mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
don't use wrong base class for trigger
This commit is contained in:
parent
d7e4f9d69a
commit
2d076e1340
1 changed files with 15 additions and 4 deletions
|
|
@ -87,9 +87,10 @@ public class ScytheOfTheWretched extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScytheOfTheWretchedAbility extends DiesAndDealtDamageThisTurnTriggeredAbility {
|
class ScytheOfTheWretchedAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
public ScytheOfTheWretchedAbility() {
|
public ScytheOfTheWretchedAbility() {
|
||||||
super(new ScytheOfTheWretchedReanimateEffect());
|
super(Zone.ALL, new ScytheOfTheWretchedReanimateEffect(), false);
|
||||||
Effect attachToThatCreature = new AttachEffect(Outcome.AddAbility);
|
Effect attachToThatCreature = new AttachEffect(Outcome.AddAbility);
|
||||||
attachToThatCreature.setText("Attach {this} to that creature.");
|
attachToThatCreature.setText("Attach {this} to that creature.");
|
||||||
addEffect(attachToThatCreature);
|
addEffect(attachToThatCreature);
|
||||||
|
|
@ -100,10 +101,15 @@ class ScytheOfTheWretchedAbility extends DiesAndDealtDamageThisTurnTriggeredAbil
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DiesAndDealtDamageThisTurnTriggeredAbility copy() {
|
public ScytheOfTheWretchedAbility copy() {
|
||||||
return new ScytheOfTheWretchedAbility(this);
|
return new ScytheOfTheWretchedAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent equippedCreature = getEquippedCreature(game);
|
Permanent equippedCreature = getEquippedCreature(game);
|
||||||
|
|
@ -122,6 +128,11 @@ class ScytheOfTheWretchedAbility extends DiesAndDealtDamageThisTurnTriggeredAbil
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever a creature dealt damage by equipped creature this turn dies, " + super.getRule();
|
||||||
|
}
|
||||||
|
|
||||||
private void setTarget(TargetPointer target) {
|
private void setTarget(TargetPointer target) {
|
||||||
for(Effect effect : getEffects()) {
|
for(Effect effect : getEffects()) {
|
||||||
effect.setTargetPointer(target);
|
effect.setTargetPointer(target);
|
||||||
|
|
@ -140,7 +151,7 @@ class ScytheOfTheWretchedAbility extends DiesAndDealtDamageThisTurnTriggeredAbil
|
||||||
class ScytheOfTheWretchedReanimateEffect extends OneShotEffect {
|
class ScytheOfTheWretchedReanimateEffect extends OneShotEffect {
|
||||||
public ScytheOfTheWretchedReanimateEffect() {
|
public ScytheOfTheWretchedReanimateEffect() {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.staticText = "Whenever a creature dealt damage by equipped creature this turn dies, return that card to the battlefield under your control.";
|
this.staticText = "return that card to the battlefield under your control";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScytheOfTheWretchedReanimateEffect(final ScytheOfTheWretchedReanimateEffect effect) {
|
public ScytheOfTheWretchedReanimateEffect(final ScytheOfTheWretchedReanimateEffect effect) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue