- Converted Invincible Hymn to script.

This commit is contained in:
jendave
2011-08-07 00:07:02 +00:00
parent b582a6d210
commit 85a02b77cb
2 changed files with 4 additions and 38 deletions

View File

@@ -1,7 +1,10 @@
Name:Invincible Hymn Name:Invincible Hymn
ManaCost:6 W W ManaCost:6 W W
Types:Sorcery Types:Sorcery
Text:Count the number of cards in your library. Your life total becomes that number. Text:no text
A:SP$ SetLife | Cost$ 6 W W | Defined$ You | LifeAmount$ X | SpellDescription$ Count the number of cards in your library. Your life total becomes that number.
SVar:X:Count$InYourLibrary.Card
SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/invincible_hymn.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/invincible_hymn.jpg
SetInfo:ALA|Rare|http://magiccards.info/scans/en/ala/14.jpg SetInfo:ALA|Rare|http://magiccards.info/scans/en/ala/14.jpg

View File

@@ -1900,43 +1900,6 @@ public class CardFactory_Sorceries {
card.clearFirstSpellAbility(); card.clearFirstSpellAbility();
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Invincible Hymn")) {
final Player player = card.getController();
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -827136493013927725L;
@Override
public void resolve() {
PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
CardList libCards = new CardList(library.getCards());
int lifeGain = libCards.size();
Log.debug("Invincible Hymn", "lifeGain: " + lifeGain);
player.setLife(lifeGain, card);
Log.debug("Invincible Hymn", "life.getLife(): " + player.getLife());
}
@Override
public boolean canPlayAI() {
PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
CardList libCards = new CardList(library.getCards());
int lifeGain = libCards.size();
if(lifeGain > AllZone.ComputerPlayer.getLife()) return true;
else return false;
}
};//spell
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
card.clearFirstSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************