Implemented Vitality Hunter

This commit is contained in:
Evan Kranzler 2020-04-16 13:59:51 -04:00
parent 7445dcb1cf
commit d34905ff14
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.v;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.MonstrosityAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetadjustment.TargetAdjuster;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class VitalityHunter extends CardImpl {
public VitalityHunter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.NIGHTMARE);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// {X}{W}{W}: Monstrosity X.
this.addAbility(new MonstrosityAbility("{X}{W}{W}", Integer.MAX_VALUE));
// When Vitality Hunter becomes monstrous, put a lifelink counter on each of up to X target creatures.
Ability ability = new BecomesMonstrousSourceTriggeredAbility(
new AddCountersTargetEffect(CounterType.LIFELINK.createInstance())
.setText("put a lifelink counter on each of up to X target creatures")
);
ability.setTargetAdjuster(VitalityHunterAdjuster.instance);
this.addAbility(ability);
}
private VitalityHunter(final VitalityHunter card) {
super(card);
}
@Override
public VitalityHunter copy() {
return new VitalityHunter(this);
}
}
enum VitalityHunterAdjuster implements TargetAdjuster {
instance;
@Override
public void adjustTargets(Ability ability, Game game) {
int xValue = ((BecomesMonstrousSourceTriggeredAbility) ability).getMonstrosityValue();
ability.getTargets().clear();
ability.addTarget(new TargetCreaturePermanent(0, xValue));
}
}

View file

@ -306,6 +306,7 @@ public final class Commander2020Edition extends ExpansionSet {
cards.add(new SetCardInfo("Vastwood Hydra", 194, Rarity.RARE, mage.cards.v.VastwoodHydra.class));
cards.add(new SetCardInfo("Vigilante Justice", 164, Rarity.UNCOMMON, mage.cards.v.VigilanteJustice.class));
cards.add(new SetCardInfo("Villainous Wealth", 233, Rarity.RARE, mage.cards.v.VillainousWealth.class));
cards.add(new SetCardInfo("Vitality Hunter", 30, Rarity.RARE, mage.cards.v.VitalityHunter.class));
cards.add(new SetCardInfo("Vizier of Tumbling Sands", 126, Rarity.UNCOMMON, mage.cards.v.VizierOfTumblingSands.class));
cards.add(new SetCardInfo("Vorapede", 195, Rarity.MYTHIC, mage.cards.v.Vorapede.class));
cards.add(new SetCardInfo("Whiplash Trap", 127, Rarity.COMMON, mage.cards.w.WhiplashTrap.class));