Added new cards:

Awaken the Sky Tyrant
Blackblade Reforged
Dread Slaver
Druidic Satchel
Enshrouding Mist
Felhide Spiritbinder
Frostwielder
Goblin Kaboomist (+colorless artifact token named Land Mine)
Goblin Spymaster (+1/1 red Goblin creature token with Creatures you control attack each combat if able)
Hadana's Climb / Winged Temple of Orazca
Heroes' Podium
Kumano, Master Yamabushi
Loyal Cathar / Unhallowed Cathar
Michiko Konda, Truth Seeker
Mizzix of the Izmagnus
Myr Servitor
Queen Marchesa (+1/1 black Assassin creature token with deathtouch and haste)
Rot Wolf
Sage-Eye Avengers
Sea Legs
Sentinel of the Eternal Watch
Subterranean Tremors (+8/8 red Lizard creature token)
Tempt with Vengeance
Verix Bladewing (+legendary 4/4 red Dragon creature token with flying named Karox Bladewing)
master
Bilbo 2018-10-24 23:40:43 +02:00 committed by Melvin Zhang
parent 4f603e4dd9
commit 2f7f188a52
52 changed files with 792 additions and 59 deletions

View File

@ -0,0 +1,10 @@
name=1/1 black Assassin creature token with deathtouch and haste
token=Assassin
image=https://img.scryfall.com/cards/normal/en/tcn2/5.jpg
value=2
type=Creature
subtype=Assassin
color=b
pt=1/1
ability=deathtouch;haste
oracle=Deathtouch, haste

View File

@ -0,0 +1,11 @@
name=1/1 red Goblin creature token with Creatures you control attack each combat if able
token=Goblin
image=https://img.scryfall.com/cards/normal/en/tc16/12.jpg
value=1
type=Creature
subtype=Goblin
color=r
pt=1/1
ability=Creatures you control attack each combat if able.
oracle=Creatures you control attack each combat if able.

View File

@ -0,0 +1,8 @@
name=8/8 red Lizard creature token
token=Lizard
image=https://img.scryfall.com/cards/normal/en/tcn2/9.jpg
value=1
type=Creature
subtype=Lizard
color=r
pt=8/8

View File

@ -0,0 +1,22 @@
[
new DamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return permanent.isEnemy(damage.getSource()) && permanent.isController(damage.getTarget()) ?
new MagicEvent(
permanent,
this,
"PN Sacrifices SN. If PN does, then creates a 5/5 red Dragon creature token with flying."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicEvent sac = new MagicSacrificeEvent(event.getPermanent());
if (sac.isSatisfied()) {
game.addEvent(sac);
game.doAction(new PlayTokensAction(event.getPlayer(), CardDefinitions.getToken("5/5 red Dragon creature token with flying"),1));
}
}
}
]

View File

@ -5,7 +5,6 @@ value=2.500
rarity=R
type=Enchantment
cost={3}{R}
ability=When a source an opponent controls deals damage to you, sacrifice SN. If you do, create a 5/5 red Dragon creature token with flying.
timing=enchantment
oracle=When a source an opponent controls deals damage to you, sacrifice Awaken the Sky Tyrant. If you do, create a 5/5 red Dragon creature token with flying.
status=needs groovy
requires_groovy_code

View File

@ -6,7 +6,8 @@ type=Legendary,Artifact
subtype=Equipment
cost={2}
ability=Equipped creature gets +1/+1 for each land you control.;\
Equip legendary creature {3};\
Equip {3} to a legendary creature.;\
Equip {7}
timing=equipment
oracle=Equipped creature gets +1/+1 for each land you control.\nEquip legendary creature {3}\nEquip {7}

View File

