mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[MID] Implemented Howl of the Hunt
This commit is contained in:
parent
dac346d985
commit
57ef76e8b0
2 changed files with 88 additions and 0 deletions
87
Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java
Normal file
87
Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
package mage.cards.h;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.UntapEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class HowlOfTheHunt extends CardImpl {
|
||||||
|
|
||||||
|
public HowlOfTheHunt(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// When Howl of the Hunt enters the battlefield, if enchanted creature is a Wolf or Werewolf, untap that creature.
|
||||||
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(new UntapEnchantedEffect()),
|
||||||
|
HowlOfTheHuntCondition.instance, "When {this} enters the battlefield, " +
|
||||||
|
"if enchanted creature is a Wolf or Werewolf, untap that creature."
|
||||||
|
));
|
||||||
|
|
||||||
|
// Enchanted creature gets +2/+2 and has vigilance.
|
||||||
|
ability = new SimpleStaticAbility(new BoostEnchantedEffect(2, 2));
|
||||||
|
ability.addEffect(new GainAbilityAttachedEffect(
|
||||||
|
VigilanceAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield
|
||||||
|
).setText("and has vigilance"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private HowlOfTheHunt(final HowlOfTheHunt card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HowlOfTheHunt copy() {
|
||||||
|
return new HowlOfTheHunt(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum HowlOfTheHuntCondition implements Condition {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent enchantment = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
if (enchantment == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent creature = game.getPermanent(enchantment.getAttachedTo());
|
||||||
|
return creature != null && creature.hasSubtype(SubType.WOLF, game) || creature.hasSubtype(SubType.WEREWOLF, game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,6 +42,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class));
|
cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class));
|
||||||
cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class));
|
cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class));
|
||||||
|
cards.add(new SetCardInfo("Howl of the Hunt", 188, Rarity.COMMON, mage.cards.h.HowlOfTheHunt.class));
|
||||||
cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class));
|
cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class));
|
||||||
cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Jadar, Ghoulcaller of Nephalia", 108, Rarity.RARE, mage.cards.j.JadarGhoulcallerOfNephalia.class));
|
cards.add(new SetCardInfo("Jadar, Ghoulcaller of Nephalia", 108, Rarity.RARE, mage.cards.j.JadarGhoulcallerOfNephalia.class));
|
||||||
|
|
Loading…
Reference in a new issue