From 8ffd75a160b254925e9889e5531f635a4337a3b4 Mon Sep 17 00:00:00 2001 From: "a. benedict balbue na" Date: Tue, 2 Oct 2012 21:34:17 +0800 Subject: [PATCH] added Knightly Valor --- release/Magarena/scripts/Knight2.txt | 9 +++++++ release/Magarena/scripts/Knightly_Valor.txt | 13 +++++++++ src/magic/card/Knightly_Valor.java | 30 +++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 release/Magarena/scripts/Knight2.txt create mode 100644 release/Magarena/scripts/Knightly_Valor.txt create mode 100644 src/magic/card/Knightly_Valor.java diff --git a/release/Magarena/scripts/Knight2.txt b/release/Magarena/scripts/Knight2.txt new file mode 100644 index 0000000000..8c18df2a76 --- /dev/null +++ b/release/Magarena/scripts/Knight2.txt @@ -0,0 +1,9 @@ +name=Knight +token=Knight2 +image=http://magiccards.info/extras/token/return-to-ravnica/knight.jpg +value=3 +type=Creature +subtype=Knight +color=w +cost={0} +pt=2/2 diff --git a/release/Magarena/scripts/Knightly_Valor.txt b/release/Magarena/scripts/Knightly_Valor.txt new file mode 100644 index 0000000000..a77ee52273 --- /dev/null +++ b/release/Magarena/scripts/Knightly_Valor.txt @@ -0,0 +1,13 @@ +name=Knightly Valor +url=http://magiccards.info/rtr/en/13.html +image=http://magiccards.info/scans/en/rtr/13.jpg +value=3.850 +rarity=C +type=Enchantment +subtype=Aura +cost={4}{W} +given_pt=+2/+2 +given_ability=vigilance +timing=aura +enchant=pump,pos creature +requires_card_code diff --git a/src/magic/card/Knightly_Valor.java b/src/magic/card/Knightly_Valor.java new file mode 100644 index 0000000000..e7a13e463a --- /dev/null +++ b/src/magic/card/Knightly_Valor.java @@ -0,0 +1,30 @@ +package magic.card; + +import magic.data.TokenCardDefinitions; +import magic.model.MagicGame; +import magic.model.MagicPermanent; +import magic.model.MagicPlayer; +import magic.model.action.MagicPlayTokenAction; +import magic.model.event.MagicEvent; +import magic.model.trigger.MagicWhenComesIntoPlayTrigger; + +public class Knightly_Valor { + public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer player) { + return new MagicEvent( + permanent, + this, + "PN puts a 2/2 white Knight creature token with vigilance onto the battlefield."); + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event, + final Object data[], + final Object[] choiceResults) { + game.doAction(new MagicPlayTokenAction(event.getPlayer(), TokenCardDefinitions.get("Knight2"))); + } + }; +}