@ -0,0 +1,41 @@
def trigger = new ThisDiesTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent died) {
return new MagicEvent(
permanent,
permanent.getOpponent(),
permanent.getCard(),
this,
"Return SN to the battlefield under PN's control."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ReanimateAction(
event.getRefCard(),
event.getPlayer(),
MagicPlayMod.BLACK_ZOMBIE
));
}
}
[
new DamageIsDealtTrigger(MagicTrigger.REPLACEMENT) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return damage.isSource(permanent) && (damage.isTargetCreature()) ?
new MagicEvent(
permanent,
damage.getTargetPermanent(),
this,
"If RN die this turn, return it to the battlefield under PN's control. "+
"That creature is a black Zombie in addition to its other colors and types."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new AddTurnTriggerAction(event.getRefPermanent(),trigger));
}
}
]

View File

@ -6,7 +6,6 @@ type=Creature
subtype=Zombie,Horror
cost={3}{B}{B}
pt=3/5
ability=Whenever a creature dealt damage by SN this turn dies, return it to the battlefield under your control. That creature is a black Zombie in addition to its other colors and types.
timing=main
requires_groovy_code
oracle=Whenever a creature dealt damage by Dread Slaver this turn dies, return it to the battlefield under your control. That creature is a black Zombie in addition to its other colors and types.
status=not supported: damage-by-SN-dies

View File

@ -0,0 +1,44 @@
//Land Creatures should trigger two effects
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Draw),
"Reveal"
) {
@Override
public Iterable<? extends MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source, "{2}"),
new MagicTapEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Reveal the top card of PN's library. If it's a creature card, create a 1/1 green Saproling creature token. " +
"If it's a land card, put that card onto the battlefield under PN control. " +
"If it's a noncreature, nonland card, PN gain 2 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
for (final MagicCard card : event.getPlayer().getLibrary().getCardsFromTop(1)) {
game.doAction(new RevealAction(card));
if (card.hasType(MagicType.Creature)) {
game.doAction(new PlayTokensAction(event.getPlayer(), CardDefinitions.getToken("1/1 green Saproling creature token"), 1));
}
if (card.hasType(MagicType.Land)) {
game.doAction(new ReturnCardAction(MagicLocationType.OwnersLibrary, card, event.getPlayer()));
}
if (!card.hasType(MagicType.Creature) && !card.hasType(MagicType.Land)) {
game.doAction(new ChangeLifeAction(event.getPlayer(), 2));
}
}
}
}
]

View File

@ -4,8 +4,6 @@ value=3.667
rarity=R
type=Artifact
cost={3}
ability={2}, {T}: Reveal the top card of your library. If it's a creature card, create a 1/1 green Saproling creature token. If it's a land card, put that card onto the battlefield under your control. If it's a noncreature, nonland card, you gain 2 life.
timing=artifact
requires_groovy_code
oracle={2}, {T}: Reveal the top card of your library. If it's a creature card, create a 1/1 green Saproling creature token. If it's a land card, put that card onto the battlefield under your control. If it's a noncreature, nonland card, you gain 2 life.
status=needs groovy
#Land Creatures should trigger two effects

View File

@ -0,0 +1,38 @@
def preventDamageTrigger = new IfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
if (damage.getTarget() == permanent) {
// Replacement effect. Generates no event or action.
damage.prevent();
}
return MagicEvent.NONE;
}
}
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
POS_TARGET_CREATURE,
MagicPumpTargetPicker.create(),
this,
"Target creature\$ gets +1/+1 until end of turn. "+
"Prevent all damage that would be dealt to it this turn. "+
"If it's renowned, untap it."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
game.doAction(new ChangeTurnPTAction(it,1,1));
game.doAction(new AddTurnTriggerAction(it, preventDamageTrigger));
if (it.hasState(MagicPermanentState.Renowned)) {
game.doAction(new UntapAction(it));
}
});
}
}
]

View File

@ -5,7 +5,7 @@ value=2.500
rarity=C
type=Instant
cost={W}
effect=Target creature gets +1/+1 until end of turn. Prevent all damage that would be dealt to it this turn. If it's renowned, untap it.
timing=removal
requires_groovy_code
oracle=Target creature gets +1/+1 until end of turn. Prevent all damage that would be dealt to it this turn. If it's renowned, untap it.
status=needs groovy

View File

