v3.1.0: fixed crashes caused by loading existing Warrior saves

This commit is contained in:
Evan Debenham
2025-04-11 12:19:23 -04:00
parent 18c0203906
commit 2b4cfd79ea

View File

@@ -371,11 +371,10 @@ public class BrokenSeal extends Item {
if (bundle.contains(COOLDOWN)) {
cooldown = bundle.getInt(COOLDOWN);
turnsSinceEnemies = bundle.getInt(TURNS_SINCE_ENEMIES);
} else {
//pre-3.1 shield, normally just clear it, but retain if it's big and possibly from berserking
if (shielding() < maxShield()+5 && target.HP > 0){
setShield(0);
}
//if we have shield from pre-3.1, have it last a bit
} else if (shielding() > 0) {
turnsSinceEnemies = -100;
}
}
}