Пример #1
0
        public override bool fight(ControllableBoardObject target)
        {
            if (!TookAction && target.Coords.isInRange(1, Coords)) {
                bool dead = target.takeDamage(AttackPower);
                if (dead && target.isAnt() && isEnemy(target as Ant)) {
                    Owner.Points++;
                    Owner.KillCount++;
                }
                TookAction = true;
                return true;
            }

            return false;
        }
Пример #2
0
        public override bool fight(ControllableBoardObject target)
        {
            if (!TookAction && target.Coords.isInRange(1, Coords))
            {
                bool dead = target.takeDamage(AttackPower);
                if (dead && target.isAnt() && isEnemy(target as Ant))
                {
                    Owner.Points++;
                    Owner.KillCount++;
                }
                TookAction = true;
                return(true);
            }

            return(false);
        }