This commit is contained in:
marcins78@gmail.com
2011-10-20 16:20:29 +00:00
parent 6eea76c04d
commit 0c1ad8b9ad

View File

@@ -0,0 +1,51 @@
package com.gempukku.lotro.cards.set6.gandalf;
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.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Event
* Game Text: Skirmish: Exert an Ent to make him strength +1 for each Ent you spot (limit +4).
*/
public class Card6_034 extends AbstractEvent {
public Card6_034() {
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Roused", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canExert(self, game, Race.ENT);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.ENT) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
int bonus = Math.min(4, Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Race.ENT));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, character, bonus), Phase.SKIRMISH));
}
});
return action;
}
}