* Tin Street Hooligan - Fix that ETB trigger went on the stack even if G was not spent to cast it

This commit is contained in:
Quercitron 2015-11-21 03:22:46 +03:00
parent 59fabeee20
commit f3019d70fd

View file

@ -32,7 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
@ -57,8 +57,10 @@ public class TinStreetHooligan extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact. // When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyTargetEffect(), new ManaWasSpentCondition(ColoredManaSymbol.G), Ability ability = new ConditionalTriggeredAbility(
"if {G} was spent to cast {this}, destroy target artifact"), false); new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()),
new ManaWasSpentCondition(ColoredManaSymbol.G),
"When {this} enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.");
ability.addTarget(new TargetArtifactPermanent()); ability.addTarget(new TargetArtifactPermanent());
this.addAbility(ability, new ManaSpentToCastWatcher()); this.addAbility(ability, new ManaSpentToCastWatcher());
} }