mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Convert Serra Avenger to script
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user