Beispiel #1
0
	INT CombatCore_T::NearDamage( Obj_Character& rMe, Obj_Character& rTar, INT nAdditionAttack/*=0*/, INT nAdditionDefence/*=0*/ )
	{
		__ENTER_FUNCTION

		INT nAttack = Attr_VerifyGeneralAttack(rMe.GetAttackNear()+nAdditionAttack);
		INT nDefence = Attr_VerifyDefence(rTar.GetDefenceNear()+nAdditionDefence);
		INT	nDamage;
		nDamage = NormalDamage(rTar, nAttack, nDefence, IATTRIBUTE_SHIELD_NEAR );

		INT iResist =  rTar.GetNearAttReduce();
		nDamage = GetFinalDamages(nDamage, iResist);

		return nDamage;
		__LEAVE_FUNCTION
		return 0;
	}
Beispiel #2
0
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();
}