mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
[AFR] Implemented Purple Worm
This commit is contained in:
parent
4f38338fa6
commit
74bb1f895c
4 changed files with 80 additions and 3 deletions
51
Mage.Sets/src/mage/cards/p/PurpleWorm.java
Normal file
51
Mage.Sets/src/mage/cards/p/PurpleWorm.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.abilities.hint.common.MorbidHint;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.watchers.common.MorbidWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PurpleWorm extends CardImpl {
|
||||
|
||||
public PurpleWorm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.WORM);
|
||||
this.power = new MageInt(8);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// This spell costs {2} less to cast if a creature died this turn.
|
||||
Ability ability = new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionSourceEffect(1, MorbidCondition.instance)
|
||||
);
|
||||
ability.setRuleAtTheTop(true);
|
||||
this.addAbility(ability.addHint(MorbidHint.instance), new MorbidWatcher());
|
||||
|
||||
// Ward {2}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
|
||||
}
|
||||
|
||||
private PurpleWorm(final PurpleWorm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurpleWorm copy() {
|
||||
return new PurpleWorm(this);
|
||||
}
|
||||
}
|
|
@ -60,6 +60,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Portable Hole", 33, Rarity.UNCOMMON, mage.cards.p.PortableHole.class));
|
||||
cards.add(new SetCardInfo("Power Word Kill", 114, Rarity.UNCOMMON, mage.cards.p.PowerWordKill.class));
|
||||
cards.add(new SetCardInfo("Prosperous Innkeeper", 200, Rarity.UNCOMMON, mage.cards.p.ProsperousInnkeeper.class));
|
||||
cards.add(new SetCardInfo("Purple Worm", 201, Rarity.UNCOMMON, mage.cards.p.PurpleWorm.class));
|
||||
cards.add(new SetCardInfo("Ranger's Hawk", 37, Rarity.COMMON, mage.cards.r.RangersHawk.class));
|
||||
cards.add(new SetCardInfo("Shortcut Seeker", 73, Rarity.COMMON, mage.cards.s.ShortcutSeeker.class));
|
||||
cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -10,7 +9,6 @@ import mage.watchers.common.MorbidWatcher;
|
|||
* @author nantuko
|
||||
*/
|
||||
public enum MorbidCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
|
@ -23,5 +21,4 @@ public enum MorbidCondition implements Condition {
|
|||
public String toString() {
|
||||
return "if a creature died this turn";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package mage.abilities.hint.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
* TODO: add this to other morbid cards
|
||||
*/
|
||||
public enum MorbidHint implements Hint {
|
||||
instance;
|
||||
private static final ConditionHint hint = new ConditionHint(
|
||||
MorbidCondition.instance, "A creature died this turn"
|
||||
);
|
||||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
return hint.getText(game, ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Hint copy() {
|
||||
return instance;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue