mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
convert Mirror Universe to script
This commit is contained in:
@@ -2,6 +2,9 @@ Name:Mirror Universe
|
||||
ManaCost:6
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
A:AB$ ExchangeLife | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | ActivationPhases$ Upkeep | PlayerTurn$ True | SpellDescription$ Exchange life totals with target opponent. Activate this ability only during your upkeep.
|
||||
#Apparently, compy just plain can't handle the sac cost
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mirror_universe.jpg
|
||||
SetInfo:LEG|Rare|http://magiccards.info/scans/en/lg/232.jpg
|
||||
|
||||
@@ -1184,52 +1184,6 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
|
||||
} //*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Mirror Universe")) {
|
||||
/*
|
||||
* Tap, Sacrifice Mirror Universe: Exchange life totals with
|
||||
* target opponent. Activate this ability only during your upkeep.
|
||||
*/
|
||||
Cost abCost = new Cost("T Sac<1/CARDNAME>", cardName, true);
|
||||
final Ability_Activated ability = new Ability_Activated(card, abCost, null) {
|
||||
private static final long serialVersionUID = -1409850598108909739L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
Player player = card.getController();
|
||||
Player opponent = player.getOpponent();
|
||||
int tmp = player.getLife();
|
||||
player.setLife(opponent.getLife(), card);
|
||||
opponent.setLife(tmp, card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return super.canPlay() && AllZone.getPhase().getPhase().equals(Constant.Phase.Upkeep)
|
||||
&& AllZone.getPhase().getPlayerTurn().equals(card.getController());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
if (AllZone.getComputerPlayer().getLife() < 5 && AllZone.getHumanPlayer().getLife() > 5) {
|
||||
return true;
|
||||
} else if (AllZone.getComputerPlayer().getLife() == 1) {
|
||||
return true;
|
||||
} else {
|
||||
return ((AllZone.getHumanPlayer().getLife() - AllZone.getComputerPlayer().getLife()) > 10);
|
||||
}
|
||||
}
|
||||
}; //SpellAbility
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(cardName).append(" - Exchange life totals with target opponent.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
ability.setDescription(abCost + "Exchange life totals with target opponent. Activate this ability only during your upkeep.");
|
||||
card.addSpellAbility(ability);
|
||||
} //*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Barl's Cage")) {
|
||||
final String[] tgts = {"Creature"};
|
||||
|
||||
Reference in New Issue
Block a user