Re: Adding new cards with Groovy
Nice work 
I don't think there's templates on Firemind for Born of the Gods
I don't think there's templates on Firemind for Born of the Gods
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=82&t=10323

name=Brimaz, King of Oreskos
url=http://magiccards.info/bng/en/5.html
image=http://mtgimage.com/card/brimaz%2C%20king%20of%20oreskos.jpg
value=3.741
rarity=M
type=Legendary,Creature
subtype=Cat,Soldier
cost={1}{W}{W}
ability=vigilance
pt=3/4
timing=main
requires_groovy_code
[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
return permanent == attacker ?
new MagicEvent(
permanent,
this,
"PN puts a 1/1 white Cat Soldier creature token with vigilance onto the battlefield attacking."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player=event.getPlayer();
game.doAction(new MagicPlayCardAction(
MagicCard.createTokenCard(
TokenCardDefinitions.get("1/1 white Cat Soldier creature token with vigilance"),
player
),
player,
[MagicPlayMod.ATTACKING]
));
}
},
new MagicWhenBlocksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocker) {
final MagicPermanent blocked = permanent.getBlockedCreature();
return (permanent == blocker && blocked.isValid()) ?
new MagicEvent(
permanent,
blocked,
this,
"PN puts a 1/1 white Cat Soldier creature token with vigilance onto the battlefield blocking RN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player=event.getPlayer();
final MagicPlayCardAction act = new MagicPlayCardAction(
MagicCard.createTokenCard(
TokenCardDefinitions.get("1/1 white Cat Soldier creature token with vigilance"),
player
),
player
);
game.doAction(act);
game.doAction(new MagicSetBlockerAction(event.getRefPermanent(), act.getPermanent()));
}
}
]
name=Feast of Blood
url=http://magiccards.info/zen/en/88.html
image=http://mtgimage.com/card/feast%20of%20blood.jpg
value=4.013
rarity=U
type=Sorcery
cost={1}{B}
timing=main
requires_groovy_code
def TWO_OR_MORE_VAMPIRES_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicSubType.Vampire)>=2;
}
};
[
new MagicCardActivation(
[TWO_OR_MORE_VAMPIRES_CONDITION],
new MagicActivationHints(MagicTiming.Removal,true),
"Destroy"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return source.getCostEvent();
}
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE,
MagicDestroyTargetPicker.Destroy,
this,
"Destroy target creature\$. " +
"PN gains 4 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
final MagicPermanent creature ->
game.doAction(new MagicDestroyAction(creature));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),4));
});
}
}
] new MagicCardActivation(
[TWO_OR_MORE_VAMPIRES_CONDITION],
new MagicActivationHints(MagicTiming.Removal,true),
"Destroy"
) {
@Override
public void change(final MagicCardDefinition cdef) {
cdef.setCardAct(this);
}
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE,
MagicDestroyTargetPicker.Destroy,
this,
"Destroy target creature\$. " +
"PN gains 4 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
final MagicPermanent creature ->
game.doAction(new MagicDestroyAction(creature));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),4));
});
}
}
]
Sorry guys, just now gotten around to adding the BNG cards to firemind.chhong yie wrote:tried to submit this script to firemind.ch, but somehow this card is not recognized. i think this would be in Mike's Authority, maybe.
Anyway here it is
Thanks, mikemike wrote:Sorry guys, just now gotten around to adding the BNG cards to firemind.ch

name=Mental Misstep
url=http://magiccards.info/nph/en/38.html
image=http://mtgimage.com/card/mental%20misstep.jpg
value=4.626
rarity=U
type=Instant
cost={U}
effect=Counter target spell with converted mana cost 1.
timing=counter
requires_groovy_code
[
new MagicCardActivation(
[MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Counter,true),
"Pay 2 life"
) {
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [
new MagicPayLifeEvent(source, 2)
];
}
}
]
{RP} {RP}, Act of Aggression for example? (Well, several alternate costs:
+2 life,
+4 life)return [
new MagicPayManaCostEvent(source,"{3}{R}")
new MagicPayLifeEvent(source, 2)
];

:Search] [ {2Life} :Search] - Omitting the
,
and 'Sacrifice a creature' as they appear on both?