normalize card scripts

master
melvin 2014-10-22 10:34:23 +08:00
parent 17eb06189e
commit 646c8b73c8
5 changed files with 69 additions and 91 deletions

View File

@ -1,12 +1,12 @@
name=Broodhatch Nantuko
image=http://mtgimage.com/card/broodhatch%20nantuko.jpg
value=2.500
rarity=U
type=Creature
subtype=Insect,Druid
cost={1}{G}
pt=1/1
ability=Morph {2}{G}
timing=main
requires_groovy_code=Saber Ants
oracle=Whenever Broodhatch Nantuko is dealt damage, you may put that many 1/1 green Insect creature tokens onto the battlefield. Morph {2}{G}
name=Broodhatch Nantuko
image=http://mtgimage.com/card/broodhatch%20nantuko.jpg
value=2.500
rarity=U
type=Creature
subtype=Insect,Druid
cost={1}{G}
pt=1/1
ability=Morph {2}{G}
timing=main
requires_groovy_code=Saber Ants
oracle=Whenever Broodhatch Nantuko is dealt damage, you may put that many 1/1 green Insect creature tokens onto the battlefield. Morph {2}{G}

View File

@ -1,48 +1,48 @@
[
new MagicAtYourUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return MagicConditionFactory.HandAtLeast(1) ?
new MagicEvent(
permanent,
new MagicMayChoice("Put a verse counter on SN?"),
this,
"PN may\$ put a verse counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.Verse,1));
}
}
},
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Counter),
"Counter"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicSacrificeEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_SPELL,
this,
"Counter target spell\$ unless its controller pays X, where X is the number of verse counters on SN."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game, {
final int amount = event.getPermanent().getCounters(MagicCounterType.Verse);
game.addEvent(new MagicCounterUnlessEvent(event.getSource(),it,MagicManaCost.create("{"+amount+"}")));
});
}
}
]
[
new MagicAtYourUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return MagicConditionFactory.HandAtLeast(1) ?
new MagicEvent(
permanent,
new MagicMayChoice("Put a verse counter on SN?"),
this,
"PN may\$ put a verse counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.Verse,1));
}
}
},
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Counter),
"Counter"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicSacrificeEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_SPELL,
this,
"Counter target spell\$ unless its controller pays X, where X is the number of verse counters on SN."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game, {
final int amount = event.getPermanent().getCounters(MagicCounterType.Verse);
game.addEvent(new MagicCounterUnlessEvent(event.getSource(),it,MagicManaCost.create("{"+amount+"}")));
});
}
}
]

View File

@ -1,9 +1,9 @@
name=Lilting Refrain
image=http://mtgimage.com/card/lilting%20refrain.jpg
value=2.500
rarity=U
type=Enchantment
cost={1}{U}
timing=enchantment
requires_groovy_code
oracle=At the beginning of your upkeep, you may put a verse counter on Lilting Refrain. Sacrifice Lilting Refrain: Counter target spell unless its controller pays {X}, where X is the number of verse counters on Lilting Refrain.
name=Lilting Refrain
image=http://mtgimage.com/card/lilting%20refrain.jpg
value=2.500
rarity=U
type=Enchantment
cost={1}{U}
timing=enchantment
requires_groovy_code
oracle=At the beginning of your upkeep, you may put a verse counter on Lilting Refrain. Sacrifice Lilting Refrain: Counter target spell unless its controller pays {X}, where X is the number of verse counters on Lilting Refrain.

View File

@ -1,12 +0,0 @@
name=Broodhatch Nantuko
image=http://mtgimage.com/card/broodhatch%20nantuko.jpg
value=2.500
rarity=U
type=Creature
subtype=Insect,Druid
cost={1}{G}
pt=1/1
ability=Whenever SN is dealt damage, you may put that many 1/1 green Insect creature tokens onto the battlefield.;\
Morph {2}{G}
timing=main
oracle=Whenever Broodhatch Nantuko is dealt damage, you may put that many 1/1 green Insect creature tokens onto the battlefield. Morph {2}{G}

View File

@ -1,10 +0,0 @@
name=Lilting Refrain
image=http://mtgimage.com/card/lilting%20refrain.jpg
value=2.500
rarity=U
type=Enchantment
cost={1}{U}
ability=At the beginning of your upkeep, you may put a verse counter on SN.;\
Sacrifice SN: Counter target spell unless its controller pays {X}, where X is the number of verse counters on SN.
timing=main
oracle=At the beginning of your upkeep, you may put a verse counter on Lilting Refrain. Sacrifice Lilting Refrain: Counter target spell unless its controller pays {X}, where X is the number of verse counters on Lilting Refrain.