Beispiel #1
0
            public void Execute()
            {
                GameAI ai = GetTestGameAI();

                ActualBestMove = ai.GetBestMove(gameBoard, maxDepth, 0);
                Assert.AreEqual(ExpectedBestMove, ActualBestMove);
            }
Beispiel #2
0
        public OldSchoolExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.Activate, 19613556, DefaultHeavyStorm);
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Activate, 53129443, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, 26412047, DefaultHammerShot);
            AddExecutor(ExecutorType.Activate, 66788016);
            AddExecutor(ExecutorType.Activate, 72302403, SwordsOfRevealingLight);
            AddExecutor(ExecutorType.Activate, 43422537, DoubleSummon);

            AddExecutor(ExecutorType.Summon, 83104731, DefaultTributeSummon);
            AddExecutor(ExecutorType.Summon, 6631034, DefaultTributeSummon);
            AddExecutor(ExecutorType.SummonOrSet, 43096270);
            AddExecutor(ExecutorType.SummonOrSet, 69247929);
            AddExecutor(ExecutorType.MonsterSet, 30190809);
            AddExecutor(ExecutorType.SummonOrSet, 77542832);
            AddExecutor(ExecutorType.SummonOrSet, 11091375);
            AddExecutor(ExecutorType.SummonOrSet, 35052053);
            AddExecutor(ExecutorType.SummonOrSet, 49881766);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, 44095762, DefaultTrap);
            AddExecutor(ExecutorType.Activate, 70342110, DefaultTrap);
        }
Beispiel #3
0
        public RMasterExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.Activate, CardId.PotOfGreed);

            AddExecutor(ExecutorType.SpSummon, CardId.CyberDragon);

            AddExecutor(ExecutorType.Summon, CardId.SnipeHunter);
            AddExecutor(ExecutorType.Summon, CardId.ExiledForce);

            AddExecutor(ExecutorType.MonsterSet, CardId.Krawler);

            AddExecutor(ExecutorType.Summon, CardId.Avram);
            AddExecutor(ExecutorType.Summon, CardId.Alexandrite);
            AddExecutor(ExecutorType.Summon, CardId.Luster);
            AddExecutor(ExecutorType.Summon, CardId.Sabersaurus);
            AddExecutor(ExecutorType.Summon, CardId.Artorigus);
            AddExecutor(ExecutorType.MonsterSet, CardId.Snowman);

            AddExecutor(ExecutorType.SpSummon, CardId.Tricky);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, CardId.StopDefence, ActivateStopDefence);
            AddExecutor(ExecutorType.Activate, CardId.BlockAttack, ActivateBlockAttack);
            AddExecutor(ExecutorType.Activate, CardId.SnipeHunter, ActivateExiledForce);
            AddExecutor(ExecutorType.Activate, CardId.ExiledForce, ActivateExiledForce);
            AddExecutor(ExecutorType.Activate, CardId.Krawler, ActivateExiledForce);
            AddExecutor(ExecutorType.Activate, CardId.Snowman, ActivateExiledForce);
        }
Beispiel #4
0
 protected virtual async void CallPowerOptions()
 {
     await Task.Run(() =>
     {
         SendPowerOptionChoice(GameAI.PowerOptions(_poGame, PowerOptions.PowerOptionList));
     });
 }
Beispiel #5
0
        private void InitAI()
        {
            _gameAI = Config.GetGameAI(_gameBoard.ExpansionPieces);
            _gameAI.BestMoveFound += OnBestMoveFound;

            ResetAI(false);
        }
Beispiel #6
0
 protected Executor(GameAI ai, Duel duel)
 {
     Duel = duel;
     AI = ai;
     Executors = new List<CardExecutor>();
     CurrentChain = new List<ClientCard>();
 }
    public override void StartCommunicationWithPlayer(Player player, GameAI ai, string message)
    {
        if (timeToWait <= 0)
        {
            //default to 10 seconds wait time
            timeToWait = 10.0f;
        }

        InitializeChannelFields(player, ai);

        player.FreezePlayer();

        //change this in derived class if you want text input.
        CreateTextBoxes(withPlayerWordBox: false, withContinuePrompt: true);

        if (aiTextBox == null)
        {
            Debug.LogError("Could not find one of the text boxes for game AI to use.");
        }

        SplitMessageIntoLines(message);
        DisplayNextLine();

        //record initial position of the player
        initialPlayerPos = player.transform.localPosition;
    }
Beispiel #8
0
        public HorusExecutor(GameAI ai, Duel duel) : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, (int)CardId.HorusTheBlackFlameDragonLv6);
            AddExecutor(ExecutorType.Activate, (int)CardId.StampingDestruction, DefaultStampingDestruction);
            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.FoolishBurial, FoolishBurial);
            AddExecutor(ExecutorType.Activate, (int)CardId.Mountain, DefaultField);
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.HammerShot, DefaultHammerShot);
            AddExecutor(ExecutorType.Activate, (int)CardId.Fissure);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.BellowOfTheSilverDragon, BellowOfTheSilverDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.MonsterReborn, MonsterReborn);

            AddExecutor(ExecutorType.Summon, (int)CardId.WhiteNightDragon, WhiteNightDragon);
            AddExecutor(ExecutorType.Summon, (int)CardId.HorusTheBlackFlameDragonLv6, DefaultTributeSummon);
            AddExecutor(ExecutorType.Summon, (int)CardId.AlexandriteDragon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.AxeDragonute);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.DodgerDragon);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.GolemDragon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.LusterDragon);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.HorusTheBlackFlameDragonLv8, HorusTheBlackFlameDragonLv8);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonsRebirth, DragonsRebirth);
        }
Beispiel #9
0
 void Awake()
 {
     gameCanvas = GameObject.Find("Canvas");
     ai         = null;
     player     = null;
     enabled    = false;
 }
        public LightswornExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫);
            AddExecutor(ExecutorType.Activate, (int)CardId.裁决之龙, DefaultDarkHole);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.裁决之龙);

            AddExecutor(ExecutorType.Activate, (int)CardId.增援, 增援效果);
            AddExecutor(ExecutorType.Activate, (int)CardId.光之援军, 光之援军效果);
            AddExecutor(ExecutorType.Activate, (int)CardId.太阳交换, 太阳交换效果);

            AddExecutor(ExecutorType.Summon, (int)CardId.哥布林德伯格, 哥布林德伯格通常召唤);

            // 常用额外
            AddExecutor(ExecutorType.SpSummon, (int)CardId.励辉士入魔蝇王, 励辉士入魔蝇王特殊召唤);
            AddExecutor(ExecutorType.Activate, (int)CardId.励辉士入魔蝇王, 励辉士入魔蝇王效果);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.辉光子帕拉迪奥斯, 辉光子帕拉迪奥斯特殊召唤);
            AddExecutor(ExecutorType.Activate, (int)CardId.辉光子帕拉迪奥斯, 辉光子帕拉迪奥斯效果);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.鸟铳士卡斯泰尔, 鸟铳士卡斯泰尔特殊召唤);
            AddExecutor(ExecutorType.Activate, (int)CardId.鸟铳士卡斯泰尔, 鸟铳士卡斯泰尔效果);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.红莲魔龙右红痕, 红莲魔龙右红痕特殊召唤);
            AddExecutor(ExecutorType.Activate, (int)CardId.红莲魔龙右红痕, 红莲魔龙右红痕效果);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.No39希望皇霍普, 电光皇特殊召唤);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.闪光No39希望皇霍普电光皇);
            AddExecutor(ExecutorType.Activate, (int)CardId.闪光No39希望皇霍普电光皇);

            AddExecutor(ExecutorType.Activate, (int)CardId.日食翼龙);
            AddExecutor(ExecutorType.Activate, (int)CardId.娱乐法师戏法小丑, 娱乐法师戏法小丑效果);
            AddExecutor(ExecutorType.Activate, (int)CardId.英豪挑战者千刀兵);
            AddExecutor(ExecutorType.Activate, (int)CardId.欧尼斯特, 欧尼斯特效果);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
        }
