本文整理汇总了C++中Obj_Character::GetDefenceMagicFar方法的典型用法代码示例。如果您正苦于以下问题:C++ Obj_Character::GetDefenceMagicFar方法的具体用法?C++ Obj_Character::GetDefenceMagicFar怎么用?C++ Obj_Character::GetDefenceMagicFar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_Character
的用法示例。
在下文中一共展示了Obj_Character::GetDefenceMagicFar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MagicalFarDamage
INT CombatCore_T::MagicalFarDamage(Obj_Character& rMe, Obj_Character& rTar, INT nAdditionAttack, INT nAdditionDefence)
{
__ENTER_FUNCTION
INT nDamage;
INT nAttack = Attr_VerifyGeneralAttack(rMe.GetAttackMagicFar()+nAdditionAttack);
INT nDefence = Attr_VerifyDefence(rTar.GetDefenceMagicFar()+nAdditionDefence);
nDamage = NormalDamage(rTar, nAttack, nDefence, IATTRIBUTE_SHIELD_MAGIC_FAR);
INT iResist = rTar.GetMagicFarAttReduce();
nDamage = GetFinalDamages(nDamage, iResist);
return nDamage;
__LEAVE_FUNCTION
return 0;
}
示例2:
VOID StdImpact069_T::FinalDamage( INT * vDamage, Obj_Character &rMe ) const
{
vDamage[DAMAGE_TYPE_NEAR] -= rMe.GetDefenceNear();
if( rMe.GetNearAttReduce() != 0 )
vDamage[DAMAGE_TYPE_NEAR] /= rMe.GetNearAttReduce();
vDamage[DAMAGE_TYPE_FAR] -= rMe.GetDefenceFar();
if( rMe.GetNearAttReduce() != 0 )
vDamage[DAMAGE_TYPE_FAR] /= rMe.GetFarAttReduce();
vDamage[DAMAGE_TYPE_MAGIC_NEAR] -= rMe.GetDefenceMagicNear();
if( rMe.GetNearAttReduce() != 0 )
vDamage[DAMAGE_TYPE_MAGIC_NEAR] /= rMe.GetMagicNearAttReduce();
vDamage[DAMAGE_TYPE_MAGIC_FAR] -= rMe.GetDefenceMagicFar();
if( rMe.GetFarAttReduce() != 0 )
vDamage[DAMAGE_TYPE_MAGIC_FAR] /= rMe.GetMagicFarAttReduce();
vDamage[DAMAGE_TYPE_GOLD] -= rMe.GetDefenceGold();
vDamage[DAMAGE_TYPE_WOOD] -= rMe.GetDefenceWood();
vDamage[DAMAGE_TYPE_WATER] -= rMe.GetDefenceWater();
vDamage[DAMAGE_TYPE_FIRE] -= rMe.GetDefenceFire();
vDamage[DAMAGE_TYPE_SOIL] -= rMe.GetDefenceSoil();
}