more cards 5 (#1517)

* Add more new cards after playtesting (credit goes to Kelsioboy):
Akuta, Born of Ash
Dark Dabbling
Defiling Tears
Doorkeeper
Dragon Grip
Explorer's Scope
Gigapede
Guul Draz Overseer
Into the Wilds
Salt Road Ambushers
Tainted Remedy
Terrifying Presence
Thrasios, Triton Hero
Trail of Mystery
Yomiji, Who Bars the Way

* Cleanup: Remove trailing whitespace from scripts

* Fix all HTTP to HTTPS for magiccards.info
master
Martin Petricek 2018-03-22 10:35:32 +01:00 committed by Melvin Zhang
parent e5ebff99b1
commit 5ce8792d61
60 changed files with 403 additions and 94 deletions

View File

@ -1,5 +1,5 @@
name=Frantic Search name=Frantic Search
image=http://magiccards.info/scans/en/vma/70.jpg image=https://magiccards.info/scans/en/vma/70.jpg
value=2.500 value=2.500
rarity=C rarity=C
type=Instant type=Instant

View File

@ -1,5 +1,5 @@
name=Great Whale name=Great Whale
image=http://magiccards.info/scans/en/us/77.jpg image=https://magiccards.info/scans/en/us/77.jpg
value=2.500 value=2.500
rarity=R rarity=R
type=Creature type=Creature

View File

@ -1,5 +1,5 @@
name=Palinchron name=Palinchron
image=http://magiccards.info/scans/en/vma/86.jpg image=https://magiccards.info/scans/en/vma/86.jpg
value=2.500 value=2.500
rarity=R rarity=R
type=Creature type=Creature

View File

@ -1,5 +1,5 @@
name=Peregrine Drake name=Peregrine Drake
image=http://magiccards.info/scans/en/pc2/22.jpg image=https://magiccards.info/scans/en/pc2/22.jpg
value=2.500 value=2.500
rarity=U rarity=U
type=Creature type=Creature

View File

@ -1,5 +1,5 @@
name=Reaper King name=Reaper King
url=http://magiccards.info/shm/en/260.html url=https://magiccards.info/shm/en/260.html
image=http://mtgimage.com/card/reaper%20king.jpg image=http://mtgimage.com/card/reaper%20king.jpg
value=4.162 value=4.162
rarity=R rarity=R

View File

@ -1,5 +1,5 @@
name=Rewind name=Rewind
image=http://magiccards.info/scans/en/m13/65.jpg image=https://magiccards.info/scans/en/m13/65.jpg
value=2.500 value=2.500
rarity=U rarity=U
type=Instant type=Instant

View File

@ -1,5 +1,5 @@
name=Snap name=Snap
image=http://magiccards.info/scans/en/ul/43.jpg image=https://magiccards.info/scans/en/ul/43.jpg
value=2.500 value=2.500
rarity=C rarity=C
type=Instant type=Instant

View File

@ -1,5 +1,5 @@
name=Time Spiral name=Time Spiral
image=http://magiccards.info/scans/en/us/103.jpg image=https://magiccards.info/scans/en/us/103.jpg
value=2.500 value=2.500
rarity=R rarity=R
type=Sorcery type=Sorcery

View File

@ -1,5 +1,5 @@
name=Ulamog, the Ceaseless Hunger name=Ulamog, the Ceaseless Hunger
image=http://magiccards.info/scans/en/bfz/15.jpg image=https://magiccards.info/scans/en/bfz/15.jpg
image_updated=2015-11-08 image_updated=2015-11-08
value=2.500 value=2.500
rarity=M rarity=M

View File

@ -7,7 +7,6 @@ subtype=Spirit
cost={2}{B}{B} cost={2}{B}{B}
pt=3/2 pt=3/2
ability=Haste;\ ability=Haste;\
At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return SN from your graveyard to the battlefield. Sacrifice a Swamp: Return SN from your graveyard to the battlefield. Activate this ability only during your upkeep and only if you have more cards in hand than each opponent.
timing=fmain timing=fmain
oracle=Haste\nAt the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield. oracle=Haste\nAt the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield.
status=not supported: trigger-from-graveyard

View File

@ -2,8 +2,8 @@
new PreventDamageTrigger() { new PreventDamageTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) { public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
if (damage.getTarget() == permanent && if (damage.getTarget() == permanent &&
damage.isCombat() && damage.isCombat() &&
damage.getSource().hasType(MagicType.Creature) && damage.getSource().hasType(MagicType.Creature) &&
permanent.getBlockingCreatures().contains(damage.getSource())) { permanent.getBlockingCreatures().contains(damage.getSource())) {
// Replacement effect. Generates no event or action. // Replacement effect. Generates no event or action.

View File

@ -5,7 +5,6 @@ value=2.500
rarity=C rarity=C
type=Instant type=Instant
cost={2}{B} cost={2}{B}
effect=Regenerate target creature. Draw a card.~If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control. effect=Regenerate target creature.~Draw a card.~If there are two or more instant and/or sorcery cards in your graveyard, regenerate each other creature you control.
timing=removal timing=removal
oracle=Regenerate target creature. Draw a card.\nSpell mastery — If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control. oracle=Regenerate target creature. Draw a card.\nSpell mastery — If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control.
status=needs groovy

View File

@ -19,14 +19,14 @@ def sac = new MagicRegularCostEvent("Sacrifice three Clerics");
return new MagicEvent( return new MagicEvent(
source, source,
this, this,
"PN searches his or her graveyard, hand, and/or library a card named Scion of Darkness and put it onto the battlefield. " + "PN searches his or her graveyard, hand, and/or library a card named Scion of Darkness and put it onto the battlefield. " +
"Shuffle PN's library." "Shuffle PN's library."
); );
} }
@Override @Override
public void executeEvent(final MagicGame game, final MagicEvent event) { public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicTargetFilter filter = final MagicTargetFilter filter =
MagicTargetFilterFactory.cardName("Scion of Darkness") MagicTargetFilterFactory.cardName("Scion of Darkness")
.from(MagicTargetType.Graveyard) .from(MagicTargetType.Graveyard)
.from(MagicTargetType.Hand) .from(MagicTargetType.Hand)

View File

@ -5,7 +5,7 @@
return new MagicEvent( return new MagicEvent(
permanent, permanent,
this, this,
"PN exiles all creatures he or she controls. " + "PN exiles all creatures he or she controls. " +
"Then creates that many 5/5 red Dragon creature tokens with flying." "Then creates that many 5/5 red Dragon creature tokens with flying."
); );
} }

View File

@ -4,8 +4,7 @@ value=1.797
rarity=U rarity=U
type=Instant type=Instant
cost={2}{B} cost={2}{B}
effect=Until end of turn, target creature becomes black, gets +1/-1, and gains "{B}: Regenerate this creature." effect=Until end of turn, target creature becomes black and gains "{B}: Regenerate this creature."~*It* gets +1/-1 until end of turn.
timing=removal timing=removal
oracle=Until end of turn, target creature becomes black, gets +1/-1, and gains "{B}: Regenerate this creature." oracle=Until end of turn, target creature becomes black, gets +1/-1, and gains "{B}: Regenerate this creature."
status=needs groovy
# AI target-type problem, weakness, pump, removal, regenerate?

View File

@ -0,0 +1,39 @@
def CREATURE_WITH_DEFENDER_YOU_CONTROL = new MagicPermanentFilterImpl() {
public boolean accept(final MagicSource source,final MagicPlayer player,final MagicPermanent target) {
return target.isCreature() && target.hasAbility(MagicAbility.Defender) == true
}
};
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump),
"Mill"
) {
@Override
public Iterable<? extends MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicTapEvent(source),
new MagicPayManaCostEvent(source, "{2}{U}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
TARGET_PLAYER,
this,
"Target player\$ puts the top X cards from his or her library into his or her graveyard, "+
"where X is the number of creatures with defender PN control."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game, {
final MagicPlayer player = event.getPlayer()
final int amount = event.getPlayer().getNrOfPermanents(CREATURE_WITH_DEFENDER_YOU_CONTROL);
game.logAppendX(event.getPlayer(), amount);
game.doAction(new MillLibraryAction(it, amount));
});
}
}
]