Beispiel #11
0
 // Token: 0x060003F8 RID: 1016 RVA: 0x00021DC4 File Offset: 0x0001FFC4
 public NiaojunExecutor(GameAI ai, Duel duel) : base(ai, duel)
 {
     base.AddExecutor(ExecutorType.Activate, 9981675, new Func <bool>(this.EyiEffect));
     base.AddExecutor(ExecutorType.Activate, 9981724, new Func <bool>(this.DefaultTorrentialTribute));
     base.AddExecutor(ExecutorType.SpSummon, 9981418, new Func <bool>(this.DijiaSummon));
     base.AddExecutor(ExecutorType.Activate, 9981418, new Func <bool>(this.DijiaEffect));
     base.AddExecutor(ExecutorType.Activate, 9982053, new Func <bool>(this.PohuaijianEffect));
     base.AddExecutor(ExecutorType.SpSummon, 9982055);
     base.AddExecutor(ExecutorType.Activate, 9982055, new Func <bool>(this.PohuaijianzhanshiEffect));
     base.AddExecutor(ExecutorType.SpSummon, 9950484);
     base.AddExecutor(ExecutorType.Activate, 9950484, new Func <bool>(this.ZuihuopuEffect));
     base.AddExecutor(ExecutorType.Summon, 9951605, new Func <bool>(this.ShuizhaoSummon));
     base.AddExecutor(ExecutorType.Activate, 9951605, new Func <bool>(this.ShuizhaoEffect));
     base.AddExecutor(ExecutorType.Activate, 9950697);
     base.AddExecutor(ExecutorType.Activate, 9951558);
     base.AddExecutor(ExecutorType.Activate, 9981632, new Func <bool>(this.DDzhanshouEffect));
     base.AddExecutor(ExecutorType.Activate, 9982077, new Func <bool>(this.DSEffect));
     base.AddExecutor(ExecutorType.Activate, 9982377, new Func <bool>(this.JiushifangzhouEffect));
     base.AddExecutor(ExecutorType.Activate, 9982051, new Func <bool>(this.PohuaijianxietongEffect));
     base.AddExecutor(ExecutorType.Activate, 9981725);
     base.AddExecutor(ExecutorType.Activate, 50954680, new Func <bool>(this.ZuihuopuEffect));
     base.AddExecutor(ExecutorType.Activate, 8824601, new Func <bool>(this.IEffect));
     base.AddExecutor(ExecutorType.Activate, 8824602, new Func <bool>(this.IEffect));
     base.AddExecutor(ExecutorType.Activate, 8824590, new Func <bool>(this.HundunjuheEffect));
     base.AddExecutor(ExecutorType.Activate, 9980715);
     base.AddExecutor(ExecutorType.Activate, 8824591);
     base.AddExecutor(ExecutorType.Activate, 8824594, new Func <bool>(this.X9Effect));
     base.AddExecutor(ExecutorType.Activate, 8824596, new Func <bool>(this.X11Effect));
     base.AddExecutor(ExecutorType.Activate, 8824598, new Func <bool>(this.X13Effect));
     base.AddExecutor(ExecutorType.Activate, 8824584);
     base.AddExecutor(ExecutorType.Repos, new Func <bool>(base.DefaultMonsterRepos));
     base.AddExecutor(ExecutorType.SpellSet, new Func <bool>(base.DefaultSpellSet));
 }
 public DinocarriageDynarmixExecutor(GameAI ai, Duel duel)
     : base(ai, duel)
 {
     AddExecutor(ExecutorType.SpSummon, CardId.大恐龙驾, MAXsummon);
     AddExecutor(ExecutorType.Activate, CardId.大恐龙驾, 大恐龙驾Effect);
     AddExecutor(ExecutorType.Activate, CardId.成金哥布林);
     AddExecutor(ExecutorType.Activate, CardId.抑龙);
     AddExecutor(ExecutorType.Activate, CardId.成金恐龙王, 成金恐龙王Effect);
     AddExecutor(ExecutorType.Activate, CardId.机械镰刀盗龙, 机械镰刀盗龙Effect);
     AddExecutor(ExecutorType.Activate, CardId.奇迹的共进化, 奇迹的共进化Effect);
     AddExecutor(ExecutorType.Summon, CardId.巨身多角龙, DefaultMonsterSummon);
     AddExecutor(ExecutorType.Activate, CardId.超级恐龙王, 超级恐龙王Effect);
     AddExecutor(ExecutorType.Summon, CardId.机械镰刀盗龙);
     AddExecutor(ExecutorType.Summon, CardId.抑龙, 抑龙Summon);
     AddExecutor(ExecutorType.Summon, CardId.成金恐龙王, 成金恐龙王Summon);
     AddExecutor(ExecutorType.Activate, CardId.恐龙粉碎, 恐龙粉碎Effect);
     AddExecutor(ExecutorType.SummonOrSet, CardId.荒野盗龙, DefaultMonsterSummon);
     AddExecutor(ExecutorType.SummonOrSet, CardId.流雷龙, DefaultMonsterSummon);
     AddExecutor(ExecutorType.Summon, CardId.超级恐龙王, DefaultMonsterSummon);
     AddExecutor(ExecutorType.Summon, CardId.大恐龙驾L, MAXLsummon);
     AddExecutor(ExecutorType.Summon, CardId.大恐龙驾R, MAXRsummon);
     AddExecutor(ExecutorType.MonsterSet, CardId.大恐龙驾L, MAXLset);
     AddExecutor(ExecutorType.MonsterSet, CardId.大恐龙驾R, MAXRset);
     AddExecutor(ExecutorType.MonsterSet, CardId.抑龙);
     AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
     AddExecutor(ExecutorType.MonsterSet, CardId.流雷龙, monsterset);
     AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
     AddExecutor(ExecutorType.Activate, CardId.侏罗纪世界);
     AddExecutor(ExecutorType.Activate, CardId.恐力重压);
     AddExecutor(ExecutorType.Activate, CardId.超越进化, 超越进化Effect);
     AddExecutor(ExecutorType.SpellSet);
     //AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
 }
    public override void StartCommunicationWithPlayer(Player player, GameAI ai, string message)
    {
        waitTimeBeforeResponseCheck = 1.0f;
        safeToCheckResponse         = false;

        InitializeChannelFields(player, ai);

        //Do NOT restrict players movements
        //player.BeginTextCommunicationWithPlayer();

        playerCoords = player.MazeCellCoords;

        CreateTextBoxes(withPlayerWordBox: false, withContinuePrompt: false);

        if (aiTextBox == null)
        {
            Debug.LogError("Could not find one of the text boxes for game AI to use.");
        }

        if (playerPath == null)
        {
            throw new InvalidOperationException("Cannot start path comm channel with null player path. Call SetPathForPlayer() before StartCommuncationWithPlayer()");
        }

        aiTextBox.text = message;
    }
Beispiel #14
0
        public static Executor Instantiate(GameAI ai, Duel duel)
        {
            DeckInstance infos;

            string deck = ai.Game.Deck;

            if (deck != null && _decks.ContainsKey(deck))
            {
                infos = _decks[deck];
                Logger.WriteLine("Deck found, loading " + infos.Deck);
            }
            else
            {
                do
                {
                    infos = _list[_rand.Next(_list.Count)];
                }while (infos.Level != "Normal");
                Logger.WriteLine("Deck not found, loading random: " + infos.Deck);
            }

            Executor executor = (Executor)Activator.CreateInstance(infos.Type, ai, duel);

            executor.Deck = infos.Deck;
            return(executor);
        }
Beispiel #15
0
        public HorusExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, (int)CardId.HorusTheBlackFlameDragonLv6);
            AddExecutor(ExecutorType.Activate, (int)CardId.StampingDestruction, DefaultStampingDestruction);
            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.FoolishBurial, FoolishBurial);
            AddExecutor(ExecutorType.Activate, (int)CardId.Mountain, DefaultField);
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.HammerShot, DefaultHammerShot);
            AddExecutor(ExecutorType.Activate, (int)CardId.Fissure);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.BellowOfTheSilverDragon, BellowOfTheSilverDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.MonsterReborn, MonsterReborn);

            AddExecutor(ExecutorType.Summon, (int)CardId.WhiteNightDragon, WhiteNightDragon);
            AddExecutor(ExecutorType.Summon, (int)CardId.HorusTheBlackFlameDragonLv6, DefaultTributeSummon);
            AddExecutor(ExecutorType.Summon, (int)CardId.AlexandriteDragon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.AxeDragonute);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.DodgerDragon);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.GolemDragon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.LusterDragon);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.HorusTheBlackFlameDragonLv8, HorusTheBlackFlameDragonLv8);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonsRebirth, DragonsRebirth);
        }
        public void Given_1RedPieces_And_1GreenPiecesAtNotTargetPosition_Expect_GamePieceCanKickFalse()
        {
            // Arrange
            var gamePieces = new List <GamePiece>()
            {
                new GamePiece()
                {
                    Color = (GameColor)1, Number = 1, TrackPosition = 16
                },
                new GamePiece()
                {
                    Color = (GameColor)3, Number = 1, TrackPosition = 3
                }
            };

            var board = new GameBoard();

            board.UpdateTracks(gamePieces);

            var dice = new GameDice();

            dice.Result = 5;

            var aiPlayer = new GameAI(board, gamePieces, dice);

            board.UpdateTracks(gamePieces);
            // Act

            var gamePieceCanKick = aiPlayer.GamePieceCanKick(gamePieces[0]);

            // Assert
            Assert.False(gamePieceCanKick);
        }
        public void Given_1BluePiecesAt8_And_1GreenPiecesAt2_Expect_GamePieceIsThreatenedAtOriginPosTrue()
        {
            // Arrange
            var gamePieces = new List <GamePiece>()
            {
                new GamePiece()
                {
                    Color = (GameColor)0, Number = 1, TrackPosition = 1
                },                                                                    //1
                new GamePiece()
                {
                    Color = (GameColor)3, Number = 1, TrackPosition = 8
                }                                                                     //38
            };

            var board = new GameBoard();

            board.UpdateTracks(gamePieces);

            var dice = new GameDice();

            dice.Result = 2;

            var aiPlayer = new GameAI(board, gamePieces, dice);

            board.UpdateTracks(gamePieces);
            // Act

            var gamePieceIsThreatened = aiPlayer.PieceIsThreatenedAtTargetPos(gamePieces[0]);

            // Assert
            Assert.True(gamePieceIsThreatened);
        }
