예제 #1
0
        public static string testZapp(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.ZappSlywick));

            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BaronRivendare));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BaronRivendare).setPoisonous(true));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p2Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BaronRivendare)
            };
            expected.Add(exp1);

            HearthstoneBoard exp2 = new HearthstoneBoard();

            exp2.p2Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant)
            };
            expected.Add(exp2);

            return("test zapp targeting");
        }
        //Check if stored name matches name from line. If neq, minion has been transformed -> save the new minion instead
        public void checkIfNameMatches(string[] nameandid)
        {
            string       id      = nameandid[1];
            string       newName = nameandid[0];
            DrawableCard c       = minions[id];

            if (c.getName().Equals("UnknownCard"))
            {
                return;
            }

            string oldName = c.getName();

            if (!oldName.Equals(newName))
            {
                int temp = c.BoardPosition;
                minions[id] = DrawableCard.makeDrawable(CardCreatorFactory.createFromName(newName).setId(int.Parse(id)));
                minions[id].BoardPosition = temp;
                if (board.p1Board.Contains(c))
                {
                    board.p1Board.Remove(c);
                    board.p1Board.Add(minions[id]);
                }
                Console.WriteLine("Minion changed: " + oldName + " to " + minions[id].getReadableName());
            }
        }
 public override void doAction(Action cause, Card user, HearthstoneBoard board, List <Card> alwaysUse)
 {
     board.printDebugMessage("Performing action: deathrattlesummon: " + user, HearthstoneBoard.OutputPriority.EFFECTTRIGGERS);
     for (int i = 0; i < count; i++)
     {
         board.addNewMinionToBoard(board.getPlayerFromMinion(user), CardCreatorFactory.createFromName(summon).setAttackPriority(user.attackPriority), board.getPositionFromMinion(user) + i, true);
     }
 }
        public static string Ghastcoiler(BoardSide b1, BoardSide b2)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.GhastCoiler));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.GhastCoiler));



            return("Ghastcoiler");
        }
예제 #5
0
        public static string testMinibotDivine(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.ShieldedMinibot));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            expected.Add(exp1);
            return("test minibot divine");
        }
예제 #6
0
        public static string testCase2(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Mecharoo));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            expected.Add(exp1);
            return("Test 1");
        }
 private void button8_Click(object sender, EventArgs e)
 {
     board = new DrawableHearthstoneBoard();
     board.p1Board.Add(DrawableCard.makeDrawable(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant)));
     board.p1Board.Add(DrawableCard.makeDrawable(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant)));
     //       board.p1Board.Add(DrawableCard.makeDrawable(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant)));
     board.p2Board.Add(DrawableCard.makeDrawable(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.MalGanis)));
     board.illidanPlayer = 1;
     board.drawBoardState(new Point(50, 50), new Point(50, 300), this);
 }
        public static string testCase0(BoardSide b1, BoardSide b2)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.KaboomBot));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus).setStats(10, 10));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));



            return("RandTest");
        }
예제 #9
0
 public Card revive()
 {
     if (gold)
     {
         return(CardCreatorFactory.createGoldenFromName(card));
     }
     else
     {
         return(CardCreatorFactory.createFromName(card));
     }
 }
        public static string testCase1(BoardSide b1, BoardSide b2)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha).setStats(10, 10));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));



            return("Test 1");
        }
예제 #11
0
 public override void doAction(Action cause, Card user, HearthstoneBoard board, List <Card> alwaysUse)
 {
     board.printDebugMessage("Performing action: reborn: " + user.getReadableName(), HearthstoneBoard.OutputPriority.EFFECTTRIGGERS);
     if (golden)
     {
         board.addNewMinionToBoard(board.getPlayerFromMinion(user), CardCreatorFactory.createGoldenFromName(user.cardID).setHp(1).setAttackPriority(user.attackPriority).removeReborn(), board.getPositionFromMinion(user), true);
     }
     else
     {
         board.addNewMinionToBoard(board.getPlayerFromMinion(user), CardCreatorFactory.createFromName(user.cardID).setHp(1).setAttackPriority(user.attackPriority).removeReborn(), board.getPositionFromMinion(user), true);
     }
 }
예제 #12
0
        public static string testJuggler(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Voidwalker));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.SoulJuggler));

            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.KaboomBot).setStats(3, 3));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            expected.Add(exp1);
            return("test soul juggler");
        }
예제 #13
0
        public static string testPoison(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Maexxna));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Maexxna));



            HearthstoneBoard exp1 = new HearthstoneBoard();

            expected.Add(exp1);
            return("test poison");
        }
