- Converted the following card abilities to Keyword for possible use with other cards: Platinum Angel, Abyssal Persecutor, Ali From Cairo (and friends), Lich

- Added Angel's Grace using newly converted keywords and AF_Effect
This commit is contained in:
jendave
2011-08-06 22:20:21 +00:00
parent ead7553187
commit 58dbd7729b
12 changed files with 67 additions and 24 deletions

1
.gitattributes vendored
View File

@@ -225,6 +225,7 @@ res/cardsfolder/angelic_shield.txt svneol=native#text/plain
res/cardsfolder/angelic_voices.txt -text svneol=native#text/plain
res/cardsfolder/angelic_wall.txt -text svneol=native#text/plain
res/cardsfolder/angels_feather.txt -text svneol=native#text/plain
res/cardsfolder/angels_grace.txt -text svneol=native#text/plain
res/cardsfolder/angels_mercy.txt -text svneol=native#text/plain
res/cardsfolder/angelsong.txt -text svneol=native#text/plain
res/cardsfolder/anger.txt -text svneol=native#text/plain

View File

@@ -1,10 +1,12 @@
Name:Abyssal Persecutor
ManaCost:2 B B
Types:Creature Demon
Text:You can't win the game and your opponents can't lose the game.
Text:no text
PT:6/6
K:Flying
K:Trample
K:You can't win the game.
K:Your opponents can't lose the game.
SVar:RemAIDeck:True
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/abyssal_persecutor.jpg

View File

@@ -1,8 +1,9 @@
Name:Ali from Cairo
ManaCost:2 R R
Types:Creature Human
Text:Damage that would reduce your life total to less than 1 reduces it to 1 instead.
Text:no text
PT:0/1
K: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

@@ -0,0 +1,13 @@
Name:Angel's Grace
ManaCost:W
Types:Instant
Text:no text
K:Split second
A:SP$ Effect | Cost$ W | Name$ Angel's Grace Effect | Keywords$ CantLose,OppsCantWin,AliFromCairo | 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:CantLose:You can't lose the game.
SVar:OppsCantWin: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.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/angels_grace.jpg
End

View File

@@ -1,9 +1,10 @@
Name:Fortune Thief
ManaCost:4 R
Types:Creature Human Rogue
Text:Damage that would reduce your life total to less than 1 reduces it to 1 instead.
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.
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

@@ -2,6 +2,7 @@ Name:Lich
ManaCost:B B B B
Types:Enchantment
Text:As CARDNAME enters the battlefield, you lose life equal to your life total.\r\nYou don't lose the game for having 0 or less life.\r\nIf you would gain life, draw that many cards instead.\r\nWhenever you're dealt damage, sacrifice that many nontoken permanents. If you can't, you lose the game.\r\nWhen CARDNAME is put into a graveyard from the battlefield, you lose the game.
K:You don't lose the game for having 0 or less life.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/lich.jpg

View File

@@ -1,9 +1,11 @@
Name:Platinum Angel
ManaCost:7
Types:Artifact Creature Angel
Text:You can't lose the game and your opponents can't win the game.
Text:no text
PT:4/4
K:Flying
K:You can't lose the game.
K:Your opponents can't win the game.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/platinum_angel.jpg
SetInfo:M11|Mythic|http://magiccards.info/scans/en/m11/212.jpg

View File

@@ -1,9 +1,10 @@
Name:Sustaining Spirit
ManaCost:1 W
Types:Creature Angel Spirit
Text:Damage that would reduce your life total to less than 1 reduces it to 1 instead.
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.
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

@@ -1,7 +1,8 @@
Name:Worship
ManaCost:3 W
Types:Enchantment
Text:If you control a creature, damage that would reduce your life total to less than 1 reduces it to 1 instead.
Text:no text
K:stPumpSelf:Permanent:0/0/Damage that would reduce your life total to less than 1 reduces it to 1 instead.:isPresent Creature.YouCtrl:If you control a creature, 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/worship.jpg
SetInfo:8ED|Rare|http://magiccards.info/scans/en/8e/57.jpg

View File

@@ -905,23 +905,36 @@ public abstract class Player extends MyObservable{
}
public boolean cantLose(){
if ((AllZoneUtil.getPlayerCardsInPlay(this, "Platinum Angel").size() > 0) ||
(AllZoneUtil.getPlayerCardsInPlay(getOpponent(), "Abyssal Persecutor").size() > 0)){
CardList list = AllZoneUtil.getPlayerCardsInPlay(this);
list = list.getKeyword("You can't lose the game.");
if (list.size() > 0)
return true;
}
return false;
CardList oppList = AllZoneUtil.getPlayerCardsInPlay(getOpponent());
oppList = oppList.getKeyword("Your opponents can't win the game.");
return oppList.size() > 0;
}
public boolean cantLoseForZeroOrLessLife() {
return AllZoneUtil.isCardInPlay("Lich", this);
CardList list = AllZoneUtil.getPlayerCardsInPlay(this);
list = list.getKeyword("You don't lose the game for having 0 or less life.");
return list.size() > 0;
}
public boolean cantWin(){
if ((AllZoneUtil.getPlayerCardsInPlay(getOpponent(), "Platinum Angel").size() > 0) ||
(AllZoneUtil.getPlayerCardsInPlay(this, "Abyssal Persecutor").size() > 0)){
CardList list = AllZoneUtil.getPlayerCardsInPlay(getOpponent());
list = list.getKeyword("You can't win the game.");
if (list.size() > 0)
return true;
}
return false;
CardList oppList = AllZoneUtil.getPlayerCardsInPlay(this);
oppList = oppList.getKeyword("Your opponents can't lose the game.");
return oppList.size() > 0;
}
public boolean hasLost(){

View File

@@ -4,14 +4,15 @@ package forge;
public class PlayerUtil {
public static boolean worshipFlag(Player player) {
if( AllZoneUtil.isCardInPlay("Ali from Cairo", player)
|| (AllZoneUtil.isCardInPlay("Worship", player) && AllZoneUtil.getCreaturesInPlay(player).size() > 0)
|| AllZoneUtil.isCardInPlay("Fortune Thief", player)
|| AllZoneUtil.isCardInPlay("Sustaining Spirit", player)) {
return true;
}
else {
return false;
// Instead of hardcoded Ali from Cairo like cards, it is now a Keyword
CardList list = AllZoneUtil.getPlayerCardsInPlay(player);
list = list.getKeyword("Damage that would reduce your life total to less than 1 reduces it to 1 instead.");
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return !c.isFaceDown();
}
});
return list.size() > 0;
}
}

View File

@@ -112,6 +112,11 @@ public class AbilityFactory_Effect {
public static String effectStackDescription(AbilityFactory af, SpellAbility sa){
StringBuilder sb = new StringBuilder();
if (sa instanceof Ability_Sub)
sb.append(" ");
else
sb.append(sa.getSourceCard().getName()).append(" - ");
sb.append(sa.getDescription());
Ability_Sub abSub = sa.getSubAbility();
@@ -186,6 +191,7 @@ public class AbilityFactory_Effect {
eff.setController(controller);
eff.setOwner(controller);
eff.setImageName(card.getImageName());
eff.setColor(card.getColor());
// Effects should be Orange or something probably