Implement "Promise a gift" mechanic (#12578)

* [BLB] Implement Wear Down

* [BLB] Implement Valley Rally

* [BLB] Implement Dawn's Truce

* add initial test

* [BLB] Implement Kitnap

* [BLB] Implement Long River's Pull

* [BLB] Implement Peerless Recycling

* [BLB] Implement Into the Flood Maw

* add more tests

* add verify skip

* remove skip

* a few requested changes

* [BLB] Implement Nocturnal Hunger

* add test for gifting a food token

* [BLB] Implement Starforged Sword

* add comment to activation ket

* add test for adding extra cards
This commit is contained in:
Evan Kranzler 2024-07-18 09:15:45 -04:00 committed by GitHub
parent 0d3590e579
commit 7fe6ba9c57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 956 additions and 1 deletions

View file

@ -1791,7 +1791,7 @@ public final class CardUtil {
if (value == null) {
throw new IllegalStateException("Wrong code usage: Costs tag " + tag + " has value stored of type null but is trying to be read. Use checkSourceCostsTagExists");
}
if (value.getClass() != defaultValue.getClass()) {
if (defaultValue != null && value.getClass() != defaultValue.getClass()) {
throw new IllegalStateException("Wrong code usage: Costs tag " + tag + " has value stored of type " + value.getClass().getName() + " different from default of type " + defaultValue.getClass().getName());
}
return (T) value;