- Converted "Damage that would reduce your life total to less than 1 reduces it to 1 instead." to a player keyword.

- Fixed Angel's Grace.
This commit is contained in:
Sloth
2012-12-01 22:53:26 +00:00
parent c2cab7fb91
commit 8d0e665900
7 changed files with 8 additions and 35 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -548,7 +548,8 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
} 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

View File

@@ -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();
}
/**
* <p>
* worshipFlag.
* </p>
*
* @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<Card> 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<Card>() {
@Override
public boolean apply(final Card c) {
return !c.isFaceDown();
}
});
return list.size() > 0;
}
/**
* <p>
* input_discardNumUnless.