mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
* 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:
parent
59fabeee20
commit
f3019d70fd
1 changed files with 6 additions and 4 deletions
|
|
@ -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,9 +57,11 @@ 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()),
|
||||||
ability.addTarget(new TargetArtifactPermanent());
|
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());
|
||||||
this.addAbility(ability, new ManaSpentToCastWatcher());
|
this.addAbility(ability, new ManaSpentToCastWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue