"White Hand Enforcer"
This commit is contained in:
@@ -37,6 +37,10 @@ public class PlayConditions {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean canLiberateASite(LotroGame game) {
|
||||
return PlayConditions.canSpot(game, Filters.siteControlledByShadowPlayer(game.getGameState().getCurrentPlayerId()));
|
||||
}
|
||||
|
||||
public static boolean canDiscardFromHand(LotroGame game, String playerId, int count, Filterable... cardFilter) {
|
||||
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), cardFilter).size() >= count;
|
||||
}
|
||||
|
||||
@@ -72,8 +72,13 @@ public class LiberateASiteEffect extends AbstractEffect {
|
||||
for (PhysicalCard discardedCard : discardedCards)
|
||||
game.getActionsEnvironment().emitEffectResult(new DiscardCardsFromPlayResult(discardedCard));
|
||||
|
||||
liberatedSiteCallback(siteToLiberate);
|
||||
|
||||
return new FullEffectResult(true, true);
|
||||
}
|
||||
return new FullEffectResult(false, false);
|
||||
}
|
||||
|
||||
public void liberatedSiteCallback(PhysicalCard liberatedSite) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.gempukku.lotro.cards.set17.uruk_hai;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.LiberateASiteEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
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.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Side: Shadow
|
||||
* Culture: Uruk-hai
|
||||
* Twilight Cost: 3
|
||||
* Type: Minion • Uruk-Hai
|
||||
* Strength: 8
|
||||
* Vitality: 2
|
||||
* Site: 5
|
||||
* Game Text: Damage +1. When you play this minion, you may liberate a site to add (X) where X is the Shadow number
|
||||
* of the liberated site.
|
||||
*/
|
||||
public class Card17_125 extends AbstractMinion {
|
||||
public Card17_125() {
|
||||
super(3, 8, 2, 5, Race.URUK_HAI, Culture.URUK_HAI, "White Hand Enforcer");
|
||||
addKeyword(Keyword.DAMAGE, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)
|
||||
&& PlayConditions.canLiberateASite(game)) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new LiberateASiteEffect(self) {
|
||||
@Override
|
||||
public void liberatedSiteCallback(PhysicalCard liberatedSite) {
|
||||
action.appendEffect(
|
||||
new AddTwilightEffect(self, game.getModifiersQuerying().getTwilightCost(game.getGameState(), liberatedSite, false)));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user