@ -0,0 +1,47 @@
def choice = new MagicTargetChoice("another target creature");
def TypeStatic = new MagicStatic(MagicLayer.Type) {
@Override
public int getTypeFlags(final MagicPermanent permanent,final int flags) {
return flags | MagicType.Enchantment.getMask();
}
};
def Enchantment = {
final MagicPermanent perm ->
final MagicGame game = perm.getGame();
game.doAction(new AddStaticAction(perm, TypeStatic));
}
[
new ThisBecomesUntappedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent untapped) {
return new MagicEvent(
permanent,
new MagicMayChoice(
new MagicPayManaCostChoice(MagicManaCost.create("{1}{R}")),
choice,
),
this,
"PN may\$ pay {1}{R}\$. If PN does, PN creates a token that's a copy of another target creature\$, " +
"except it's an enchantment in addition to its other types. It gains haste. Exile it at the beginning of the next end step."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game, {
game.doAction(new PlayTokenAction(
event.getPlayer(),
it,
Enchantment,
MagicPlayMod.HASTE_UEOT,
MagicPlayMod.EXILE_AT_END_OF_TURN
));
});
}
}
}
]

View File

@ -6,7 +6,7 @@ type=Creature
subtype=Minotaur,Shaman
cost={3}{R}
pt=3/4
ability=Whenever SN becomes untapped, you may pay {1}{R}. If you do, create a token that's a copy of another target creature, except it's an enchantment in addition to its other types. It gains haste. Exile it at the beginning of the next end step.
timing=main
requires_groovy_code
oracle=Inspired — Whenever Felhide Spiritbinder becomes untapped, you may pay {1}{R}. If you do, create a token that's a copy of another target creature, except it's an enchantment in addition to its other types. It gains haste. Exile it at the beginning of the next end step.
status=needs groovy

View File

@ -6,8 +6,8 @@ type=Creature
subtype=Human,Shaman
cost={2}{R}{R}
pt=1/2
ability={T}: SN deals 1 damage to target creature or player.;\
If a creature dealt damage by SN this turn would die, exile it instead.
ability={T}: SN deals 1 damage to target creature or player.
timing=main
requires_groovy_code=Kumano, Master Yamabushi
oracle={T}: Frostwielder deals 1 damage to target creature or player.\nIf a creature dealt damage by Frostwielder this turn would die, exile it instead.
status=needs groovy

View File

@ -0,0 +1,28 @@
def loseAct = {
final MagicGame game, final MagicEvent event ->
game.doAction(new DealDamageAction(event.getPermanent(), event.getPermanent(), 2));
}
[
new AtYourUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return new MagicEvent(
permanent,
this,
"PN creates a colorless artifact token named Land Mine with \"{R}, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying.\""+
"Then flip a coin. If PN loses the flip, SN deals 2 damage to itself."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new PlayTokensAction(event.getPlayer(), CardDefinitions.getToken("colorless artifact token named Land Mine"),1));
game.addEvent(new MagicCoinFlipEvent(
event,
MagicEventAction.NONE,
loseAct
));
}
}
]

View File

@ -6,7 +6,7 @@ type=Creature
subtype=Goblin,Warrior
cost={1}{R}
pt=1/2
ability=At the beginning of your upkeep, create a colorless artifact token named Land Mine with "{R}, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying." Then flip a coin. If you lose the flip, SN deals 2 damage to itself.
timing=main
requires_groovy_code
oracle=At the beginning of your upkeep, create a colorless artifact token named Land Mine with "{R}, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying." Then flip a coin. If you lose the flip, Goblin Kaboomist deals 2 damage to itself.
status=needs groovy

View File

@ -0,0 +1,19 @@
[
new AtEndOfTurnTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer eotPlayer) {
return permanent.isOpponent(eotPlayer) ?
new MagicEvent(
permanent,
eotPlayer,
this,
"PN creates a 1/1 red Goblin creature token with \"Creatures you control attack each combat if able.\""
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new PlayTokensAction(event.getPlayer(),CardDefinitions.getToken("1/1 red Goblin creature token with Creatures you control attack each combat if able"),1));
}
}
]

View File

