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 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);
        }
Exemple #3
0
        public Rank5Executor(GameAI ai, Duel duel)
            : base(ai, duel)
        {
            // Quick spells
            AddExecutor(ExecutorType.Activate, (int)CardId.BookOfMoon, DefaultBookOfMoon);
            AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);

            // XYZ Monsters: Effect
            AddExecutor(ExecutorType.Activate, (int)CardId.DigvorzhakKingOfHeavyIndustry);
            AddExecutor(ExecutorType.Activate, (int)CardId.TirasKeeperOfGenesis);
            AddExecutor(ExecutorType.Activate, (int)CardId.AdreusKeeperOfArmageddon);
            AddExecutor(ExecutorType.Activate, (int)CardId.Number61Volcasaurus);
            AddExecutor(ExecutorType.Activate, (int)CardId.Number19Freezerdon);

            // Summon LV.5 Monsters
            AddExecutor(ExecutorType.SpSummon, (int)CardId.CyberDragon);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.ViceDragon);
            AddExecutor(ExecutorType.Summon, (int)CardId.PowerInvader, PowerInvader);
            AddExecutor(ExecutorType.Summon, (int)CardId.WindUpSoldier);
            AddExecutor(ExecutorType.Summon, (int)CardId.StarDrawing);
            AddExecutor(ExecutorType.Summon, (int)CardId.GagagaMagician);

            AddExecutor(ExecutorType.SpSummon, (int)CardId.TheTricky, TheTricky);

            AddExecutor(ExecutorType.Summon, (int)CardId.MistArchfiend, MistArchfiend);
            AddExecutor(ExecutorType.Activate, (int)CardId.InstantFusion, IsAnotherRank5Available);

            AddExecutor(ExecutorType.Activate, (int)CardId.GagagaMagician, GagagaMagicianEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.WindUpSoldier, WindUpSoldierEffect);

            // Useful spells
            AddExecutor(ExecutorType.Activate, (int)CardId.DoubleSummon, DoubleSummon);
            AddExecutor(ExecutorType.Activate, (int)CardId.XyzUnit, XyzUnit);

            // XYZ Monsters: Summon
            AddExecutor(ExecutorType.SpSummon, (int)CardId.DigvorzhakKingOfHeavyIndustry, SummonXYZ);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.TirasKeeperOfGenesis, SummonXYZ);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.AdreusKeeperOfArmageddon, SummonXYZ);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Number61Volcasaurus, SummonXYZ);
            AddExecutor(ExecutorType.SpSummon, (int)CardId.Number19Freezerdon, SummonXYZ);

            // Xyz Reborn
            AddExecutor(ExecutorType.Activate, (int)CardId.XyzReborn);

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

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

            AddExecutor(ExecutorType.Activate, (int)CardId.XyzVeil, XyzVeil);
            AddExecutor(ExecutorType.Activate, (int)CardId.XyzEffect, XyzEffect);
            AddExecutor(ExecutorType.Activate, (int)CardId.TorrentialTribute, DefaultTorrentialTribute);
            AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultTrap);
            AddExecutor(ExecutorType.Activate, (int)CardId.SakuretsuArmor, DefaultTrap);
        }
Exemple #4
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, DefaultDarkHole);
            AddExecutor(ExecutorType.Activate, (int)CardId.Raigeki, DefaultRaigeki);
            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);
        }
Exemple #5
0
        public GameBehavior(GameClient game)
        {
            Game = game;
            Connection = game.Connection;

            _packets = new Dictionary<StocMessage, Action<GamePacketReader>>();
            _messages = new Dictionary<GameMessage, Action<GamePacketReader>>();
            RegisterPackets();

            _room = new Room();
            _duel = new Duel();

            _ai = new GameAI(Game, _duel);
            _ai.Executor = DecksManager.Instantiate(_ai, _duel);
            Deck = Deck.Load(_ai.Executor.Deck);
        }
        public GameBehavior(AIGameClient game)
        {
            Game       = game;
            Connection = game.Connection;

            _packets  = new Dictionary <StocMessage, Action <GameServerPacket> >();
            _messages = new Dictionary <GameMessage, Action <GameServerPacket> >();
            RegisterPackets();

            _room = new Room();
            _duel = new Duel();

            _ai          = new GameAI(Game, _duel);
            _ai.Executor = DecksManager.Instantiate(_ai, _duel);
            Deck         = Deck.Load(_ai.Executor.Deck);
        }
Exemple #7
0
        public GameBehavior(GameClient game)
        {
            Game       = game;
            Connection = game.Connection;
            _hand      = game.Hand;

            _packets  = new Dictionary <StocMessage, Action <BinaryReader> >();
            _messages = new Dictionary <GameMessage, Action <BinaryReader> >();
            RegisterPackets();

            _room = new Room();
            _duel = new Duel();

            _ai          = new GameAI(Game, _duel);
            _ai.Executor = DecksManager.Instantiate(_ai, _duel);
            Deck         = Deck.Load(_ai.Executor.Deck);

            _select_hint = 0;
        }
Exemple #8
0
        public static Executor Instantiate(GameAI ai, Duel duel, string deck)
        {
            DeckInstance infos;

            if (deck != null && _decks.ContainsKey(deck))
            {
                infos = _decks[deck];
            }
            else
            {
                do
                {
                    infos = _list[_rand.Next(_list.Count)];
                }while (infos.Level != "Normal");
            }

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

            executor.Deck = infos.Deck;
            return(executor);
        }