- Converted Biorhythm to script.

This commit is contained in:
jendave
2011-08-07 00:09:22 +00:00
parent 3427c8e791
commit c01e4d81ab
3 changed files with 13 additions and 42 deletions

2
.gitattributes vendored
View File

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

View File

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

View File

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