v0.8.0: bugfixes:

- reverted unintential commit of debug stats for ghouls
- fixed ghoul life link not transferring correctly in some cases
- mobs now retain their max level for xp between save/load
- fixed DM-300 incorrectly being immune to rooting
This commit is contained in:
Evan Debenham 2020-02-11 18:16:32 -05:00
parent aaa0bdc135
commit 3697b1b8c6
3 changed files with 11 additions and 3 deletions

View File

@ -42,8 +42,8 @@ public class Ghoul extends Mob {
{
spriteClass = GhoulSprite.class;
HP = HT = 5;
defenseSkill = 0;
HP = HT = 45;
defenseSkill = 20;
EXP = 5;
maxLvl = 20;
@ -313,7 +313,7 @@ public class Ghoul extends Mob {
super.detach();
Ghoul newHost = searchForHost(ghoul);
if (newHost != null){
newHost.add(this);
attachTo(newHost);
} else {
ghoul.die(this);
}

View File

@ -107,6 +107,7 @@ public abstract class Mob extends Char {
private static final String STATE = "state";
private static final String SEEN = "seen";
private static final String TARGET = "target";
private static final String MAX_LVL = "max_lvl";
@Override
public void storeInBundle( Bundle bundle ) {
@ -126,6 +127,7 @@ public abstract class Mob extends Char {
}
bundle.put( SEEN, enemySeen );
bundle.put( TARGET, target );
bundle.put( MAX_LVL, maxLvl );
}
@Override
@ -149,6 +151,8 @@ public abstract class Mob extends Char {
enemySeen = bundle.getBoolean( SEEN );
target = bundle.getInt( TARGET );
if (bundle.contains(MAX_LVL)) maxLvl = bundle.getInt(MAX_LVL);
}
public CharSprite sprite() {

View File

@ -490,6 +490,10 @@ public class NewDM300 extends Mob {
return true;
} else {
if (rooted || target == pos) {
return false;
}
int bestpos = pos;
for (int i : PathFinder.NEIGHBOURS8){
if (Dungeon.level.openSpace[pos+i] && Actor.findChar(pos+i) == null &&