"Severed His Bonds"
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
import com.gempukku.lotro.common.Filterable;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
public class CancelSkirmishEffect extends AbstractEffect {
|
||||
private Filter _involvementFilter;
|
||||
private Filterable[] _involvementFilter;
|
||||
|
||||
public CancelSkirmishEffect() {
|
||||
}
|
||||
|
||||
public CancelSkirmishEffect(Filter involvementFilter) {
|
||||
public CancelSkirmishEffect(Filterable... involvementFilter) {
|
||||
_involvementFilter = involvementFilter;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CancelSkirmishEffect extends AbstractEffect {
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return game.getGameState().getSkirmish() != null
|
||||
&& !game.getGameState().getSkirmish().isCancelled()
|
||||
&& (_involvementFilter == null || Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.inSkirmish, _involvementFilter) > 0);
|
||||
&& (_involvementFilter == null || Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.and(_involvementFilter, Filters.inSkirmish)) > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Card4_303 extends AbstractAttachableFPPossession {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
boolean firstOption = (game.getGameState().getCurrentSiteNumber() == 1 && game.getGameState().getCurrentSiteBlock() == Block.TWO_TOWERS);
|
||||
boolean firstOption = (game.getGameState().getCurrentSiteNumber() <= 4 && game.getGameState().getCurrentSiteBlock() == Block.TWO_TOWERS);
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
if (firstOption) {
|
||||
action.appendCost(
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gempukku.lotro.cards.set4.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.CancelSkirmishEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.OverwhelmedByMultiplierModifier;
|
||||
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.effects.ChooseActiveCardEffect;
|
||||
|
||||
/**
|
||||
* Set: The Two Towers
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Stealth. Skirmish: At sites 1T to 4T, cancel a skirmish involving a Hobbit. At any other site, prevent
|
||||
* a Hobbit from being overwhelmed unless his or her strength is tripled.
|
||||
*/
|
||||
public class Card4_319 extends AbstractEvent {
|
||||
public Card4_319() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.SHIRE, "Severed His Bonds", Phase.SKIRMISH);
|
||||
addKeyword(Keyword.STEALTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
boolean firstOption = (game.getGameState().getCurrentSiteNumber() <= 4 && game.getGameState().getCurrentSiteBlock() == Block.TWO_TOWERS);
|
||||
if (firstOption) {
|
||||
action.appendEffect(
|
||||
new CancelSkirmishEffect(Race.HOBBIT));
|
||||
} else {
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose a Hobbit", Race.HOBBIT) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
action.insertEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new OverwhelmedByMultiplierModifier(self, Filters.sameCard(card), 3), Phase.SKIRMISH));
|
||||
}
|
||||
});
|
||||
}
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user