Beispiel #18
0
 public ServerGameState(string session, GameState sharedState, GameAI botUser)
 {
     Session     = session;
     SharedState = sharedState;
     BotUser     = botUser;
     Actions     = new List <IGameAction>();
 }
        public void Given_1RedPiecesAt6_And_1GreenPiecesAt2_Expect_GamePieceIsThreatenedOriginPosTrue()
        {
            // Arrange
            var gamePieces = new List <GamePiece>()
            {
                new GamePiece()
                {
                    Color = (GameColor)1, Number = 1, TrackPosition = 35
                },
                new GamePiece()
                {
                    Color = (GameColor)3, Number = 1, TrackPosition = 12
                }
            };

            var board = new GameBoard();

            board.UpdateTracks(gamePieces);

            var aiPlayer = new GameAI(board, gamePieces, new GameDice());

            board.UpdateTracks(gamePieces);
            // Act

            var gamePieceIsThreatened = aiPlayer.PieceIsThreatenedAtOriginPos(gamePieces[0]);

            // Assert
            Assert.True(gamePieceIsThreatened);
        }
Beispiel #20
0
 protected virtual async void CallPowerChoices()
 {
     await Task.Run(() =>
     {
         SendPowerChoicesChoice(GameAI.PowerChoices(_poGame, PowerChoices));
     });
 }
Beispiel #21
0
        public DragunityExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            // Set traps
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            // Execute spells
            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.AssaultTeleport);
            AddExecutor(ExecutorType.Activate, (int)CardId.UpstartGoblin);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonRavine, DragonRavineField);
            AddExecutor(ExecutorType.Activate, (int)CardId.Terraforming, Terraforming);
            AddExecutor(ExecutorType.Activate, (int)CardId.FoolishBurial, FoolishBurial);
            AddExecutor(ExecutorType.Activate, (int)CardId.MonsterReborn, MonsterReborn);

            // Execute monsters
            AddExecutor(ExecutorType.Activate, (int)CardId.ScrapDragon, ScrapDragonEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityPhalanx);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityKnightVajrayana);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityArmaMysletainn);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityDux);

            // Summon
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonsMirror, DragonsMirror);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.ScrapDragon, ScrapDragonSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.StardustDragon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragunityKnightVajrayana);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragunityKnightGaeDearg);
            AddExecutor(ExecutorType.Summon, (int)CardId.DragunityPhalanx, DragunityPhalanxSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragunityArmaMysletainn, DragunityArmaMysletainn);
            AddExecutor(ExecutorType.Summon, (int)CardId.DragunityArmaMysletainn, DragunityArmaMysletainnTribute);

            // Use draw effects if we can't do anything else
            AddExecutor(ExecutorType.Activate, (int)CardId.CardsOfConsonance);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonRavine, DragonRavineEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.FireFormationTenki, FireFormationTenki);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunitySpearOfDestiny);

            // Summon
            AddExecutor(ExecutorType.Summon, (int)CardId.DragunityDux, DragunityDux);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.DragunityPhalanx, DragunityPhalanxSet);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.AssaultBeast);

            // Draw assault mode if we don't have one
            AddExecutor(ExecutorType.Activate, (int)CardId.AssaultBeast, AssaultBeast);

            // Set useless cards
            AddExecutor(ExecutorType.SpellSet, (int)CardId.DragonsMirror, SetUselessCards);
            AddExecutor(ExecutorType.SpellSet, (int)CardId.Terraforming, SetUselessCards);
            AddExecutor(ExecutorType.SpellSet, (int)CardId.AssaultTeleport, SetUselessCards);
            AddExecutor(ExecutorType.SpellSet, (int)CardId.CardsOfConsonance, SetUselessCards);

            // Chain traps and monsters
            AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragonAssaultMode, StardustDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, StardustDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.StarlightRoad, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.AssaultModeActivate);
        }
        public UnderdogBeatExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.Summon, CardId.SummonedSkull);
            AddExecutor(ExecutorType.Summon, CardId.MegalosmasherX);
            AddExecutor(ExecutorType.Summon, CardId.LusterDragon);
            AddExecutor(ExecutorType.Summon, CardId.InsectKnightl);
            AddExecutor(ExecutorType.Summon, CardId.GladiatorBeastAndall);
            AddExecutor(ExecutorType.Summon, CardId.MadDogofDarkness);
            AddExecutor(ExecutorType.Summon, CardId.GeminiElfl);
            AddExecutor(ExecutorType.Summon, CardId.Sabersaurus);

            AddExecutor(ExecutorType.Activate, CardId.HeartoftheUnderdog);

            AddExecutor(ExecutorType.SpellSet, CardId.EnemyController);
            AddExecutor(ExecutorType.Activate, CardId.EnemyController);

            AddExecutor(ExecutorType.SpellSet, CardId.SuperRushHeadlong);
            AddExecutor(ExecutorType.Activate, CardId.SuperRushHeadlong);

            AddExecutor(ExecutorType.SpellSet, CardId.HalfCounter);
            AddExecutor(ExecutorType.Activate, CardId.HalfCounter);

            AddExecutor(ExecutorType.SpellSet, CardId.WallofDisruptionr);
            AddExecutor(ExecutorType.Activate, CardId.WallofDisruptionr);

            AddExecutor(ExecutorType.SpellSet, CardId.MirrorWall);
            AddExecutor(ExecutorType.Activate, CardId.MirrorWall);
        }
Beispiel #23
0
            public void Execute()
            {
                GameAI ai = GetTestGameAI(Board.ExpansionPieces);

                ActualBestMove = ai.GetBestMove(Board, MaxDepth, TestMaxHelperThreads);
                Assert.AreEqual(ExpectedBestMove, ActualBestMove);
            }
Beispiel #24
0
 public MokeyMokeyExecutor(GameAI ai, Duel duel)
     : base(ai, duel)
 {
     AddExecutor(ExecutorType.Summon);
     AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
     AddExecutor(ExecutorType.SpellSet);
 }
        public OldSchoolExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.Activate, 19613556, DefaultHeavyStorm);
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Activate, 53129443, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, 26412047, DefaultHammerShot);
            AddExecutor(ExecutorType.Activate, 66788016);
            AddExecutor(ExecutorType.Activate, 72302403, SwordsOfRevealingLight);
            AddExecutor(ExecutorType.Activate, 43422537, DoubleSummon);

            AddExecutor(ExecutorType.Summon, 83104731, DefaultTributeSummon);
            AddExecutor(ExecutorType.Summon, 6631034, DefaultTributeSummon);
            AddExecutor(ExecutorType.SummonOrSet, 43096270);
            AddExecutor(ExecutorType.SummonOrSet, 69247929);
            AddExecutor(ExecutorType.MonsterSet, 30190809);
            AddExecutor(ExecutorType.SummonOrSet, 77542832);
            AddExecutor(ExecutorType.SummonOrSet, 11091375);
            AddExecutor(ExecutorType.SummonOrSet, 35052053);
            AddExecutor(ExecutorType.SummonOrSet, 49881766);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, 44095762, DefaultTrap);
            AddExecutor(ExecutorType.Activate, 70342110, DefaultTrap);
        }
