Implementing Blitz mechanic (WIP) (#8835)

* added blitz mechanic (mostly copy/paste of dash)

* renamed class

* reworked alt cost abilities, greatly reduced redundant code

* updated text generation

* removed all skips

* added test for blitz

* changed blitz implementation

* [SNC] Implemented Tenacious Underdog
This commit is contained in:
Evan Kranzler 2022-04-24 12:03:25 -04:00 committed by GitHub
parent 76daf4bd5a
commit 0e3252d256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 620 additions and 722 deletions

View file

@ -3607,9 +3607,9 @@ public abstract class PlayerImpl implements Player, Serializable {
ManaCostsImpl manaCosts = new ManaCostsImpl();
for (Cost cost : alternateSourceCostsAbility.getCosts()) {
// AlternativeCost2 replaced by real cost on activate, so getPlayable need to extract that costs here
if (cost instanceof AlternativeCost2) {
if (((AlternativeCost2) cost).getCost() instanceof ManaCost) {
manaCosts.add((ManaCost) ((AlternativeCost2) cost).getCost());
if (cost instanceof AlternativeCost) {
if (((AlternativeCost) cost).getCost() instanceof ManaCost) {
manaCosts.add((ManaCost) ((AlternativeCost) cost).getCost());
}
} else {
if (cost instanceof ManaCost) {
@ -3656,9 +3656,9 @@ public abstract class PlayerImpl implements Player, Serializable {
ManaCostsImpl manaCosts = new ManaCostsImpl();
for (Cost cost : ((Ability) alternateSourceCosts).getCosts()) {
// AlternativeCost2 replaced by real cost on activate, so getPlayable need to extract that costs here
if (cost instanceof AlternativeCost2) {
if (((AlternativeCost2) cost).getCost() instanceof ManaCost) {
manaCosts.add((ManaCost) ((AlternativeCost2) cost).getCost());
if (cost instanceof AlternativeCost) {
if (((AlternativeCost) cost).getCost() instanceof ManaCost) {
manaCosts.add((ManaCost) ((AlternativeCost) cost).getCost());
}
} else {
if (cost instanceof ManaCost) {