/* * ItemEntry instance may be overrided by a few unique items * * if item is equiped by attacker and hit target. */ public static bool AttackBy(ItemEntity item, Actor target, Actor attacker, float jumpCoeff) { if( item != null ) { return item.AttackBy(target, attacker, jumpCoeff); } else { int dmg = attacker.CalcurateAttackDamage(item, target, ElementType.ET_Physical, jumpCoeff); if( dmg > 0 ) { GUIManager.GetManager().Message(target.charName + " に " + dmg + " の ダメージあたえた!" ); return target.ApplyDamage(dmg); } else { GUIManager.GetManager().Message(target.charName + " に ダメージをあたえられない!" ); return true; } } }
/* * ItemEntry instance may be overrided by a few unique items * * if item is equiped by attacker and hit target. */ public virtual bool AttackBy(Actor target, Actor attacker, float jumpCoeff) { int dmg = attacker.CalcurateAttackDamage(this, target, ElementType.ET_Physical, jumpCoeff); if( dmg > 0 ) { GUIManager.GetManager().Message(target.charName + " に " + dmg + " の ダメージあたえた!" ); _TestStatusApply(target); return target.ApplyDamage(dmg); } else { GUIManager.GetManager().Message(target.charName + " に ダメージをあたえられない!" ); return true; } }