Beispiel #1
0
        private int GetTowerActualHurtValue(AttackPropertyType type, int hurtValue)
        {
            int value = 0;

            if (type == AttackPropertyType.PhysicalAttack)
            {
                value = Formula.ActuallyPhysicalDamage(hurtValue, physicalResistance);
            }
            //else if ( type == HurtType.MagicAttack )
            //{
            //	value = (int)( hurtValue / ( magicResistance / 100 + 1 ) );
            //}
            else
            {
                DebugUtils.LogError(DebugUtils.Type.AI_Tower, string.Format("Can't handle this hurtType {0} now!", type));
            }

            return(value);
        }
Beispiel #2
0
        protected int GetActualHurtValue(AttackPropertyType type, int hurtValue)
        {
            int value = 0;

            if (type == AttackPropertyType.PhysicalAttack)
            {
                value = Formula.ActuallyPhysicalDamage(hurtValue, armor);
            }
            else if (type == AttackPropertyType.MagicAttack)
            {
                value = Formula.ActuallyMagicDamage(hurtValue, magicResist);
            }
            else
            {
                DebugUtils.LogError(DebugUtils.Type.AI_Npc, string.Format("Can't handle this hurtType {0} now!", type));
            }

            return(value);
        }
Beispiel #3
0
        private int GetInstituteActualHurtValue(AttackPropertyType type, int hurtValue)
        {
            int value = 0;

            if (type == AttackPropertyType.PhysicalAttack)
            {
                value = Formula.ActuallyPhysicalDamage(hurtValue, physicalResistance);
            }
            //Building can't be magicAttack( design ),When we need open here
            //else if ( type == HurtType.MagicAttack )
            //{
            //	value = (int)( hurtValue / ( magicResistance / 100 + 1 ) );
            //}
            else
            {
                DebugUtils.LogError(DebugUtils.Type.Building, string.Format("Can't handle this hurtType {0} now!", type));
            }

            return(value);
        }