本文整理汇总了C++中OWN_IMPACT::SetImpactID方法的典型用法代码示例。如果您正苦于以下问题:C++ OWN_IMPACT::SetImpactID方法的具体用法?C++ OWN_IMPACT::SetImpactID怎么用?C++ OWN_IMPACT::SetImpactID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWN_IMPACT
的用法示例。
在下文中一共展示了OWN_IMPACT::SetImpactID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetResultImpact
//.........这里部分代码省略.........
//Calculate Damages
//Near
nDamage = NearDamage(rAttacker, rDefencer, m_nAdditionalAttackNear, m_nAdditionalDefenceNear);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageNear(rImp, nDamage);
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_NEAR;
//Far
nDamage = FarDamage(rAttacker, rDefencer, m_nAdditionalAttackFar, m_nAdditionalDefenceFar);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageFar(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_FAR;
}
//近程内功
nDamage = MagicalNearDamage(rAttacker, rDefencer, m_nAdditionalAttackMagicNear, m_nAdditionalDefenceMagicNear);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageMagicNear(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_MAGIC_NEAR;
}
//近程外功
nDamage = MagicalFarDamage(rAttacker, rDefencer, m_nAdditionalAttackMagicFar, m_nAdditionalDefenceMagicFar);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageMagicFar(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_MAGIC_FAR;
}
//Gold
nDamage = GoldDamage(rAttacker, rDefencer, m_nAdditionalAttackGold, m_nAdditionalDefenceGold);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageGold(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_GOLD;
}
//Wood
nDamage = WoodDamage(rAttacker, rDefencer, m_nAdditionalAttackWood, m_nAdditionalDefenceWood);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageWood(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_WOOD;
}
//Water
nDamage = WaterDamage(rAttacker, rDefencer, m_nAdditionalAttackWater, m_nAdditionalDefenceWater);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageWater(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_WATER;
}
//Fire
nDamage = FireDamage(rAttacker, rDefencer, m_nAdditionalAttackFire, m_nAdditionalDefenceFire);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageFire(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_FIRE;
}
//Soil
nDamage = SoilDamage(rAttacker, rDefencer, m_nAdditionalAttackSoil, m_nAdditionalDefenceSoil);
// Refix damage with fluctuation
nDamage = nDamage + nDamage*nFluctuation/100;
logicDamages.SetDamageSoil(rImp, nDamage);
if(nMaxDamage<nDamage)
{
nMaxDamage = nDamage;
nSpecialEffectID = DAMAGE_SPECIAL_EFFECT_SOIL;
}
rImp.SetImpactID(nSpecialEffectID);
return TRUE;
__LEAVE_FUNCTION
return FALSE;
}