Cleaning up Playing actions.

This commit is contained in:
marcins78@gmail.com
2011-08-30 10:30:26 +00:00
parent e72add4247
commit 0b79620dc7
36 changed files with 85 additions and 120 deletions

View File

@@ -1,6 +1,6 @@
package com.gempukku.lotro.cards;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
@@ -37,7 +37,7 @@ public class AbstractAlly extends AbstractLotroCardBlueprint {
protected void appendPlayAllyActions(List<Action> actions, LotroGame lotroGame, PhysicalCard self) {
ModifiersQuerying modifiersQuerying = lotroGame.getModifiersQuerying();
if (PlayConditions.canPlayCharacterDuringFellowship(lotroGame.getGameState(), modifiersQuerying, self)) {
actions.add(new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT));
actions.add(new PlayPermanentAction(self, Zone.FREE_SUPPORT));
}
}

View File

@@ -1,6 +1,6 @@
package com.gempukku.lotro.cards;
import com.gempukku.lotro.cards.actions.AttachPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.AttachPermanentAction;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filter;
import com.gempukku.lotro.filters.Filters;
@@ -38,7 +38,7 @@ public class AbstractAttachable extends AbstractLotroCardBlueprint {
&& (!blueprint.isUnique() || !Filters.canSpot(gameState, game.getModifiersQuerying(), Filters.name(blueprint.getName())))
&& Filters.canSpot(gameState, game.getModifiersQuerying(), validTargetFilter)) {
actions.add(new AttachPermanentFromHandAction(self, validTargetFilter, playCostModifiers));
actions.add(new AttachPermanentAction(self, validTargetFilter, playCostModifiers));
}
}

View File