Beispiel #26
0
 protected Executor(GameAI ai, Duel duel)
 {
     Duel         = duel;
     AI           = ai;
     Executors    = new List <CardExecutor>();
     CurrentChain = new List <ClientCard>();
 }
        public GrenMajuThunderBoarderExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.GoToBattlePhase, GoToBattlePhase);
            AddExecutor(ExecutorType.Activate, CardId.EvenlyMatched, EvenlyMatchedeff);
            //Sticker
            AddExecutor(ExecutorType.Activate, CardId.MacroCosmos, MacroCosmoseff);
            AddExecutor(ExecutorType.Activate, CardId.AntiSpellFragrance, AntiSpellFragranceeff);
            //counter
            AddExecutor(ExecutorType.Activate, CardId.AshBlossomAndJoyousSpring, DefaultAshBlossomAndJoyousSpring);
            AddExecutor(ExecutorType.Activate, CardId.MaxxC, DefaultMaxxC);
            AddExecutor(ExecutorType.Activate, CardId.InfiniteImpermanence, DefaultInfiniteImpermanence);
            AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning);
            AddExecutor(ExecutorType.Activate, CardId.SolemStrike, DefaultSolemnStrike);
            AddExecutor(ExecutorType.Activate, CardId.ImperialOrder, ImperialOrderfirst);
            AddExecutor(ExecutorType.Activate, CardId.HeavyStormDuster, HeavyStormDustereff);
            AddExecutor(ExecutorType.Activate, CardId.UnendingNightmare, UnendingNightmareeff);
            AddExecutor(ExecutorType.Activate, CardId.DarkBribe, DarkBribeeff);
            AddExecutor(ExecutorType.Activate, CardId.ImperialOrder, ImperialOrdereff);
            AddExecutor(ExecutorType.Activate, CardId.ThunderKingRaiOh, ThunderKingRaiOheff);
            AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment);
            AddExecutor(ExecutorType.Activate, CardId.DrowningMirrorForce, DrowningMirrorForceeff);
            //first do
            AddExecutor(ExecutorType.Activate, CardId.UpstartGoblin, UpstartGoblineff);
            AddExecutor(ExecutorType.Activate, CardId.HarpieFeatherDuster, DefaultHarpiesFeatherDusterFirst);
            AddExecutor(ExecutorType.Activate, CardId.PotOfDuality, PotOfDualityeff);
            AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, PotOfDesireseff);
            AddExecutor(ExecutorType.Activate, CardId.CardOfDemise, CardOfDemiseeff);
            //sp
            AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff);
            AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh, Linkuribohsp);
            AddExecutor(ExecutorType.SpSummon, CardId.KnightmareCerberus, Knightmaresp);
            AddExecutor(ExecutorType.SpSummon, CardId.KnightmarePhoenix, Knightmaresp);
            AddExecutor(ExecutorType.SpSummon, CardId.MissusRadiant, MissusRadiantsp);
            AddExecutor(ExecutorType.Activate, CardId.MissusRadiant, MissusRadianteff);

            AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh, Linkuribohsp);
            AddExecutor(ExecutorType.SpSummon, CardId.LinkSpider);
            AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonsp);
            AddExecutor(ExecutorType.Activate, CardId.BorreloadDragon, BorreloadDragoneff);
            AddExecutor(ExecutorType.Activate, CardId.EaterOfMillions, EaterOfMillionseff);
            AddExecutor(ExecutorType.Activate, CardId.WakingTheDragon, WakingTheDragoneff);
            // normal summon
            AddExecutor(ExecutorType.Summon, CardId.InspectBoarder, InspectBoardersummon);
            AddExecutor(ExecutorType.Summon, CardId.GrenMajuDaEizo, GrenMajuDaEizosummon);
            AddExecutor(ExecutorType.Summon, CardId.ThunderKingRaiOh, ThunderKingRaiOhsummon);
            AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonspsecond);
            AddExecutor(ExecutorType.SpSummon, CardId.EaterOfMillions, EaterOfMillionssp);

            AddExecutor(ExecutorType.Activate, CardId.MetalSnake, MetalSnakesp);
            AddExecutor(ExecutorType.Activate, CardId.MetalSnake, MetalSnakeeff);
            //spell
            AddExecutor(ExecutorType.Activate, CardId.Crackdown, Crackdowneff);
            AddExecutor(ExecutorType.Activate, CardId.MoonMirrorShield, MoonMirrorShieldeff);
            AddExecutor(ExecutorType.Activate, CardId.Scapegoat, DefaultScapegoat);
            AddExecutor(ExecutorType.Activate, CardId.PhatomKnightsSword, PhatomKnightsSwordeff);
            AddExecutor(ExecutorType.Repos, MonsterRepos);
            //set
            AddExecutor(ExecutorType.SpellSet, SpellSet);
        }
Beispiel #28
0
        public OldSchoolExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            this.AddExecutor(ExecutorType.Activate, CardId.HeavyStorm, this.DefaultHeavyStorm);
            this.AddExecutor(ExecutorType.SpellSet, this.DefaultSpellSet);
            this.AddExecutor(ExecutorType.Activate, CardId.DarkHole, this.DefaultDarkHole);
            this.AddExecutor(ExecutorType.Activate, CardId.Raigeki, this.DefaultRaigeki);
            this.AddExecutor(ExecutorType.Activate, CardId.HammerShot, this.DefaultHammerShot);
            this.AddExecutor(ExecutorType.Activate, CardId.Fissure);
            this.AddExecutor(ExecutorType.Activate, CardId.SwordsOfRevealingLight, this.SwordsOfRevealingLight);
            this.AddExecutor(ExecutorType.Activate, CardId.DoubleSummon, this.DoubleSummon);

            this.AddExecutor(ExecutorType.Summon, CardId.AncientGearGolem, this.DefaultTributeSummon);
            this.AddExecutor(ExecutorType.Summon, CardId.Frostosaurus, this.DefaultTributeSummon);
            this.AddExecutor(ExecutorType.SummonOrSet, CardId.AlexandriteDragon);
            this.AddExecutor(ExecutorType.SummonOrSet, CardId.GeneWarpedWarwolf);
            this.AddExecutor(ExecutorType.MonsterSet, CardId.GearGolemTheMovingFortress);
            this.AddExecutor(ExecutorType.SummonOrSet, CardId.EvilswarmHeliotrope);
            this.AddExecutor(ExecutorType.SummonOrSet, CardId.LusterDragon);
            this.AddExecutor(ExecutorType.SummonOrSet, CardId.InsectKnight);
            this.AddExecutor(ExecutorType.SummonOrSet, CardId.ArchfiendSoldier);

            this.AddExecutor(ExecutorType.Repos, this.DefaultMonsterRepos);

            this.AddExecutor(ExecutorType.Activate, CardId.MirrorForce, this.DefaultTrap);
            this.AddExecutor(ExecutorType.Activate, CardId.DimensionalPrison, this.DefaultTrap);
        }
Beispiel #29
0
        public ZexalWeaponsExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            // Quick spells
            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);

            // XYZ summons
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.ZwLionArms);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.AdreusKeeperOfArmageddon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Number61Volcasaurus);

            // XYZ effects
            AddExecutor(ExecutorType.Activate, (int)CardId.Number39Utopia, Number39Utopia);
            AddExecutor(ExecutorType.Activate, (int)CardId.ZwLionArms, ZwLionArms);
            AddExecutor(ExecutorType.Activate, (int)CardId.AdreusKeeperOfArmageddon);
            AddExecutor(ExecutorType.Activate, (int)CardId.Number61Volcasaurus);

            // Weapons
            AddExecutor(ExecutorType.Activate, (int)CardId.ZwTornadoBringer);
            AddExecutor(ExecutorType.Activate, (int)CardId.ZwLightningBlade);

            // Spell cards
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.ReinforcementOfTheArmy, ReinforcementOfTheArmy);

            // Special summons
            AddExecutor(ExecutorType.SpSummon, (int)CardId.PhotonTrasher);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.SolarWindJammer, SolarWindJammer);

            AddExecutor(ExecutorType.Activate, (int)CardId.InstantFusion, InstantFusion);

            // Normal summons
            AddExecutor(ExecutorType.Summon, (int)CardId.Goblindbergh, GoblindberghFirst);
            AddExecutor(ExecutorType.Summon, (int)CardId.TinGoldfish, GoblindberghFirst);
            AddExecutor(ExecutorType.Summon, (int)CardId.StarDrawing);
            AddExecutor(ExecutorType.Summon, (int)CardId.SacredCrane);
            AddExecutor(ExecutorType.Summon, (int)CardId.HeroicChallengerExtraSword);
            AddExecutor(ExecutorType.Summon, (int)CardId.Goblindbergh);
            AddExecutor(ExecutorType.Summon, (int)CardId.TinGoldfish);
            AddExecutor(ExecutorType.Summon, (int)CardId.SummonerMonk);

            // Summons: Effects
            AddExecutor(ExecutorType.Activate, (int)CardId.Goblindbergh, GoblindberghEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.TinGoldfish, GoblindberghEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.Kagetokage);
            AddExecutor(ExecutorType.Activate, (int)CardId.SummonerMonk, SummonerMonkEffect);

            // Reposition
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            // Set and activate traps
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, (int)CardId.BreakthroughSkill, BreakthroughSkill);
            AddExecutor(ExecutorType.Activate, (int)CardId.SolemnWarning, DefaultTrap);
        }