View File

@ -0,0 +1,12 @@
name=Doorkeeper
image=https://magiccards.info/scans/en/rtr/37.jpg
value=2.878
rarity=C
type=Creature
subtype=Homunculus
cost={1}{U}
pt=0/4
ability=Defender
timing=smain
oracle=Defender\n{2}{U}, {T}: Target player puts the top X cards of his or her library into his or her graveyard, where X is the number of creatures with defender you control.
requires_groovy_code

View File

@ -0,0 +1,20 @@
def CREATURE_POWER_4_OR_MORE_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().controlsPermanent(CREATURE_POWER_4_OR_MORE);
}
};
[
new MagicHandCastActivation(
[CREATURE_POWER_4_OR_MORE_CONDITION, MagicCondition.NOT_SORCERY_CONDITION],
new MagicActivationHints(MagicTiming.Pump,true),
"Flash"
) {
@Override
public Iterable<? extends MagicEvent> getCostEvent(final MagicCard source) {
return [
MagicPayManaCostEvent.Cast(source, "{2}{R}")
];
}
}
]

View File

@ -5,10 +5,9 @@ rarity=U
type=Enchantment type=Enchantment
subtype=Aura subtype=Aura
cost={2}{R} cost={2}{R}
ability=If you control a creature with power 4 or greater, you may cast SN as though it had flash.;\ ability=Enchant creature;\
Enchant creature;\
Enchanted creature gets +2/+0 and has first strike. Enchanted creature gets +2/+0 and has first strike.
timing=aura timing=aura
enchant=default,creature enchant=default,pos creature
oracle=Ferocious — If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash.\nEnchant creature\nEnchanted creature gets +2/+0 and has first strike. oracle=Ferocious — If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash.\nEnchant creature\nEnchanted creature gets +2/+0 and has first strike.
status=needs groovy requires_groovy_code

