- Convert Serra Avenger to script

This commit is contained in:
Sol
2013-02-27 02:58:08 +00:00
parent bbe1dc10ce
commit 03772dd095
3 changed files with 11 additions and 18 deletions

View File

@@ -1920,6 +1920,15 @@ public class CardFactoryUtil {
}
}
if (sq[0].equals("YourTurns")) {
return CardFactoryUtil.doXMath(cardController.getTurn(), m, c);
}
if (sq[0].equals("TotalTurns")) {
// Sorry for the Singleton use, replace this once this function has game passed into it
return CardFactoryUtil.doXMath(Singletons.getModel().getGame().getPhaseHandler().getTurn(), m, c);
}
// Generic Zone-based counting
// Count$QualityAndZones.Subquality

View File

@@ -260,23 +260,6 @@ public class SpellPermanent extends Spell {
} // Spell_Permanent()
/** {@inheritDoc} */
@Override
public boolean canPlay() {
final Card source = this.getSourceCard();
final Player turn = Singletons.getModel().getGame().getPhaseHandler().getPlayerTurn();
if (source.getName().equals("Serra Avenger")) {
if (turn.equals(source.getController()) && (turn.getTurn() <= 3)) {
return false;
}
}
// Flash handled by super.canPlay
return super.canPlay();
}
/** {@inheritDoc} */
@Override
public boolean canPlayAI() {