"An Invisible Ring"

This commit is contained in:
PhallenCassidy
2016-11-30 12:58:40 -05:00
committed by GitHub
parent d5fed464e8
commit 10fad228e8

View File

@@ -0,0 +1,48 @@
package com.gempukku.lotro.cards.set31.shire;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.cards.modifiers.RemoveGameTextModifier;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
/**
* Set: The Short Rest
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Event
* Game Text: Skirmish: Make Bilbo strength +2. If he wears the One Ring, until the regroup phase,
* remove the game text from a minion (except Sauron) skirmishing him and make it unable to
* gain game text.
*/
public class Card31_039 extends AbstractEvent {
public Card31_039() {
super(Side.FREE_PEOPLE, 1, Culture.SHIRE, "An Invisible Ring", Phase.SKIRMISH);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Filters.name("Bilbo")));
if (game.getGameState().isWearingRing()) {
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION, Filters.inSkirmishAgainst(Filters.name("Bilbo"))) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new RemoveGameTextModifier(self, card), Phase.REGROUP));
}
});
}
return action;
}
}