Implemented Heliod, Sun-Crowned

This commit is contained in:
Evan Kranzler 2020-01-01 11:30:29 -05:00
parent a89619373d
commit de07960ee5
2 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,85 @@
package mage.cards.h;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.GainLifeControllerTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HeliodSunCrowned extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("creature or enchantment you control");
private static final FilterPermanent filter2 = new FilterCreaturePermanent("another target creature");
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.CREATURE),
new CardTypePredicate(CardType.ENCHANTMENT)
));
filter2.add(AnotherPredicate.instance);
}
public HeliodSunCrowned(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Indestructible
this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white is less than five, Heliod isn't a creature.
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.W, 5))
.addHint(DevotionCount.W.getHint()));
// Whenever you gain life, put a +1/+1 counter on target creature or enchantment you control.
Ability ability = new GainLifeControllerTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false
);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// {1}{W}: Another target creature gains lifelink until end of turn.
ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(
LifelinkAbility.getInstance(), Duration.EndOfTurn
), new ManaCostsImpl("{1}{W}"));
ability.addTarget(new TargetPermanent(filter2));
this.addAbility(ability);
}
private HeliodSunCrowned(final HeliodSunCrowned card) {
super(card);
}
@Override
public HeliodSunCrowned copy() {
return new HeliodSunCrowned(this);
}
}

View file

@ -51,6 +51,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
cards.add(new SetCardInfo("Glimpse of Freedom", 50, Rarity.UNCOMMON, mage.cards.g.GlimpseOfFreedom.class));
cards.add(new SetCardInfo("Grasping Giant", 288, Rarity.RARE, mage.cards.g.GraspingGiant.class));
cards.add(new SetCardInfo("Gray Merchant of Asphodel", 99, Rarity.UNCOMMON, mage.cards.g.GrayMerchantOfAsphodel.class));
cards.add(new SetCardInfo("Heliod, Sun-Crowned", 18, Rarity.MYTHIC, mage.cards.h.HeliodSunCrowned.class));
cards.add(new SetCardInfo("Hero of the Winds", 23, Rarity.UNCOMMON, mage.cards.h.HeroOfTheWinds.class));
cards.add(new SetCardInfo("Idyllic Tutor", 24, Rarity.RARE, mage.cards.i.IdyllicTutor.class));
cards.add(new SetCardInfo("Indomitable Will", 25, Rarity.COMMON, mage.cards.i.IndomitableWill.class));