@ -7,9 +7,9 @@ type=Creature
subtype=Goblin,Rogue
cost={2}{R}
pt=2/1
ability=First strike;\
At the beginning of each opponent's end step, that player creates a 1/1 red Goblin creature token with "Creatures you control attack each combat if able."
ability=First strike
timing=main
requires_groovy_code
oracle=First strike\nAt the beginning of each opponent's end step, that player creates a 1/1 red Goblin creature token with "Creatures you control attack each combat if able."
status=needs groovy
# token name should include the ability to avoid clashing with standard Goblin token with no abilities

View File

@ -0,0 +1,25 @@
[
new AtBeginOfCombatTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer attackingPlayer) {
return permanent.getController() == attackingPlayer ?
new MagicEvent(
permanent,
TARGET_CREATURE_YOU_CONTROL,
this,
"PN puts a +1/+1 counter on target creature he or she controls\$. "+
"Then if that creature has three or more +1/+1 counters on it, transform SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
game.doAction(new ChangeCountersAction(event.getPlayer(),it,MagicCounterType.PlusOne,1));
if (it.getCounters(MagicCounterType.PlusOne) >= 3) {
game.doAction(new TransformAction(event.getPermanent()));
}
});
}
}
]

View File

@ -4,7 +4,7 @@ value=2.500
rarity=R
type=Legendary,Enchantment
cost={1}{G}{U}
ability=At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. Then if that creature has three or more +1/+1 counters on it, transform SN.
transform=Winged Temple of Orazca
timing=enchantment
requires_groovy_code
oracle=At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. Then if that creature has three or more +1/+1 counters on it, transform Hadana's Climb.

View File

@ -0,0 +1,73 @@
def LEGENDARY_CREATURE_YOU_CONTROL = new MagicPermanentFilterImpl() {
public boolean accept(final MagicSource source, final MagicPlayer player, final MagicPermanent target) {
return target.hasType(MagicType.Legendary) && target.hasType(MagicType.Creature);
}
}
def action = {
final MagicGame game, final MagicEvent event ->
final MagicCardList topCards = new MagicCardList(event.getRefCardList());
event.processChosenCards(game, {
game.doAction(new RevealAction(it));
game.doAction(new ShiftCardAction(it, MagicLocationType.OwnersLibrary, MagicLocationType.OwnersHand));
topCards.removeCard(it);
});
topCards.each {
game.doAction(new ShiftCardAction(it, MagicLocationType.OwnersLibrary, MagicLocationType.BottomOfOwnersLibrary))
}
}
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Flash),
"AddToHand"
) {
@Override
public Iterable<? extends MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicTapEvent(source),
new MagicPayManaCostEvent(source, "{X}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
payedCost.getX(),
this,
"PN looks at the top RN cards of PN's library."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final int X = event.getRefInt();
final MagicCardList topCards = player.getLibrary().getCardsFromTop(X);
game.doAction(new LookAction(topCards, player, "top ${X} cards of your library"));
game.addEvent(new MagicEvent(
event.getSource(),
new MagicFromCardListChoice(
topCards.findAll({ it.hasType(MagicType.Legendary) && it.hasType(MagicType.Creature) }),
1,
true
),
topCards,
action,
"PN may reveal a legendary creature card from among them\$ and put it into PN's hand. " +
"PN puts the rest on the bottom of PN's library in any order."
));
}
},
new MagicStatic(MagicLayer.ModPT, LEGENDARY_CREATURE_YOU_CONTROL) {
@Override
public void modPowerToughness(final MagicPermanent source, final MagicPermanent permanent, final MagicPowerToughness pt) {
final int amount = LEGENDARY_CREATURE_YOU_CONTROL.except(permanent).filter(source.getController()).size();
pt.add(amount,amount);
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
}
]

View File

@ -4,8 +4,7 @@ value=2.829
rarity=R
type=Legendary,Artifact
cost={5}
ability=Each legendary creature you control gets +1/+1 for each other legendary creature you control.;\
{X}, {T}: Look at the top X cards of your library. You may reveal a legendary creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
timing=artifact
requires_groovy_code
oracle=Each legendary creature you control gets +1/+1 for each other legendary creature you control.\n{X}, {T}: Look at the top X cards of your library. You may reveal a legendary creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
status=needs groovy

View File

@ -0,0 +1,19 @@
[
new DamageIsDealtTrigger(MagicTrigger.REPLACEMENT) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return damage.isSource(permanent) && (damage.isTargetCreature()) ?
new MagicEvent(
permanent,
damage.getTargetPermanent(),
this,
"If RN would die this turn, exile it instead."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new AddTurnTriggerAction(event.getRefPermanent(),ThisLeavesBattlefieldTrigger.IfDieExileInstead));
}
}
]

View File

@ -6,8 +6,8 @@ type=Legendary,Creature
subtype=Human,Shaman
cost={3}{R}{R}
pt=4/4
ability={1}{R}: SN deals 1 damage to target creature or player.;\
If a creature dealt damage by SN this turn would die, exile it instead.
ability={1}{R}: SN deals 1 damage to target creature or player.
timing=main
requires_groovy_code
oracle={1}{R}: Kumano, Master Yamabushi deals 1 damage to target creature or player.\nIf a creature dealt damage by Kumano this turn would die, exile it instead.
status=needs groovy

View File

@ -0,0 +1,47 @@
def DelayedTrigger = {
final MagicSource staleSource, final MagicPlayer stalePlayer, final MagicCard staleCard ->
return new AtEndOfTurnTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer eotPlayer) {
game.addDelayedAction(new RemoveTriggerAction(this));
final MagicCard mappedCard = staleCard.getOwner().map(game).getGraveyard().getCard(staleCard.getId());
return mappedCard.isInGraveyard() ?
new MagicEvent(
game.createDelayedSource(staleSource, stalePlayer),
mappedCard,
this,
"PN returns RN to the battlefield transformed."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ReanimateAction(event.getRefCard(),event.getPlayer(),MagicPlayMod.TRANSFORMED));
}
}
}
[
new ThisDiesTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent source, final MagicPermanent died) {
return new MagicEvent(
source,
source.getOwner(),
source.getCard(),
this,
"Return SN to the battlefield transformed under PN's control at the beginning of the next end step."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new AddTriggerAction(
DelayedTrigger(event.getSource(), event.getPlayer(), event.getRefCard())
));
}
}
]

View File

@ -6,9 +6,8 @@ type=Creature
subtype=Human,Soldier
cost={W}{W}
pt=2/2
ability=Vigilance;\
When SN dies, return it to the battlefield transformed under your control at the beginning of the next end step.
ability=Vigilance
transform=Unhallowed Cathar
timing=main
oracle=Vigilance\nWhen Loyal Cathar dies, return it to the battlefield transformed under your control at the beginning of the next end step.
status=needs groovy
requires_groovy_code

View File

@ -0,0 +1,23 @@
[
new DamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return permanent.isEnemy(damage.getSource()) && permanent.isController(damage.getTarget()) ?
new MagicEvent(
permanent,
damage.getSource().getController(),
this,
"PN sacrifices a permanent."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.addEvent(new MagicSacrificePermanentEvent(
event.getPermanent(),
event.getPlayer(),
SACRIFICE_PERMANENT
));
}
}
]

View File

@ -6,7 +6,7 @@ type=Legendary,Creature
subtype=Human,Advisor
cost={3}{W}
pt=2/2
ability=Whenever a source an opponent controls deals damage to you, that player sacrifices a permanent.
timing=main
requires_groovy_code
oracle=Whenever a source an opponent controls deals damage to you, that player sacrifices a permanent.
status=needs groovy

View File

@ -0,0 +1,29 @@
[
new OtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicCardOnStack spell) {
return (permanent.isFriend(spell) && spell.isInstantOrSorcerySpell()) && spell.getConvertedCost() > permanent.getController().getExperience() ?
new MagicEvent(
permanent,
this,
"PN gets an experience counter."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ChangeCountersAction(event.getPlayer(),event.getPlayer(),MagicCounterType.Experience, 1));
}
},
new MagicStatic(MagicLayer.CostReduction) {
@Override
public MagicManaCost reduceCost(final MagicPermanent source, final MagicCard card, final MagicManaCost cost) {
if ((card.hasType(MagicType.Instant) || card.hasType(MagicType.Sorcery)) && source.isFriend(card)) {
final int XP = source.getController().getExperience();
return cost.reduce(XP);
} else {
return cost;
}
}
}
]

View File

@ -7,8 +7,7 @@ type=Legendary,Creature
subtype=Goblin,Wizard
cost={2}{U}{R}
pt=2/2
ability=Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter.;\
Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have.
timing=main
requires_groovy_code
oracle=Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter.\nInstant and sorcery spells you cast cost {1} less to cast for each experience counter you have.
status=needs groovy

View File

@ -0,0 +1,26 @@
[
new AtYourUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isValid() ?
new MagicEvent(
permanent,
this,
"If SN is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent SN = event.getPermanent();
if (SN.isValid()) {
for (final MagicPlayer player : game.getAPNAP()) {
final List<MagicCard> graveyard = cardName("Myr Servitor").from(MagicTargetType.Graveyard).filter(player);
for (final MagicCard card : graveyard) {
game.doAction(new ReanimateAction(card, player));
}
}
}
}
}
]

View File

@ -6,7 +6,7 @@ type=Artifact,Creature
subtype=Myr
cost={1}
pt=1/1
ability=At the beginning of your upkeep, if SN is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield.
timing=main
requires_groovy_code
oracle=At the beginning of your upkeep, if Myr Servitor is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield.
status=needs groovy

View File

@ -0,0 +1,18 @@
[
new AtYourUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return upkeepPlayer.getOpponent().hasState(MagicPlayerState.Monarch) ?
new MagicEvent(
permanent,
this,
"PN creates a 1/1 black Assassin creature token with deathtouch and haste."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new PlayTokensAction(event.getPlayer(),CardDefinitions.getToken("1/1 black Assassin creature token with deathtouch and haste"),1));
}
}
]

View File

@ -8,8 +8,8 @@ subtype=Human,Assassin
cost={1}{R}{W}{B}
pt=3/3
ability=Deathtouch, haste;\
When SN enters the battlefield, you become the monarch.;\
At the beginning of your upkeep, if an opponent is the monarch, create a 1/1 black Assassin creature token with deathtouch and haste.
When SN enters the battlefield, you become the monarch.
timing=main
requires_groovy_code
oracle=Deathtouch, haste\nWhen Queen Marchesa enters the battlefield, you become the monarch.\nAt the beginning of your upkeep, if an opponent is the monarch, create a 1/1 black Assassin creature token with deathtouch and haste.
status=needs groovy

View File

@ -0,0 +1,38 @@
def trigger = new ThisDiesTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent died) {
return new MagicEvent(
permanent,
permanent.getOpponent(),
new MagicMayChoice("Draw a card?"),
this,
"PN may\$ draw a card."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new DrawAction(event.getPlayer()));
}
}
}
[
new DamageIsDealtTrigger(MagicTrigger.REPLACEMENT) {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return damage.isSource(permanent) && (damage.isTargetCreature()) ?
new MagicEvent(
permanent,
damage.getTargetPermanent(),
this,
"If RN die this turn, PN may draw a card."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new AddTurnTriggerAction(event.getRefPermanent(),trigger));
}
}
]

View File

@ -6,8 +6,8 @@ type=Creature
subtype=Wolf
cost={2}{G}
pt=2/2
ability=Infect;\
Whenever a creature dealt damage by SN this turn dies, you may draw a card.
ability=Infect
timing=main
requires_groovy_code
oracle=Infect\nWhenever a creature dealt damage by Rot Wolf this turn dies, you may draw a card.
status=not supported: damage-by-SN-dies

View File

