"Drawn to Its Power"

This commit is contained in:
marcins78@gmail.com
2011-09-09 14:04:52 +00:00
parent 9dd42d4c78
commit ce5dc88ee4

View File

@@ -0,0 +1,59 @@
package com.gempukku.lotro.cards.set1.wraith;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
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.actions.DefaultCostToEffectAction;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 2
* Type: Condition
* Game Text: Plays to your support area. Each time a companion is killed in a skirmish involving a Nazgul, add
* a burden.
*/
public class Card1_211 extends AbstractLotroCardBlueprint {
public Card1_211() {
super(Side.SHADOW, CardType.CONDITION, Culture.WRAITH, "Drawn to Its Power");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return PlayConditions.canPayForShadowCard(game, self, twilightModifier);
}
@Override
public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return new PlayPermanentAction(self, Zone.SHADOW_SUPPORT, twilightModifier);
}
@Override
public int getTwilightCost() {
return 2;
}
@Override
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.KILL
&& game.getGameState().getSkirmish() != null
&& Filters.filter(game.getGameState().getSkirmish().getShadowCharacters(), game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.NAZGUL)).size() > 0) {
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Add a burden");
action.addEffect(
new AddBurdenEffect(game.getGameState().getCurrentPlayerId()));
return Collections.singletonList(action);
}
return null;
}
}