finish up Max speed refactor (#6958)

Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
This commit is contained in:
Northmoc
2025-02-08 08:42:55 -05:00
committed by GitHub
parent 751c31b226
commit 692400db2a
14 changed files with 27 additions and 29 deletions

View File

@@ -337,9 +337,6 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
if (params.containsKey("Blessing")) { if (params.containsKey("Blessing")) {
if ("True".equalsIgnoreCase(params.get("Blessing")) != hostController.hasBlessing()) return false; if ("True".equalsIgnoreCase(params.get("Blessing")) != hostController.hasBlessing()) return false;
} }
if (params.containsKey("MaxSpeed")) {
if ("True".equalsIgnoreCase(params.get("MaxSpeed")) != hostController.maxSpeed()) return false;
}
if (params.containsKey("DayTime")) { if (params.containsKey("DayTime")) {
if ("Day".equalsIgnoreCase(params.get("DayTime"))) { if ("Day".equalsIgnoreCase(params.get("DayTime"))) {

View File

@@ -271,7 +271,6 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
if (this.isRevolt() && !activator.hasRevolt()) return false; if (this.isRevolt() && !activator.hasRevolt()) return false;
if (this.isDesert() && !activator.hasDesert()) return false; if (this.isDesert() && !activator.hasDesert()) return false;
if (this.isBlessing() && !activator.hasBlessing()) return false; if (this.isBlessing() && !activator.hasBlessing()) return false;
if (this.isMaxSpeed() && !activator.maxSpeed()) return false;
if (this.kicked && !sa.isKicked()) return false; if (this.kicked && !sa.isKicked()) return false;
if (this.kicked1 && !sa.isOptionalCostPaid(OptionalCost.Kicker1)) return false; if (this.kicked1 && !sa.isOptionalCostPaid(OptionalCost.Kicker1)) return false;

View File

@@ -98,9 +98,6 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
if (value.equals("Solved")) { if (value.equals("Solved")) {
this.setSolved(true); this.setSolved(true);
} }
if (value.equals("MaxSpeed")) {
this.setMaxSpeed(true);
}
} }
if (params.containsKey("ActivationZone")) { if (params.containsKey("ActivationZone")) {
@@ -443,9 +440,6 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
return false; return false;
} }
} }
if (isMaxSpeed()) {
if (!activator.maxSpeed()) return false;
}
if (isBlessing()) { if (isBlessing()) {
if (!activator.hasBlessing()) { if (!activator.hasBlessing()) {
return false; return false;

View File

@@ -96,7 +96,6 @@ public class SpellAbilityVariables implements Cloneable {
private boolean desert = false; private boolean desert = false;
private boolean blessing = false; private boolean blessing = false;
private boolean solved = false; private boolean solved = false;
private boolean maxSpeed = false;
/** The s is present. */ /** The s is present. */
private String isPresent = null; private String isPresent = null;
@@ -347,7 +346,6 @@ public class SpellAbilityVariables implements Cloneable {
public void setDesert(final boolean bDesert) { desert = bDesert; } public void setDesert(final boolean bDesert) { desert = bDesert; }
public void setBlessing(final boolean bBlessing) { blessing = bBlessing; } public void setBlessing(final boolean bBlessing) { blessing = bBlessing; }
public void setSolved(final boolean bSolved) { solved = bSolved; } public void setSolved(final boolean bSolved) { solved = bSolved; }
public void setMaxSpeed(final boolean b) { maxSpeed = b; }
/** Optional Costs */ /** Optional Costs */
protected boolean kicked = false; protected boolean kicked = false;
@@ -540,8 +538,6 @@ public class SpellAbilityVariables implements Cloneable {
public final boolean isSolved() { return this.solved; } public final boolean isSolved() { return this.solved; }
public final boolean isMaxSpeed() { return this.maxSpeed; }
public String getNoDifferentColors() { public String getNoDifferentColors() {
return noDifferentColors; return noDifferentColors;
} }

View File

@@ -4,7 +4,8 @@ Types:Artifact
K:Start your engines K:Start your engines
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When this artifact enters, exile target nonland permanent an opponent controls until this artifact leaves the battlefield. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When this artifact enters, exile target nonland permanent an opponent controls until this artifact leaves the battlefield.
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | Duration$ UntilHostLeavesPlay SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | Duration$ UntilHostLeavesPlay
A:AB$ PutCounter | PrecostDesc$ Max speed — | Cost$ T | Activation$ MaxSpeed | ValidTgts$ Creature.YouCtrl,Vehicle.YouCtrl | TgtPrompt$ Select target creature or Vehicle | CounterType$ P1P1 | CounterNum$ 1 | SorcerySpeed$ True | SpellDescription$ Put a +1/+1 counter on target creature or Vehicle you control. Activate only as a sorcery. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddAbility$ ABPutCounter | Description$ Max speed — {T}: Put a +1/+1 counter on target creature or Vehicle you control. Activate only as a sorcery.
SVar:ABPutCounter:AB$ PutCounter | PrecostDesc$ Max speed — | Cost$ T | Secondary$ True | ValidTgts$ Creature.YouCtrl,Vehicle.YouCtrl | TgtPrompt$ Select target creature or Vehicle | CounterType$ P1P1 | CounterNum$ 1 | SorcerySpeed$ True | SpellDescription$ Put a +1/+1 counter on target creature or Vehicle you control. Activate only as a sorcery.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
DeckHas:Ability$Counters DeckHas:Ability$Counters
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nWhen this artifact enters, exile target nonland permanent an opponent controls until this artifact leaves the battlefield.\nMax speed — {T}: Put a +1/+1 counter on target creature or Vehicle you control. Activate only as a sorcery. Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nWhen this artifact enters, exile target nonland permanent an opponent controls until this artifact leaves the battlefield.\nMax speed — {T}: Put a +1/+1 counter on target creature or Vehicle you control. Activate only as a sorcery.

View File

@@ -5,5 +5,7 @@ K:Start your engines
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When this artifact enters, draw two cards, then discard a card. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When this artifact enters, draw two cards, then discard a card.
SVar:TrigDraw:DB$ Draw | NumCards$ 2 | SubAbility$ DBDiscard SVar:TrigDraw:DB$ Draw | NumCards$ 2 | SubAbility$ DBDiscard
SVar:DBDiscard:DB$ Discard | Defined$ You | NumCards$ 1 | Mode$ TgtChoose SVar:DBDiscard:DB$ Discard | Defined$ You | NumCards$ 1 | Mode$ TgtChoose
S:Mode$ ReduceCost | Condition$ MaxSpeed | ValidCard$ Card | Type$ Spell | Activator$ You | Amount$ 1 | Description$ Max speed — Spells you cast cost {1} less to cast. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max speed — Spells you cast cost {1} less to cast.
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nWhen this artifact enters, draw two cards, then discard a card.\nMax speed — Spells you cast cost {1} less to cast. SVar:MaxSpeedStatic:Mode$ ReduceCost | Secondary$ True | ValidCard$ Card | Type$ Spell | Activator$ You | Amount$ 1 | Description$ Max speed — Spells you cast cost {1} less to cast.
DeckHas:Ability$Discard
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nWhen this artifact enters, draw two cards, then discard a card.\nMax speed — Spells you cast cost {1} less to cast.

View File

@@ -3,7 +3,8 @@ ManaCost:4 B
Types:Creature Zombie Cat Knight Types:Creature Zombie Cat Knight
PT:5/4 PT:5/4
K:Start your engines K:Start your engines
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | MaxSpeed$ True | TriggerDescription$ Max speed — At the beginning of your end step, create a 2/2 black Zombie creature token. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddTrigger$ PhaseTrig | Description$ Max speed — At the beginning of your end step, create a 2/2 black Zombie creature token.
SVar:PhaseTrig:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Max speed — At the beginning of your end step, create a 2/2 black Zombie creature token.
SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie
DeckHas:Ability$Token DeckHas:Ability$Token
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — At the beginning of your end step, create a 2/2 black Zombie creature token. Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — At the beginning of your end step, create a 2/2 black Zombie creature token.

View File

@@ -3,6 +3,7 @@ ManaCost:1 U
Types:Creature Ooze Types:Creature Ooze
PT:1/3 PT:1/3
K:Start your engines K:Start your engines
A:AB$ CopySpellAbility | Cost$ 1 Sac<1/CARDNAME> | TgtPrompt$ Select target spell you control | ValidTgts$ Card.YouCtrl | TargetType$ Spell | Activation$ MaxSpeed | PrecostDesc$ Max speed — | SpellDescription$ Copy target spell you control. You may choose new targets for the copy. (A copy of a permanent spell becomes a token.) S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddAbility$ ABCopySpell | Description$ Max speed — {1}, Sacrifice this creature: Copy target spell you control. You may choose new targets for the copy. (A copy of a permanent spell becomes a token.)
SVar:ABCopySpell:AB$ CopySpellAbility | PrecostDesc$ Max speed — | Cost$ 1 Sac<1/CARDNAME/this creature> | TgtPrompt$ Select target spell you control | ValidTgts$ Card.YouCtrl | TargetType$ Spell | Secondary$ True | MayChooseTarget$ True | SpellDescription$ Copy target spell you control. You may choose new targets for the copy. (A copy of a permanent spell becomes a token.)
DeckHas:Ability$Sacrifice|Token DeckHas:Ability$Sacrifice|Token
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — {1}, Sacrifice this creature: Copy target spell you control. You may choose new targets for the copy. (A copy of a permanent spell becomes a token.) Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — {1}, Sacrifice this creature: Copy target spell you control. You may choose new targets for the copy. (A copy of a permanent spell becomes a token.)

View File

@@ -3,7 +3,8 @@ ManaCost:3
Types:Artifact Types:Artifact
K:Start your engines K:Start your engines
A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color. A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color.
A:AB$ Draw | PrecostDesc$ Max speed — | Cost$ T Sac<1/CARDNAME/this artifact> | NumCards$ 2 | Activation$ MaxSpeed | SubAbility$ DBDiscard | SpellDescription$ Draw two cards, then discard a card. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddAbility$ ABDraw | Description$ Max speed — {T}, Sacrifice this artifact: Draw two cards, then discard a card.
SVar:ABDraw:AB$ Draw | PrecostDesc$ Max speed — | Cost$ T Sac<1/CARDNAME/this artifact> | NumCards$ 2 | Secondary$ True | SubAbility$ DBDiscard | SpellDescription$ Draw two cards, then discard a card.
SVar:DBDiscard:DB$ Discard | Defined$ You | Mode$ TgtChoose SVar:DBDiscard:DB$ Discard | Defined$ You | Mode$ TgtChoose
DeckHas:Ability$Sacrifice|Discard DeckHas:Ability$Sacrifice|Discard
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\n{T}: Add one mana of any color.\nMax speed — {T}, Sacrifice this artifact: Draw two cards, then discard a card. Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\n{T}: Add one mana of any color.\nMax speed — {T}, Sacrifice this artifact: Draw two cards, then discard a card.

View File

@@ -5,5 +5,7 @@ PT:3/3
K:Flying K:Flying
K:Haste K:Haste
K:Start your engines K:Start your engines
S:Mode$ Continuous | Condition$ MaxSpeed | Affected$ Card.Self | AddKeyword$ Lifelink | Description$ Max speed — This creature has lifelink. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max speed — This creature has lifelink.
SVar:MaxSpeedStatic:Mode$ Continuous | Secondary$ True | Affected$ Card.Self | AddKeyword$ Lifelink | Description$ Max speed — This creature has lifelink.
DeckHas:Ability$LifeGain
Oracle:Flying, haste\nStart your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — This creature has lifelink. Oracle:Flying, haste\nStart your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — This creature has lifelink.

View File

@@ -4,5 +4,6 @@ Types:Creature Bird Warrior
PT:3/3 PT:3/3
K:Flying K:Flying
K:Start your engines K:Start your engines
S:Mode$ Continuous | Condition$ MaxSpeed | Affected$ Card.Self | AddToughness$ 1 | AddKeyword$ Vigilance | Description$ Max speed — This creature gets +0/+1 and has vigilance. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max speed — This creature gets +0/+1 and has vigilance.
Oracle:Flying\nStart your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — This creature gets +0/+1 and has vigilance. SVar:MaxSpeedStatic:Mode$ Continuous | Secondary$ True | Affected$ Card.Self | AddToughness$ 1 | AddKeyword$ Vigilance | Description$ Max speed — This creature gets +0/+1 and has vigilance.
Oracle:Flying\nStart your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — This creature gets +0/+1 and has vigilance.

View File

@@ -4,6 +4,7 @@ Types:Legendary Creature Homunculus
PT:0/4 PT:0/4
K:Start your engines K:Start your engines
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size. S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
R:Event$ Draw | MaxSpeed$ True | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ DrawTwo | Description$ Max speed — If you would draw a card, draw two cards instead. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddReplacementEffect$ RepDraw | Description$ Max speed — If you would draw a card, draw two cards instead.
SVar:RepDraw:Event$ Draw | Secondary$ True | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ DrawTwo | Description$ Max speed — If you would draw a card, draw two cards instead.
SVar:DrawTwo:DB$ Draw | Defined$ You | NumCards$ 2 SVar:DrawTwo:DB$ Draw | Defined$ You | NumCards$ 2
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nYou have no maximum hand size.\nMax speed — If you would draw a card, draw two cards instead. Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nYou have no maximum hand size.\nMax speed — If you would draw a card, draw two cards instead.

View File

@@ -3,5 +3,6 @@ ManaCost:2
Types:Artifact Creature Zombie Cat Types:Artifact Creature Zombie Cat
PT:2/1 PT:2/1
K:Start your engines K:Start your engines
S:Mode$ Continuous | Condition$ MaxSpeed | Affected$ Card.Self | AddPower$ 1 | AddToughness$ 2 | Description$ Max speed — This creature gets +1/+2. S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max speed — This creature gets +1/+2.
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — This creature gets +1/+2. SVar:MaxSpeedStatic:Mode$ Continuous | Secondary$ True | Affected$ Card.Self | AddPower$ 1 | AddToughness$ 2 | Description$ Max speed — This creature gets +1/+2.
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nMax speed — This creature gets +1/+2.

View File

@@ -4,7 +4,8 @@ Types:Legendary Creature Zombie Cat Warrior
PT:3/2 PT:3/2
K:Start your engines K:Start your engines
A:AB$ Surveil | Cost$ Sac<1/Creature.Other/another creature> | ActivationLimit$ 1 | SpellDescription$ Surveil 1. Activate only once each turn. A:AB$ Surveil | Cost$ Sac<1/Creature.Other/another creature> | ActivationLimit$ 1 | SpellDescription$ Surveil 1. Activate only once each turn.
DeckHas:Ability$Sacrifice|Token S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddTrigger$ TrigDies | Description$ Max speed — Whenever a nontoken creature you control dies, create a tapped 2/2 black Zombie creature token.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.YouCtrl+nonToken | TriggerZones$ Battlefield | Execute$ TrigToken | MaxSpeed$ True | TriggerDescription$ Whenever a nontoken creature you control dies, create a tapped 2/2 black Zombie creature token. SVar:TrigDies:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.YouCtrl+nonToken | TriggerZones$ Battlefield | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Max speed — Whenever a nontoken creature you control dies, create a tapped 2/2 black Zombie creature token.
SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie | TokenTapped$ True SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie | TokenTapped$ True
DeckHas:Ability$Sacrifice|Token
Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nSacrifice another creature: Surveil 1. Activate only once each turn.\nMax speed — Whenever a nontoken creature you control dies, create a tapped 2/2 black Zombie creature token. Oracle:Start your engines! (If you have no speed, it starts at 1. It increases once on each of your turns when an opponent loses life. Max speed is 4.)\nSacrifice another creature: Surveil 1. Activate only once each turn.\nMax speed — Whenever a nontoken creature you control dies, create a tapped 2/2 black Zombie creature token.