mirror of
https://github.com/correl/mage.git
synced 2025-04-11 17:00:08 -09:00
Implemented Grimdancer
This commit is contained in:
parent
f3e406583f
commit
06f5ad8cab
3 changed files with 116 additions and 0 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage/counters
107
Mage.Sets/src/mage/cards/g/Grimdancer.java
Normal file
107
Mage.Sets/src/mage/cards/g/Grimdancer.java
Normal file
|
@ -0,0 +1,107 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Grimdancer extends CardImpl {
|
||||
|
||||
public Grimdancer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.NIGHTMARE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Grimdancer enters the battlefield with your choice of two different counters on it from among menace, deathtouch, and lifelink.
|
||||
this.addAbility(new EntersBattlefieldAbility(new GrimdancerEffect()));
|
||||
}
|
||||
|
||||
private Grimdancer(final Grimdancer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Grimdancer copy() {
|
||||
return new Grimdancer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrimdancerEffect extends OneShotEffect {
|
||||
|
||||
private static final Set<String> choices = new HashSet();
|
||||
|
||||
static {
|
||||
choices.add("Menace and deathtouch");
|
||||
choices.add("Menace and lifelink");
|
||||
choices.add("Deathtouch and lifelink");
|
||||
}
|
||||
|
||||
GrimdancerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "with your choice of two different counters on it from among menace, deathtouch, and lifelink";
|
||||
}
|
||||
|
||||
private GrimdancerEffect(final GrimdancerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrimdancerEffect copy() {
|
||||
return new GrimdancerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
choice.setMessage("Choose two abilities");
|
||||
choice.setChoices(choices);
|
||||
if (!player.choose(outcome, choice, game)) {
|
||||
return false;
|
||||
}
|
||||
Counter counter1 = null;
|
||||
Counter counter2 = null;
|
||||
switch (choice.getChoice()) {
|
||||
case "Menace and deathtouch":
|
||||
counter1 = CounterType.MENACE.createInstance();
|
||||
counter2 = CounterType.DEATHTOUCH.createInstance();
|
||||
break;
|
||||
case "Menace and lifelink":
|
||||
counter1 = CounterType.MENACE.createInstance();
|
||||
counter2 = CounterType.LIFELINK.createInstance();
|
||||
break;
|
||||
case "Deathtouch and lifelink":
|
||||
counter1 = CounterType.DEATHTOUCH.createInstance();
|
||||
counter2 = CounterType.LIFELINK.createInstance();
|
||||
break;
|
||||
}
|
||||
permanent.addCounters(counter1, source, game);
|
||||
permanent.addCounters(counter2, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Essence Scatter", 49, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
|
||||
cards.add(new SetCardInfo("Fully Grown", 154, Rarity.COMMON, mage.cards.f.FullyGrown.class));
|
||||
cards.add(new SetCardInfo("Gloom Pangolin", 89, Rarity.COMMON, mage.cards.g.GloomPangolin.class));
|
||||
cards.add(new SetCardInfo("Grimdancer", 90, Rarity.UNCOMMON, mage.cards.g.Grimdancer.class));
|
||||
cards.add(new SetCardInfo("Mosscoat Goriak", 167, Rarity.COMMON, mage.cards.m.MosscoatGoriak.class));
|
||||
cards.add(new SetCardInfo("Pacifism", 25, Rarity.COMMON, mage.cards.p.Pacifism.class));
|
||||
cards.add(new SetCardInfo("Snapdax, Apex of the Hunt", 209, Rarity.MYTHIC, mage.cards.s.SnapdaxApexOfTheHunt.class));
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package mage.counters;
|
||||
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
||||
/**
|
||||
|
@ -76,12 +78,14 @@ public enum CounterType {
|
|||
KI("ki"),
|
||||
LANDMARK("landmark"),
|
||||
LEVEL("level"),
|
||||
LIFELINK("lifelink"),
|
||||
LORE("lore"),
|
||||
LUCK("luck"),
|
||||
LOYALTY("loyalty"),
|
||||
MANIFESTATION("manifestation"),
|
||||
MANNEQUIN("mannequin"),
|
||||
MATRIX("matrix"),
|
||||
MENACE("menace"),
|
||||
M1M1(new BoostCounter(-1, -1).name),
|
||||
M2M1(new BoostCounter(-2, -1).name),
|
||||
M2M2(new BoostCounter(-2, -2).name),
|
||||
|
@ -199,6 +203,10 @@ public enum CounterType {
|
|||
return new BoostCounter(-2, -2, amount);
|
||||
case DEATHTOUCH:
|
||||
return new AbilityCounter(DeathtouchAbility.getInstance());
|
||||
case LIFELINK:
|
||||
return new AbilityCounter(LifelinkAbility.getInstance());
|
||||
case MENACE:
|
||||
return new AbilityCounter(new MenaceAbility());
|
||||
case TRAMPLE:
|
||||
return new AbilityCounter(TrampleAbility.getInstance());
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue