From 588c27788f31d3767b7042ec6e38e3d4982f2b73 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 13 Feb 2025 12:44:59 -0500 Subject: [PATCH] v3.0.0: fixed a crash caused by stone glyph and trinity --- .../shatteredpixeldungeon/items/armor/Armor.java | 2 +- .../shatteredpixeldungeon/items/armor/glyphs/Stone.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index 9401770a4..621b45204 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -350,7 +350,7 @@ public class Armor extends EquipableItem { public float evasionFactor( Char owner, float evasion ){ - if (hasGlyph(Stone.class, owner) && !((Stone)glyph).testingEvasion()){ + if (hasGlyph(Stone.class, owner) && !Stone.testingEvasion()){ return 0; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java index 910fa3bdd..85980a0e3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java @@ -56,9 +56,9 @@ public class Stone extends Armor.Glyph { return damage; } - private boolean testing = false; + private static boolean testing = false; - public boolean testingEvasion(){ + public static boolean testingEvasion(){ return testing; }