From f4122654039f4e9fa26b6d2d094a77b555f486ea Mon Sep 17 00:00:00 2001 From: Sloth Date: Thu, 25 Aug 2011 20:31:18 +0000 Subject: [PATCH] - Added Topple. --- .gitattributes | 1 + res/cardsfolder/r/reciprocate.txt | 1 - res/cardsfolder/t/topple.txt | 8 ++++++++ src/main/java/forge/Card.java | 7 +++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 res/cardsfolder/t/topple.txt diff --git a/.gitattributes b/.gitattributes index 6b24b1f3fb8..b8bd3a45127 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7902,6 +7902,7 @@ res/cardsfolder/t/tooth_and_nail.txt svneol=native#text/plain res/cardsfolder/t/tooth_of_chiss_goria.txt svneol=native#text/plain res/cardsfolder/t/tooth_of_ramos.txt svneol=native#text/plain res/cardsfolder/t/topan_ascetic.txt svneol=native#text/plain +res/cardsfolder/t/topple.txt -text res/cardsfolder/t/tor_giant.txt svneol=native#text/plain res/cardsfolder/t/tor_wauki.txt svneol=native#text/plain res/cardsfolder/t/torch_drake.txt svneol=native#text/plain diff --git a/res/cardsfolder/r/reciprocate.txt b/res/cardsfolder/r/reciprocate.txt index 9763a6d033b..7955d525ea1 100644 --- a/res/cardsfolder/r/reciprocate.txt +++ b/res/cardsfolder/r/reciprocate.txt @@ -3,7 +3,6 @@ ManaCost:W Types:Instant Text:no text A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.dealtDamageToYouThisTurn | TgtPrompt$ Select target creature that dealt damage to you this turn | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target creature that dealt damage to you this turn. -SVar:RemAIDeck:True SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/reciprocate.jpg SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/40.jpg diff --git a/res/cardsfolder/t/topple.txt b/res/cardsfolder/t/topple.txt new file mode 100644 index 00000000000..012583d82b6 --- /dev/null +++ b/res/cardsfolder/t/topple.txt @@ -0,0 +1,8 @@ +Name:Topple +ManaCost:2 W +Types:Sorcery +Text:no text +A:SP$ ChangeZone | Cost$ 2 W | ValidTgts$ Creature.greatestPower | TgtPrompt$ Select target creature with the greatest power | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target creature with the greatest power. (If two or more creatures are tied for greatest power, target any one of them.) +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/topple.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index 8ea41c9425d..ac2e81528e5 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -4837,6 +4837,13 @@ public class Card extends MyObservable implements Comparable { return false; } else if (Property.startsWith("wasDealtDamageThisTurn")) { if ((getReceivedDamageFromThisTurn().keySet()).isEmpty()) return false; + } else if (Property.startsWith("greatestPower")) { + CardList list = AllZoneUtil.getCreaturesInPlay(); + for (Card crd : list) { + if (crd.getNetAttack() > getNetAttack()) { + return false; + } + } } else if (Property.startsWith("enchanted")) { if (!isEnchanted()) return false; } else if (Property.startsWith("unenchanted")) {