mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Implemented Daybreak Chimera
This commit is contained in:
parent
225ee56a69
commit
7b1878d2a2
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/d/DaybreakChimera.java
Normal file
82
Mage.Sets/src/mage/cards/d/DaybreakChimera.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DaybreakChimera extends CardImpl {
|
||||
|
||||
public DaybreakChimera(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
||||
|
||||
this.subtype.add(SubType.CHIMERA);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// This spell costs {X} less to cast, where X is your devotion to white.
|
||||
this.addAbility(new SimpleStaticAbility(new DaybreakChimeraEffect()).addHint(DevotionCount.W.getHint()));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
private DaybreakChimera(final DaybreakChimera card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaybreakChimera copy() {
|
||||
return new DaybreakChimera(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DaybreakChimeraEffect extends CostModificationEffectImpl {
|
||||
|
||||
DaybreakChimeraEffect() {
|
||||
super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "This spell costs {X} less to cast, where X is your devotion to white. " +
|
||||
"<i>(Each {W} in the mana costs of permanents you control counts toward your devotion to white.)</i>";
|
||||
}
|
||||
|
||||
private DaybreakChimeraEffect(final DaybreakChimeraEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
SpellAbility spellAbility = (SpellAbility) abilityToModify;
|
||||
Mana mana = spellAbility.getManaCostsToPay().getMana();
|
||||
if (mana.getGeneric() == 0) {
|
||||
return false;
|
||||
}
|
||||
int count = DevotionCount.W.calculate(game, source, this);
|
||||
mana.setGeneric(Math.max(mana.getGeneric() - count, 0));
|
||||
spellAbility.getManaCostsToPay().load(mana.toString());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
return abilityToModify instanceof SpellAbility
|
||||
&& abilityToModify.getSourceId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaybreakChimeraEffect copy() {
|
||||
return new DaybreakChimeraEffect(this);
|
||||
}
|
||||
}
|
|
@ -54,6 +54,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dalakos, Crafter of Wonders", 212, Rarity.RARE, mage.cards.d.DalakosCrafterOfWonders.class));
|
||||
cards.add(new SetCardInfo("Dawn Evangel", 8, Rarity.UNCOMMON, mage.cards.d.DawnEvangel.class));
|
||||
cards.add(new SetCardInfo("Daxos, Blessed by the Sun", 9, Rarity.UNCOMMON, mage.cards.d.DaxosBlessedByTheSun.class));
|
||||
cards.add(new SetCardInfo("Daybreak Chimera", 10, Rarity.COMMON, mage.cards.d.DaybreakChimera.class));
|
||||
cards.add(new SetCardInfo("Deathbellow War Cry", 294, Rarity.RARE, mage.cards.d.DeathbellowWarCry.class));
|
||||
cards.add(new SetCardInfo("Demon of Loathing", 292, Rarity.RARE, mage.cards.d.DemonOfLoathing.class));
|
||||
cards.add(new SetCardInfo("Destiny Spinner", 168, Rarity.UNCOMMON, mage.cards.d.DestinySpinner.class));
|
||||
|
|
Loading…
Reference in a new issue