예제 #14
0
        public static string testMurloc(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.OldMurkeye));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.ColdlightSeer));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.OldMurkeye).setStats(2, 2)
            };
            expected.Add(exp1);
            return("test murloc");
        }
예제 #15
0
        public static string testReborn(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BronzeWarden));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.KaboomBot));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BronzeWarden).removeReborn()
            };
            expected.Add(exp1);
            return("test reborn");
        }
예제 #16
0
        public static string testSelfless(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.SelflessHero));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha)
            };
            expected.Add(exp1);
            return("test selfless hero");
        }
예제 #17
0
        public static string testKaboom(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.KaboomBot));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Annoyomodule));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Annoyomodule).setDivineShield(false));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p2Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Annoyomodule).setDivineShield(false)
            };
            expected.Add(exp1);
            return("test kaboom");
        }
예제 #18
0
        public static string testCase0(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RighteousProtector));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha)
            };
            expected.Add(exp1);
            return("Test 1");
        }
예제 #19
0
        public static string testGlyphGuardian(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.GlyphGuardian));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Alleycat).setStats(1, 6));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus));
            // b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RedWhelp));



            HearthstoneBoard exp1 = new HearthstoneBoard();

            expected.Add(exp1);
            return("test glyph guardian");
        }
예제 #20
0
        public static string testDeathBuff(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.SpawnOfNzoth));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha).setStats(3, 1)
            };
            expected.Add(exp1);
            return("test deathbuff");
        }
예제 #21
0
        public static string testRatPack(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RatPack).setStats(3, 2));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RatToken), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RatToken), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RatToken), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RatToken), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DireWolfAlpha)
            };
            expected.Add(exp1);
            return("test ratpack");
        }
예제 #22
0
        public static string testReborn2(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BronzeWarden));

            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus).setStats(2, 12));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p2Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus)
            };
            expected.Add(exp1);
            return("test reborn2");
        }
예제 #23
0
        public static string testDeathBeastBuff(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Goldrinn));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Alleycat));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Goldrinn).setStats(5, 5));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Alleycat).setStats(5, 5)
            };
            expected.Add(exp1);
            return("test beastbuffdeath");
        }
예제 #24
0
        public static string testCoilerBaron(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.SavannahHighmane).setStats(7, 7));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BaronRivendare));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronhideDirehorn));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Hyena), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Hyena), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Hyena), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Hyena), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.BaronRivendare)
            };
            expected.Add(exp1);

            return("test baron doublesummon");
        }
예제 #25
0
        public static string testAmalgamWax(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Amalgam));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.WaxriderTogwaggle));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Alleycat));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.WaxriderTogwaggle).setStats(3, 4)
            };
            expected.Add(exp1);

            return("test amalgam and wax");
        }
예제 #26
0
        public static string testMackerel(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.HolyMackerel).setDivineShield(true));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RighteousProtector));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RighteousProtector));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.HolyMackerel).setDivineShield(true), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.RighteousProtector).setDivineShield(false)
            };
            expected.Add(exp1);

            return("test mackerel");
        }
예제 #27
0
        public static string testOverkillIronhide(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronhideDirehorn));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus).setStats(1, 3));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus).setStats(1, 20));


            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronhideDirehorn).setStats(7, 3), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronhideToken)
            };
            expected.Add(exp1);
            return("test overkill ironhide");
        }
예제 #28
0
        public static string testKhadgar3(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.KindlyGrandmother));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Khadgar));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.ImpToken));


            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.GMToken), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.GMToken), CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Khadgar)
            };
            expected.Add(exp1);

            return("test khadgar 3");
        }
예제 #29
0
        public static string testTheBeast(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Alleycat));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.TheBeast).setTaunt(true));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.MechanoEgg));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.VulgarHomunculus).setStats(9, 9));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronSensei));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.EggToken).setStats(8, 3)
            };
            expected.Add(exp1);
            return("test the beast");
        }
예제 #30
0
        public static string testWaxrider(BoardSide b1, BoardSide b2, List <HearthstoneBoard> expected)
        {
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.DragonspawnLieutenant));
            b1.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.WaxriderTogwaggle));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.Alleycat));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronSensei));
            b2.Add(CardCreatorFactory.createFromName(CardCreatorFactory.Cards.IronSensei));

            HearthstoneBoard exp1 = new HearthstoneBoard();

            exp1.p1Board = new BoardSide {
                CardCreatorFactory.createFromName(CardCreatorFactory.Cards.WaxriderTogwaggle).setStats(5, 4)
            };
            expected.Add(exp1);
            return("test waxrider");
        }