[OTJ] Implementing "spree" mechanic (#12018)

* [OTJ] Implement Unfortunate Accident

* fix errors

* a few more things

* [OTJ] Implement Three Steps Ahead

* [OTJ] Implement Caught in the Crossfire

* [OTJ] Implement Insatiable Avarice

* add test

* [OTJ] Implement Explosive Derailment

* [OTJ] Implement Requisition Raid

* [OTJ] Implement Rustler Rampage

* add comment to test

* [OTJ] Implement Metamorphic Blast

* [OTJ] Implement Final Showdown

* rework cost addition, add test

* move cost application to its own loop
This commit is contained in:
Evan Kranzler 2024-03-31 12:11:34 -04:00 committed by GitHub
parent fa67b0450f
commit ba20e97b71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 740 additions and 2 deletions

View file

@ -1,5 +1,6 @@
package mage.abilities;
import mage.abilities.costs.Cost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects;
import mage.target.Target;
@ -17,6 +18,7 @@ public class Mode implements Serializable {
protected final Targets targets;
protected final Effects effects;
protected String flavorWord;
protected Cost cost = null;
/**
* Optional Tag to distinguish this mode from others.
* In the case of modes that players can only choose once,
@ -39,6 +41,7 @@ public class Mode implements Serializable {
this.effects = mode.effects.copy();
this.flavorWord = mode.flavorWord;
this.modeTag = mode.modeTag;
this.cost = mode.cost != null ? mode.cost.copy() : null;
}
public UUID setRandomId() {
@ -107,4 +110,13 @@ public class Mode implements Serializable {
this.flavorWord = flavorWord;
return this;
}
public Mode withCost(Cost cost) {
this.cost = cost;
return this;
}
public Cost getCost() {
return cost;
}
}