v0.8.0: fixed golden mimics gaining huge stat boosts from save/load
This commit is contained in:
parent
432c069691
commit
e3d2d12e37
|
@ -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
|
||||
|
|
|
@ -85,7 +85,8 @@ public class Mimic extends Mob {
|
|||
if (bundle.contains( ITEMS )) {
|
||||
items = new ArrayList<>((Collection<Item>) ((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
|
||||
|
|
Loading…
Reference in New Issue
Block a user