public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
{
gameState.gameLog.PushScope();
Card actionOne = DrawAndRevealTillFindAnActionIsntGolem(currentPlayer, gameState);
Card actionTwo = DrawAndRevealTillFindAnActionIsntGolem(currentPlayer, gameState);
currentPlayer.MoveRevealedCardsToDiscard(cardToMove => !cardToMove.Equals(actionOne) && !cardToMove.Equals(actionTwo), gameState);
// set the cards asside in case golem plays other cards that also must be revealed.
currentPlayer.MoveRevealedCardsToSetAside();
if (actionOne != null && actionTwo != null)
{
Card cardToPlayFirst = currentPlayer.actions.ChooseCardToPlayFirst(gameState, actionOne, actionTwo);
if (cardToPlayFirst != actionOne && cardToPlayFirst != actionTwo)
{
throw new Exception("Must pick one of the actions to player first");
}
// swap order;
if (cardToPlayFirst == actionTwo)
{
actionTwo = actionOne;
actionOne = cardToPlayFirst;
}
}
if (actionOne != null)
{
currentPlayer.cardsSetAside.RemoveCard(actionOne);
currentPlayer.DoPlayAction(actionOne, gameState);
}
if (actionTwo != null)
{
currentPlayer.cardsSetAside.RemoveCard(actionTwo);
currentPlayer.DoPlayAction(actionTwo, gameState);
}
gameState.gameLog.PopScope();
}