- Changed isSorcerySpeed to return true for planeswalker abilities.

- Little tweak in AF Token.
This commit is contained in:
Sloth
2012-01-31 10:23:01 +00:00
parent 59259d7e0c
commit bcd230c1cc
2 changed files with 3 additions and 5 deletions

View File

@@ -299,7 +299,8 @@ public class AbilityFactoryToken extends AbilityFactory {
} }
if ((AllZone.getPhaseHandler().isPlayerTurn(AllZone.getComputerPlayer()) || AllZone.getPhaseHandler().isBefore( if ((AllZone.getPhaseHandler().isPlayerTurn(AllZone.getComputerPlayer()) || AllZone.getPhaseHandler().isBefore(
Constant.Phase.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY)) Constant.Phase.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY))
&& !mapParams.containsKey("ActivationPhases") && !AbilityFactory.isSorcerySpeed(sa)) { && !mapParams.containsKey("ActivationPhases") && !AbilityFactory.isSorcerySpeed(sa)
&& !haste) {
return false; return false;
} }
if ((AllZone.getPhaseHandler().isAfter(Constant.Phase.COMBAT_BEGIN) || AllZone.getPhaseHandler().isPlayerTurn( if ((AllZone.getPhaseHandler().isAfter(Constant.Phase.COMBAT_BEGIN) || AllZone.getPhaseHandler().isPlayerTurn(

View File

@@ -146,6 +146,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
if (params.containsKey("Planeswalker")) { if (params.containsKey("Planeswalker")) {
this.setPlaneswalker(true); this.setPlaneswalker(true);
this.setSorcerySpeed(true);
} }
if (params.containsKey("IsPresent")) { if (params.containsKey("IsPresent")) {
@@ -325,10 +326,6 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
} }
if (this.isPwAbility()) { if (this.isPwAbility()) {
// Planeswalker abilities can only be activated as Sorceries
if (!PhaseHandler.canCastSorcery(activator)) {
return false;
}
for (final SpellAbility pwAbs : c.getAllSpellAbilities()) { for (final SpellAbility pwAbs : c.getAllSpellAbilities()) {
// check all abilities on card that have their planeswalker // check all abilities on card that have their planeswalker