"Guarded City"

This commit is contained in:
marcins78@gmail.com
2012-01-03 17:11:18 +00:00
parent a2f7c492ae
commit 13a6f8dfca

View File

@@ -0,0 +1,46 @@
package com.gempukku.lotro.cards.set13.gondor;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ReinforceTokenEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
/**
* Set: Bloodlines
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Event • Fellowship
* Game Text: Spot a [GONDOR] companion to reinforce a [GONDOR] token for each possession borne by that companion.
*/
public class Card13_068 extends AbstractEvent {
public Card13_068() {
super(Side.FREE_PEOPLE, 1, Culture.GONDOR, "Guarded City", Phase.FELLOWSHIP);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canSpot(game, Culture.GONDOR, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseActiveCardEffect(self, playerId, "Choose a GONDOR companion", Culture.GONDOR, CardType.COMPANION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
int count = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), CardType.POSSESSION, Filters.attachedTo(card));
action.appendEffect(
new ReinforceTokenEffect(self, playerId, Token.GONDOR, count));
}
});
return action;
}
}