View File

@ -5,7 +5,7 @@
return new MagicEvent( return new MagicEvent(
permanent, permanent,
this, this,
"PN creates X 2/2 black Zombie creature tokens, " + "PN creates X 2/2 black Zombie creature tokens, " +
"where X is half the number of Zombies he or she controls, rounded down" "where X is half the number of Zombies he or she controls, rounded down"
); );
} }

View File

@ -0,0 +1,48 @@
def action = {
final MagicGame game, final MagicEvent event ->
if (event.isYes()) {
final MagicCard card = event.getRefCard();
final MagicPlayer player = event.getPlayer();
game.doAction(new ReturnCardAction(MagicLocationType.OwnersLibrary, card, event.getPlayer(), MagicPlayMod.TAPPED));
game.logAppendMessage(player, "${player} puts (${card}) it onto the battlefield tapped.")
}
}
[
new AttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
final MagicPermanent equippedCreature=permanent.getEquippedCreature();
return (equippedCreature.isValid() && equippedCreature==creature) ?
new MagicEvent(
equippedCreature,
this,
"PN looks at the top card of his or her library. If it's a land card, "+
"PN may put it onto the battlefield tapped."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final MagicCardList cards = player.getLibrary().getCardsFromTop(1);
for (final MagicCard card : cards) {
game.doAction(new LookAction(card, player, "top card of your library"));
if (card.hasType(MagicType.Land)) {
game.addEvent(new MagicEvent(
event.getSource(),
new MagicSimpleMayChoice(
MagicSimpleMayChoice.DRAW_CARDS,
1,
MagicSimpleMayChoice.DEFAULT_YES
),
card,
action,
"\$"
));
}
}
}
}
]

View File

@ -5,8 +5,7 @@ rarity=U
type=Artifact type=Artifact
subtype=Equipment subtype=Equipment
cost={1} cost={1}
ability=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped.;\ ability=Equip {1}
Equip {1}
timing=equipment timing=equipment
oracle=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped.\nEquip {1} oracle=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped.\nEquip {1}
status=needs groovy requires_groovy_code

View File

