"Deep Hatred"
This commit is contained in:
@@ -26,6 +26,17 @@ public class PlayConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isAhead(LotroGame game) {
|
||||
String currentPlayer = game.getGameState().getCurrentPlayerId();
|
||||
int currentPosition = game.getGameState().getCurrentSiteNumber();
|
||||
for (String player : game.getGameState().getPlayerOrder().getAllPlayers()) {
|
||||
if (!player.equals(currentPlayer))
|
||||
if (game.getGameState().getPlayerPosition(player) >= currentPosition)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.gempukku.lotro.cards.set13.dwarven;
|
||||
|
||||
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.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
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.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Bloodlines
|
||||
* Side: Free
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 0
|
||||
* Type: Condition • Support Area
|
||||
* Game Text: Each time the fellowship moves, add (2). Skirmish: Exert a Dwarf who is not assigned to a skirmish
|
||||
* to wound 2 Orcs (or to wound 1 Orc twice). Discard this from play if the fellowship is ahead on the adventure path.
|
||||
*/
|
||||
public class Card13_003 extends AbstractPermanent {
|
||||
public Card13_003() {
|
||||
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.DWARVEN, Zone.SUPPORT, "Deep Hatred");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.isAhead(game)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new SelfDiscardEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
if (TriggerConditions.moves(game, effectResult)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new AddTwilightEffect(self, 2));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
||||
&& PlayConditions.canExert(self, game, Race.DWARF, Filters.notAssignedToSkirmish)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF, Filters.notAssignedToSkirmish));
|
||||
action.appendEffect(
|
||||
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Race.ORC));
|
||||
action.appendEffect(
|
||||
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Race.ORC));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user