@ -0,0 +1,38 @@
def POWER_LESS_THAN_SAGE = new MagicPermanentFilterImpl() {
public boolean accept(final MagicSource source, final MagicPlayer player, final MagicPermanent target) {
final MagicPermanent Sage = ((MagicPermanent)source);
final int amount = Sage.getPower();
return target.hasType(MagicType.Creature) && target.getPower() < amount;
}
}
def TARGET_POWER_LESS_THAN_SAGE = new MagicTargetChoice(
POWER_LESS_THAN_SAGE,
MagicTargetHint.Negative,
"target creature with power less than Sage-Eye Avengers's power"
);
def action = {
final MagicGame game, final MagicEvent event ->
if (event.isYes()) {
event.processTargetPermanent(game, {
if (it.getPower() < event.getPermanent().getPower()) {
game.doAction(new RemoveFromPlayAction(it,MagicLocationType.OwnersHand));
}
});
}
}
[
new ThisAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent attacker) {
return new MagicEvent(
permanent,
new MagicMayChoice("Choose target creature?", TARGET_POWER_LESS_THAN_SAGE),
action,
"PN may\$ return target creature\$ to its owner's hand if its power is less than SN's power."
);
}
}
]

View File

@ -6,8 +6,8 @@ type=Creature
subtype=Djinn,Monk
cost={4}{U}{U}
pt=4/5
ability=Prowess;\
Whenever SN attacks, you may return target creature to its owner's hand if its power is less than SN's power.
ability=Prowess
timing=main
requires_groovy_code
oracle=Prowess\nWhenever Sage-Eye Avengers attacks, you may return target creature to its owner's hand if its power is less than Sage-Eye Avengers's power.
status=needs groovy

View File

@ -7,7 +7,8 @@ subtype=Aura
cost={U}
ability=Flash;\
Enchant creature;\
Enchanted creature gets +0/+2 as long as it's a Pirate. Otherwise, it gets -2/-0.
As long as enchanted creature is Pirate, enchanted creature gets +0/+2.;\
As long as enchanted creature is non-Pirate creature, enchanted creature gets -2/-0.
timing=flash
enchant=default,creature
oracle=Flash\nEnchant creature\nEnchanted creature gets +0/+2 as long as it's a Pirate. Otherwise, it gets -2/-0.

View File

@ -0,0 +1,22 @@
[
new AtBeginOfCombatTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer attackingPlayer) {
return permanent.getOpponent() == attackingPlayer ?
new MagicEvent(
permanent,
TARGET_CREATURE_YOUR_OPPONENT_CONTROLS,
permanent.getOpponent(),
this,
"Tap target creature\$ that RN controls."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
game.doAction(new TapAction(it));
});
}
}
]

View File

@ -7,8 +7,8 @@ type=Creature
subtype=Giant,Soldier
cost={5}{W}
pt=4/6
ability=Vigilance;\
At the beginning of combat on each opponent's turn, tap target creature that player controls.
ability=Vigilance
timing=main
requires_groovy_code
oracle=Vigilance\nAt the beginning of combat on each opponent's turn, tap target creature that player controls.
status=needs groovy

View File

@ -0,0 +1,30 @@
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
final int x = payedCost.getX();
return new MagicEvent(
cardOnStack,
this,
"SN deals " + x + " damage to each creature without flying." +
(x >= 4 ? " Destroy all artifacts." : "") +
(x >= 8 ? " PN creates an 8/8 red Lizard creature token." : "")
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final MagicSource source = event.getSource();
int x = event.getCardOnStack().getX();
if (x >= 8) {
game.doAction(new PlayTokensAction(player, CardDefinitions.getToken("8/8 red Lizard creature token"), 1));
}
if (x >= 4) {
game.doAction(new DestroyAction(ARTIFACT.filter(event)));
}
CREATURE_WITHOUT_FLYING.filter(event) each {
game.doAction(new DealDamageAction(source, it, x));
}
}
}
]

View File

@ -5,7 +5,7 @@ value=2.500
rarity=M
type=Sorcery
cost={X}{R}
effect=SN deals X damage to each creature without flying. If X is 4 or more, destroy all artifacts. If X is 8 or more, create an 8/8 red Lizard creature token.
timing=main
requires_groovy_code
oracle=Subterranean Tremors deals X damage to each creature without flying. If X is 4 or more, destroy all artifacts. If X is 8 or more, create an 8/8 red Lizard creature token.
status=needs groovy

