Exemple #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);
        }
        public static Vector2f GetPositionOfTheBestDamagingSpellDeploy()
        {
            // Prio1: Hit Enemy King Tower if health is low
            // Prio2: Every damaging spell if there is a big group of enemies

            if (EnemyCharacterHandling.EnemyKingTower.HealthComponent.CurrentHealth < GameHandling.Settings.KingTowerSpellDamagingHealth)
            {
                return(EnemyCharacterHandling.EnemyKingTower.StartPosition);
            }
            else
            {
                int       count;
                Character enemy = EnemyCharacterHandling.EnemyCharacterWithTheMostEnemiesAround(out count);

                if (enemy != null)
                {
                    if (PlayerCharacterHandling.HowManyCharactersAroundCharacter(enemy) >= GameHandling.Settings.SpellCorrectionConditionCharCount)
                    {
                        return(enemy.StartPosition);
                    }
                    else
                    {
                        // Position Correction
                        return(PositionHelper.AddYInDirection(enemy.StartPosition, PlayerProperties.PlayerPosition, 4000));
                    }
                }
            }

            return(Vector2f.Zero);
        }
Exemple #3
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);
                }
            }
        }
Exemple #4
0
 private static FightState GetCurrentFightStateRusher()
 {
     if (EnemyCharacterHandling.IsAnEnemyOnOurSide())
     {
         return(EnemyIsOnOurSideDecision());
     }
     else
     {
         return(AttackDecision());
     }
 }
        public static bool IsAOEAttackNeeded()
        {
            int biggestEnemieGroupCount;

            Engine.NativeObjects.Logic.GameObjects.Character @char =
                EnemyCharacterHandling.EnemyCharacterWithTheMostEnemiesAround(out biggestEnemieGroupCount);

            if (biggestEnemieGroupCount > 3)
            {
                return(true);
            }

            return(false);
        }
        public static bool DamagingSpellDecision()
        {
            int count = 0;

            EnemyCharacterHandling.EnemyCharacterWithTheMostEnemiesAround(out count);

            /*
             * Logger.Debug("enemyWhithTheMostEnemiesAround-Count: {count} enemy-Name {name}", count
             *           , enemy.LogicGameObjectData.Name.Value);
             */
            if (count > 4)
            {
                return(true);
            }

            return(false);
        }
Exemple #7
0
        private static FightState DefenseDecision()
        {
            if (CurrentEnemyPrincessTowerState > 0)
            {
                return(FightState.DKT);
            }

            Character princessTower = EnemyCharacterHandling.GetEnemyPrincessTowerWithLowestHealth(StaticValues.Player.OwnerIndex);

            if (PlaygroundPositionHandling.IsPositionOnTheRightSide(princessTower.StartPosition))
            {
                return(FightState.DRPT);
            }
            else
            {
                return(FightState.DLPT);
            }
        }
Exemple #8
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());
            }
        }
 public static bool IsFlyingAttackNeeded()
 {
     return(EnemyCharacterHandling.IsFlyingEnemyOnTheField());
 }