diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java index 84aeb2b00..f545b4662 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java @@ -76,9 +76,8 @@ public class GoldenMimic extends Mimic { } @Override - public void adjustStats(int level) { - //FIXME this causes level to keep increasing over save/load - super.adjustStats(Math.round(level*1.33f)); + public void setLevel(int level) { + super.setLevel(Math.round(level*1.33f)); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java index 01add218e..b2a09c09d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java @@ -85,7 +85,8 @@ public class Mimic extends Mob { if (bundle.contains( ITEMS )) { items = new ArrayList<>((Collection) ((Collection) bundle.getCollection(ITEMS))); } - adjustStats( bundle.getInt( LEVEL ) ); + level = bundle.getInt( LEVEL ); + adjustStats(level); super.restoreFromBundle(bundle); if (state != PASSIVE && alignment == Alignment.NEUTRAL){ alignment = Alignment.ENEMY; @@ -216,10 +217,13 @@ public class Mimic extends Mob { return 6 + level; } } + + public void setLevel( int level ){ + this.level = level; + adjustStats(level); + } public void adjustStats( int level ) { - this.level = level; - HP = HT = (1 + level) * 6; defenseSkill = 2 + level/2; @@ -273,7 +277,7 @@ public class Mimic extends Mob { } m.items = new ArrayList<>( items ); - m.adjustStats( Dungeon.depth ); + m.setLevel( Dungeon.depth ); m.pos = pos; //generate an extra reward for killing the mimic