From 00e56cef4675956454f08a0146f3e4a54c46a9cb Mon Sep 17 00:00:00 2001 From: Sloth Date: Sat, 21 Apr 2012 21:13:15 +0000 Subject: [PATCH] - Fixed a bug with "May be played by your opponent". --- .../java/forge/card/spellability/SpellAbilityRestriction.java | 3 ++- src/main/java/forge/game/player/ComputerUtil.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/forge/card/spellability/SpellAbilityRestriction.java b/src/main/java/forge/card/spellability/SpellAbilityRestriction.java index 97efe12038d..d250184fa19 100644 --- a/src/main/java/forge/card/spellability/SpellAbilityRestriction.java +++ b/src/main/java/forge/card/spellability/SpellAbilityRestriction.java @@ -190,7 +190,8 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { // Not a Spell, or on Battlefield, return false if (!sa.isSpell() || cardZone.is(ZoneType.Battlefield) || !this.getZone().equals(ZoneType.Hand)) { return false; - } else if (!c.hasKeyword("May be played") && !c.hasKeyword("May be played by your opponent")) { + } else if (!(c.hasKeyword("May be played") && cardZone.getPlayer().isPlayer(c.getController())) + && !(c.hasKeyword("May be played by your opponent") && !cardZone.getPlayer().isPlayer(c.getController()))) { return false; } } diff --git a/src/main/java/forge/game/player/ComputerUtil.java b/src/main/java/forge/game/player/ComputerUtil.java index 15b0bc872f7..78c92e020ce 100644 --- a/src/main/java/forge/game/player/ComputerUtil.java +++ b/src/main/java/forge/game/player/ComputerUtil.java @@ -1183,7 +1183,7 @@ public class ComputerUtil { final CardList lands = computer.getCardsIn(ZoneType.Graveyard); for (final Card crd : lands) { - if (crd.isLand() && crd.hasStartOfKeyword("May be played")) { + if (crd.isLand() && crd.hasKeyword("May be played")) { landList.add(crd); } }