Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public static bool IsAOEAttackNeeded()
        {
            int biggestEnemieGroupCount;

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

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

            return(false);
        }
Ejemplo n.º 3
0
        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);
        }