v3.0.0: fixed unstable spell never using scrolls that are both combat and non-combat

This commit is contained in:
Evan Debenham
2025-01-26 15:45:02 -05:00
parent d304b03a2f
commit 31665de46a

View File

@@ -100,11 +100,11 @@ public class UnstableSpell extends Spell {
//reroll the scroll until it is relevant for the situation (whether there are visible enemies) //reroll the scroll until it is relevant for the situation (whether there are visible enemies)
if (hero.visibleEnemies() == 0){ if (hero.visibleEnemies() == 0){
while (combatScrolls.contains(s.getClass())){ while (!nonCombatScrolls.contains(s.getClass())){
s = Reflection.newInstance(Random.chances(scrollChances)); s = Reflection.newInstance(Random.chances(scrollChances));
} }
} else { } else {
while (nonCombatScrolls.contains(s.getClass())){ while (!combatScrolls.contains(s.getClass())){
s = Reflection.newInstance(Random.chances(scrollChances)); s = Reflection.newInstance(Random.chances(scrollChances));
} }
} }