v2.0.0: added a safety check to prevent crashes with duelist unlock

This commit is contained in:
Evan Debenham
2022-11-28 11:16:31 -05:00
parent 4fb4b11dd7
commit af1c4cb3cd
@@ -867,7 +867,8 @@ public class Badges {
}
public static void validateDuelistUnlock(){
if (!isUnlocked(Badge.UNLOCK_HUNTRESS) && Dungeon.hero.belongings.weapon instanceof MeleeWeapon
if (!isUnlocked(Badge.UNLOCK_HUNTRESS) && Dungeon.hero != null
&& Dungeon.hero.belongings.weapon instanceof MeleeWeapon
&& ((MeleeWeapon) Dungeon.hero.belongings.weapon).tier >= 2
&& ((MeleeWeapon) Dungeon.hero.belongings.weapon).STRReq() <= Dungeon.hero.STR()){