From c01e4d81ab10df7569980bdabdc0ebcb1c277d8d Mon Sep 17 00:00:00 2001 From: jendave Date: Sun, 7 Aug 2011 00:09:22 +0000 Subject: [PATCH] - Converted Biorhythm to script. --- .gitattributes | 2 +- res/cardsfolder/biorhythm.txt | 20 ++++++----- .../cardFactory/CardFactory_Sorceries.java | 33 ------------------- 3 files changed, 13 insertions(+), 42 deletions(-) diff --git a/.gitattributes b/.gitattributes index 251b12702cb..9141f420a62 100644 --- a/.gitattributes +++ b/.gitattributes @@ -706,7 +706,7 @@ res/cardsfolder/bind.txt -text svneol=native#text/plain res/cardsfolder/binding_agony.txt -text svneol=native#text/plain res/cardsfolder/binding_grasp.txt -text svneol=native#text/plain res/cardsfolder/biomantic_mastery.txt -text svneol=native#text/plain -res/cardsfolder/biorhythm.txt svneol=native#text/plain +res/cardsfolder/biorhythm.txt -text svneol=native#text/plain res/cardsfolder/birchlore_rangers.txt -text svneol=native#text/plain res/cardsfolder/bird_maiden.txt -text svneol=native#text/plain res/cardsfolder/birds_of_paradise.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/biorhythm.txt b/res/cardsfolder/biorhythm.txt index 8be7d2aa12e..4c4ea097e12 100644 --- a/res/cardsfolder/biorhythm.txt +++ b/res/cardsfolder/biorhythm.txt @@ -1,9 +1,13 @@ -Name:Biorhythm -ManaCost:6 G G -Types:Sorcery -Text:Each player's life total becomes the number of creatures he or she controls. -SVar:Rarity:Rare -SVar:Picture:http://www.wizards.com/global/images/magic/general/biorhythm.jpg -SetInfo:ONS|Rare|http://magiccards.info/scans/en/on/247.jpg -SetInfo:9ED|Rare|http://magiccards.info/scans/en/9e/231.jpg +Name:Biorhythm +ManaCost:6 G G +Types:Sorcery +Text:no text +A:SP$ SetLife | Cost$ 6 G G | Defined$ You | LifeAmount$ X | SubAbility$ SVar=DBSetLifeOpp | SpellDescription$ Each player's life total becomes the number of creatures he or she controls. +SVar:DBSetLifeOpp:DB$SetLife | Defined$ Opponent | LifeAmount$ Y +SVar:X:Count$Valid Creature.YouCtrl +SVar:Y:Count$Valid Creature.YouDontCtrl +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/biorhythm.jpg +SetInfo:ONS|Rare|http://magiccards.info/scans/en/on/247.jpg +SetInfo:9ED|Rare|http://magiccards.info/scans/en/9e/231.jpg End \ No newline at end of file diff --git a/src/forge/card/cardFactory/CardFactory_Sorceries.java b/src/forge/card/cardFactory/CardFactory_Sorceries.java index 153f506ae3a..a64d497923b 100644 --- a/src/forge/card/cardFactory/CardFactory_Sorceries.java +++ b/src/forge/card/cardFactory/CardFactory_Sorceries.java @@ -3747,39 +3747,6 @@ public class CardFactory_Sorceries { spell.setDescription(abCost+"Destroy target non-Swamp land. If that land was nonbasic, Choking Sands deals 2 damage to the land's controller."); }//*************** END ************ END ************************** - - - //*************** START *********** START ************************** - else if(cardName.equals("Biorhythm")) { - final SpellAbility spell = new Spell(card) { - private static final long serialVersionUID = -6042020870286943301L; - - @Override - public boolean canPlayAI() { - CardList human = AllZoneUtil.getCreaturesInPlay(AllZone.HumanPlayer); - CardList comp = AllZoneUtil.getCreaturesInPlay(AllZone.ComputerPlayer); - int hLife = AllZone.HumanPlayer.getLife(); - int cLife = AllZone.ComputerPlayer.getLife(); - return comp.size() > 0 && human.size() < hLife && ((cLife < 4 && hLife > 4) || (hLife - cLife > 12)); - } - - @Override - public void resolve() { - CardList human = AllZoneUtil.getCreaturesInPlay(AllZone.HumanPlayer); - CardList comp = AllZoneUtil.getCreaturesInPlay(AllZone.ComputerPlayer); - AllZone.HumanPlayer.setLife(human.size(), card); - AllZone.ComputerPlayer.setLife(comp.size(), card); - } - };//SpellAbility - - StringBuilder sb = new StringBuilder(); - sb.append(card.getName()).append(" - Each player's life total becomes the lowest life total among all players."); - spell.setStackDescription(sb.toString()); - - // Do not remove SpellAbilities created by AbilityFactory or Keywords. - card.clearFirstSpellAbility(); - card.addSpellAbility(spell); - }//*************** END ************ END ************************** //*************** START *********** START **************************