- Added Power Play (via manual editing of draft deck)

This commit is contained in:
Sol
2014-12-19 03:53:30 +00:00
parent 7898e84a80
commit de1c726b3c
4 changed files with 21 additions and 0 deletions

View File

@@ -1395,6 +1395,20 @@ public class GameAction {
}
}
// Power Play - Each player with a Power Play in the CommandZone becomes the Starting Player
CardCollectionView commandCards = game.getCardsIn(ZoneType.Command);
if (commandCards.size() > 0) {
CardCollection powerPlays = CardLists.getValidCards(commandCards, "Card.namedPower Play", game.getPlayers().getFirst(), commandCards.getFirst());
Set<Player> powerPlayers = new HashSet<>();
for (Card c : powerPlays) {
powerPlayers.add(c.getOwner());
}
ArrayList<Player> players = Lists.newArrayList(powerPlayers);
Collections.shuffle(players);
return players.get(0);
}
boolean isFirstGame = lastGameOutcome == null;
if (isFirstGame) {
game.fireEvent(new GameEventFlipCoin()); // Play the Flip Coin sound