Exemple #1
0
    public static List <BattleAttackInfo> GetAttackInfo(CharacterLogic player, CharacterLogic enemy)
    {
        List <BattleAttackInfo> r = new List <BattleAttackInfo>();
        var atkA           = player.Info.Attribute;
        var defA           = enemy.Info.Attribute;
        BattleAttackInfo i = new BattleAttackInfo(player, enemy);

        i.Process();
        r.Add(i);
        if (IsDead(i, enemy) == false && IsCounterAttack(player, enemy))
        {
            BattleAttackInfo j = new BattleAttackInfo(enemy, player);
            j.Process();
            r.Add(j);
        }
        return(r);
    }
Exemple #2
0
 public static bool IsDead(BattleAttackInfo info, CharacterLogic logic)
 {
     return(info.hit && logic.GetCurrentHP() < info.damageToDefender);
 }