Beispiel #1
0
        private static FightState GetCurrentFightStateBalanced()
        {
            FightState fightState = FightState.WAIT;

            if (GameBeginning)
            {
                return(GameBeginningDecision());
            }

            if (EnemyCharacterHandling.IsAnEnemyOnOurSide())
            {
                fightState = EnemyIsOnOurSideDecision();
            }
            else if (StaticValues.Player.Mana >= GameHandling.Settings.ManaTillAttack || AttackMode)
            {
                if (EnemyCharacterHandling.EnemiesWithoutTower.Count() > 2) // ToDo: CHeck more (Health, Damage etc)
                {
                    fightState = EnemyHasCharsOnTheFieldDecision();
                }
                else
                {
                    fightState = AttackDecision();
                }
            }

            Logger.Debug("FightSate = {0}", fightState.ToString());
            return(fightState);
        }
Beispiel #2
0
        private static FightState GameBeginningDecision()
        {
            if (StaticValues.Player.Mana < GameHandling.Settings.ManaTillFirstAttack)
            {
                if (EnemyCharacterHandling.IsAnEnemyOnOurSide())
                {
                    GameBeginning = false;
                }

                return(FightState.START);
            }
            else
            {
                GameBeginning = false;

                if (PlaygroundPositionHandling.IsPositionOnTheRightSide(EnemyCharacterHandling.NearestEnemy.StartPosition))
                {
                    return(FightState.DRPT);
                }
                else
                {
                    return(FightState.DLPT);
                }
            }
        }
Beispiel #3
0
 private static FightState GetCurrentFightStateRusher()
 {
     if (EnemyCharacterHandling.IsAnEnemyOnOurSide())
     {
         return(EnemyIsOnOurSideDecision());
     }
     else
     {
         return(AttackDecision());
     }
 }
Beispiel #4
0
        private static FightState GetCurrentFightStateDefensive()
        {
            if (GameBeginning)
            {
                return(GameBeginningDecision());
            }

            if (EnemyCharacterHandling.IsAnEnemyOnOurSide())
            {
                return(EnemyIsOnOurSideDecision());
            }
            else if (EnemyCharacterHandling.EnemiesWithoutTower.Count() > 1)
            {
                return(EnemyHasCharsOnTheFieldDecision());
            }
            else
            {
                return(DefenseDecision());
            }
        }