From 5da9cd74ddd79f9c900ae0c83eb5819cce684972 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Tue, 20 Aug 2013 14:33:20 +0000 Subject: [PATCH] - "Pathfinder" and "Follow Smeagol" no longer allow to replace your own site. --- .../src/main/web/includes/changeLog.html | 1 + .../lotro/cards/set1/gondor/Card1_110.java | 17 +++++++++++++---- .../lotro/cards/set5/gollum/Card5_023.java | 16 ++++++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html b/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html index b76a95b2a..99bc89750 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html @@ -3,6 +3,7 @@ - "War and Valor" from Second Edition now applies to Gondor Man, not Gondor Ranger (per card text). - "Curse Their Foul Feet!" now discards only cards if the hand could be revealed. - "At His Command" no longer allows to applied the bonus to a ring-bound companion. +- "Pathfinder" and "Follow Smeagol" no longer allow to replace your own site. 20 Jun. 2013 - "They Sang as They Slew" correctly counts the exerted cards. diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gondor/Card1_110.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gondor/Card1_110.java index 8cfc3044c..38dd7d236 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gondor/Card1_110.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gondor/Card1_110.java @@ -2,6 +2,7 @@ package com.gempukku.lotro.cards.set1.gondor; import com.gempukku.lotro.cards.AbstractOldEvent; import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.PlayNextSiteEffect; import com.gempukku.lotro.common.Culture; import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; @@ -9,7 +10,7 @@ import com.gempukku.lotro.common.Side; 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.PlaySiteEffect; +import com.gempukku.lotro.logic.timing.UnrespondableEffect; /** * Set: The Fellowship of the Ring @@ -26,9 +27,17 @@ public class Card1_110 extends AbstractOldEvent { } @Override - public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { - PlayEventAction action = new PlayEventAction(self, true); - action.appendEffect(new PlaySiteEffect(action, playerId, null, game.getGameState().getCurrentSiteNumber() + 1)); + public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action = new PlayEventAction(self, true); + action.appendEffect( + new UnrespondableEffect() { + @Override + protected void doPlayEffect(LotroGame game) { + final PhysicalCard nextSite = game.getGameState().getSite(game.getGameState().getCurrentSiteNumber() + 1); + if (nextSite == null || !nextSite.getOwner().equals(playerId)) + action.appendEffect(new PlayNextSiteEffect(action, playerId)); + } + }); return action; } diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_023.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_023.java index 2b874e6b7..19f54f226 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_023.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_023.java @@ -2,6 +2,7 @@ package com.gempukku.lotro.cards.set5.gollum; import com.gempukku.lotro.cards.AbstractAttachable; import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.PlayNextSiteEffect; import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; import com.gempukku.lotro.common.CardType; import com.gempukku.lotro.common.Culture; @@ -12,8 +13,8 @@ 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.effects.PlaySiteEffect; import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.UnrespondableEffect; import java.util.Collections; import java.util.List; @@ -38,14 +39,21 @@ public class Card5_023 extends AbstractAttachable { } @Override - protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + protected List getExtraPhaseActions(final String playerId, LotroGame game, PhysicalCard self) { if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self) && PlayConditions.canExert(self, game, Filters.gollumOrSmeagol)) { - ActivateCardAction action = new ActivateCardAction(self); + final ActivateCardAction action = new ActivateCardAction(self); action.appendCost( new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gollumOrSmeagol)); action.appendEffect( - new PlaySiteEffect(action, playerId, null, game.getGameState().getCurrentSiteNumber() + 1)); + new UnrespondableEffect() { + @Override + protected void doPlayEffect(LotroGame game) { + final PhysicalCard nextSite = game.getGameState().getSite(game.getGameState().getCurrentSiteNumber() + 1); + if (nextSite == null || !nextSite.getOwner().equals(playerId)) + action.appendEffect(new PlayNextSiteEffect(action, playerId)); + } + }); return Collections.singletonList(action); } return null;