本文整理汇总了C++中Obj_Character::GetDefenceWood方法的典型用法代码示例。如果您正苦于以下问题:C++ Obj_Character::GetDefenceWood方法的具体用法?C++ Obj_Character::GetDefenceWood怎么用?C++ Obj_Character::GetDefenceWood使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_Character
的用法示例。
在下文中一共展示了Obj_Character::GetDefenceWood方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WoodDamage
INT CombatCore_T::WoodDamage(Obj_Character& rMe,Obj_Character& rTar, INT nAdditionalAttack, INT nAdditionalResist)
{
INT nDamage;
INT nAttack = Attr_VerifyTraitAttack(rMe.GetAttackWood()+nAdditionalAttack);
INT nResist = Attr_VerifyResist(rTar.GetDefenceWood()+nAdditionalResist);
nDamage = AttrDamage(rMe, nResist, nAttack, IATTRIBUTE_SHIELD_WOOD);
INT nIgnoreRate = 0;
if(Obj::OBJ_TYPE_HUMAN==rTar.GetObjType())
{
nIgnoreRate= (INT)(rTar.ItemValue(IATTRIBUTE_RATE_WOOD_ATT_REDUCE).m_Value);
}
nDamage = nDamage*(100.0-((double)nIgnoreRate))/100.0f;
return nDamage;
}
示例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();
}