"You Do Not Know Pain"
This commit is contained in:
@@ -25,6 +25,14 @@ public class TriggerConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean takenControlOfASite(EffectResult effectResult, String playerId) {
|
||||
if (effectResult.getType() == EffectResult.Type.TAKE_CONTROL_OF_SITE) {
|
||||
TakeControlOfSiteResult takeResult = (TakeControlOfSiteResult) effectResult;
|
||||
return takeResult.getPlayerId().equals(playerId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean startOfPhase(LotroGame game, EffectResult effectResult, Phase phase) {
|
||||
return (effectResult.getType() == EffectResult.Type.START_OF_PHASE
|
||||
&& game.getGameState().getCurrentPhase() == phase);
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.Preventable;
|
||||
import com.gempukku.lotro.logic.timing.results.TakeControlOfSiteResult;
|
||||
|
||||
public class TakeControlOfASiteEffect extends AbstractEffect implements Preventable {
|
||||
private PhysicalCard _source;
|
||||
@@ -68,6 +69,7 @@ public class TakeControlOfASiteEffect extends AbstractEffect implements Preventa
|
||||
if (site != null && !_prevented) {
|
||||
game.getGameState().takeControlOfCard(_playerId, site, Zone.SUPPORT);
|
||||
game.getGameState().sendMessage(_playerId + " took control of " + GameUtils.getCardLink(site));
|
||||
game.getActionsEnvironment().emitEffectResult(new TakeControlOfSiteResult(_playerId));
|
||||
return new FullEffectResult(true, true);
|
||||
}
|
||||
return new FullEffectResult(false, false);
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.gempukku.lotro.cards.set17.uruk_hai;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.LiberateASiteEffect;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
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: 1
|
||||
* Type: Condition • Support Area
|
||||
* Game Text: Each time you take control of a site, you may spot 3 [URUK-HAI] minions to exert an unbound companion.
|
||||
* Skirmish: Liberate a site to make an [URUK-HAI] minion damage +1.
|
||||
*/
|
||||
public class Card17_138 extends AbstractPermanent {
|
||||
public Card17_138() {
|
||||
super(Side.SHADOW, 1, CardType.CONDITION, Culture.URUK_HAI, Zone.SUPPORT, "You Do Not Know Pain");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.takenControlOfASite(effectResult, playerId)
|
||||
&& PlayConditions.canSpot(game, 3, Culture.URUK_HAI, CardType.MINION)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.unboundCompanion));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
|
||||
&& PlayConditions.canLiberateASite(game)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new LiberateASiteEffect(self));
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose an URUK-HAI minion", Culture.URUK_HAI, CardType.MINION) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new KeywordModifier(self, card, Keyword.DAMAGE, 1), Phase.SKIRMISH));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public abstract class EffectResult {
|
||||
|
||||
CHARACTER_ASSIGNED, CARD_TRANSFERRED,
|
||||
|
||||
REPLACE_SITE
|
||||
REPLACE_SITE, TAKE_CONTROL_OF_SITE
|
||||
}
|
||||
|
||||
private Type _type;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.gempukku.lotro.logic.timing.results;
|
||||
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
public class TakeControlOfSiteResult extends EffectResult {
|
||||
private String _playerId;
|
||||
|
||||
public TakeControlOfSiteResult(String playerId) {
|
||||
super(Type.TAKE_CONTROL_OF_SITE);
|
||||
_playerId = playerId;
|
||||
}
|
||||
|
||||
public String getPlayerId() {
|
||||
return _playerId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user