@ -18,7 +18,7 @@
game.doAction(new GainAbilityAction(permanent, MagicAbility.Haste)); game.doAction(new GainAbilityAction(permanent, MagicAbility.Haste));
} }
}, },
new AtYourUpkeepTrigger() { new AtYourUpkeepTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) { public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {

View File

@ -7,7 +7,6 @@ subtype=Insect
cost={3}{G}{G} cost={3}{G}{G}
pt=6/1 pt=6/1
ability=Shroud;\ ability=Shroud;\
At the beginning of your upkeep, if SN is in your graveyard, you may discard a card. If you do, return SN to your hand. Discard a card: Return SN from your graveyard to your hand. Activate this ability only during your upkeep.
timing=main timing=main
oracle=Shroud\nAt the beginning of your upkeep, if Gigapede is in your graveyard, you may discard a card. If you do, return Gigapede to your hand. oracle=Shroud\nAt the beginning of your upkeep, if Gigapede is in your graveyard, you may discard a card. If you do, return Gigapede to your hand.
status=not supported: trigger-from-graveyard

View File

@ -3,7 +3,7 @@
@Override @Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer eotPlayer) { public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer eotPlayer) {
final MagicPermanent enchanted = permanent.getEnchantedPermanent(); final MagicPermanent enchanted = permanent.getEnchantedPermanent();
return permanent.isController(eotPlayer) ? return permanent.isController(eotPlayer) ?
new MagicEvent( new MagicEvent(
permanent, permanent,
enchanted.getController(), enchanted.getController(),

View File

@ -0,0 +1,24 @@
[
new OtherEntersBattlefieldTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
final int amount = otherPermanent.hasSubType(MagicSubType.Swamp) ? 2 : 1;
return (otherPermanent.isLand() && otherPermanent.isFriend(permanent)) ?
new MagicEvent(
permanent,
amount,
this,
"Other creatures PN control get +RN/+0 until end of turn."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int amount = event.getRefInt();
CREATURE_YOU_CONTROL.except(event.getPermanent()).filter(event) each {
game.doAction(new ChangeTurnPTAction(it,amount,0));
}
}
}
]

View File

@ -7,8 +7,7 @@ type=Creature
subtype=Vampire subtype=Vampire
cost={4}{B}{B} cost={4}{B}{B}
pt=3/4 pt=3/4
ability=Flying;\ ability=Flying
Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead.
timing=main timing=main
requires_groovy_code
oracle=Flying\nLandfall — Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. oracle=Flying\nLandfall — Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead.
status=needs groovy

View File

@ -9,8 +9,8 @@ def costEffect = new MagicRegularCostEvent("Sacrifice a Forest");
new MagicMayChoice("Sacrifice a Forest?"), new MagicMayChoice("Sacrifice a Forest?"),
payedCost, payedCost,
this, this,
"PN may\$ sacrifice a Forest. " + "PN may\$ sacrifice a Forest. " +
"If you do, put SN onto the battlefield. " + "If you do, put SN onto the battlefield. " +
"If you don't, put it into its owner's graveyard." "If you don't, put it into its owner's graveyard."
); );
} }

View File

