Only owner of the card with muster can use it.

This commit is contained in:
marcins78@gmail.com
2011-12-07 14:11:38 +00:00
parent fa6a183606
commit 9209a67421

View File

@@ -32,13 +32,15 @@ public class MusterRule {
&& game.getGameState().getHand(playerId).size() > 0) {
List<OptionalTriggerAction> actions = new LinkedList<OptionalTriggerAction>();
for (PhysicalCard musterCard : Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), Keyword.MUSTER)) {
OptionalTriggerAction action = new OptionalTriggerAction("muster" + musterCard.getCardId(), musterCard);
action.setText("Use Muster");
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1));
action.appendEffect(
new DrawCardsEffect(playerId, 1));
actions.add(action);
if (playerId.equals(musterCard.getOwner())) {
OptionalTriggerAction action = new OptionalTriggerAction("muster" + musterCard.getCardId(), musterCard);
action.setText("Use Muster");
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1));
action.appendEffect(
new DrawCardsEffect(playerId, 1));
actions.add(action);
}
}
return actions;