From 0fc3d3c01f219d9d224632b6f5bbb96f09f4620c Mon Sep 17 00:00:00 2001 From: Agetian Date: Mon, 16 Jan 2017 16:08:53 +0000 Subject: [PATCH] - Fixed the logic in how some parameters are checked in Player.java. - Added Hope of Ghirapur (AER). --- .gitattributes | 1 + forge-game/src/main/java/forge/game/player/Player.java | 6 +++--- forge-gui/res/cardsfolder/h/hope_of_ghirapur.txt | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 forge-gui/res/cardsfolder/h/hope_of_ghirapur.txt diff --git a/.gitattributes b/.gitattributes index 850cf9d0aed..6c397339d4f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8052,6 +8052,7 @@ forge-gui/res/cardsfolder/h/hooting_mandrills.txt -text forge-gui/res/cardsfolder/h/hope_against_hope.txt -text forge-gui/res/cardsfolder/h/hope_and_glory.txt svneol=native#text/plain forge-gui/res/cardsfolder/h/hope_charm.txt svneol=native#text/plain +forge-gui/res/cardsfolder/h/hope_of_ghirapur.txt -text forge-gui/res/cardsfolder/h/hopeful_eidolon.txt -text forge-gui/res/cardsfolder/h/hopping_automaton.txt svneol=native#text/plain forge-gui/res/cardsfolder/h/horde_ambusher.txt -text diff --git a/forge-game/src/main/java/forge/game/player/Player.java b/forge-game/src/main/java/forge/game/player/Player.java index 2c43868fed6..f1886909304 100644 --- a/forge-game/src/main/java/forge/game/player/Player.java +++ b/forge-game/src/main/java/forge/game/player/Player.java @@ -2066,7 +2066,7 @@ public class Player extends GameEntity implements Comparable { if (!found) { return false; } - } else if (property.equals("wasDealtDamageThisGameBy ")) { + } else if (property.startsWith("wasDealtDamageThisGameBy ")) { final String v = property.split(" ")[1]; final List cards = AbilityUtils.getDefinedCards(source, v, spellAbility); boolean found = false; @@ -2079,7 +2079,7 @@ public class Player extends GameEntity implements Comparable { if (!found) { return false; } - } else if (property.equals("wasDealtDamageThisTurnBy ")) { + } else if (property.startsWith("wasDealtDamageThisTurnBy ")) { final String v = property.split(" ")[1]; final List cards = AbilityUtils.getDefinedCards(source, v, spellAbility); boolean found = false; @@ -2092,7 +2092,7 @@ public class Player extends GameEntity implements Comparable { if (!found) { return false; } - } else if (property.equals("wasDealtCombatDamageThisTurnBy ")) { + } else if (property.startsWith("wasDealtCombatDamageThisTurnBy ")) { final String v = property.split(" ")[1]; final List cards = AbilityUtils.getDefinedCards(source, v, spellAbility); diff --git a/forge-gui/res/cardsfolder/h/hope_of_ghirapur.txt b/forge-gui/res/cardsfolder/h/hope_of_ghirapur.txt new file mode 100644 index 00000000000..2e8b45bc61d --- /dev/null +++ b/forge-gui/res/cardsfolder/h/hope_of_ghirapur.txt @@ -0,0 +1,9 @@ +Name:Hope of Ghirapur +ManaCost:1 +Types:Legendary Artifact Creature Thopter +PT:1/1 +K:Flying +A:AB$ Effect | Cost$ Sac<1/CARDNAME> | ValidTgts$ Player.wasDealtCombatDamageThisTurnBy Self | Name$ Hope of Ghirapur Effect | StaticAbilities$ STCantBeCast | RememberObjects$ Targeted | Duration$ UntilYourNextTurn | SpellDescription$ Target player can't cast noncreature spells this turn. +SVar:STCantBeCast:Mode$ CantBeCast | EffectZone$ Command | ValidCard$ Card.nonCreature | Caster$ Player.IsRemembered | Description$ Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells. +SVar:Picture:http://www.wizards.com/global/images/magic/general/hope_of_ghirapur.jpg +Oracle:Flying\nSacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells.