"New Authority"

This commit is contained in:
marcins78@gmail.com
2011-12-04 18:32:00 +00:00
parent df064defe9
commit 07850e5d50

View File

@@ -0,0 +1,64 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.CancelActivatedEffect;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.common.*;
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.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.ActivateCardResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: To play, spot a [GANDALF] Wizard. Each time a Shadow card adds a burden, you may remove (3).
* Response: If a minion uses its special ability, discard this condition to cancel the effect of that special ability.
*/
public class Card11_037 extends AbstractPermanent {
public Card11_037() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, Zone.SUPPORT, "New Authority", true);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canSpot(game, Culture.GANDALF, Race.WIZARD);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.addedBurden(game, effectResult, Side.SHADOW)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new RemoveTwilightEffect(3));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.activated(game, effectResult, CardType.MINION)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new CancelActivatedEffect(self, (ActivateCardResult) effectResult));
return Collections.singletonList(action);
}
return null;
}
}