mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
[MH2] Implemented Scion of Draco
This commit is contained in:
parent
9e950b66cd
commit
93f5f1fe79
2 changed files with 102 additions and 0 deletions
101
Mage.Sets/src/mage/cards/s/ScionOfDraco.java
Normal file
101
Mage.Sets/src/mage/cards/s/ScionOfDraco.java
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ScionOfDraco extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new DomainValue();
|
||||
|
||||
public ScionOfDraco(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{12}");
|
||||
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Domain — This spell costs {2} less to cast for each basic land type among lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(2, xValue)
|
||||
).addHint(DomainHint.instance).setAbilityWord(AbilityWord.DOMAIN));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Each creature you control has vigilance if it's white, hexproof if it's blue, lifelink if it's black, first strike if it's red, and trample if it's green.
|
||||
this.addAbility(new SimpleStaticAbility(new ScionOfDracoEffect()));
|
||||
}
|
||||
|
||||
private ScionOfDraco(final ScionOfDraco card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScionOfDraco copy() {
|
||||
return new ScionOfDraco(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ScionOfDracoEffect extends ContinuousEffectImpl {
|
||||
|
||||
ScionOfDracoEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.Benefit);
|
||||
staticText = "each creature you control has vigilance if it's white, hexproof if it's blue, " +
|
||||
"lifelink if it's black, first strike if it's red, and trample if it's green";
|
||||
this.addDependencyType(DependencyType.AddingAbility);
|
||||
}
|
||||
|
||||
private ScionOfDracoEffect(final ScionOfDracoEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScionOfDracoEffect copy() {
|
||||
return new ScionOfDracoEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE,
|
||||
source.getControllerId(), source.getSourceId(), game
|
||||
)) {
|
||||
ObjectColor color = permanent.getColor(game);
|
||||
if (color.isWhite()) {
|
||||
permanent.addAbility(VigilanceAbility.getInstance(), source.getSourceId(), game);
|
||||
}
|
||||
if (color.isBlue()) {
|
||||
permanent.addAbility(HexproofAbility.getInstance(), source.getSourceId(), game);
|
||||
}
|
||||
if (color.isBlack()) {
|
||||
permanent.addAbility(LifelinkAbility.getInstance(), source.getSourceId(), game);
|
||||
}
|
||||
if (color.isRed()) {
|
||||
permanent.addAbility(FirstStrikeAbility.getInstance(), source.getSourceId(), game);
|
||||
}
|
||||
if (color.isGreen()) {
|
||||
permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -127,6 +127,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sanctum Prelate", 491, Rarity.MYTHIC, mage.cards.s.SanctumPrelate.class));
|
||||
cards.add(new SetCardInfo("Sanctum Weaver", 171, Rarity.RARE, mage.cards.s.SanctumWeaver.class));
|
||||
cards.add(new SetCardInfo("Scalding Tarn", 254, Rarity.RARE, mage.cards.s.ScaldingTarn.class));
|
||||
cards.add(new SetCardInfo("Scion of Draco", 234, Rarity.MYTHIC, mage.cards.s.ScionOfDraco.class));
|
||||
cards.add(new SetCardInfo("Scurry Oak", 172, Rarity.UNCOMMON, mage.cards.s.ScurryOak.class));
|
||||
cards.add(new SetCardInfo("Scuttletide", 61, Rarity.UNCOMMON, mage.cards.s.Scuttletide.class));
|
||||
cards.add(new SetCardInfo("Sea Drake", 268, Rarity.RARE, mage.cards.s.SeaDrake.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue