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[]{}; }
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[] { }; }