"Good Work"
This commit is contained in:
@@ -182,7 +182,7 @@ public class PlayConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean winsSkirmish(GameState gameState, ModifiersQuerying modifiersQuerying, EffectResult effectResult, Filter filter) {
|
||||
public static boolean winsSkirmish(GameState gameState, ModifiersQuerying modifiersQuerying, EffectResult effectResult, Filterable... filter) {
|
||||
EffectResult.Type effectType = effectResult.getType();
|
||||
if (effectType == EffectResult.Type.RESOLVE_SKIRMISH || effectType == EffectResult.Type.OVERWHELM_IN_SKIRMISH) {
|
||||
SkirmishResult skirmishResult = (SkirmishResult) effectResult;
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.gempukku.lotro.cards.set4.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddTokenEffect;
|
||||
import com.gempukku.lotro.cards.effects.RemoveBurdenEffect;
|
||||
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.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Two Towers
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 2
|
||||
* Type: Condition
|
||||
* Game Text: Plays to your support area. Each time a Hobbit wins a skirmish, you may place a [SHIRE] token here.
|
||||
* Fellowship: Remove a burden for each [SHIRE] token here (limit 3). Discard this condition.
|
||||
*/
|
||||
public class Card4_305 extends AbstractPermanent {
|
||||
public Card4_305() {
|
||||
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.SHIRE, Zone.SUPPORT, "Good Work", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Race.HOBBIT)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new AddTokenEffect(self, self, Token.SHIRE));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
int tokenCount = game.getGameState().getTokenCount(self, Token.SHIRE);
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
for (int i = 0; i < tokenCount; i++)
|
||||
action.appendEffect(
|
||||
new RemoveBurdenEffect(self));
|
||||
action.appendEffect(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,5 @@ public enum Token {
|
||||
BURDEN, WOUND,
|
||||
|
||||
DUNLAND, DWARVEN, ELVEN, GANDALF,
|
||||
GONDOR, ISENGARD, RAIDER, ROHAN
|
||||
GONDOR, ISENGARD, RAIDER, ROHAN, SHIRE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user