- Fixed "May be played by your opponent" keyword.

This commit is contained in:
Sloth
2012-04-24 14:25:18 +00:00
parent 28a4344fa0
commit 81e6ac33b6

View File

@@ -190,10 +190,14 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
// Not a Spell, or on Battlefield, return false // Not a Spell, or on Battlefield, return false
if (!sa.isSpell() || cardZone.is(ZoneType.Battlefield) || !this.getZone().equals(ZoneType.Hand)) { if (!sa.isSpell() || cardZone.is(ZoneType.Battlefield) || !this.getZone().equals(ZoneType.Hand)) {
return false; return false;
} 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;
} }
if (c.hasKeyword("May be played") && cardZone.getPlayer().isPlayer(c.getController())) {
return true;
}
if (c.hasKeyword("May be played by your opponent") && !cardZone.getPlayer().isPlayer(c.getController())) {
return true;
}
return false;
} }
return true; return true;