Beispiel #30
0
        public YuyukoRank2Executor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, CardId.Liesun);
            AddExecutor(ExecutorType.Activate, CardId.YoumuN5);
            AddExecutor(ExecutorType.Activate, CardId.YoumeiNoKuwa);
            AddExecutor(ExecutorType.Activate, CardId.KokoroCorona, KokoroCoronaEffect);
            AddExecutor(ExecutorType.Activate, CardId.HiNoOtoko);
            AddExecutor(ExecutorType.Activate, CardId.Mougakyou, MougakyouEffect);
            AddExecutor(ExecutorType.Activate, CardId.YoumuTheSweetMaid, YoumuTheSweetMaidEffect);
            AddExecutor(ExecutorType.Activate, CardId.Hakugyokurou, HakugyokurouEffect);
            AddExecutor(ExecutorType.SpSummon, CardId.YoumuTheBluesky, YoumuTheBlueskySummon);
            AddExecutor(ExecutorType.Activate, CardId.NueL3, NueL3Effect);
            AddExecutor(ExecutorType.Activate, CardId.MimaL9);
            AddExecutor(ExecutorType.Activate, CardId.Bing);
            AddExecutor(ExecutorType.Activate, CardId.YoumuTheMangetsuYuuki);
            AddExecutor(ExecutorType.Activate, CardId.YoumuTheHalfSpirit);
            AddExecutor(ExecutorType.Activate, CardId.YoumuTheHalfSpiritL3);
            AddExecutor(ExecutorType.Activate, CardId.YoumuSanaeF);
            AddExecutor(ExecutorType.Activate, CardId.YoumuR4);
            AddExecutor(ExecutorType.Activate, CardId.YoumuSanaeF);
            AddExecutor(ExecutorType.Activate, CardId.YoumuTheAkaSakuraYuurei);
            AddExecutor(ExecutorType.Activate, CardId.YoumuF6);
            AddExecutor(ExecutorType.Activate, CardId.AyaS8);
            AddExecutor(ExecutorType.Activate, CardId.YoumuS6);
            AddExecutor(ExecutorType.Activate, CardId.LoliceR4);
            AddExecutor(ExecutorType.Activate, CardId.LinkReimu);
            AddExecutor(ExecutorType.Activate, CardId.LinkReisen);

            AddExecutor(ExecutorType.SpSummon, CardId.MimaL9, MimaL9Effect);
            AddExecutor(ExecutorType.SpSummon, CardId.YuyukoL8, YuyukoL8Summon);
            AddExecutor(ExecutorType.SpSummon, CardId.YoumuTheAkaSakuraYuurei);
            AddExecutor(ExecutorType.Summon, CardId.HatanokokoroL4);
            AddExecutor(ExecutorType.SummonOrSet, CardId.HatanokokoroL4);
            AddExecutor(ExecutorType.Summon, CardId.YoumuTheHalfSpirit);
            AddExecutor(ExecutorType.SummonOrSet, CardId.YoumuTheSweetMaid);
            AddExecutor(ExecutorType.SpSummon, CardId.YoumuTheMangetsuYuuki);
            AddExecutor(ExecutorType.SpSummon, CardId.YoumuTheHalfSpiritL3);
            AddExecutor(ExecutorType.Activate, CardId.HatanokokoroL4);

            AddExecutor(ExecutorType.SpSummon, CardId.LinkYuyuko, LinkYuyukoSummon);
            AddExecutor(ExecutorType.Activate, CardId.LinkYuyuko, LinkYuyukoEffect);
            AddExecutor(ExecutorType.SpSummon, CardId.LinkYuuka);
            AddExecutor(ExecutorType.SpSummon, CardId.YoumuS6);
            AddExecutor(ExecutorType.SpSummon, CardId.LoliceR4, DefaultCastelTheSkyblasterMusketeerSummon);
            AddExecutor(ExecutorType.SpSummon, CardId.AyaS8);
            AddExecutor(ExecutorType.SpSummon, CardId.LinkReimu, LinkSummon);
            AddExecutor(ExecutorType.SpSummon, CardId.LinkReisen, LinkSummon);

            AddExecutor(ExecutorType.Activate, CardId.YuyukoL8, YuyukoL8Effect);
            AddExecutor(ExecutorType.SpSummon, CardId.YoumuR4, YoumuR4Summon);

            AddExecutor(ExecutorType.Activate, CardId.JigenYuuhei, DefaultUniqueTrap);


            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
        }
Beispiel #31
0
 public override CardPosition GetSummonPosition(Executor exec, GameAI ai, Duel duel, ClientField bot, ClientField enemy, ClientCard card)
 {
     if (card.Location == CardLocation.Grave)
     {
         return(CardPosition.FaceUpDefence);
     }
     return(CardPosition.FaceUpAttack);
 }
Beispiel #32
0
 public override bool ShouldExec(Executor exec, GameAI ai, Duel duel, ClientField bot, ClientField enemy, ClientCard card)
 {
     if (exec.ExecType == ExecutorType.Activate)
     {
         return(bot.LifePoints > 1000);
     }
     return(true);
 }
Beispiel #33
0
 protected void InitializeChannelFields(Player player, GameAI ai)
 {
     lineIdx      = 0;
     enabled      = true;
     this.player  = player;
     this.ai      = ai;
     commComplete = false;
 }
Beispiel #34
0
        public DragunityExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            // Set traps
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            // Execute spells
            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, MysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.AssaultTeleport);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonRavine, DragonRavineField);
            AddExecutor(ExecutorType.Activate, (int)CardId.Terraforming, Terraforming);
            AddExecutor(ExecutorType.Activate, (int)CardId.FoolishBurial, FoolishBurial);
            AddExecutor(ExecutorType.Activate, (int)CardId.MonsterReborn, MonsterReborn);

            // Execute monsters
            AddExecutor(ExecutorType.Activate, (int)CardId.ScrapDragon, ScrapDragonEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityPhalanx);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityKnightVajrayana);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityArmaMysletainn);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragunityDux);

            // Summon
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonsMirror, DragonsMirror);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.ScrapDragon, ScrapDragonSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.StardustDragon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragunityKnightVajrayana);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragunityKnightGaeDearg);
            AddExecutor(ExecutorType.Summon, (int)CardId.DragunityPhalanx, DragunityPhalanxSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragunityArmaMysletainn, DragunityArmaMysletainn);
            AddExecutor(ExecutorType.Summon, (int)CardId.DragunityArmaMysletainn, DragunityArmaMysletainnTribute);

            // Use draw effects if we can't do anything else
            AddExecutor(ExecutorType.Activate, (int)CardId.CardsOfConsonance);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonRavine, DragonRavineEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.FireFormationTenki, FireFormationTenki);

            // Summon
            AddExecutor(ExecutorType.Summon, (int)CardId.DragunityDux, DragunityDux);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.DragunityPhalanx, DragunityPhalanxSet);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.AssaultBeast);

            // Draw assault mode if we don't have one
            AddExecutor(ExecutorType.Activate, (int)CardId.AssaultBeast, AssaultBeast);

            // Set useless cards
            AddExecutor(ExecutorType.SpellSet, (int)CardId.DragonsMirror, SetUselessCards);
            AddExecutor(ExecutorType.SpellSet, (int)CardId.Terraforming, SetUselessCards);
            AddExecutor(ExecutorType.SpellSet, (int)CardId.AssaultTeleport, SetUselessCards);
            AddExecutor(ExecutorType.SpellSet, (int)CardId.CardsOfConsonance, SetUselessCards);

            // Chain traps and monsters
            AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragonAssaultMode, StardustDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, StardustDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.StarlightRoad, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.AssaultModeActivate);
        }
        public ChaosDragonExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            // Execute spells
            AddExecutor(ExecutorType.Activate, (int)CardId.MST, MysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Reasoning);
            AddExecutor(ExecutorType.Activate, (int)CardId.FoolishBurial, FoolishBurial);
            AddExecutor(ExecutorType.Activate, (int)CardId.Charge, ChargeoftheLightBrigade);
            AddExecutor(ExecutorType.Activate, (int)CardId.DDR, DDR);

            //Execute Traps
            AddExecutor(ExecutorType.Activate, (int)CardId.EscapeFromTheDarkDimension, EscapefromtheDarkDimension);

            // Execute monsters
            AddExecutor(ExecutorType.Activate, (int)CardId.REDMD, REDMDEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.Darkflare, DarkflareEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.CardTrooper, CardTrooperEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.ChaosSorc, ChaosSorcEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.DivineDragon, DivineDragonEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.DAD, DADEffect);

            // Special Summon
            AddExecutor(ExecutorType.SpSummon, (int)CardId.REDMD, REDMDSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DAD);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Lightpulsar, LightpulsarSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Darkflare, ChaosSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.BLSEotB, ChaosSummon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.ChaosSorc, ChaosSummon);

            // Use draw effects if we can't do anything else
            AddExecutor(ExecutorType.Activate, (int)CardId.Allure, AllureofDarkness);

            // Normal Summon
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Ryko);
            AddExecutor(ExecutorType.Summon, (int)CardId.Calc, Calculator);
            AddExecutor(ExecutorType.Summon, (int)CardId.CardTrooper);
            AddExecutor(ExecutorType.Summon, (int)CardId.TKRO);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.DivineDragon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.EclipseWyvern);

            // Chain traps and monsters
            AddExecutor(ExecutorType.Activate, (int)CardId.Warning, SolemnWarning);
            AddExecutor(ExecutorType.Activate, (int)CardId.Torrential, TorrentialTribute);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, MirrorForce);
            AddExecutor(ExecutorType.Activate, (int)CardId.Compulsory, CompulsoryEvac);
            AddExecutor(ExecutorType.Activate, (int)CardId.GalaxyEyesPhotonDragon, GEPDEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.BLSEotB, BLSEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.Lightpulsar, LightpulsarEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.Gorz);
            AddExecutor(ExecutorType.Activate, (int)CardId.Fader, BattleFader);
            AddExecutor(ExecutorType.Activate, (int)CardId.TKRO, SolemnWarning);

            // Set traps
            AddExecutor(ExecutorType.SpellSet, SetOurTraps);
        }
