Implemented Daxos, Blessed by the Sun

This commit is contained in:
Evan Kranzler 2019-12-14 11:08:14 -05:00
parent 1b8b452a99
commit f1b9b5aba7
3 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,89 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DaxosBlessedByTheSun extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public DaxosBlessedByTheSun(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{W}{W}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.DEMIGOD);
this.power = new MageInt(2);
this.toughness = new MageInt(0);
// Daxos's toughness is equal to your devotion to white.
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new SetToughnessSourceEffect(xValue, Duration.EndOfGame
).setText("{this}'s toughness is equal to your devotion to white")));
// Whenever another creature you control enters the battlefield or dies, you gain 1 life.
this.addAbility(new DaxosBlessedByTheSunAbility());
}
private DaxosBlessedByTheSun(final DaxosBlessedByTheSun card) {
super(card);
}
@Override
public DaxosBlessedByTheSun copy() {
return new DaxosBlessedByTheSun(this);
}
}
class DaxosBlessedByTheSunAbility extends TriggeredAbilityImpl {
DaxosBlessedByTheSunAbility() {
super(Zone.BATTLEFIELD, new GainLifeEffect(1));
}
private DaxosBlessedByTheSunAbility(DaxosBlessedByTheSunAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD)
|| (event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).isDiesEvent());
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getTargetId().equals(this.getSourceId())) {
return false;
}
Permanent creature = game.getPermanentOrLKIBattlefield(event.getTargetId());
return creature != null && creature.isControlledBy(this.getControllerId());
}
@Override
public String getRule() {
return "Whenever another creature you control enters the battlefield or dies, you gain 1 life.";
}
@Override
public DaxosBlessedByTheSunAbility copy() {
return new DaxosBlessedByTheSunAbility(this);
}
}

View file

@ -26,6 +26,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
this.ratioBoosterMythic = 8;
this.maxCardNumberInBooster = 254;
cards.add(new SetCardInfo("Daxos, Blessed by the Sun", 9, Rarity.UNCOMMON, mage.cards.d.DaxosBlessedByTheSun.class));
cards.add(new SetCardInfo("Eidolon of Philosophy", 48, Rarity.COMMON, mage.cards.e.EidolonOfPhilosophy.class));
cards.add(new SetCardInfo("Elspeth, Sun's Nemesis", 14, Rarity.MYTHIC, mage.cards.e.ElspethSunsNemesis.class));
cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));

View file

@ -110,6 +110,7 @@ public enum SubType {
// D
DATHOMIRIAN("Dathomirian", SubTypeSet.CreatureType, true), // Star Wars
DAUTHI("Dauthi", SubTypeSet.CreatureType),
DEMIGOD("Demigod", SubTypeSet.CreatureType),
DEMON("Demon", SubTypeSet.CreatureType),
DESERTER("Deserter", SubTypeSet.CreatureType),
DEVIL("Devil", SubTypeSet.CreatureType),