Implemented Ill-Gotten Inheritance

This commit is contained in:
Evan Kranzler 2019-01-11 17:07:24 -05:00
parent 74bb249e44
commit c47100421d
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,54 @@
package mage.cards.i;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class IllGottenInheritance extends CardImpl {
public IllGottenInheritance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
// At the beginning of your upkeep, Ill-Gotten Inheritance deals 1 damage to each opponent and you gain 1 life.
Ability ability = new BeginningOfUpkeepTriggeredAbility(
new DamagePlayersEffect(1, TargetController.OPPONENT),
TargetController.YOU, false
);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(ability);
// {5}{B}, Sacrifice Ill-Gotten Inheritance: It deals 4 damage to target opponent and you gain 4 life.
ability = new SimpleActivatedAbility(
new DamageTargetEffect(4, "it"),
new ManaCostsImpl("{5}{B}")
);
ability.addEffect(new GainLifeEffect(4).concatBy("and"));
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
private IllGottenInheritance(final IllGottenInheritance card) {
super(card);
}
@Override
public IllGottenInheritance copy() {
return new IllGottenInheritance(this);
}
}

View file

@ -133,6 +133,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
cards.add(new SetCardInfo("High Alert", 182, Rarity.UNCOMMON, mage.cards.h.HighAlert.class)); cards.add(new SetCardInfo("High Alert", 182, Rarity.UNCOMMON, mage.cards.h.HighAlert.class));
cards.add(new SetCardInfo("Humongulus", 41, Rarity.COMMON, mage.cards.h.Humongulus.class)); cards.add(new SetCardInfo("Humongulus", 41, Rarity.COMMON, mage.cards.h.Humongulus.class));
cards.add(new SetCardInfo("Hydroid Krasis", 183, Rarity.MYTHIC, mage.cards.h.HydroidKrasis.class)); cards.add(new SetCardInfo("Hydroid Krasis", 183, Rarity.MYTHIC, mage.cards.h.HydroidKrasis.class));
cards.add(new SetCardInfo("Ill-Gotten Inheritance", 77, Rarity.COMMON, mage.cards.i.IllGottenInheritance.class));
cards.add(new SetCardInfo("Immolation Shaman", 105, Rarity.RARE, mage.cards.i.ImmolationShaman.class)); cards.add(new SetCardInfo("Immolation Shaman", 105, Rarity.RARE, mage.cards.i.ImmolationShaman.class));
cards.add(new SetCardInfo("Impassioned Orator", 12, Rarity.COMMON, mage.cards.i.ImpassionedOrator.class)); cards.add(new SetCardInfo("Impassioned Orator", 12, Rarity.COMMON, mage.cards.i.ImpassionedOrator.class));
cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class)); cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class));