From acfa46758461be1f30b1da8347e0bc346c156923 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 30 May 2023 12:43:13 -0400 Subject: [PATCH] v2.1.0: fixed stat calculation for tormented spirits --- .../actors/mobs/TormentedSpirit.java | 12 ++++++++++-- .../shatteredpixeldungeon/actors/mobs/Wraith.java | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/TormentedSpirit.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/TormentedSpirit.java index a62d1614d..3138932f5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/TormentedSpirit.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/TormentedSpirit.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; @@ -40,9 +41,16 @@ public class TormentedSpirit extends Wraith { spriteClass = TormentedSpiritSprite.class; } + //50% more damage scaling than regular wraiths @Override - public void adjustStats(int level) { - super.adjustStats(Math.round(level*1.5f)); + public int damageRoll() { + return Random.NormalIntRange( 1 + Math.round(1.5f*level)/2, 2 + Math.round(1.5f*level) ); + } + + //50% more accuracy (and by extension evasion) scaling than regular wraiths + @Override + public int attackSkill( Char target ) { + return 10 + Math.round(1.5f*level); } public void cleanse(){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java index 9fc23d1d0..36e176776 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java @@ -37,7 +37,7 @@ public class Wraith extends Mob { private static final float SPAWN_DELAY = 2f; - private int level; + protected int level; { spriteClass = WraithSprite.class; @@ -104,7 +104,7 @@ public class Wraith extends Mob { if ((!Dungeon.level.solid[pos] || Dungeon.level.passable[pos]) && Actor.findChar( pos ) == null) { Wraith w; - if (allowExotic && Random.Int(100) == 0){ + if (allowExotic && Random.Int(1) == 0){ w = new TormentedSpirit(); } else { w = new Wraith();