- Fixed Armor of Thorns' trigger firing even if cast at sorcery speed or given instant speed casting by something like Vedalken Orrey (10/1/2009 Ruling: The sacrifice occur only if you cast it using its own ability. If you cast it using some other effect (for instance, if it gained flash from Vedalken Orrery), then it won't be sacrificed. )

This commit is contained in:
moomarc
2012-09-25 12:51:59 +00:00
parent 2bacd4dcfe
commit c0df967d1c
3 changed files with 23 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ Types:Enchantment Aura
Text:no text
K:You may cast CARDNAME as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.
K:Enchant nonblack creature
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigDelayedSac | Static$ True | Secondary$ True | TriggerDescription$ If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigDelayedSac | Static$ True | Secondary$ True | SpellSpeed$ NotSorcerySpeed | TriggerDescription$ If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.
SVar:TrigDelayedSac:AB$ Animate | Cost$ 0 | Defined$ Self | Triggers$ CleanupTrig | sVars$ Sac | Permanent$ True
SVar:CleanupTrig:Mode$ Phase | Phase$ Cleanup | TriggerZones$ Battlefield | Execute$ Sac | TriggerDescription$ At the beginning of the next cleanup step, sacrifice CARDNAME.
SVar:Sac:AB$ Sacrifice | Cost$ 0 | Defined$ Self

View File

@@ -166,17 +166,22 @@ public class TriggerSpellAbilityCast extends Trigger {
}
if (this.getMapParams().containsKey("SpellSpeed")) {
if (this.getHostCard().hasKeyword("You may cast CARDNAME as though it had flash. If you cast it any time "
+ "a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it "
+ "at the beginning of the next cleanup step.")
&& (this.getHostCard().hasKeyword("Flash") || this.getHostCard().hasKeyword("HIDDEN Flash")
|| this.getHostCard().getController().hasKeyword("You may cast nonland cards as though they had flash."))) {
if (this.getMapParams().get("SpellSpeed").equals("NotSorcerySpeed")) {
boolean notSorcerySpeed = true;
if (PhaseHandler.couldCastSorcery(this.getHostCard().getController(), spellAbility)) {
notSorcerySpeed = false;
} else if (this.getHostCard().hasKeyword("You may cast CARDNAME as though it had flash. If you cast it any time a "
+ "sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning"
+ " of the next cleanup step.") && !PhaseHandler.couldCastSorcery(this.getHostCard().getController(), spellAbility)) {
boolean instantmentCast = true;
// for these cards the trigger must only fire if using their own ability to cast at instant speed
return false;
}
else if (this.getMapParams().get("SpellSpeed").equals("NotSorcerySpeed")
&& PhaseHandler.couldCastSorcery(this.getHostCard().getController(), spellAbility)) {
return false;
if (this.getHostCard().hasKeyword("Flash") || this.getHostCard().hasKeyword("HIDDEN Flash")
|| this.getHostCard().getController().hasKeyword("You may cast nonland cards as though they had flash.")) {
instantmentCast = false;
}
notSorcerySpeed = instantmentCast;
}
return notSorcerySpeed;
}
}

View File

@@ -997,14 +997,19 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
public static boolean couldCastSorcery(final Player player, final SpellAbility sa) {
PhaseHandler now = Singletons.getModel().getGameState().getPhaseHandler();
final Card source = sa.getRootSpellAbility().getSourceCard();
boolean onlyThis = true;
if (AllZone.getStack().size() != 0) {
for (final Card card : AllZoneUtil.getCardsIn(ZoneType.Stack)) {
if (card != source) {
return false;
onlyThis = false;
//System.out.println("StackCard: " + card + " vs SourceCard: " + source);
}
}
}
return now.isPlayerTurn(player) && now.getPhase().isMain();
//System.out.println("now.isPlayerTurn(player) - " + now.isPlayerTurn(player));
//System.out.println("now.getPhase().isMain() - " + now.getPhase().isMain());
//System.out.println("onlyThis - " + onlyThis);
return now.isPlayerTurn(player) && now.getPhase().isMain() && onlyThis;
}