Implement Aetherflame Wall

This commit is contained in:
Noah Gleason 2018-07-05 21:35:56 -04:00
parent 6c000d9177
commit 1f7c7e90b2
No known key found for this signature in database
GPG key ID: EC030EC6B0650A40
5 changed files with 94 additions and 59 deletions

View file

@ -0,0 +1,50 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CanBlockAsThoughtItHadShadowEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import java.util.UUID;
/**
*
* @author noahg
*/
public final class AetherflameWall extends CardImpl {
public AetherflameWall(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.WALL);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
// Defender
this.addAbility(DefenderAbility.getInstance());
// Aetherflame Wall can block creatures with shadow as though they didnt have shadow.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAsThoughtItHadShadowEffect(Duration.WhileOnBattlefield)));
// {R}: Aetherflame Wall gets +1/+0 until end of turn.
this.addAbility(new SimpleActivatedAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
}
public AetherflameWall(final AetherflameWall card) {
super(card);
}
@Override
public AetherflameWall copy() {
return new AetherflameWall(this);
}
}

View file

@ -6,6 +6,7 @@ import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.common.CanBlockAsThoughtItHadShadowEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.AsThoughEffectType;
@ -29,7 +30,7 @@ public final class HeartwoodDryad extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Heartwood Dryad can block creatures with shadow as though Heartwood Dryad had shadow. // Heartwood Dryad can block creatures with shadow as though Heartwood Dryad had shadow.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAsThoughtIthadShadowEffect(Duration.WhileOnBattlefield))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAsThoughtItHadShadowEffect(Duration.WhileOnBattlefield)));
} }
public HeartwoodDryad(final HeartwoodDryad card) { public HeartwoodDryad(final HeartwoodDryad card) {
@ -41,31 +42,3 @@ public final class HeartwoodDryad extends CardImpl {
return new HeartwoodDryad(this); return new HeartwoodDryad(this);
} }
} }
class CanBlockAsThoughtIthadShadowEffect extends AsThoughEffectImpl {
public CanBlockAsThoughtIthadShadowEffect(Duration duration) {
super(AsThoughEffectType.BLOCK_SHADOW, duration, Outcome.Benefit);
staticText = "{this} can block creatures with shadow as though {this} had shadow";
}
public CanBlockAsThoughtIthadShadowEffect(final CanBlockAsThoughtIthadShadowEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public CanBlockAsThoughtIthadShadowEffect copy() {
return new CanBlockAsThoughtIthadShadowEffect(this);
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
return sourceId.equals(source.getSourceId());
}
}

View file

@ -6,6 +6,7 @@ import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.common.CanBlockAsThoughtItHadShadowEffect;
import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -33,7 +34,7 @@ public final class WallOfDiffusion extends CardImpl {
// Defender // Defender
this.addAbility(DefenderAbility.getInstance()); this.addAbility(DefenderAbility.getInstance());
// Wall of Diffusion can block creatures with shadow as though Wall of Diffusion had shadow. // Wall of Diffusion can block creatures with shadow as though Wall of Diffusion had shadow.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAsThoughtIthadShadowEffect(Duration.WhileOnBattlefield))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAsThoughtItHadShadowEffect(Duration.WhileOnBattlefield)));
} }
public WallOfDiffusion(final WallOfDiffusion card) { public WallOfDiffusion(final WallOfDiffusion card) {
@ -45,31 +46,3 @@ public final class WallOfDiffusion extends CardImpl {
return new WallOfDiffusion(this); return new WallOfDiffusion(this);
} }
} }
class CanBlockAsThoughtIthadShadowEffect extends AsThoughEffectImpl {
public CanBlockAsThoughtIthadShadowEffect(Duration duration) {
super(AsThoughEffectType.BLOCK_SHADOW, duration, Outcome.Benefit);
staticText = "{this} can block creatures with shadow as though {this} had shadow";
}
public CanBlockAsThoughtIthadShadowEffect(final CanBlockAsThoughtIthadShadowEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public CanBlockAsThoughtIthadShadowEffect copy() {
return new CanBlockAsThoughtIthadShadowEffect(this);
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
return sourceId.equals(source.getSourceId());
}
}

View file

@ -26,6 +26,7 @@ public final class TimeSpiral extends ExpansionSet {
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 0; this.ratioBoosterMythic = 0;
cards.add(new SetCardInfo("Academy Ruins", 269, Rarity.RARE, mage.cards.a.AcademyRuins.class)); cards.add(new SetCardInfo("Academy Ruins", 269, Rarity.RARE, mage.cards.a.AcademyRuins.class));
cards.add(new SetCardInfo("Aetherflame Wall", 142, Rarity.COMMON, mage.cards.a.AetherflameWall.class));
cards.add(new SetCardInfo("Amrou Scout", 1, Rarity.COMMON, mage.cards.a.AmrouScout.class)); cards.add(new SetCardInfo("Amrou Scout", 1, Rarity.COMMON, mage.cards.a.AmrouScout.class));
cards.add(new SetCardInfo("Amrou Seekers", 2, Rarity.COMMON, mage.cards.a.AmrouSeekers.class)); cards.add(new SetCardInfo("Amrou Seekers", 2, Rarity.COMMON, mage.cards.a.AmrouSeekers.class));
cards.add(new SetCardInfo("Ancestral Vision", 48, Rarity.RARE, mage.cards.a.AncestralVision.class)); cards.add(new SetCardInfo("Ancestral Vision", 48, Rarity.RARE, mage.cards.a.AncestralVision.class));

View file

@ -0,0 +1,38 @@
package mage.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.constants.AsThoughEffectType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.game.Game;
import java.util.UUID;
public class CanBlockAsThoughtItHadShadowEffect extends AsThoughEffectImpl {
public CanBlockAsThoughtItHadShadowEffect(Duration duration) {
super(AsThoughEffectType.BLOCK_SHADOW, duration, Outcome.Benefit);
staticText = "{this} can block creatures with shadow as though {this} had shadow";
}
public CanBlockAsThoughtItHadShadowEffect(final CanBlockAsThoughtItHadShadowEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public CanBlockAsThoughtItHadShadowEffect copy() {
return new CanBlockAsThoughtItHadShadowEffect(this);
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
return sourceId.equals(source.getSourceId());
}
}