[BLB] Implement Season of Gathering and Pawprints mechanic (#12617)

* Add skeleton

* Implement Pawprints modal functionality

* Implement Seasons of Gathering

* remove unused imports

* Add Pawprints test

* use withPawPRintValue() instead of setter

* use 0 for non-pawprint mode and modes classes and move mode validation to addMode

* Use GreatestPowerAmongControlledCreaturesValue

* Fix pawprints check

* calcualte sleected pawprint count based on selected modes

* move max pawprints check to getAvailableModes

* fix max pawprints checks
This commit is contained in:
jimga150 2024-08-14 21:13:09 -04:00 committed by GitHub
parent d5c76489ac
commit e976920e2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 449 additions and 8 deletions

View file

@ -19,6 +19,7 @@ public class Mode implements Serializable {
protected final Effects effects;
protected String flavorWord;
protected Cost cost = null;
protected int pawPrintValue = 0; //0 = does not use pawprints
/**
* Optional Tag to distinguish this mode from others.
* In the case of modes that players can only choose once,
@ -42,6 +43,7 @@ public class Mode implements Serializable {
this.flavorWord = mode.flavorWord;
this.modeTag = mode.modeTag;
this.cost = mode.cost != null ? mode.cost.copy() : null;
this.pawPrintValue = mode.pawPrintValue;
}
public UUID setRandomId() {
@ -119,4 +121,13 @@ public class Mode implements Serializable {
public Cost getCost() {
return cost;
}
public Mode withPawPrintValue(int pawPrintValue) {
this.pawPrintValue = pawPrintValue;
return this;
}
public int getPawPrintValue() {
return pawPrintValue;
}
}