Beispiel #36
0
        public NekrozExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            NekrozRituelCard.Add((int)CardId.Solais);
            NekrozRituelCard.Add((int)CardId.Unicore);
            NekrozRituelCard.Add((int)CardId.ArmureInvincible);
            NekrozRituelCard.Add((int)CardId.Brionac);
            NekrozRituelCard.Add((int)CardId.Trishula);
            NekrozRituelCard.Add((int)CardId.Gungnir);
            NekrozRituelCard.Add((int)CardId.Valkyrus);

            NekrozSpellCard.Add((int)CardId.Miroir);
            NekrozSpellCard.Add((int)CardId.Kaleidoscope);
            NekrozSpellCard.Add((int)CardId.Cycle);

            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.RenfortDeLarmee, Renfort);
            AddExecutor(ExecutorType.Activate, (int)CardId.Transaction);
            AddExecutor(ExecutorType.Activate, (int)CardId.PreparationDesRites);
            AddExecutor(ExecutorType.Activate, (int)CardId.Miroir);
            AddExecutor(ExecutorType.Activate, (int)CardId.Kaleidoscope);
            AddExecutor(ExecutorType.Activate, (int)CardId.Cycle);
            AddExecutor(ExecutorType.Activate, (int)CardId.Typhon, DefaultMysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.Decret);

            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.PrincesseDansanteNekroz, Princesse);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Shurit, Shurit);
            AddExecutor(ExecutorType.Summon, (int)CardId.SenjuMilleMain, Senju);
            AddExecutor(ExecutorType.Summon, (int)CardId.ManjuMilleMain, Manju);
            AddExecutor(ExecutorType.Summon, (int)CardId.FantomeDuChaos, Fantome);

            AddExecutor(ExecutorType.Activate, (int)CardId.Unicore, Unicore);
            AddExecutor(ExecutorType.Activate, (int)CardId.ArmureInvincible, Armure);
            AddExecutor(ExecutorType.Activate, (int)CardId.Valkyrus, Valkyrus);
            AddExecutor(ExecutorType.Activate, (int)CardId.Gungnir, Gungnir);
            AddExecutor(ExecutorType.Activate, (int)CardId.Brionac, Brionac);
            AddExecutor(ExecutorType.Activate, (int)CardId.Solais, Solais);
            AddExecutor(ExecutorType.Activate, (int)CardId.Exciton, Exciton);
            AddExecutor(ExecutorType.Activate, (int)CardId.FantomeDuChaos, FantomeEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.Cancrelat);
            AddExecutor(ExecutorType.Activate, (int)CardId.SenjuMilleMain, SenjuEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.ManjuMilleMain, Brionac);
            AddExecutor(ExecutorType.Activate, (int)CardId.Herault);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.Trishula);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.ArmureInvincible);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Valkyrus);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Gungnir);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Brionac);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Unicore);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Solais);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Exciton, Exciton);
        }
Beispiel #37
0
 private void LoadedHandler(object sender, RoutedEventArgs e)
 {
     StringReader sr = GenerateInput.SmallGenerate(new Random(0), 100);
     gm = GameModel.ReadGameModel(sr);
     //ai = new TestAI(gm);
     //ai = new TargetAI(gm, 3, false);
     ai = new IgnitionAI(gm, 2, true);
     //ai = new FireAI(gm, 2, false);
     //ai = new SwitchingAI(gm, 2, 10);
     CompositionTarget.Rendering += RenderingHandler;
 }
Beispiel #38
0
        public static Executor Instantiate(GameAI ai, Duel duel)
        {
            DeckInstance infos;

            string deck = ai.Game.Deck_;

            if (deck != null && _decks.ContainsKey(deck))
                infos = _decks[deck];
            else
                infos = _list[_rand.Next(_list.Count)];

            Executor executor = (Executor)Activator.CreateInstance(infos.Type, ai, duel);
            executor.Deck = infos.Deck;
            return executor;
        }
    /// <summary>
    /// Create the text boxes, set up fields, and add the message text
    /// </summary>
    /// <param name="player"></param>
    /// <param name="ai"></param>
    /// <param name="message"></param>
    public override void StartCommunicationWithPlayer(Player player, GameAI ai, string message) {
        InitializeChannelFields(player, ai);

        //restrict players movements
        player.FreezePlayer();

        CreateTextBoxes();

        if (aiTextBox == null || playerWordBox == null) {
            Debug.LogError("Could not find one of the text boxes for game AI to use.");
        }

        SplitMessageIntoLines(message);
        DisplayNextLine();
    }
    private void BeginGame() {
        mazeInstance = Instantiate(mazePrefab) as Maze;
        mazeInstance.Generate();
 
        playerInstance = Instantiate(playerPrefab) as Player;

        
        IntVector2 playerStartCoords = mazeInstance.PlacePlayerInMaze(playerInstance);
        exitCellCoords = mazeInstance.PlaceExitCell(playerStartCoords);

        gameAiInstance = Instantiate(gameAiPrefab) as GameAI;
        gameAiInstance.player = playerInstance;
        gameAiInstance.maze = mazeInstance;
        
        playerInstance.EnablePlayerCamera();
    }
Beispiel #41
0
        public CyberDragonExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            Bot = Duel.Fields[0];

            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.SpellSet, (int)CardId.Defusion);

            AddExecutor(ExecutorType.Activate, (int)CardId.CapsuleDuneAutreDimension, Capsule);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.Polymerisation, Polymeration);
            AddExecutor(ExecutorType.Activate, (int)CardId.LienDePuissance, LienDePuissance);
            AddExecutor(ExecutorType.Activate, (int)CardId.ExplosionDevolution, ExplosionDevolution);
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.UniteDeGenerationPhotonique);
            AddExecutor(ExecutorType.Activate, (int)CardId.Defusion, Defusion);

            AddExecutor(ExecutorType.Activate, (int)CardId.TrappeSansFond, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.ForceDeMirroir, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.UniteReflectiveDattaque);
            AddExecutor(ExecutorType.Activate, (int)CardId.Disfonction);
            AddExecutor(ExecutorType.Activate, (int)CardId.AppelDeLetreHante, DefaultCallOfTheHaunted);

            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.CyberDragonDrei, NoCyberDragonSpSummon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.CyberPhoenix, NoCyberDragonSpSummon);
            AddExecutor(ExecutorType.Summon, (int)CardId.NagaCyber, NoCyberDragonSpSummon);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.CyberDragonNoyau, NoCyberDragonSpSummon);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.CyberVouivre, CyberVouivre);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.CyberDragonProto, CyberDragonProto);
            AddExecutor(ExecutorType.Summon, (int)CardId.CyberKirin, CyberKirin);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragonUltime);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragonJumele);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragonLaser);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragonBarriere);

            AddExecutor(ExecutorType.Activate, (int)CardId.CyberDragonLaser);
            AddExecutor(ExecutorType.Activate, (int)CardId.CyberDragonBarriere);
            AddExecutor(ExecutorType.Activate, (int)CardId.CyberDragonDrei);
            AddExecutor(ExecutorType.Activate, (int)CardId.CyberPhoenix);
            AddExecutor(ExecutorType.Activate, (int)CardId.CyberKirin);
            AddExecutor(ExecutorType.Activate, (int)CardId.CyberVouivre, CyberVouivreEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.NagaCyber);
        }
        public BlackwingExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, MysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.TourbillonNoir, TourbillonNoir);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.KrisLaFissure);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.KrisLaFissure);
            AddExecutor(ExecutorType.Summon, (int)CardId.Sirocco, Sirocco);
            AddExecutor(ExecutorType.Summon, (int)CardId.Shura, Shura);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.Shura);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Bora);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.Bora);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.Kalut, Kalut);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.MisralLeTourbillon);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.MisralLeTourbillon);
            AddExecutor(ExecutorType.Summon, (int)CardId.Blizzard, Blizzard);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.MistralLeBouclier);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.VentDargent);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Maitre);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Gram);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Arsenal);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.AileSombre);

            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.CorbeauxDelta, CorbeauxDelta);
            AddExecutor(ExecutorType.Activate, (int)CardId.CorbeauxDelta, DefaultUniqueTrap);

            AddExecutor(ExecutorType.Activate, (int)CardId.Blizzard);
            AddExecutor(ExecutorType.Activate, (int)CardId.Shura);
            AddExecutor(ExecutorType.Activate, (int)CardId.Kalut, KaluhSiroccoEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.Sirocco, KaluhSiroccoEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.MisralLeTourbillon, MistralLeTourbillonEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.VentDargent);
            AddExecutor(ExecutorType.Activate, (int)CardId.AileSombre);
            AddExecutor(ExecutorType.Activate, (int)CardId.Maitre);
            AddExecutor(ExecutorType.Activate, (int)CardId.Arsenal);
            AddExecutor(ExecutorType.Activate, (int)CardId.Gram);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
        }
