remove DamageDoneWatcher from default watchers

This commit is contained in:
xenohedron 2023-11-30 00:36:31 -05:00
parent c164d70135
commit 6155f2d403
5 changed files with 11 additions and 6 deletions

View file

@ -21,6 +21,7 @@ import mage.constants.*;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetPlayerOrPlaneswalker;
import mage.watchers.common.DamageDoneWatcher;
/**
*
@ -52,7 +53,7 @@ public final class ChandraFireOfKaladesh extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED,Pronoun.SHE), new SourceDealtDamageCondition(3)));
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
this.addAbility(ability, new DamageDoneWatcher());
}

View file

@ -38,6 +38,8 @@ public final class NeedleDrop extends CardImpl {
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
this.getSpellAbility().addWatcher(new DamageDoneWatcher());
}
private NeedleDrop(final NeedleDrop card) {

View file

@ -37,7 +37,8 @@ public class WaveOfRats extends CardImpl {
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new DiesSourceTriggeredAbility(new ReturnToBattlefieldUnderOwnerControlSourceEffect()),
WaveOfRatsDealtDamageToPlayerCondition.instance,
"When Wave of Rats dies, if it dealt combat damage to a player this turn, return it to the battlefield under its owner's control.")
"When Wave of Rats dies, if it dealt combat damage to a player this turn, return it to the battlefield under its owner's control."),
new DamageDoneWatcher()
);
// Blitz {4}{B} (If you cast this spell for its blitz cost, it gains haste and When this creature dies, draw a card. Sacrifice it at the beginning of the next end step.)
@ -69,4 +70,4 @@ enum WaveOfRatsDealtDamageToPlayerCondition implements Condition {
}
return watcher.damagedAPlayer(waveOfRats.getId(), waveOfRats.getZoneChangeCounter(game), game);
}
}
}

View file

@ -9,10 +9,12 @@ import mage.watchers.common.DamageDoneWatcher;
*
* @author LevelX2
*/
public class SourceDealtDamageCondition implements Condition {
private final int value;
/**
* Must add DamageDoneWatcher on card init
*/
public SourceDealtDamageCondition(int value) {
this.value = value;
}
@ -29,4 +31,4 @@ public class SourceDealtDamageCondition implements Condition {
}
}
}

View file

@ -1339,7 +1339,6 @@ public abstract class GameImpl implements Game {
newWatchers.add(new CastSpellLastTurnWatcher());
newWatchers.add(new PlayerLostLifeWatcher());
newWatchers.add(new BlockedAttackerWatcher());
newWatchers.add(new DamageDoneWatcher()); // TODO: no need to be default watcher
newWatchers.add(new PlanarRollWatcher()); // TODO: no need to be default watcher
newWatchers.add(new AttackedThisTurnWatcher());
newWatchers.add(new CardsDrawnThisTurnWatcher());