@ -18,7 +18,7 @@
outerGame.doAction(new AddStaticAction(new MagicStatic(MagicLayer.Game, MagicStatic.UntilEOT) { outerGame.doAction(new AddStaticAction(new MagicStatic(MagicLayer.Game, MagicStatic.UntilEOT) {
@Override @Override
public void modGame(final MagicPermanent source, final MagicGame game) { public void modGame(final MagicPermanent source, final MagicGame game) {
CREATURE.except(it).filter(it) each { CREATURE.except(it).filter(it) each {
it.addAbility(MagicAbility.CannotAttack); it.addAbility(MagicAbility.CannotAttack);
} }
} }

View File

@ -0,0 +1,45 @@
def action = {
final MagicGame game, final MagicEvent event ->
if (event.isYes()) {
final MagicCard card = event.getRefCard();
final MagicPlayer player = event.getPlayer();
game.doAction(new ReturnCardAction(MagicLocationType.OwnersLibrary, card, event.getPlayer()));
game.logAppendMessage(player, "${player} puts (${card}) it onto the battlefield.")
}
}
[
new AtYourUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return new MagicEvent(
permanent,
this,
"PN looks at the top card of his or her library. If it's a land card, "+
"PN may put it onto the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final MagicCardList cards = player.getLibrary().getCardsFromTop(1);
for (final MagicCard card : cards) {
game.doAction(new LookAction(card, player, "top card of your library"));
if (card.hasType(MagicType.Land)) {
game.addEvent(new MagicEvent(
event.getSource(),
new MagicSimpleMayChoice(
MagicSimpleMayChoice.DRAW_CARDS,
1,
MagicSimpleMayChoice.DEFAULT_YES
),
card,
action,
"\$"
));
}
}
}
}
]

View File

@ -4,7 +4,6 @@ value=3.598
rarity=R rarity=R
type=Enchantment type=Enchantment
cost={3}{G} cost={3}{G}
ability=At the beginning of your upkeep, look at the top card of your library. If it's a land card, you may put it onto the battlefield.
timing=enchantment timing=enchantment
oracle=At the beginning of your upkeep, look at the top card of your library. If it's a land card, you may put it onto the battlefield. oracle=At the beginning of your upkeep, look at the top card of your library. If it's a land card, you may put it onto the battlefield.
status=needs groovy requires_groovy_code

View File

@ -8,7 +8,6 @@
return [ return [
new MagicTapEvent(source), new MagicTapEvent(source),
new MagicPayManaCostEvent(source, "{5}") new MagicPayManaCostEvent(source, "{5}")
]; ];
} }
@Override @Override

View File

@ -9,8 +9,8 @@ def costEffect = new MagicRegularCostEvent("Sacrifice a Plains");
new MagicMayChoice("Sacrifice a Plains?"), new MagicMayChoice("Sacrifice a Plains?"),
payedCost, payedCost,
this, this,
"PN may\$ sacrifice a Plains. " + "PN may\$ sacrifice a Plains. " +
"If you do, put SN onto the battlefield. " + "If you do, put SN onto the battlefield. " +
"If you don't, put it into its owner's graveyard." "If you don't, put it into its owner's graveyard."
); );
} }

View File

@ -6,7 +6,7 @@
permanent, permanent,
damage.getDealtAmount(), damage.getDealtAmount(),
this, this,
"PN creates RN 1/1 green Insect creature tokens." "PN creates RN 1/1 green Insect creature tokens."
); );
} }
@Override @Override

View File

@ -3,7 +3,7 @@
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) { public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
final MagicPermanent enchanted = permanent.getEnchantedPermanent() final MagicPermanent enchanted = permanent.getEnchantedPermanent()
return enchanted.isValid() ? return enchanted.isValid() ?
new MagicEvent( new MagicEvent(
permanent, permanent,
enchanted, enchanted,

View File

@ -2,8 +2,8 @@ def TRASNFORM = MagicRuleEventAction.create("Transform all Humans.");
def NONWEREWOLF_CREATURES = new MagicPermanentFilterImpl() { def NONWEREWOLF_CREATURES = new MagicPermanentFilterImpl() {
public boolean accept(final MagicSource source,final MagicPlayer player,final MagicPermanent target) { public boolean accept(final MagicSource source,final MagicPlayer player,final MagicPermanent target) {
return !target.hasSubType(MagicSubType.Werewolf) && return !target.hasSubType(MagicSubType.Werewolf) &&
!target.hasSubType(MagicSubType.Wolf) && !target.hasSubType(MagicSubType.Wolf) &&
target.isCreature(); target.isCreature();
} }
}; };
@ -14,7 +14,7 @@ def NONWEREWOLF_CREATURES = new MagicPermanentFilterImpl() {
return new MagicEvent( return new MagicEvent(
cardOnStack, cardOnStack,
this, this,
"Transform all Humans. " + "Transform all Humans. " +
"Prevent all combat damage that would be dealt this turn by creatures other than Werewolves and Wolves." "Prevent all combat damage that would be dealt this turn by creatures other than Werewolves and Wolves."
); );
} }

View File

@ -7,8 +7,8 @@
new MagicMayChoice(), new MagicMayChoice(),
payedCost, payedCost,
this, this,
"PN may\$ discard a land card. " + "PN may\$ discard a land card. " +
"If you do, put SN onto the battlefield. " + "If you do, put SN onto the battlefield. " +
"If you don't, put it into its owner's graveyard." "If you don't, put it into its owner's graveyard."
); );
} }