Beispiel #43
0
        public FrogExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, (int)CardId.Solidarity, Solidarity);
            AddExecutor(ExecutorType.Activate, (int)CardId.Terraforming, Terraforming);
            AddExecutor(ExecutorType.Activate, (int)CardId.Wetlands, DefaultField);
            AddExecutor(ExecutorType.Activate, (int)CardId.DarkHole, DarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.PotOfDuality, PotOfDuality);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.SwapFrog, SwapFrogSummon);
            AddExecutor(ExecutorType.Activate, (int)CardId.SwapFrog, SwapFrogActivate);
            AddExecutor(ExecutorType.Activate, (int)CardId.DupeFrog, DupeFrog);
            AddExecutor(ExecutorType.Activate, (int)CardId.FlipFlopFrog, FlipFlopFrog);
            AddExecutor(ExecutorType.Activate, (int)CardId.Ronintoadin, Ronintoadin);
            AddExecutor(ExecutorType.Activate, (int)CardId.TreebornFrog);
            AddExecutor(ExecutorType.Activate, (int)CardId.Unifrog);

            AddExecutor(ExecutorType.Summon, (int)CardId.CryomancerOfTheIceBarrier, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.DewdarkOfTheIceBarrier, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.SubmarineFrog, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.SwapFrog, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.Unifrog, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.Ronintoadin, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.DupeFrog, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.Tradetoad, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.TreebornFrog, SummonFrog);
            AddExecutor(ExecutorType.Summon, (int)CardId.FlipFlopFrog, SummonFrog);

            AddExecutor(ExecutorType.MonsterSet, (int)CardId.FlipFlopFrog);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.DupeFrog);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Tradetoad);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Ronintoadin);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.TreebornFrog);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Unifrog);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.SwapFrog);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.SubmarineFrog);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.DewdarkOfTheIceBarrier);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.CryomancerOfTheIceBarrier);

            AddExecutor(ExecutorType.Repos, FrogMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.FroggyForcefield, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.TheHugeRevolutionIsOver, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.GravityBind, GravityBind);
        }
    public override void StartCommunicationWithPlayer(Player player, GameAI ai, string message) {
        if (timeToWait <= 0) {
            //default to 10 seconds wait time
            timeToWait = 10.0f;
        }

        InitializeChannelFields(player, ai);

        //change this in derived class if you want text input.
        CreateTextBoxes(withPlayerWordBox: false, withContinuePrompt: true);

        if (aiTextBox == null) {
            Debug.LogError("Could not find one of the text boxes for game AI to use.");
        }

        SplitMessageIntoLines(message);
        DisplayNextLine();
    }
        public ProtecteursExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.InvitationDesTenebres);
            AddExecutor(ExecutorType.Activate, (int)CardId.TrouNoir, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.SacrificeRoyal);
            AddExecutor(ExecutorType.Activate, (int)CardId.Stelle);
            AddExecutor(ExecutorType.Activate, (int)CardId.Typhon, DefaultMysticalSpaceTyphoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.LivreDeLaLune, DefaultBookOfMoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.TempleCaches, TempleCaches);
            AddExecutor(ExecutorType.Activate, (int)CardId.ValleeMortuaire, ValleeMortuaire);

            AddExecutor(ExecutorType.Activate, (int)CardId.TrappeSansFond, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.Prison, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.Rite, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.TombeImperial, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.Hommage, DefaultTorrentialTribute);

            AddExecutor(ExecutorType.Summon, (int)CardId.DevinProtecteurs);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonPoussiereDetoileCorrompu, DragonPoussiereDetoileCorrompu);
            AddExecutor(ExecutorType.Summon, (int)CardId.Oracle);
            AddExecutor(ExecutorType.Summon, (int)CardId.Chef);
            AddExecutor(ExecutorType.Summon, (int)CardId.RaiOh);
            AddExecutor(ExecutorType.Summon, (int)CardId.Commandant, CommandantSummon);
            AddExecutor(ExecutorType.Summon, (int)CardId.Assailant);
            AddExecutor(ExecutorType.Summon, (int)CardId.Serviteur);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Espion);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Recruteur);

            AddExecutor(ExecutorType.Activate, (int)CardId.DevinProtecteurs);
            AddExecutor(ExecutorType.Activate, (int)CardId.Oracle);
            AddExecutor(ExecutorType.Activate, (int)CardId.Chef);
            AddExecutor(ExecutorType.Activate, (int)CardId.Commandant, Commandant);
            AddExecutor(ExecutorType.Activate, (int)CardId.Assailant, Assailant);
            AddExecutor(ExecutorType.Activate, (int)CardId.Serviteur, Serviteur);
            AddExecutor(ExecutorType.Activate, (int)CardId.Espion, EspionOuRecruteur);
            AddExecutor(ExecutorType.Activate, (int)CardId.Recruteur, EspionOuRecruteur);
        }
Beispiel #46
0
 public ExodiaExecutor(GameAI ai, Duel duel)
     : base(ai, duel)
 {
     AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
     AddExecutor(ExecutorType.Repos, (int)CardId.RoyalMagicalLibrary);
     AddExecutor(ExecutorType.Summon, (int)CardId.RoyalMagicalLibrary);
     AddExecutor(ExecutorType.Activate, (int)CardId.DoubleSummon);
     AddExecutor(ExecutorType.Activate, (int)CardId.RoyalMagicalLibrary);
     AddExecutor(ExecutorType.Activate, (int)CardId.ToonTableOfContents, ToonTableofContents);
     AddExecutor(ExecutorType.Activate, (int)CardId.BrokenBambooSword);
     AddExecutor(ExecutorType.Activate, (int)CardId.TradeIn);
     AddExecutor(ExecutorType.Activate, (int)CardId.CardsOfConsonance);
     AddExecutor(ExecutorType.Activate, (int)CardId.GoldenBambooSword);
     AddExecutor(ExecutorType.Activate, (int)CardId.OneDayofPeace);
     AddExecutor(ExecutorType.Activate, (int)CardId.UpstartGoblin);
     AddExecutor(ExecutorType.Activate, (int)CardId.SpellPowerGrasp);
     AddExecutor(ExecutorType.Activate, (int)CardId.MagicalMallet, MagicalMallet);
     AddExecutor(ExecutorType.Activate, (int)CardId.PotOfDuality, PotOfDuality);
     AddExecutor(ExecutorType.Activate, (int)CardId.ToonWorld);
 }
Beispiel #47
0
        public BlueEyesExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.Decret, Decret);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            AddExecutor(ExecutorType.Activate, (int)CardId.Transaction, Transaction);
            AddExecutor(ExecutorType.Activate, (int)CardId.CartesHarmonie, Harmonie);
            AddExecutor(ExecutorType.Activate, (int)CardId.TrouNoir, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.UpstartGobelin);
            AddExecutor(ExecutorType.Activate, (int)CardId.MiroirDragon, MiroirDragon);
            AddExecutor(ExecutorType.Activate, (int)CardId.EpeesRevelationLumiere, DefaultSwordsOfRevealingLight);
            AddExecutor(ExecutorType.Activate, (int)CardId.DestructionDeMain, DestructionDeMain);
            AddExecutor(ExecutorType.Activate, (int)CardId.SilverCry);

            AddExecutor(ExecutorType.Summon, (int)CardId.Pierre, HasDragonSombreInHand);
            AddExecutor(ExecutorType.Summon, (int)CardId.DragonAppat, HasDragonSombreInHand);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Pierre, Pierre);
            AddExecutor(ExecutorType.Summon, (int)CardId.Maiden);
            AddExecutor(ExecutorType.Summon, (int)CardId.Kaibaman, HasDragonInHand);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.KomodoDragon, HasDragonInHand);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.DragonAppat, Appat);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.Kaibaman, DragonEtincelant1OuMirage);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.DragonEtincelant1, DragonEtincelant1OuMirage);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.DragonMirage, DragonEtincelant1OuMirage);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonSombreMetalique);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonTonnerre);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonAzur);

            AddExecutor(ExecutorType.Activate, (int)CardId.Maiden);
            AddExecutor(ExecutorType.Activate, (int)CardId.Pierre);
            AddExecutor(ExecutorType.Activate, (int)CardId.Kaibaman);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonAzur, AppatEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonSombreMetalique, DragonSombre);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonTonnerre, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.KomodoDragon, KomodoEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonAppat, AppatEffect);
        }
