v2.1.0: fixed stat calculation for tormented spirits

This commit is contained in:
Evan Debenham
2023-05-30 12:43:13 -04:00
parent aaad76fe0d
commit acfa467584
2 changed files with 12 additions and 4 deletions
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
@@ -40,9 +41,16 @@ public class TormentedSpirit extends Wraith {
spriteClass = TormentedSpiritSprite.class; spriteClass = TormentedSpiritSprite.class;
} }
//50% more damage scaling than regular wraiths
@Override @Override
public void adjustStats(int level) { public int damageRoll() {
super.adjustStats(Math.round(level*1.5f)); 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(){ public void cleanse(){
@@ -37,7 +37,7 @@ public class Wraith extends Mob {
private static final float SPAWN_DELAY = 2f; private static final float SPAWN_DELAY = 2f;
private int level; protected int level;
{ {
spriteClass = WraithSprite.class; 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) { if ((!Dungeon.level.solid[pos] || Dungeon.level.passable[pos]) && Actor.findChar( pos ) == null) {
Wraith w; Wraith w;
if (allowExotic && Random.Int(100) == 0){ if (allowExotic && Random.Int(1) == 0){
w = new TormentedSpirit(); w = new TormentedSpirit();
} else { } else {
w = new Wraith(); w = new Wraith();