View File

@ -62,7 +62,7 @@ def AN_EQUIPMENT_YOU_CONTROL = new MagicTargetChoice("an Equipment you control")
public void executeEvent(final MagicGame game, final MagicEvent event) { public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) { if (event.isYes()) {
event.processTargetCard(game, { event.processTargetCard(game, {
final MagicLocationType from = it.isInHand() ? MagicLocationType.OwnersHand : MagicLocationType.Graveyard; final MagicLocationType from = it.isInHand() ? MagicLocationType.OwnersHand : MagicLocationType.Graveyard;
game.doAction(new ReturnCardAction(from,it,event.getPlayer())); game.doAction(new ReturnCardAction(from,it,event.getPlayer()));
}); });
} }

View File

@ -1,7 +1,7 @@
[ [
new MagicPlaneswalkerActivation(-4) { new MagicPlaneswalkerActivation(-4) {
@Override @Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) { public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent( return new MagicEvent(
source, source,
this, this,

View File

@ -1,4 +1,4 @@
[ [
new ThisCombatDamagePlayerTrigger() { new ThisCombatDamagePlayerTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicDamage damage) { public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicDamage damage) {

View File

@ -7,6 +7,6 @@ subtype=Phoenix
cost={2}{R}{R} cost={2}{R}{R}
pt=4/3 pt=4/3
ability=Flying;\ ability=Flying;\
When SN dies, create a 0/1 red Elemental creature token. When SN dies, create a 0/1 red Elemental creature token.
timing=main timing=main
oracle=Flying\nWhen Rekindling Phoenix dies, create a 0/1 red Elemental creature token with "At the beginning of your upkeep, sacrifice this creature and return target card named Rekindling Phoenix from your graveyard to the battlefield. It gains haste until end of turn." oracle=Flying\nWhen Rekindling Phoenix dies, create a 0/1 red Elemental creature token with "At the beginning of your upkeep, sacrifice this creature and return target card named Rekindling Phoenix from your graveyard to the battlefield. It gains haste until end of turn."

View File

@ -6,7 +6,7 @@
cardOnStack, cardOnStack,
TARGET_CREATURE_CARD_FROM_GRAVEYARD, TARGET_CREATURE_CARD_FROM_GRAVEYARD,
this, this,
"PN exiles target creature card from his or her graveyard.\$ " + "PN exiles target creature card from his or her graveyard.\$ " +
"PN creates a black Zombie creature token. Its power is equal to "+ "PN creates a black Zombie creature token. Its power is equal to "+
"that card's power and its toughness is equal to that card's toughness." "that card's power and its toughness is equal to that card's toughness."
); );

View File

@ -0,0 +1,19 @@
[
new TurnedFaceUpTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (permanent != otherPermanent && otherPermanent.isFriend(permanent) && otherPermanent.hasType(MagicType.Creature)) ?
new MagicEvent(
permanent,
otherPermanent,
this,
"PN puts two +1/+1 counters on RN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ChangeCountersAction(event.getRefPermanent(),MagicCounterType.PlusOne,2));
}
}
]

View File

@ -6,8 +6,7 @@ type=Creature
subtype=Hound,Warrior subtype=Hound,Warrior
cost={3}{G} cost={3}{G}
pt=3/3 pt=3/3
ability=Whenever another permanent you control is turned face up, if it's a creature, put two +1/+1 counters on it.;\ ability=Megamorph {3}{G}{G}
Megamorph {3}{G}{G}
timing=main timing=main
requires_groovy_code
oracle=Whenever another permanent you control is turned face up, if it's a creature, put two +1/+1 counters on it.\nMegamorph {3}{G}{G} oracle=Whenever another permanent you control is turned face up, if it's a creature, put two +1/+1 counters on it.\nMegamorph {3}{G}{G}
status=needs groovy

View File

@ -6,7 +6,7 @@
pt.set(amount,amount); pt.set(amount,amount);
} }
}, },
new OtherSpellIsCastTrigger() { new OtherSpellIsCastTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) { public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {

View File

@ -5,7 +5,7 @@
if (!damage.isCombat() && if (!damage.isCombat() &&
damage.isTargetCreature() && damage.isTargetCreature() &&
damage.getTargetPermanent().isController(permanent.getOpponent())) { damage.getTargetPermanent().isController(permanent.getOpponent())) {
final int amount = damage.replace(); final int amount = damage.replace();
game.doAction(new ChangeCountersAction(damage.getTargetPermanent(), MagicCounterType.MinusOne, amount)); game.doAction(new ChangeCountersAction(damage.getTargetPermanent(), MagicCounterType.MinusOne, amount));
} }

View File

@ -11,7 +11,7 @@
"If SN is on the battlefield, it deals damage equal to its power to target creature an opponent controls\$ " + "If SN is on the battlefield, it deals damage equal to its power to target creature an opponent controls\$ " +
"and that creature deals damage equal to its power to SN." "and that creature deals damage equal to its power to SN."
): ):
MagicEvent.NONE MagicEvent.NONE
} }
@Override @Override

