mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[MID] Implemented Hungry for More
This commit is contained in:
parent
904f60e86a
commit
743db172cd
3 changed files with 115 additions and 0 deletions
79
Mage.Sets/src/mage/cards/h/HungryForMore.java
Normal file
79
Mage.Sets/src/mage/cards/h/HungryForMore.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.HungryForMoreToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HungryForMore extends CardImpl {
|
||||
|
||||
public HungryForMore(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{R}");
|
||||
|
||||
// Create a 3/1 black and red Vampire creature token with trample, lifelink, and haste. Sacrifice it at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new HungryForMoreEffect());
|
||||
|
||||
// Flashback {1}{B}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{1}{B}{R}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
private HungryForMore(final HungryForMore card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungryForMore copy() {
|
||||
return new HungryForMore(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HungryForMoreEffect extends OneShotEffect {
|
||||
|
||||
HungryForMoreEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create a 3/1 black and red Vampire creature token with trample, " +
|
||||
"lifelink, and haste. Sacrifice it at the beginning of the next end step";
|
||||
}
|
||||
|
||||
private HungryForMoreEffect(final HungryForMoreEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungryForMoreEffect copy() {
|
||||
return new HungryForMoreEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new HungryForMoreToken();
|
||||
token.putOntoBattlefield(1, game, source, source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||
new SacrificeTargetEffect().setTargetPointer(new FixedTargets(
|
||||
token.getLastAddedTokenIds()
|
||||
.stream()
|
||||
.map(game::getPermanent)
|
||||
.collect(Collectors.toList()),
|
||||
game
|
||||
)).setText("sacrifice that token")
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -77,6 +77,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class));
|
||||
cards.add(new SetCardInfo("Hobbling Zombie", 106, Rarity.COMMON, mage.cards.h.HobblingZombie.class));
|
||||
cards.add(new SetCardInfo("Howl of the Hunt", 188, Rarity.COMMON, mage.cards.h.HowlOfTheHunt.class));
|
||||
cards.add(new SetCardInfo("Hungry for More", 228, Rarity.UNCOMMON, mage.cards.h.HungryForMore.class));
|
||||
cards.add(new SetCardInfo("Immolation", 144, Rarity.COMMON, mage.cards.i.Immolation.class));
|
||||
cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class));
|
||||
cards.add(new SetCardInfo("Insectile Aberration", 47, Rarity.UNCOMMON, mage.cards.i.InsectileAberration.class));
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HungryForMoreToken extends TokenImpl {
|
||||
|
||||
public HungryForMoreToken() {
|
||||
super("Vampire", "3/1 black and red Vampire creature token with trample, lifelink, and haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.VAMPIRE);
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
addAbility(LifelinkAbility.getInstance());
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
public HungryForMoreToken(final HungryForMoreToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public HungryForMoreToken copy() {
|
||||
return new HungryForMoreToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue