- Converted Urza's Armor and Guardian Seraph to stPreventDamage.

This commit is contained in:
jendave
2011-08-07 00:06:15 +00:00
parent fcf45480e4
commit 169e8fb73e
3 changed files with 7 additions and 40 deletions

View File

@@ -1,9 +1,10 @@
Name:Guardian Seraph Name:Guardian Seraph
ManaCost:2 W W ManaCost:2 W W
Types:Creature Angel Types:Creature Angel
Text:If a source an opponent controls would deal damage to you, prevent 1 of that damage. Text:no text
PT:3/4 PT:3/4
K:Flying K:Flying
K:stPreventDamage:You:Card.YouDontCtrl:1:If a source an opponent controls would deal damage to you, prevent 1 of that damage.
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/guardian_seraph.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/guardian_seraph.jpg
SetInfo:M10|Rare|http://magiccards.info/scans/en/m10/13.jpg SetInfo:M10|Rare|http://magiccards.info/scans/en/m10/13.jpg

View File

@@ -1,7 +1,8 @@
Name:Urza's Armor Name:Urza's Armor
ManaCost:6 ManaCost:6
Types:Artifact Types:Artifact
Text:If a source would deal damage to you, prevent 1 of that damage. Text:no text
K:stPreventDamage:You:Card:1:If a source would deal damage to you, prevent 1 of that damage.
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/urzas_armor.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/urzas_armor.jpg
SetInfo:USG|Uncommon|http://magiccards.info/scans/en/us/313.jpg SetInfo:USG|Uncommon|http://magiccards.info/scans/en/us/313.jpg

View File

@@ -311,43 +311,6 @@ public abstract class Player extends MyObservable{
} //stPreventDamage } //stPreventDamage
//specific cards //specific cards
//if (AllZoneUtil.isCardInPlay("Energy Storm") && source.isSpell()) return 0;
//if (AllZoneUtil.isCardInPlay("Energy Field") && !source.getController().equals(this)) return 0;
if (AllZoneUtil.isCardInPlay("Spirit of Resistance", this) && !source.getController().equals(this)
&& restDamage > 0) restDamage = restDamage - 1;
/*if (AllZoneUtil.isCardInPlay("Plated Pegasus") && source.isSpell() && restDamage > 0) restDamage = restDamage - 1;
if (AllZoneUtil.isCardInPlay("Sphere of Purity", this) && source.isArtifact() && restDamage > 0)
restDamage = restDamage - 1;
if (AllZoneUtil.isCardInPlay("Sphere of Duty", this) && source.isGreen()) {
if (restDamage > 1) restDamage = restDamage - 2;
else return 0;
}
if (AllZoneUtil.isCardInPlay("Sphere of Grace", this) && source.isBlack()) {
if (restDamage > 1) restDamage = restDamage - 2;
else return 0;
}
if (AllZoneUtil.isCardInPlay("Sphere of Law", this) && source.isRed()) {
if (restDamage > 1) restDamage = restDamage - 2;
else return 0;
}
if (AllZoneUtil.isCardInPlay("Sphere of Reason", this) && source.isBlue()) {
if (restDamage > 1) restDamage = restDamage - 2;
else return 0;
}
if (AllZoneUtil.isCardInPlay("Sphere of Truth", this) && source.isWhite()) {
if (restDamage > 1) restDamage = restDamage - 2;
else return 0;
}*/
if (AllZoneUtil.isCardInPlay("Urza's Armor", this) && restDamage > 0) restDamage = restDamage - 1;
if (AllZoneUtil.isCardInPlay("Guardian Seraph", this) && !source.getController().isPlayer(this) && restDamage > 0)
restDamage = restDamage - 1;
if(AllZoneUtil.isCardInPlay("Spirit of Resistance", this)) { if(AllZoneUtil.isCardInPlay("Spirit of Resistance", this)) {
if( AllZoneUtil.getPlayerColorInPlay(this, Constant.Color.Black).size() > 0 if( AllZoneUtil.getPlayerColorInPlay(this, Constant.Color.Black).size() > 0
&& AllZoneUtil.getPlayerColorInPlay(this, Constant.Color.Blue).size() > 0 && AllZoneUtil.getPlayerColorInPlay(this, Constant.Color.Blue).size() > 0
@@ -357,7 +320,9 @@ public abstract class Player extends MyObservable{
return 0; return 0;
} }
} }
if(restDamage>0)
return restDamage; return restDamage;
else return 0;
} }
//This should be also usable by the AI to forecast an effect (so it must not change the game state) //This should be also usable by the AI to forecast an effect (so it must not change the game state)