mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Converted Invincible Hymn to script.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
Name:Invincible Hymn
|
||||
ManaCost:6 W W
|
||||
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:Picture:http://www.wizards.com/global/images/magic/general/invincible_hymn.jpg
|
||||
SetInfo:ALA|Rare|http://magiccards.info/scans/en/ala/14.jpg
|
||||
|
||||
@@ -1900,43 +1900,6 @@ public class CardFactory_Sorceries {
|
||||
card.clearFirstSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** 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 **************************
|
||||
|
||||
Reference in New Issue
Block a user