"Grima"
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
package com.gempukku.lotro.cards.set19.isengard;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.*;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.PlayersCantUseSpecialAbilitiesModifier;
|
||||
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;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.actions.SubAction;
|
||||
import com.gempukku.lotro.logic.effects.AssignmentEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
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: Ages End
|
||||
* Side: Shadow
|
||||
* Culture: Isengard
|
||||
* Twilight Cost: 2
|
||||
* Type: Minion • Man
|
||||
* Strength: 4
|
||||
* Vitality: 3
|
||||
* Site: 3
|
||||
* Game Text: When you play Grima, you may remove (4) to exert an unbound companion. That companion cannot use special
|
||||
* abilities until the regroup phase. Assignment: Exert Grima to assign him to an unbound companion.
|
||||
* That companion may exert to prevent this.
|
||||
*/
|
||||
public class Card19_016 extends AbstractMinion {
|
||||
public Card19_016() {
|
||||
super(2, 4, 3, 3, Race.MAN, Culture.ISENGARD, "Grima", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)
|
||||
&& game.getGameState().getTwilightPool() >= 4) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new RemoveTwilightEffect(4));
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.unboundCompanion) {
|
||||
@Override
|
||||
protected void forEachCardExertedCallback(PhysicalCard character) {
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseModifierEffect(
|
||||
new PlayersCantUseSpecialAbilitiesModifier(self, character), Phase.REGROUP));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.ASSIGNMENT, self, 0)
|
||||
&& PlayConditions.canSelfExert(self, game)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new SelfExertEffect(self));
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose an unbound companion", Filters.unboundCompanion, Filters.assignableToSkirmishAgainst(Side.SHADOW, self)) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, final PhysicalCard companion) {
|
||||
action.appendEffect(
|
||||
new PreventableEffect(action,
|
||||
new AssignmentEffect(playerId, companion, self),
|
||||
game.getGameState().getCurrentPlayerId(),
|
||||
new PreventableEffect.PreventionCost() {
|
||||
@Override
|
||||
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
|
||||
return new ExertCharactersEffect(self, companion);
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user