"Resistance Becomes Unbearable"
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
package com.gempukku.lotro.cards.set2.wraith;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.costs.ChooseAndExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.PutOnTheOneRingEffect;
|
||||
import com.gempukku.lotro.cards.effects.TakeOffTheOneRingEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Mines of Moria
|
||||
* Side: Shadow
|
||||
* Culture: Wraith
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Maneuver: Exert a twilight Nazgul to exert the Ring-bearer. If the Ring-bearer is then exhausted, he puts
|
||||
* on The One Ring until the regroup phase.
|
||||
*/
|
||||
public class Card2_079 extends AbstractEvent {
|
||||
public Card2_079() {
|
||||
super(Side.SHADOW, Culture.WRAITH, "Resistance Becomes Unbearable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.NAZGUL), Filters.keyword(Keyword.TWILIGHT));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.race(Race.NAZGUL), Filters.keyword(Keyword.TWILIGHT)));
|
||||
action.appendEffect(
|
||||
new ExertCharacterEffect(self, Filters.keyword(Keyword.RING_BEARER)));
|
||||
action.appendEffect(
|
||||
new Effect() {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectResult.Type getType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectResult[] playEffect(LotroGame game) {
|
||||
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.RING_BEARER), Filters.exhausted())) {
|
||||
action.insertEffect(
|
||||
new PutOnTheOneRingEffect());
|
||||
game.getActionsEnvironment().addUntilEndOfPhaseActionProxy(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends Action> getRequiredAfterTriggers(LotroGame lotroGame, EffectResult effectResults) {
|
||||
if (effectResults.getType() == EffectResult.Type.START_OF_PHASE
|
||||
&& lotroGame.getGameState().getCurrentPhase() == Phase.REGROUP) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new TakeOffTheOneRingEffect());
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}, Phase.REGROUP);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user