If you revealed a Dragon card or controlled a Dragon - fixed game error on usage (miss watcher)

This commit is contained in:
Oleg Agafonov 2023-06-17 18:01:45 +04:00
parent c61095e2eb
commit e365aa7b2d
4 changed files with 8 additions and 1 deletions

View file

@ -12,6 +12,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.DragonOnTheBattlefieldWhileSpellWasCastWatcher;
import java.util.UUID;
@ -29,6 +30,7 @@ public final class DraconicRoar extends CardImpl {
// Draconic Roar deals 3 damage to target creature. If you revealed a Dragon card or controlled a Dragon as you cast Draconic Roar, Draconic Roar deals 3 damage to that creature's controller.
this.getSpellAbility().addEffect(new DraconicRoarEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addWatcher(new DragonOnTheBattlefieldWhileSpellWasCastWatcher());
}
private DraconicRoar(final DraconicRoar card) {

View file

@ -10,6 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.watchers.common.DragonOnTheBattlefieldWhileSpellWasCastWatcher;
import java.util.UUID;
@ -30,7 +31,7 @@ public final class DragonlordsPrerogative extends CardImpl {
new ConditionalContinuousRuleModifyingEffect(
new CantBeCounteredSourceEffect(), RevealedOrControlledDragonCondition.instance
).setText("if you revealed a Dragon card or controlled a Dragon as you cast this spell, this spell can't be countered")
));
), new DragonOnTheBattlefieldWhileSpellWasCastWatcher());
// Draw four cards.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(4));

View file

@ -10,6 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.TargetPlayer;
import mage.watchers.common.DragonOnTheBattlefieldWhileSpellWasCastWatcher;
import java.util.UUID;
@ -33,6 +34,7 @@ public final class FoulTongueInvocation extends CardImpl {
"If you revealed a Dragon card or controlled a Dragon as you cast this spell, you gain 4 life."
));
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addWatcher(new DragonOnTheBattlefieldWhileSpellWasCastWatcher());
}
private FoulTongueInvocation(final FoulTongueInvocation card) {

View file

@ -10,6 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.TargetSpell;
import mage.watchers.common.DragonOnTheBattlefieldWhileSpellWasCastWatcher;
import java.util.UUID;
@ -31,6 +32,7 @@ public final class SilumgarsScorn extends CardImpl {
"If you revealed a Dragon card or controlled a Dragon as you cast this spell, counter that spell instead"
));
this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addWatcher(new DragonOnTheBattlefieldWhileSpellWasCastWatcher());
}
private SilumgarsScorn(final SilumgarsScorn card) {