mirror of
https://github.com/correl/mage.git
synced 2024-11-28 11:09:54 +00:00
Add check that all Auras have an EnchantAbility to VerifyCardDataTest
This commit is contained in:
parent
743d1771f0
commit
f06f4ab252
3 changed files with 11 additions and 3 deletions
|
@ -4,6 +4,7 @@ package mage.cards.g;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.ControlEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -29,6 +30,7 @@ public final class GhastlyHaunting extends CardImpl {
|
|||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// You control enchanted creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect()));
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
|
||||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -26,6 +25,7 @@ public final class Vigilance extends CardImpl {
|
|||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)));
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.common.SagaAbility;
|
|||
import mage.abilities.common.WerewolfBackTriggeredAbility;
|
||||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.abilities.keyword.MultikickerAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
|
@ -1383,9 +1384,14 @@ public class VerifyCardDataTest {
|
|||
fail(card, "abilities", "card have Multikicker ability, but missing it in rules text");
|
||||
}
|
||||
|
||||
// special check: Auras need to have enchant ability added
|
||||
if (card.hasSubtype(SubType.AURA, null) && !card.getAbilities().containsClass(EnchantAbility.class)) {
|
||||
fail(card, "abilities", "card is an Aura but is missing this.addAbility(EnchantAbility)");
|
||||
}
|
||||
|
||||
// special check: Sagas need to have saga ability added
|
||||
if (card.hasSubtype(SubType.SAGA, null) && !card.getAbilities().containsClass(SagaAbility.class)) {
|
||||
fail(card, "abilities", "card is a Saga but is missing this.addAbility(sagaAbility)");
|
||||
fail(card, "abilities", "card is a Saga but is missing this.addAbility(SagaAbility)");
|
||||
}
|
||||
|
||||
// special check: Werewolves front ability should only be on front and vice versa
|
||||
|
|
Loading…
Reference in a new issue