From 3dca2704ea744e7efacb184f6d3b7ac6d95730c4 Mon Sep 17 00:00:00 2001 From: "marcin.sciesinski" Date: Mon, 7 Oct 2019 20:02:02 -0700 Subject: [PATCH] Fixing couple of bugs --- .../src/main/web/cards/set31/set31-sites.json | 8 +++++ .../src/main/web/cards/set32/set32-fp.json | 8 +++-- .../src/main/web/cards/set40/set40.json | 7 ++++ .../cards/build/BuiltLotroCardBlueprint.java | 36 ++++++++++++------- 4 files changed, 44 insertions(+), 15 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set31/set31-sites.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set31/set31-sites.json index 9b9550306..bb3996494 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set31/set31-sites.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set31/set31-sites.json @@ -158,6 +158,7 @@ }, "effect": { "type": "choice", + "player": "fp", "texts": [ "Exert Thorin", "Exert 2 other companions" @@ -256,6 +257,13 @@ "filter": "orc", "memorize": "playedOrc" }, + "condition": { + "type": "not", + "condition": { + "type": "hasInZoneData", + "filter": "self" + } + }, "effect": { "type": "appendCardIdsToWhileInZone", "memory": "playedOrc" diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set32/set32-fp.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set32/set32-fp.json index dbf9ab6e3..e284f933c 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set32/set32-fp.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set32/set32-fp.json @@ -444,7 +444,7 @@ }, "effect": { "type": "heal", - "filter": "self" + "filter": "choose(name(Gandalf))" } }, { @@ -757,7 +757,8 @@ { "type": "modifyStrength", "filter": "memory(exertedAlly)", - "amount": 3 + "amount": 3, + "until": "start(regroup)" }, { "type": "allyCanParticipateInArcheryFireAndSkirmishes", @@ -786,7 +787,8 @@ "type": "forEachYouCanSpot", "filter": "or(name(Gandalf),name(Elrond),name(Galadriel))" "multiplier": -1 - } + }, + "until": "start(regroup)" } } }, diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40.json index ecf135b8f..171914de2 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40.json @@ -374,6 +374,13 @@ "filter": "nazgul", "memorize": "playedNazgul" }, + "condition": { + "type": "not", + "condition": { + "type": "hasInZoneData", + "filter": "self" + } + }, "effect": { "type": "appendCardIdsToWhileInZone", "memory": "playedNazgul" diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/BuiltLotroCardBlueprint.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/BuiltLotroCardBlueprint.java index fcfa10c90..4367c5a7a 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/BuiltLotroCardBlueprint.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/BuiltLotroCardBlueprint.java @@ -848,9 +848,12 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint { return null; DefaultActionContext actionContext = new DefaultActionContext(self.getOwner(), game, self, null, null); - RequiredTriggerAction action = new RequiredTriggerAction(self); - discardedFromPlayRequiredTriggerAction.createAction(action, actionContext); - return action; + if (discardedFromPlayRequiredTriggerAction.isValid(actionContext)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + discardedFromPlayRequiredTriggerAction.createAction(action, actionContext); + return action; + } + return null; } @Override @@ -859,9 +862,12 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint { return null; DefaultActionContext actionContext = new DefaultActionContext(playerId, game, self, null, null); - OptionalTriggerAction action = new OptionalTriggerAction(self); - discardedFromPlayOptionalTriggerAction.createAction(action, actionContext); - return action; + if (discardedFromPlayOptionalTriggerAction.isValid(actionContext)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + discardedFromPlayOptionalTriggerAction.createAction(action, actionContext); + return action; + } + return null; } @Override @@ -870,9 +876,12 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint { return null; DefaultActionContext actionContext = new DefaultActionContext(self.getOwner(), game, self, null, null); - RequiredTriggerAction action = new RequiredTriggerAction(self); - killedRequiredTriggerAction.createAction(action, actionContext); - return action; + if (killedRequiredTriggerAction.isValid(actionContext)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + killedRequiredTriggerAction.createAction(action, actionContext); + return action; + } + return null; } @Override @@ -881,9 +890,12 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint { return null; DefaultActionContext actionContext = new DefaultActionContext(playerId, game, self, null, null); - OptionalTriggerAction action = new OptionalTriggerAction(self); - killedOptionalTriggerAction.createAction(action, actionContext); - return action; + if (killedOptionalTriggerAction.isValid(actionContext)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + killedOptionalTriggerAction.createAction(action, actionContext); + return action; + } + return null; } @Override