示例#1
0
bool IsBeneficialSpell(uint16 spell_id)
{
	if(!IsValidSpell(spell_id))
		return false;

	if(spells[spell_id].goodEffect == 1){
		SpellTargetType tt = spells[spell_id].targettype;
		if(tt != ST_Self && tt != ST_Pet){
			if(IsEffectInSpell(spell_id, SE_CancelMagic))
				return false;
		}		
		if(tt == ST_Target || tt == ST_AETarget || tt == ST_Animal || tt == ST_Undead || tt == ST_Pet) {
			uint16 sai = spells[spell_id].SpellAffectIndex;
			if(spells[spell_id].resisttype == RESIST_MAGIC){
				if(sai == SAI_Calm || sai == SAI_Dispell_Sight || sai == SAI_Memory_Blur || sai == SAI_Calm_Song)
					return false;
			}else{
				// Bind Sight and Cast Sight
				if(sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 && !IsEffectInSpell(spell_id, SE_VoiceGraft))
					return false;
			}
		}
	}
	return spells[spell_id].goodEffect != 0 || IsGroupSpell(spell_id);
}
示例#2
0
bool IsSummonPetSpell(uint16 spell_id)
{
	return
	(
		IsEffectInSpell(spell_id, SE_SummonPet) ||
		IsEffectInSpell(spell_id, SE_SummonBSTPet)
	);
}
示例#3
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsMaloSpell(int16 spell_id) {
	if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SE_ResistFire) && IsEffectInSpell(spell_id, SE_ResistCold) && IsEffectInSpell(spell_id, SE_ResistPoison) && IsEffectInSpell(spell_id, SE_ResistMagic)){
		return true;
	}
	else {
		return false;
	}
}
示例#4
0
bool IsSummonPetSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_SummonPet) ||
			IsEffectInSpell(spell_id, SE_SummonBSTPet))
		return true;

	return false;
}
示例#5
0
bool IsLDoNObjectSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_AppraiseLDonChest) ||
			IsEffectInSpell(spell_id, SE_DisarmLDoNTrap) ||
			IsEffectInSpell(spell_id, SE_UnlockLDoNChest))
		return true;

	return false;
}
示例#6
0
bool IsSelfConversionSpell(uint16 spell_id)
{
	if (GetSpellTargetType(spell_id) == ST_Self && IsEffectInSpell(spell_id, SE_CurrentMana) &&
			IsEffectInSpell(spell_id, SE_CurrentHP) && spells[spell_id].base[GetSpellEffectIndex(spell_id, SE_CurrentMana)] > 0 &&
			spells[spell_id].base[GetSpellEffectIndex(spell_id, SE_CurrentHP)] < 0)
		return true;
	else
		return false;
}
示例#7
0
bool IsDebuffSpell(uint16 spell_id) {

        if(IsBeneficialSpell(spell_id) || IsEffectHitpointsSpell(spell_id) || IsStunSpell(spell_id) || IsMezSpell(spell_id) 
			|| IsCharmSpell(spell_id) || IsSlowSpell(spell_id) || IsEffectInSpell(spell_id, SE_Root) || IsEffectInSpell(spell_id, SE_CancelMagic)
			|| IsEffectInSpell(spell_id, SE_MovementSpeed) || IsFearSpell(spell_id) || IsEffectInSpell(spell_id, SE_Calm))
                return false;
        else
                return true;
}
示例#8
0
bool IsResistDebuffSpell(uint16 spell_id) {

        if((IsEffectInSpell(spell_id, SE_ResistFire) || IsEffectInSpell(spell_id, SE_ResistCold) || IsEffectInSpell(spell_id, SE_ResistPoison)
			 || IsEffectInSpell(spell_id, SE_ResistDisease) || IsEffectInSpell(spell_id, SE_ResistMagic) || IsEffectInSpell(spell_id, SE_ResistAll)
			 || IsEffectInSpell(spell_id, SE_ResistCorruption)) && !IsBeneficialSpell(spell_id))
                return true;
        else
                return false;
}
示例#9
0
bool IsPartialCapableSpell(uint16 spell_id)
{
	if(IsPureNukeSpell(spell_id) || 
		IsFearSpell(spell_id) || 
		IsEffectInSpell(spell_id, SE_Root) || 
		IsEffectInSpell(spell_id, SE_Charm))
	{
		return true;
	}

	return false;
}
示例#10
0
bool IsSuccorSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_Succor))
		return true;

	return false;
}
示例#11
0
bool IsHealOverTimeSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_HealOverTime) && !IsGroupSpell(spell_id))
		return true;

	return false;
}
示例#12
0
// seveian 2008-09-23
bool IsPlayerIllusionSpell(uint16 spell_id) {
	if(IsEffectInSpell(spell_id, SE_Illusion) && spells[spell_id].targettype == ST_Self)
		return true;
	else
		return false;

}
示例#13
0
bool IsGateSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_Gate))
		return true;

	return false;
}
示例#14
0
bool IsCompleteHealSpell(uint16 spell_id) {
	
	if(spell_id == 13 || IsEffectInSpell(spell_id, SE_CompleteHeal) || IsPercentalHealSpell(spell_id) && !IsGroupSpell(spell_id))
		return true;
	else
		return false;
}
示例#15
0
bool IsShadowStepSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_ShadowStep))
		return true;

	return false;
}
示例#16
0
bool IsTeleportSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_Teleport))
		return true;

	return false;
}
示例#17
0
bool IsDeathSaveSpell(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_DeathSave))
		return true;

	return false;
}
示例#18
0
bool IsAllianceSpellLine(uint16 spell_id)
{
	if (IsEffectInSpell(spell_id, SE_AddFaction))
		return true;

	return false;
}
示例#19
0
bool IsAllianceSpellLine(uint16 spell_id) {
	bool Result = false;

	if(IsValidSpell(spell_id))
		Result = IsEffectInSpell(spell_id, SE_AddFaction);

	return Result;
}
示例#20
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsDispellSpell(int16 spell_id) {
	if (IsEffectInSpell(spell_id, SE_CancelMagic)){
		return true;
	}
	else {
		return false;
	}
}
示例#21
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsSuccorSpell(int16 spell_id) {
	if (IsEffectInSpell(spell_id, SE_Succor)){
		return true;
	}
	else {
		return false;
	}
}
示例#22
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsTeleportSpell(int16 spell_id) {
	if (IsEffectInSpell(spell_id, SE_Teleport)){
		return true;
	}
	else {
		return false;
	}
}
示例#23
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsSnareSpell(int16 spell_id) {
	if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SE_MovementSpeed)){
		return true;
	}
	else {
		return false;
	}
}
示例#24
0
bool IsDeathSaveSpell(uint16 spell_id) {
	bool Result = false;

	if(IsValidSpell(spell_id))
		Result = IsEffectInSpell(spell_id, SE_DeathSave);

	return Result;
}
示例#25
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsGateSpell(int16 spell_id) {
	if (IsEffectInSpell(spell_id, SE_Gate)){
		return true;
	}
	else {
		return false;
	}
}
示例#26
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsRootSpell(int16 spell_id) {
	if (IsEffectInSpell(spell_id, SE_Root)){
		return true;
	}
	else {
		return false;
	}
}
示例#27
0
文件: spdat.cpp 项目: Xackery/provztz
bool IsPoisonSpell(int16 spell_id) {
	if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SE_PoisonCounter)){
		return true;
	}
	else {
		return false;
	}
}
示例#28
0
// checks if this spell can be targeted
bool IsTGBCompatibleSpell(uint16 spell_id)
{
	if (IsValidSpell(spell_id) &&
			(!IsDetrimentalSpell(spell_id) && spells[spell_id].buffduration != 0 &&
			 !IsBardSong(spell_id) && !IsEffectInSpell(spell_id, SE_Illusion)))
		return true;

	return false;
}
示例#29
0
bool IsBeneficialSpell(uint16 spell_id)
{
	if (!IsValidSpell(spell_id))
		return false;

	// You'd think just checking goodEffect flag would be enough?
	if (spells[spell_id].goodEffect == 1) {
		// If the target type is ST_Self or ST_Pet and is a SE_CancleMagic spell
		// it is not Beneficial
		SpellTargetType tt = spells[spell_id].targettype;
		if (tt != ST_Self && tt != ST_Pet &&
				IsEffectInSpell(spell_id, SE_CancelMagic))
			return false;

		// When our targettype is ST_Target, ST_AETarget, ST_Aniaml, ST_Undead, or ST_Pet
		// We need to check more things!
		if (tt == ST_Target || tt == ST_AETarget || tt == ST_Animal ||
				tt == ST_Undead || tt == ST_Pet) {
			uint16 sai = spells[spell_id].SpellAffectIndex;

			// If the resisttype is magic and SpellAffectIndex is Calm/memblur/dispell sight
			// it's not beneficial
			if (spells[spell_id].resisttype == RESIST_MAGIC) {
				if (sai == SAI_Calm || sai == SAI_Dispell_Sight ||
						sai == SAI_Memory_Blur || sai == SAI_Calm_Song)
					return false;
			} else {
				// If the resisttype is not magic and spell is Bind Sight or Cast Sight
				// It's not beneficial
				if (sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 &&
						!IsEffectInSpell(spell_id, SE_VoiceGraft))
					return false;
			}
		}
	}

	// And finally, if goodEffect is not 0 or if it's a group spell it's beneficial
	return spells[spell_id].goodEffect != 0 || IsGroupSpell(spell_id);
}
示例#30
0
bool IsPureNukeSpell(uint16 spell_id)
{
	int i, effect_count = 0;

	if (!IsValidSpell(spell_id))
		return false;

	for (i = 0; i < EFFECT_COUNT; i++)
		if (!IsBlankSpellEffect(spell_id, i))
			effect_count++;

	if (effect_count == 1 && IsEffectInSpell(spell_id, SE_CurrentHP) &&
			spells[spell_id].buffduration == 0 && IsDamageSpell(spell_id))
		return true;

	return false;
}