diff --git a/res/cardsfolder/a/ali_from_cairo.txt b/res/cardsfolder/a/ali_from_cairo.txt index 5d3f65d1c4f..86439933f6a 100644 --- a/res/cardsfolder/a/ali_from_cairo.txt +++ b/res/cardsfolder/a/ali_from_cairo.txt @@ -3,7 +3,7 @@ ManaCost:2 R R Types:Creature Human Text:no text PT:0/1 -K:Damage that would reduce your life total to less than 1 reduces it to 1 instead. +S:Mode$ Continuous | Affected$ You | AddKeyword$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. | Description$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/ali_from_cairo.jpg SetInfo:ARN|Uncommon|http://magiccards.info/scans/en/an/44.jpg diff --git a/res/cardsfolder/a/angels_grace.txt b/res/cardsfolder/a/angels_grace.txt index 8879ae3a270..de517e124d3 100644 --- a/res/cardsfolder/a/angels_grace.txt +++ b/res/cardsfolder/a/angels_grace.txt @@ -3,10 +3,8 @@ ManaCost:W Types:Instant Text:no text K:Split second -A:SP$ Effect | Cost$ W | Name$ Angel's Grace Effect | Keywords$ AliFromCairo | StaticAbilities$ STCantLose,STOppsCantWin | AILogic$ Fog | SpellDescription$ You can't lose the game this turn and your opponents can't win the game this turn. Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead. -SVar:STCantLose:Mode$ Continuous | EffectZone$ Command | Affected$ You | AddKeyword$ You can't lose the game. | Description$ You can't lose the game. -SVar:STOppsCantWin:Mode$ Continuous | EffectZone$ Command | Affected$ You | AddKeyword$ Your opponents can't win the game. | Description$ Your opponents can't win the game. -SVar:AliFromCairo:Damage that would reduce your life total to less than 1 reduces it to 1 instead. +A:SP$ Effect | Cost$ W | Name$ Angel's Grace Effect | StaticAbilities$ STCantLose | AILogic$ Fog | SpellDescription$ You can't lose the game this turn and your opponents can't win the game this turn. Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead. +SVar:STCantLose:Mode$ Continuous | EffectZone$ Command | Affected$ You | AddKeyword$ You can't lose the game. & Your opponents can't win the game. & Damage that would reduce your life total to less than 1 reduces it to 1 instead. | Description$ You can't lose the game. Your opponents can't win the game. Damage that would reduce your life total to less than 1 reduces it to 1 instead. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/angels_grace.jpg SetInfo:TSP|Rare|http://magiccards.info/scans/en/ts/3.jpg diff --git a/res/cardsfolder/f/fortune_thief.txt b/res/cardsfolder/f/fortune_thief.txt index bf5e65b49ca..17ce9e2f2ad 100644 --- a/res/cardsfolder/f/fortune_thief.txt +++ b/res/cardsfolder/f/fortune_thief.txt @@ -4,7 +4,7 @@ Types:Creature Human Rogue Text:no text PT:0/1 K:Morph:R R -K:Damage that would reduce your life total to less than 1 reduces it to 1 instead. +S:Mode$ Continuous | Affected$ You | AddKeyword$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. | Description$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/fortune_thief.jpg SetInfo:TSP|Rare|http://magiccards.info/scans/en/ts/156.jpg diff --git a/res/cardsfolder/s/sustaining_spirit.txt b/res/cardsfolder/s/sustaining_spirit.txt index cb9b2b27bbc..7f2e8040855 100644 --- a/res/cardsfolder/s/sustaining_spirit.txt +++ b/res/cardsfolder/s/sustaining_spirit.txt @@ -4,7 +4,7 @@ Types:Creature Angel Spirit Text:no text PT:0/3 K:Cumulative upkeep:1 W -K:Damage that would reduce your life total to less than 1 reduces it to 1 instead. +S:Mode$ Continuous | Affected$ You | AddKeyword$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. | Description$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/sustaining_spirit.jpg SetInfo:ALL|Rare|http://magiccards.info/scans/en/ai/151.jpg diff --git a/res/cardsfolder/w/worship.txt b/res/cardsfolder/w/worship.txt index 3bf42adec0f..a61359ad92a 100644 --- a/res/cardsfolder/w/worship.txt +++ b/res/cardsfolder/w/worship.txt @@ -2,7 +2,7 @@ Name:Worship ManaCost:3 W Types:Enchantment Text:no text -S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. | CheckSVar$ X | SVarCompare$ GE1 | Description$ If you control a creature, damage that would reduce your life total to less than 1 reduces it to 1 instead. +S:Mode$ Continuous | Affected$ You | AddKeyword$ Damage that would reduce your life total to less than 1 reduces it to 1 instead. | CheckSVar$ X | SVarCompare$ GE1 | Description$ If you control a creature, damage that would reduce your life total to less than 1 reduces it to 1 instead. SVar:X:Count$Valid Creature.YouCtrl SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/worship.jpg diff --git a/src/main/java/forge/game/player/Player.java b/src/main/java/forge/game/player/Player.java index 64fe706a3d3..4537f701476 100644 --- a/src/main/java/forge/game/player/Player.java +++ b/src/main/java/forge/game/player/Player.java @@ -548,7 +548,8 @@ public abstract class Player extends GameEntity implements Comparable { } else { // Worship does not reduce the damage dealt but changes the effect // of the damage - if (PlayerUtil.worshipFlag(this) && (this.life <= damageToDo)) { + if (this.hasKeyword("Damage that would reduce your life total to less than 1 reduces it to 1 instead.") + && this.life <= damageToDo) { this.loseLife(Math.min(damageToDo, this.life - 1)); } else { // rule 118.2. Damage dealt to a player normally causes that diff --git a/src/main/java/forge/game/player/PlayerUtil.java b/src/main/java/forge/game/player/PlayerUtil.java index cc50c020a13..afebbec6e6d 100644 --- a/src/main/java/forge/game/player/PlayerUtil.java +++ b/src/main/java/forge/game/player/PlayerUtil.java @@ -19,10 +19,7 @@ package forge.game.player; import java.util.List; -import com.google.common.base.Predicate; - import forge.Card; - import forge.CardLists; import forge.Singletons; import forge.card.spellability.SpellAbility; @@ -47,29 +44,6 @@ public final class PlayerUtil { throw new AssertionError(); } - /** - *

- * worshipFlag. - *

- * - * @param player - * a {@link forge.game.player.Player} object. - * @return a boolean. - */ - public static boolean worshipFlag(final Player player) { - // Instead of hardcoded Ali from Cairo like cards, it is now a Keyword - List list = player.getCardsIn(ZoneType.Battlefield); - list = CardLists.getKeyword(list, "Damage that would reduce your life total to less than 1 reduces it to 1 instead."); - list = CardLists.filter(list, new Predicate() { - @Override - public boolean apply(final Card c) { - return !c.isFaceDown(); - } - }); - - return list.size() > 0; - } - /** *

* input_discardNumUnless.