mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
Implemented Shimmering Efreet
This commit is contained in:
parent
961860107e
commit
45aedd6027
4 changed files with 94 additions and 37 deletions
49
Mage.Sets/src/mage/cards/s/ShimmeringEfreet.java
Normal file
49
Mage.Sets/src/mage/cards/s/ShimmeringEfreet.java
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.PhaseInTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.PhaseOutTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.PhasingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class ShimmeringEfreet extends CardImpl {
|
||||||
|
|
||||||
|
public ShimmeringEfreet(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.EFREET);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Phasing
|
||||||
|
this.addAbility(PhasingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Shimmering Efreet phases in, target creature phases out.
|
||||||
|
Ability ability = new PhaseInTriggeredAbility(new PhaseOutTargetEffect(), false);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShimmeringEfreet(final ShimmeringEfreet card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ShimmeringEfreet copy() {
|
||||||
|
return new ShimmeringEfreet(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.w;
|
package mage.cards.w;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.common.PhaseInTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.DoUnlessControllerPaysEffect;
|
import mage.abilities.effects.common.DoUnlessControllerPaysEffect;
|
||||||
import mage.abilities.effects.common.PhaseOutSourceEffect;
|
import mage.abilities.effects.common.PhaseOutSourceEffect;
|
||||||
|
|
@ -15,10 +14,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -46,7 +42,7 @@ public final class WarpingWurm extends CardImpl {
|
||||||
));
|
));
|
||||||
|
|
||||||
// When Warping Wurm phases in, put a +1/+1 counter on it.
|
// When Warping Wurm phases in, put a +1/+1 counter on it.
|
||||||
this.addAbility(new WarpingWurmTriggeredAbility());
|
this.addAbility(new PhaseInTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public WarpingWurm(final WarpingWurm card) {
|
public WarpingWurm(final WarpingWurm card) {
|
||||||
|
|
@ -58,34 +54,3 @@ public final class WarpingWurm extends CardImpl {
|
||||||
return new WarpingWurm(this);
|
return new WarpingWurm(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class WarpingWurmTriggeredAbility extends TriggeredAbilityImpl {
|
|
||||||
|
|
||||||
WarpingWurmTriggeredAbility() {
|
|
||||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
|
||||||
}
|
|
||||||
|
|
||||||
WarpingWurmTriggeredAbility(final WarpingWurmTriggeredAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public WarpingWurmTriggeredAbility copy() {
|
|
||||||
return new WarpingWurmTriggeredAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.PHASED_IN;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
return getSourceId().equals(event.getTargetId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "When {this} phases in, put a +1/+1 counter on it";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ public final class Visions extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Rowen", 119, Rarity.RARE, mage.cards.r.Rowen.class));
|
cards.add(new SetCardInfo("Rowen", 119, Rarity.RARE, mage.cards.r.Rowen.class));
|
||||||
cards.add(new SetCardInfo("Sands of Time", 153, Rarity.RARE, mage.cards.s.SandsOfTime.class));
|
cards.add(new SetCardInfo("Sands of Time", 153, Rarity.RARE, mage.cards.s.SandsOfTime.class));
|
||||||
cards.add(new SetCardInfo("Scalebane's Elite", 135, Rarity.UNCOMMON, mage.cards.s.ScalebanesElite.class));
|
cards.add(new SetCardInfo("Scalebane's Elite", 135, Rarity.UNCOMMON, mage.cards.s.ScalebanesElite.class));
|
||||||
|
cards.add(new SetCardInfo("Shimmering Efreet", 42, Rarity.UNCOMMON, mage.cards.s.ShimmeringEfreet.class));
|
||||||
cards.add(new SetCardInfo("Shrieking Drake", 43, Rarity.COMMON, mage.cards.s.ShriekingDrake.class));
|
cards.add(new SetCardInfo("Shrieking Drake", 43, Rarity.COMMON, mage.cards.s.ShriekingDrake.class));
|
||||||
cards.add(new SetCardInfo("Simoon", 136, Rarity.UNCOMMON, mage.cards.s.Simoon.class));
|
cards.add(new SetCardInfo("Simoon", 136, Rarity.UNCOMMON, mage.cards.s.Simoon.class));
|
||||||
cards.add(new SetCardInfo("Sisay's Ring", 154, Rarity.COMMON, mage.cards.s.SisaysRing.class));
|
cards.add(new SetCardInfo("Sisay's Ring", 154, Rarity.COMMON, mage.cards.s.SisaysRing.class));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package mage.abilities.common;
|
||||||
|
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class PhaseInTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public PhaseInTriggeredAbility(Effect effect, boolean optional) {
|
||||||
|
super(Zone.BATTLEFIELD, effect, optional);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PhaseInTriggeredAbility(final PhaseInTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PhaseInTriggeredAbility copy() {
|
||||||
|
return new PhaseInTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.PHASED_IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
return getSourceId().equals(event.getTargetId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "When {this} phases in, " + super.getRule();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue