diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java index 027a898bc..51b2c1191 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java @@ -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); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 125e29f14..38988e19a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -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() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java index 7281ced80..ed77329a5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java @@ -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 &&