"City of the Trees"
This commit is contained in:
@@ -34,6 +34,10 @@ public class TriggerConditions {
|
||||
&& game.getGameState().getCurrentPhase() == phase);
|
||||
}
|
||||
|
||||
public static boolean endOfTurn(LotroGame game, EffectResult effectResult) {
|
||||
return effectResult.getType() == EffectResult.Type.END_OF_TURN;
|
||||
}
|
||||
|
||||
public static boolean winsSkirmish(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
if (effectResult.getType() == EffectResult.Type.CHARACTER_WON_SKIRMISH) {
|
||||
CharacterWonSkirmishResult wonResult = (CharacterWonSkirmishResult) effectResult;
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.gempukku.lotro.cards.set13.elven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Bloodlines
|
||||
* Side: Free
|
||||
* Culture: Elven
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition • Support Area
|
||||
* Game Text: At the end of your turn, discard this from play if the fellowship did not move more than once this turn.
|
||||
* At the start of each skirmish involving an Elf and a wounded minion, you may draw a card.
|
||||
*/
|
||||
public class Card13_012 extends AbstractPermanent {
|
||||
public Card13_012() {
|
||||
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "City of the Trees");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.endOfTurn(game, effectResult)
|
||||
&& game.getGameState().getMoveCount() == 1) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new SelfDiscardEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH)
|
||||
&& PlayConditions.canSpot(game, Race.ELF, Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user