View File

@ -0,0 +1,25 @@
[
new IfLifeWouldChangeTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final ChangeLifeAction act) {
int amount = 0;
if (permanent.isOpponent(act.getPlayer()) && act.getLifeChange() > 0) {
amount = act.getLifeChange();
act.setLifeChange(0);
return new MagicEvent(
permanent,
act.player,
amount,
this,
"PN loses RN Life."
);
} else {
return MagicEvent.NONE;
}
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ChangeLifeAction(event.getPlayer(),-event.getRefInt()));
}
}
]

View File

@ -5,7 +5,6 @@ value=2.500
rarity=R rarity=R
type=Enchantment type=Enchantment
cost={2}{B} cost={2}{B}
ability=If an opponent would gain life, that player loses that much life instead.
timing=enchantment timing=enchantment
oracle=If an opponent would gain life, that player loses that much life instead. oracle=If an opponent would gain life, that player loses that much life instead.
status=needs groovy requires_groovy_code

View File

@ -0,0 +1,21 @@
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
TARGET_CREATURE,
this,
"Prevent all combat damage that would be dealt by creatures other than target creature\$ this turn."
);
}
@Override
public void executeEvent(final MagicGame Game, final MagicEvent event) {
event.processTargetPermanent(Game, {
CREATURE.except(it).filter(it) each {
Game.doAction(new AddTurnTriggerAction(it, PreventDamageTrigger.PreventCombatDamageDealtBy));
}
});
}
}
]

View File

@ -5,7 +5,6 @@ value=3.955
rarity=C rarity=C
type=Instant type=Instant
cost={1}{G} cost={1}{G}
effect=Prevent all combat damage that would be dealt by creatures other than target creature this turn.
timing=removal timing=removal
requires_groovy_code
oracle=Prevent all combat damage that would be dealt by creatures other than target creature this turn. oracle=Prevent all combat damage that would be dealt by creatures other than target creature this turn.
status=needs groovy

View File

@ -0,0 +1,47 @@
def action = {
final MagicGame game, final MagicEvent event ->
final MagicPlayer player = event.getPlayer();
for (final MagicCard card : player.getLibrary().getCardsFromTop(1)) {
game.doAction(new RevealAction(card));
if (card.hasType(MagicType.Land)) {
game.doAction(new ReturnCardAction(MagicLocationType.OwnersLibrary,card,event.getPlayer(),MagicPlayMod.TAPPED));
} else {
game.doAction(new DrawAction(event.getPlayer()));
}
}
}
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump),
"Scry"
) {
@Override
public Iterable<? extends MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{4}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Scry 1, then reveal the top card of PN's library. If it's a land card, PN puts it onto the battlefield tapped. " +
"Otherwise, PN draw a card."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.addEvent(new MagicScryEvent(event));
game.addEvent(new MagicEvent(
event.getSource(),
event.getPlayer(),
action,
""
));
}
}
]

View File