Beispiel #48
0
        public CorrompuExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            CorrompuCard.Add((int)CardId.DragonArcEnCielCorrompu);
            CorrompuCard.Add((int)CardId.DragonBlancAuxYeuxBleusCorrompu);
            CorrompuCard.Add((int)CardId.DragonDeLaVeriteCorrompu);
            CorrompuCard.Add((int)CardId.DragonNoirAuxYeuxRougeCorrompu);
            CorrompuCard.Add((int)CardId.CyberDragonUltimeCorrompu);
            CorrompuCard.Add((int)CardId.DragonPoussiereDetoileCorrompu);

            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);

            AddExecutor(ExecutorType.Activate, (int)CardId.TrouNoir, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Transaction);
            AddExecutor(ExecutorType.Activate, (int)CardId.EpeesRevelationLumiere, SwordsOfRevealingLight);
            AddExecutor(ExecutorType.Activate, (int)CardId.TerraFormation, Terraforming);
            AddExecutor(ExecutorType.Activate, (int)CardId.GraalInterdit, GraalInterdit);
            AddExecutor(ExecutorType.Activate, (int)CardId.MondeCorrompu, MondeCorrompu);
            AddExecutor(ExecutorType.Activate, (int)CardId.SceauDorichalque, IsFieldEmpty);

            AddExecutor(ExecutorType.Activate, (int)CardId.TrappeSansFond, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.PrisonDimensionelle, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.ForceDeMirroir, DefaultUniqueTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.AbsorptionCompetence);
            AddExecutor(ExecutorType.Activate, (int)CardId.DelugeCorrompu, DelugeCorrompu);

            AddExecutor(ExecutorType.Summon, (int)CardId.RouageDimensionelCorrompu, RouageDimensionelCorrompu);
            AddExecutor(ExecutorType.Summon, (int)CardId.Barbaros, Barbaros);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragonUltimeCorrompu, CorrompuMonsterWithoutStardust);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonArcEnCielCorrompu, CorrompuMonsterWithoutStardust);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonBlancAuxYeuxBleusCorrompu, SynchroCorrompu);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonNoirAuxYeuxRougeCorrompu, CorrompuMonsterWithoutStardust);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonPoussiereDetoileCorrompu, DragonPoussiereDetoileCorrompu);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonDeLaVeriteCorrompu);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DragonParadoxeCorrumpu, DragonParadoxe);

            AddExecutor(ExecutorType.Activate, (int)CardId.DragonParadoxeCorrumpu);
            AddExecutor(ExecutorType.Activate, (int)CardId.DragonDeLaVeriteCorrompu);
        }
Beispiel #49
0
        public SuperRoboExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            AddExecutor(ExecutorType.Activate,(int)CardId.MysticalSpaceTyphoon,MysticalSpaceTyphoon);

            //Monsters
            AddExecutor(ExecutorType.Summon,(int)CardId.MechinaGearFrame, SummonGearFrame);
            AddExecutor(ExecutorType.Activate,(int)CardId.MechinaGearFrame,GearFrameEffect);

            AddExecutor(ExecutorType.SummonOrSet,(int)CardId.CardTrooper);
            AddExecutor(ExecutorType.Activate,(int)CardId.CardTrooper,CardTrooperEffect);

            AddExecutor(ExecutorType.Summon,(int)CardId.SuperRoboElephan, SummonSuperRoboElephan);
            AddExecutor(ExecutorType.Summon,(int)CardId.SuperRoboMonkei,SummonSuperRoboMonkei);
            AddExecutor(ExecutorType.Summon, (int)CardId.SuperRoboLeo, SummonSuperRoboLio);

            AddExecutor(ExecutorType.SpSummon, (int) CardId.GearspinrgSpirit, SummonGearspring);

            AddExecutor(ExecutorType.SpSummon,(int)CardId.MechinaCannon, SummonMechinaCannon);

            AddExecutor(ExecutorType.SpellSet, SetTrapsAndSpells);
        }
    public override void StartCommunicationWithPlayer(Player player, GameAI ai, string message) {
        waitTimeBeforeResponseCheck = 1.0f;
        safeToCheckResponse = false;

        InitializeChannelFields(player, ai);

        //Do NOT restrict players movements
        //player.BeginTextCommunicationWithPlayer();

        playerCoords = player.MazeCellCoords;

        CreateTextBoxes(withPlayerWordBox : false, withContinuePrompt : false);

        if (aiTextBox == null) {
            Debug.LogError("Could not find one of the text boxes for game AI to use.");
        }

        if (playerPath == null) {
            throw new InvalidOperationException("Cannot start path comm channel with null player path. Call SetPathForPlayer() before StartCommuncationWithPlayer()");
        }

        aiTextBox.text = message;        
    }
Beispiel #51
0
        public ExodiaExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            ExodiaParts.Add((int)CardId.Tete);
            ExodiaParts.Add((int)CardId.BrasDroit);
            ExodiaParts.Add((int)CardId.BrasGauche);
            ExodiaParts.Add((int)CardId.JambeDroit);
            ExodiaParts.Add((int)CardId.JambeGauche);

            CounterCards.Add((int)CardId.Citadelle);
            CounterCards.Add((int)CardId.Biblio);

            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            AddExecutor(ExecutorType.Activate, (int)CardId.Transaction);
            AddExecutor(ExecutorType.Activate, (int)CardId.DayPiece);
            AddExecutor(ExecutorType.Activate, (int)CardId.CarteHarmonie);
            AddExecutor(ExecutorType.Activate, (int)CardId.UpstartGobelin);
            AddExecutor(ExecutorType.Activate, (int)CardId.BambouBois);
            AddExecutor(ExecutorType.Activate, (int)CardId.BambouDor);
            AddExecutor(ExecutorType.Activate, (int)CardId.MaitrisePuissanceMagique, ActivateSpell);
            AddExecutor(ExecutorType.Activate, (int)CardId.Citadelle);
            AddExecutor(ExecutorType.Activate, (int)CardId.TableMatToon, ActivateSpell);
            AddExecutor(ExecutorType.Activate, (int)CardId.MondeDesToons, ActivateSpell);
            AddExecutor(ExecutorType.Activate, (int)CardId.PotDualite, PotDualite);
            AddExecutor(ExecutorType.Activate, (int)CardId.Citadelle);

            AddExecutor(ExecutorType.Activate, (int)CardId.MailletMagique, MailletMagique);

            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.PierreBlanche);
            AddExecutor(ExecutorType.Summon, (int)CardId.Biblio);

            AddExecutor(ExecutorType.Activate, (int)CardId.PierreBlanche);
            AddExecutor(ExecutorType.Activate, (int)CardId.Biblio);

            AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
        }
Beispiel #52
0
        public DamageBurnExecutor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            // Set traps
            AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);

            // Activate Spells
            AddExecutor(ExecutorType.Activate, (int)CardId.Ookazi);
            AddExecutor(ExecutorType.Activate, (int)CardId.GoblinThief);
            AddExecutor(ExecutorType.Activate, (int)CardId.TremendousFire);
            AddExecutor(ExecutorType.Activate, (int)CardId.SwordsOfRevealingLight, SwordsOfRevealingLight);
            AddExecutor(ExecutorType.Activate, (int)CardId.SupremacyBerry, SupremacyBerry);
            AddExecutor(ExecutorType.Activate, (int)CardId.PoisonOfTheOldMan, PoisonOfTheOldMan);

            // Set an invincible monster
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.Marshmallon, SetInvincibleMonster);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.SpiritReaper, SetInvincibleMonster);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.NaturiaBeans, SetInvincibleMonster);

            // Hello, my name is Lava Golem
            AddExecutor(ExecutorType.SpSummon, (int)CardId.LavaGolem, LavaGolem);

            // Set other monsters
            AddExecutor(ExecutorType.Summon, (int)CardId.ReflectBounder);
            AddExecutor(ExecutorType.SummonOrSet, (int)CardId.FencingFireFerret);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.BlastSphere);
            AddExecutor(ExecutorType.MonsterSet, (int)CardId.NaturiaBeans);

            // We're a coward
            AddExecutor(ExecutorType.Repos, ReposEverything);

            // Chain traps
            AddExecutor(ExecutorType.Activate, (int)CardId.MagicCylinder, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.MinorGoblinOfficial);
            AddExecutor(ExecutorType.Activate, (int)CardId.ChainBurst);
            AddExecutor(ExecutorType.Activate, (int)CardId.SkullInvitation);
        }
Beispiel #53
0
 public static void Init(GameAI _ai)
 {
     ai = _ai;
     eventArgs = new Dictionary<GameEventArg, object>();
 }
 void Awake() {
     gameCanvas = GameObject.Find("Canvas");
     ai = null;
     player = null;
     enabled = false;
 }
 abstract public void StartCommunicationWithPlayer(Player player, GameAI ai, string message);
 protected DefaultExecutor(GameAI ai, Duel duel)
     : base(ai, duel)
 {
 }
 protected void InitializeChannelFields(Player player, GameAI ai) {
     lineIdx = 0;
     enabled = true;
     this.player = player;
     this.ai = ai;
     commComplete = false;
 }
Beispiel #58
0
 public static Executor GetExecutor(GameAI ai, Duel duel)
 {
     if (m_executors == null)
     {
         List<Type> decks = GetDecks();
         List<Type> enabledDecks = new List<Type>();
         foreach (Type deck in decks)
         {
             GameDeck conDeck = Program.Config.GetDeck(deck.Name);
             if (conDeck == null || conDeck.Enabled)
                 enabledDecks.Add(deck);
         }
         m_executors = enabledDecks.ToArray();
         m_rand = new Random();
     }
     return (Executor)Activator.CreateInstance(m_executors[m_rand.Next(0, m_executors.Length)], ai, duel);
 }