Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finish up Max speed refactor #6958

Merged
merged 2 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions forge-game/src/main/java/forge/game/CardTraitBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,6 @@ else if ("None".equalsIgnoreCase(params.get("Revolt"))) {
if (params.containsKey("Blessing")) {
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 ("Day".equalsIgnoreCase(params.get("DayTime"))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ public final boolean areMet(final SpellAbility sa) {
if (this.isRevolt() && !activator.hasRevolt()) return false;
if (this.isDesert() && !activator.hasDesert()) 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.kicked1 && !sa.isOptionalCostPaid(OptionalCost.Kicker1)) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ public final void setRestrictions(final Map<String, String> params) {
if (value.equals("Solved")) {
this.setSolved(true);
}
if (value.equals("MaxSpeed")) {
this.setMaxSpeed(true);
}
}

if (params.containsKey("ActivationZone")) {
Expand Down Expand Up @@ -443,9 +440,6 @@ public final boolean checkOtherRestrictions(final Card c, final SpellAbility sa,
return false;
}
}
if (isMaxSpeed()) {
if (!activator.maxSpeed()) return false;
}
if (isBlessing()) {
if (!activator.hasBlessing()) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public SpellAbilityVariables() {
private boolean desert = false;
private boolean blessing = false;
private boolean solved = false;
private boolean maxSpeed = false;

/** The s is present. */
private String isPresent = null;
Expand Down Expand Up @@ -347,7 +346,6 @@ public final void setThreshold(final boolean bThreshold) {
public void setDesert(final boolean bDesert) { desert = bDesert; }
public void setBlessing(final boolean bBlessing) { blessing = bBlessing; }
public void setSolved(final boolean bSolved) { solved = bSolved; }
public void setMaxSpeed(final boolean b) { maxSpeed = b; }

/** Optional Costs */
protected boolean kicked = false;
Expand Down Expand Up @@ -540,8 +538,6 @@ public final String getGameLimitToCheck() {

public final boolean isSolved() { return this.solved; }

public final boolean isMaxSpeed() { return this.maxSpeed; }

public String getNoDifferentColors() {
return noDifferentColors;
}
Expand Down
3 changes: 2 additions & 1 deletion forge-gui/res/cardsfolder/upcoming/perilous_snare.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Types:Artifact
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.
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
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.
6 changes: 4 additions & 2 deletions forge-gui/res/cardsfolder/upcoming/racers_scoreboard.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
SVar:TrigDraw:DB$ Draw | NumCards$ 2 | SubAbility$ DBDiscard
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.
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.
S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max 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.
5 changes: 3 additions & 2 deletions forge-gui/res/cardsfolder/upcoming/risen_necroregent.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ManaCost:4 B
Types:Creature Zombie Cat Knight
PT:5/4
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
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.
3 changes: 2 additions & 1 deletion forge-gui/res/cardsfolder/upcoming/slick_imitator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ManaCost:1 U
Types:Creature Ooze
PT:1/3
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
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.)
3 changes: 2 additions & 1 deletion forge-gui/res/cardsfolder/upcoming/starting_column.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ManaCost:3
Types:Artifact
K:Start your engines
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
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.
4 changes: 3 additions & 1 deletion forge-gui/res/cardsfolder/upcoming/streaking_oilgorger.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ PT:3/3
K:Flying
K:Haste
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.
5 changes: 3 additions & 2 deletions forge-gui/res/cardsfolder/upcoming/swiftwing_assailant.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Types:Creature Bird Warrior
PT:3/3
K:Flying
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.
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.
S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max 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.
3 changes: 2 additions & 1 deletion forge-gui/res/cardsfolder/upcoming/vnwxt_verbose_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Types:Legendary Creature Homunculus
PT:0/4
K:Start your engines
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
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.
5 changes: 3 additions & 2 deletions forge-gui/res/cardsfolder/upcoming/walking_sarcophagus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ ManaCost:2
Types:Artifact Creature Zombie Cat
PT:2/1
K:Start your engines
S:Mode$ Continuous | Condition$ MaxSpeed | 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.
S:Mode$ Continuous | CharacteristicDefining$ True | Affected$ Card.Self | Condition$ MaxSpeed | AddStaticAbility$ MaxSpeedStatic | Description$ Max 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.
5 changes: 3 additions & 2 deletions forge-gui/res/cardsfolder/upcoming/zahur_glorys_past.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Types:Legendary Creature Zombie Cat Warrior
PT:3/2
K:Start your engines
A:AB$ Surveil | Cost$ Sac<1/Creature.Other/another creature> | ActivationLimit$ 1 | SpellDescription$ Surveil 1. Activate only once each turn.
DeckHas:Ability$Sacrifice|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.
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.
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
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.