@ -7,8 +7,7 @@ type=Legendary,Creature
subtype=Merfolk,Wizard subtype=Merfolk,Wizard
cost={G}{U} cost={G}{U}
pt=1/3 pt=1/3
ability={4}: Scry 1, then reveal the top card of your library. If it's a land card, put it onto the battlefield tapped. Otherwise, draw a card.;\ ability=Partner
Partner
timing=main timing=main
oracle={4}: Scry 1, then reveal the top card of your library. If it's a land card, put it onto the battlefield tapped. Otherwise, draw a card.\nPartner oracle={4}: Scry 1, then reveal the top card of your library. If it's a land card, put it onto the battlefield tapped. Otherwise, draw a card.\nPartner
status=needs groovy requires_groovy_code

View File

@ -0,0 +1,19 @@
[
new TurnedFaceUpTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (otherPermanent.isFriend(permanent) && otherPermanent.hasType(MagicType.Creature)) ?
new MagicEvent(
permanent,
otherPermanent,
this,
"RN gets +2/+2 until end of turn."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ChangeTurnPTAction(event.getRefPermanent(),2,2));
}
}
]

View File

@ -4,8 +4,7 @@ value=2.500
rarity=R rarity=R
type=Enchantment type=Enchantment
cost={1}{G} cost={1}{G}
ability=Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.;\ ability=Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.
Whenever a permanent you control is turned face up, if it's a creature, it gets +2/+2 until end of turn.
timing=enchantment timing=enchantment
requires_groovy_code
oracle=Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.\nWhenever a permanent you control is turned face up, if it's a creature, it gets +2/+2 until end of turn. oracle=Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.\nWhenever a permanent you control is turned face up, if it's a creature, it gets +2/+2 until end of turn.
status=needs groovy

View File

@ -2,10 +2,10 @@
new PreventDamageTrigger() { new PreventDamageTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) { public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
if (damage.getTarget() == permanent && permanent.hasCounters(MagicCounterType.PlusOne)) { if (damage.getTarget() == permanent && permanent.hasCounters(MagicCounterType.PlusOne)) {
damage.prevent(); damage.prevent();
game.doAction(new ChangeCountersAction(permanent, MagicCounterType.PlusOne,-1)); game.doAction(new ChangeCountersAction(permanent, MagicCounterType.PlusOne,-1));
} }
return MagicEvent.NONE; return MagicEvent.NONE;
} }
} }

View File

@ -7,7 +7,7 @@
permanent.getController(), permanent.getController(),
damage.getTargetPlayer(), damage.getTargetPlayer(),
this, this,
"RN sacrifices a creature. " + "RN sacrifices a creature. " +
"If RN can't, PN create a 3/3 black, red, and green Cat Dragon creature token with flying." "If RN can't, PN create a 3/3 black, red, and green Cat Dragon creature token with flying."
); );
} }

View File

@ -0,0 +1,19 @@
[
new OtherDiesTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent died) {
return (permanent != died && died.hasType(MagicType.Legendary)) ?
new MagicEvent(
permanent,
died.getCard(),
this,
"Returns RN to its owner's hand."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new ShiftCardAction(event.getRefCard(), MagicLocationType.Graveyard, MagicLocationType.OwnersHand));
}
}
]

View File

@ -6,7 +6,6 @@ type=Legendary,Creature
subtype=Spirit subtype=Spirit
cost={5}{W}{W} cost={5}{W}{W}
pt=4/4 pt=4/4
ability=Whenever a legendary permanent other than SN is put into a graveyard from the battlefield, return that card to its owner's hand.
timing=main timing=main
requires_groovy_code
oracle=Whenever a legendary permanent other than Yomiji, Who Bars the Way is put into a graveyard from the battlefield, return that card to its owner's hand. oracle=Whenever a legendary permanent other than Yomiji, Who Bars the Way is put into a graveyard from the battlefield, return that card to its owner's hand.
status=needs groovy

View File

@ -1,14 +0,0 @@
name=Doorkeeper
image=https://magiccards.info/scans/en/ima/53.jpg
image_updated=2017-04-12
value=2.878
rarity=C
type=Creature
subtype=Homunculus
cost={1}{U}
pt=0/4
ability=Defender;\
{2}{U}, {T}: Target player puts the top X cards of his or her library into his or her graveyard, where X is the number of creatures with defender you control.
timing=smain
oracle=Defender\n{2}{U}, {T}: Target player puts the top X cards of his or her library into his or her graveyard, where X is the number of creatures with defender you control.
status=needs groovy