Пример #1
0
        public bool BeginSteppedCombat(Player attacker, Player defender)
        {
            if (attacker==null || defender==null) return false;

            if (steppedCombat == null)
            {
                steppedCombat = new Combat(attacker, defender);
                steppedCombat.InitCombat(combatOptions);
            }

            return true;
        }
Пример #2
0
        public Result FightAll(Player attacker, int repeatCombat)
        {
            Result resultado = new Result();
            resultado.Attacker = attacker;

            foreach (Player defender in this.oponentes)
            {
                if (attacker.Id == defender.Id) continue;
                Combat combat = new Combat(attacker.Clone(), defender.Clone(), repeatCombat);
                resultado.Record(combat.Resolve(combatOptions));
            }

            return resultado;
        }