Пример #1
0
        private static FightState GetCurrentFightStateDefensive(Playfield p)
        {
            if (GameBeginning)
            {
                return(Decision.GameBeginningDecision(p, out GameBeginning));
            }

            if (!p.noEnemiesOnMySide())
            {
                return(Decision.EnemyIsOnOurSideDecision(p));
            }
            else if (p.enemyMinions.Count > 1)
            {
                return(Decision.EnemyHasCharsOnTheFieldDecision(p));
            }
            else
            {
                return(Decision.DefenseDecision(p));
            }
        }
Пример #2
0
        private static FightState GetCurrentFightStateBalanced(Playfield p)
        {
            FightState fightState = FightState.WAIT;

            if (GameBeginning)
            {
                StartLoadedDeploy = false;
                return(Decision.GameBeginningDecision(p, out GameBeginning));
            }

            int dangerOrAttackLine = Decision.DangerOrBestAttackingLine(p);

            if (dangerOrAttackLine < 0)
            {
                Logger.Debug("Danger");
                StartLoadedDeploy = false;
                fightState        = Decision.DangerousSituationDecision(p, dangerOrAttackLine * (-1));
            }
            else if (dangerOrAttackLine > 0)
            {
                Logger.Debug("Chance");
                StartLoadedDeploy = false;
                fightState        = Decision.GoodAttackChanceDecision(p, dangerOrAttackLine);
            }
            else
            {
                if (p.ownMana >= Setting.ManaTillDeploy)
                {
                    StartLoadedDeploy = true;
                    fightState        = Decision.DefenseDecision(p);
                }

                if (StartLoadedDeploy)
                {
                    fightState = Decision.DefenseDecision(p);
                }
            }

            //Logger.Debug("FightSate = {0}", fightState.ToString());
            return(fightState);
        }