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:
@@ -1,10 +1,11 @@
|
||||
Name:Serra Avenger
|
||||
ManaCost:W W
|
||||
Types:Creature Angel
|
||||
Text:You can't play Serra Avenger during your first, second, or third turns of the game.
|
||||
PT:3/3
|
||||
K:Flying
|
||||
K:Vigilance
|
||||
S:Mode$ CantBeCast | ValidCard$ Card.Self | EffectZone$ All | CheckSVar$ X | SVarCompare$ LE3 | Description$ You can't play Serra Avenger during your first, second, or third turns of the game.
|
||||
SVar:X:Count$YourTurns
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://resources.wizards.com/magic/cards/tsp/en-us/card113519.jpg
|
||||
SetInfo:M13|Rare|http://magiccards.info/scans/en/m13/33.jpg
|
||||
|
||||
@@ -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