예제 #1
0
파일: Effect.cs 프로젝트: shtonki/cardstone
        protected override GameEvent[] resolve(GameInterface ginterface, Target t, Card resolvingCard)
        {
            Choice shuffle;
            Player player = t.player;
            if (player.isHero)
            {
                var p = ginterface.showCards(player.deck.cards.Reverse().Take(cardCount).ToArray());
                shuffle = ginterface.getChoice("Shuffle deck?", Choice.Yes, Choice.No);
                ginterface.sendSelection((int)shuffle);
                p.closeWindow();
            }
            else
            {
                shuffle = (Choice)ginterface.demandSelection();
            }

            if (shuffle == Choice.Yes)
            {
                return new GameEvent[] {new ShuffleDeckEvent(player),};
            }
            return new GameEvent[]{};
        }
예제 #2
0
파일: Effect.cs 프로젝트: shtonki/cardstone
        protected override GameEvent[] resolve(GameInterface ginterface, Target t, Card resolvingCard)
        {
            Choice shuffle = Choice.No;
            Player player = t.player;
            if (optional)
            {
                if (player.isHero)
                {
                    shuffle = ginterface.getChoice("Shuffle deck?", Choice.Yes, Choice.No);
                    ginterface.sendSelection((int)shuffle);
                }
                else
                {
                    shuffle = (Choice)ginterface.demandSelection();
                }
            }

            if (shuffle == Choice.Yes)
            {
                return new GameEvent[] { new ShuffleDeckEvent(player), };
            }
            return new GameEvent[] { };
        }