View File

@ -0,0 +1,32 @@
def action = {
final MagicGame game, final MagicEvent event ->
if (event.isYes()) {
for (final MagicPlayer player : game.getAPNAP()) {
final int x = event.getCardOnStack().getX();
game.doAction(new PlayTokensAction(player,CardDefinitions.getToken("1/1 red Elemental creature token with haste"),x));
}
}
}
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
final int x=payedCost.getX();
return new MagicEvent(
cardOnStack,
this,
"PN creates "+x+" 1/1 red Elemental creature tokens with haste."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int x = event.getCardOnStack().getX();
game.doAction(new PlayTokensAction(event.getPlayer(),CardDefinitions.getToken("1/1 red Elemental creature token with haste"),x));
game.addEvent(new MagicEvent(event.getSource(),event.cardOnStack.getOpponent(),new MagicMayChoice("Create tokens?"),action,
"PN may\$ creates "+x+" 1/1 red Elemental creature tokens with haste. "+
"If PN does, "+event.getPlayer()+" creates "+x+" 1/1 red Elemental creature tokens with haste."
));
}
}
]

View File

@ -4,7 +4,7 @@ value=3.781
rarity=R
type=Sorcery
cost={X}{R}
effect=Create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each player who does, create X 1/1 red Elemental creature tokens with haste.
timing=main
requires_groovy_code
oracle=Tempting offer — Create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each player who does, create X 1/1 red Elemental creature tokens with haste.
status=needs groovy

View File

@ -11,4 +11,3 @@ transform=Loyal Cathar
timing=main
hidden
oracle=Unhallowed Cathar can't block.
status=needs other half

View File

@ -8,6 +8,6 @@ cost={2}{R}{R}
pt=4/4
ability=Kicker {3};\
Flying;\
When SN enters the battlefield, if it was kicked, create Karox Bladewing, a legendary 4/4 red Dragon creature token with flying.
When SN enters the battlefield, if it was kicked, create a legendary 4/4 red Dragon creature token with flying named Karox Bladewing.
timing=main
oracle=Kicker {3}\nFlying\nWhen Verix Bladewing enters the battlefield, if it was kicked, create Karox Bladewing, a legendary 4/4 red Dragon creature token with flying.

View File

@ -0,0 +1,33 @@
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump),
"Pump"
) {
@Override
public Iterable<? extends MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source, "{1}{G}{U}"),
new MagicTapEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
TARGET_CREATURE_YOU_CONTROL,
MagicPumpTargetPicker.create(),
this,
"Target creature PN controls\$ gains flying and gets +X/+X until end of turn, where X is its power."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
game.doAction(new GainAbilityAction(it, MagicAbility.Flying));
game.doAction(new ChangeTurnPTAction(it,it.getPower(),it.getPower()));
});
}
}
]

View File

@ -3,9 +3,9 @@ image=https://magiccards.info/scans/en/rix/158b.jpg
value=2.500
rarity=R
type=Legendary,Land
ability={T}: Add one mana of any color.;\
{1}{G}{U}, {T}: Target creature you control gains flying and gets +X/+X until end of turn, where X is its power.
ability={T}: Add one mana of any color.
transform=Hadana's Climb
hidden
timing=land
requires_groovy_code
oracle={T}: Add one mana of any color.\n{1}{G}{U}, {T}: Target creature you control gains flying and gets +X/+X until end of turn, where X is its power.

View File

@ -0,0 +1,8 @@
name=colorless artifact token named Land Mine
image=https://img.scryfall.com/cards/normal/en/tm15/12.jpg
token=Land Mine
type=Artifact
color=
value=1
ability={R}, Sacrifice SN: SN deals 2 damage to target attacking creature without flying.
oracle={R}, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying.

View File

@ -0,0 +1,10 @@
name=legendary 4/4 red Dragon creature token with flying named Karox Bladewing
token=Karox Bladewing
image=https://img.scryfall.com/cards/normal/en/tdom/10.jpg
value=1
type=Legendary,Creature
subtype=Dragon
color=r
pt=4/4
ability=Flying
oracle=Flying