@@ -1,7 +1,6 @@
package com.gempukku.lotro.cards;
import com.gempukku.lotro.cards.actions.PlayPermanentFromDeckAction;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -43,10 +42,9 @@ public abstract class AbstractCompanion extends AbstractLotroCardBlueprint {
protected void appendPlayCompanionActions(List<Action> actions, LotroGame lotroGame, PhysicalCard self) {
ModifiersQuerying modifiersQuerying = lotroGame.getModifiersQuerying();
if (PlayConditions.canPlayCompanionDuringSetup(lotroGame.getGameState(), modifiersQuerying, self)) {
actions.add(new PlayPermanentFromDeckAction(self, Zone.FREE_CHARACTERS));
} else if (PlayConditions.canPlayCharacterDuringFellowship(lotroGame.getGameState(), modifiersQuerying, self)) {
actions.add(new PlayPermanentFromHandAction(self, Zone.FREE_CHARACTERS));
if (PlayConditions.canPlayCompanionDuringSetup(lotroGame.getGameState(), modifiersQuerying, self)
|| PlayConditions.canPlayCharacterDuringFellowship(lotroGame.getGameState(), modifiersQuerying, self)) {
actions.add(new PlayPermanentAction(self, Zone.FREE_CHARACTERS));
}
}

View File

@@ -1,6 +1,6 @@
package com.gempukku.lotro.cards;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
@@ -33,7 +33,7 @@ public class AbstractMinion extends AbstractLotroCardBlueprint {
protected void appendPlayMinionAction(List<Action> actions, LotroGame lotroGame, PhysicalCard self) {
ModifiersQuerying modifiersQuerying = lotroGame.getModifiersQuerying();
if (PlayConditions.canPlayMinionDuringShadow(lotroGame.getGameState(), modifiersQuerying, self)) {
actions.add(new PlayPermanentFromHandAction(self, Zone.SHADOW_CHARACTERS));
actions.add(new PlayPermanentAction(self, Zone.SHADOW_CHARACTERS));
}
}

View File

@@ -1,6 +1,7 @@
package com.gempukku.lotro.cards.actions;
import com.gempukku.lotro.cards.effects.*;
import com.gempukku.lotro.common.Zone;
import com.gempukku.lotro.filters.Filter;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
@@ -11,14 +12,14 @@ import com.gempukku.lotro.logic.timing.results.PlayCardResult;
import java.util.Map;
public class AttachPermanentFromHandAction extends CostToEffectAction {
public AttachPermanentFromHandAction(final PhysicalCard card, Filter filter, final Map<Filter, Integer> attachCostModifiers) {
public class AttachPermanentAction extends CostToEffectAction {
public AttachPermanentAction(final PhysicalCard card, Filter filter, final Map<Filter, Integer> attachCostModifiers) {
super(card, "Attach " + card.getBlueprint().getName() + " from hand");
addCost(new ChooseActiveCardEffect(card.getOwner(), "Choose target to attach to", filter) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard target) {
addCost(new RemoveCardFromHandEffect(card));
addCost(new RemoveCardFromZoneEffect(card));
int modifier = 0;
for (Map.Entry<Filter, Integer> filterIntegerEntry : attachCostModifiers.entrySet())
@@ -28,6 +29,8 @@ public class AttachPermanentFromHandAction extends CostToEffectAction {
addCost(new PayPlayOnTwilightCostEffect(card, target, modifier));
addEffect(new AttachCardFromHandEffect(card, target));
if (card.getZone() == Zone.DECK)
addEffect(new ShuffleDeckEffect(card.getOwner()));
addEffect(new CardAffectingGameEffect(card));
addEffect(new TriggeringEffect(new PlayCardResult(card)));

View File

@@ -2,19 +2,23 @@ package com.gempukku.lotro.cards.actions;
import com.gempukku.lotro.cards.effects.PayTwilightCostEffect;
import com.gempukku.lotro.cards.effects.PutCardIntoDiscardEffect;
import com.gempukku.lotro.cards.effects.RemoveCardFromHandEffect;
import com.gempukku.lotro.cards.effects.RemoveCardFromZoneEffect;
import com.gempukku.lotro.cards.effects.ShuffleDeckEffect;
import com.gempukku.lotro.common.Zone;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.logic.actions.CostToEffectAction;
import com.gempukku.lotro.logic.effects.TriggeringEffect;
import com.gempukku.lotro.logic.timing.results.PlayCardResult;
public class PlayEventFromHandAction extends CostToEffectAction {
public PlayEventFromHandAction(PhysicalCard card) {
public class PlayEventAction extends CostToEffectAction {
public PlayEventAction(PhysicalCard card) {
super(card, "Play " + card.getBlueprint().getName() + " from hand");
addCost(new RemoveCardFromHandEffect(card));
addCost(new RemoveCardFromZoneEffect(card));
addCost(new PayTwilightCostEffect(card));
if (card.getZone() == Zone.DECK)
addEffect(new ShuffleDeckEffect(card.getOwner()));
addEffect(new TriggeringEffect(new PlayCardResult(card)));
addEffect(new PutCardIntoDiscardEffect(card));

View File

@@ -7,18 +7,20 @@ import com.gempukku.lotro.logic.actions.CostToEffectAction;
import com.gempukku.lotro.logic.effects.TriggeringEffect;
import com.gempukku.lotro.logic.timing.results.PlayCardResult;
public class PlayPermanentFromHandAction extends CostToEffectAction {
public PlayPermanentFromHandAction(PhysicalCard card, Zone zone) {
public class PlayPermanentAction extends CostToEffectAction {
public PlayPermanentAction(PhysicalCard card, Zone zone) {
this(card, zone, 0);
}
public PlayPermanentFromHandAction(PhysicalCard card, Zone zone, int twilightModifier) {
super(card, "Play " + card.getBlueprint().getName() + " from hand");
public PlayPermanentAction(PhysicalCard card, Zone zone, int twilightModifier) {
super(card, "Play " + card.getBlueprint().getName());
addCost(new RemoveCardFromHandEffect(card));
addCost(new RemoveCardFromZoneEffect(card));
addCost(new PayTwilightCostEffect(card, twilightModifier));
addEffect(new PutCardIntoPlayEffect(card, zone));
if (card.getZone() == Zone.DECK)
addEffect(new ShuffleDeckEffect(card.getOwner()));
addEffect(new CardAffectingGameEffect(card));
addEffect(new TriggeringEffect(new PlayCardResult(card)));

View File

@@ -1,24 +0,0 @@
package com.gempukku.lotro.cards.actions;
import com.gempukku.lotro.cards.effects.*;
import com.gempukku.lotro.common.Zone;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.logic.actions.CostToEffectAction;
import com.gempukku.lotro.logic.effects.TriggeringEffect;
import com.gempukku.lotro.logic.timing.results.PlayCardResult;
public class PlayPermanentFromDeckAction extends CostToEffectAction {
public PlayPermanentFromDeckAction(PhysicalCard card, Zone zone) {
super(card, "Play " + card.getBlueprint().getName() + " from deck");
addCost(new RemoveCardFromDeckEffect(card));
addCost(new PayTwilightCostEffect(card));
addEffect(new PutCardIntoPlayEffect(card, zone));
addEffect(new ShuffleDeckEffect(card.getOwner()));
addEffect(new CardAffectingGameEffect(card));
addEffect(new TriggeringEffect(new PlayCardResult(card)));
addFailedCostEffect(new PutCardIntoDiscardEffect(card));
}
}

View File

@@ -1,18 +0,0 @@
package com.gempukku.lotro.cards.effects;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
public class RemoveCardFromDeckEffect extends UnrespondableEffect {
private PhysicalCard _physicalCard;
public RemoveCardFromDeckEffect(PhysicalCard physicalCard) {
_physicalCard = physicalCard;
}
@Override
public void playEffect(LotroGame game) {
game.getGameState().removeCardFromZone(_physicalCard);
}
}

View File

@@ -4,10 +4,10 @@ import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
public class RemoveCardFromHandEffect extends UnrespondableEffect {
public class RemoveCardFromZoneEffect extends UnrespondableEffect {
private PhysicalCard _physicalCard;
public RemoveCardFromHandEffect(PhysicalCard physicalCard) {
public RemoveCardFromZoneEffect(PhysicalCard physicalCard) {
_physicalCard = physicalCard;
}

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.*;
@@ -33,7 +33,7 @@ public class Card1_003 extends AbstractLotroCardBlueprint {
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH) {
List<Action> actions = new LinkedList<Action>();
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
List<PhysicalCard> dwarves = Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF));
if (dwarves.size() > 0) {
action.addEffect(

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.*;
@@ -37,7 +37,7 @@ public class Card1_004 extends AbstractLotroCardBlueprint {
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF), Filters.canExert())) {
List<Action> actions = new LinkedList<Action>();
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose Dwarf to exert", Filters.keyword(Keyword.DWARF), Filters.canExert()) {
@Override

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -40,7 +40,7 @@ public class Card1_005 extends AbstractLotroCardBlueprint {
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH) {
List<Action> actions = new LinkedList<Action>();
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
List<PhysicalCard> dwarves = Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF));
if (dwarves.size() > 0) {
action.addEffect(

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
@@ -41,7 +41,7 @@ public class Card1_006 extends AbstractLotroCardBlueprint {
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF), Filters.type(CardType.COMPANION), Filters.canExert())) {
List<Action> actions = new LinkedList<Action>();
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose Dwarf companion", Filters.keyword(Keyword.DWARF), Filters.type(CardType.COMPANION), Filters.canExert()) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.DiscardTopCardFromDeckEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.*;
@@ -42,7 +42,7 @@ public class Card1_016 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (!Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name(getName()))
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF), Filters.canExert())) {
final PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
final PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose Dwarf to exert", Filters.keyword(Keyword.DWARF), Filters.canExert()) {
@Override

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -38,7 +38,7 @@ public class Card1_019 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (game.getGameState().getCurrentPhase() == Phase.MANEUVER
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF), Filters.canExert())) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose Dwarf to exert", Filters.canExert(), Filters.keyword(Keyword.DWARF)) {
@Override

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -39,7 +39,7 @@ public class Card1_020 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (game.getGameState().getCurrentPhase() == Phase.FELLOWSHIP
&& self.getZone() == Zone.HAND) {
PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
return Collections.<Action>singletonList(action);
}
return null;

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -35,7 +35,7 @@ public class Card1_021 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (game.getGameState().getCurrentPhase() == Phase.FELLOWSHIP
&& self.getZone() == Zone.HAND) {
PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
return Collections.<Action>singletonList(action);
}
return null;

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -42,7 +42,7 @@ public class Card1_022 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (game.getGameState().getCurrentPhase() == Phase.MANEUVER
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF), Filters.canExert())) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose Dwarf to exert", Filters.keyword(Keyword.DWARF), Filters.canExert()) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filter;
@@ -40,7 +40,7 @@ public class Card1_024 extends AbstractLotroCardBlueprint {
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
return Collections.<Action>singletonList(new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT));
return Collections.<Action>singletonList(new PlayPermanentAction(self, Zone.FREE_SUPPORT));
}
return null;
}

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -38,7 +38,7 @@ public class Card1_025 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayableWhenActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (self.getZone() == Zone.HAND && PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.keyword(Keyword.DWARF))) {
SkirmishResult skirmishResult = (SkirmishResult) effectResult;
PlayEventFromHandAction action = new PlayEventFromHandAction(self);
PlayEventAction action = new PlayEventAction(self);
action.addEffect(new HealCardEffect(skirmishResult.getWinners().get(0)));
return Collections.<Action>singletonList(action);
}

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -37,7 +37,7 @@ public class Card1_026 extends AbstractLotroCardBlueprint {
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, final LotroGame game, final PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
PlayEventFromHandAction action = new PlayEventFromHandAction(self);
PlayEventAction action = new PlayEventAction(self);
action.addEffect(
new ChooseActiveCardEffect(playerId, "Choose Dwarf", Filters.keyword(Keyword.DWARF)) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseActionProxyEffect;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.DiscardCardAtRandomFromHandEffect;
@@ -43,7 +43,7 @@ public class Card1_029 extends AbstractLotroCardBlueprint {
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF)) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.*;
@@ -38,7 +38,7 @@ public class Card1_032 extends AbstractLotroCardBlueprint {
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addEffect(
new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF)) {

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.SpotEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filter;
@@ -42,7 +42,7 @@ public class Card1_035 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF))) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(new SpotEffect(Filters.keyword(Keyword.ELF)));
action.addEffect(
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.*;
@@ -38,7 +38,7 @@ public class Card1_037 extends AbstractLotroCardBlueprint {
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addEffect(
new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF)) {

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.SpotEffect;
import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier;
@@ -38,7 +38,7 @@ public class Card1_038 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.ARCHERY, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHERY), Filters.type(CardType.COMPANION))) {
PlayEventFromHandAction action = new PlayEventFromHandAction(self);
PlayEventAction action = new PlayEventAction(self);
action.addCost(new SpotEffect(Filters.and(Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHERY), Filters.type(CardType.COMPANION))));
action.addEffect(new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 1), Phase.ARCHERY));

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.RemoveBurderEffect;
import com.gempukku.lotro.cards.effects.SpotEffect;
import com.gempukku.lotro.common.*;
@@ -37,7 +37,7 @@ public class Card1_039 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF))) {
PlayEventFromHandAction action = new PlayEventFromHandAction(self);
PlayEventAction action = new PlayEventAction(self);
action.addCost(new SpotEffect(Filters.keyword(Keyword.ELF)));
action.addEffect(new RemoveBurderEffect(playerId));

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -41,7 +41,7 @@ public class Card1_043 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Far-seeing Eyes"))) {
PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
return Collections.singletonList(action);
}
return null;

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -38,7 +38,7 @@ public class Card1_044 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.canExert())) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF), Filters.canExert()) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.common.*;
@@ -56,7 +56,7 @@ public class Card1_045 extends AbstractAlly {
LotroCardBlueprint blueprint = card.getBlueprint();
if (!blueprint.isUnique() || !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name(blueprint.getName()))) {
Zone zone = (blueprint.getCardType() == CardType.COMPANION) ? Zone.FREE_CHARACTERS : Zone.FREE_SUPPORT;
game.getActionsEnvironment().addActionToStack(new PlayPermanentFromHandAction(card, zone, -1000));
game.getActionsEnvironment().addActionToStack(new PlayPermanentAction(card, zone, -1000));
}
}
});

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.AddUntilEndOfTurnModifierEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.modifiers.MoveLimitModifier;
@@ -42,7 +42,7 @@ public class Card1_046 extends AbstractLotroCardBlueprint {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.type(CardType.ALLY), Filters.canExert())
&& !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Gift of Boats"))) {
final PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
final PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose an Elf ally to exert", Filters.keyword(Keyword.ELF), Filters.type(CardType.ALLY), Filters.canExert()) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.PutCardFromHandOnBottomOfDeckEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -38,7 +38,7 @@ public class Card1_054 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
return Collections.singletonList(action);
}

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.*;
@@ -43,7 +43,7 @@ public class Card1_055 extends AbstractLotroCardBlueprint {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("The Mirror of Galadriel")))
actions.add(new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT));
actions.add(new PlayPermanentAction(self, Zone.FREE_SUPPORT));
if (game.getGameState().getCurrentPhase() == Phase.MANEUVER
&& self.getZone() == Zone.FREE_SUPPORT

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventFromHandAction;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -38,7 +38,7 @@ public class Card1_058 extends AbstractLotroCardBlueprint {
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.canExert()) >= 2) {
final PlayEventFromHandAction action = new PlayEventFromHandAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Exert first Elf", Filters.keyword(Keyword.ELF)) {
@Override

View File

@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentFromHandAction;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.AddTwilightEffect;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
@@ -42,7 +42,7 @@ public class Card1_059 extends AbstractLotroCardBlueprint {
@Override
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
PlayPermanentFromHandAction action = new PlayPermanentFromHandAction(self, Zone.FREE_SUPPORT);
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
return Collections.singletonList(action);
}