"For Death and Glory"

This commit is contained in:
marcins78
2013-02-06 13:19:37 +00:00
parent 51b6d68e4b
commit 345783be9b

View File

@@ -0,0 +1,47 @@
package com.gempukku.lotro.cards.set20.rohan;
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.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.modifiers.KeywordModifier;
import java.util.Collection;
/**
* 1
* For Death and Glory
* Rohan Event • Manuever
* Exert a mounted [Rohan] Man to make him defender +1 until the regroup phase.
*/
public class Card20_324 extends AbstractEvent {
public Card20_324() {
super(Side.FREE_PEOPLE, 1, Culture.ROHAN, "For Death and Glory", Phase.MANEUVER);
}
@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.canExert(self, game, Culture.ROHAN, Race.MAN, Filters.mounted);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action= new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ROHAN, Race.MAN, Filters.mounted) {
@Override
protected void cardsToBeExertedCallback(Collection<PhysicalCard> characters) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, Filters.in(characters), Keyword.DEFENDER, 1), Phase.REGROUP));
}
});
return action;
}
}