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 fe2e15050..c5442d0e8 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 @@ -630,7 +630,7 @@ public abstract class Mob extends Char { @Override public void die( Object cause ) { - + if (hitWithRanged){ Statistics.thrownAssists++; Badges.validateHuntressUnlock(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java index 0b29691bb..52792295a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java @@ -111,7 +111,7 @@ public class Warlock extends Mob implements Callback { Buff.prolong( enemy, Degrade.class, Degrade.DURATION ); } - int dmg = Random.Int( 12, 18 ); + int dmg = Random.NormalIntRange( 12, 18 ); enemy.damage( dmg, new DarkBolt() ); if (!enemy.isAlive() && enemy == Dungeon.hero) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java index 6ef9fd887..b25cc0245 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java @@ -112,6 +112,11 @@ public class YogDzewa extends Mob { @Override protected boolean act() { + //catches an error-case from 0.8.0 & 0.8.0a + if (!isAlive()){ + die(null); + } + if (phase == 0){ if (Dungeon.hero.viewDistance >= Dungeon.level.distance(pos, Dungeon.hero.pos)) { Dungeon.observe(); @@ -280,15 +285,22 @@ public class YogDzewa extends Mob { int preHP = HP; super.damage( dmg, src ); - int dmgTaken = preHP - HP; if (phase == 0 || findFist() != null) return; - abilityCooldown -= dmgTaken/10f; - summonCooldown -= dmgTaken/10f; + if (phase < 4) { + HP = Math.max(HP, HT - 300 * phase); + } else if (phase == 4) { + HP = Math.max(HP, 100); + } + int dmgTaken = preHP - HP; + + if (dmgTaken > 0) { + abilityCooldown -= dmgTaken / 10f; + summonCooldown -= dmgTaken / 10f; + } if (phase < 4 && HP <= HT - 300*phase){ - HP = HT - 300*phase; Dungeon.level.viewDistance = Math.max(1, Dungeon.level.viewDistance-1); if (Dungeon.hero.buff(Light.class) == null){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java index 9d932fc45..bdecc6009 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java @@ -66,7 +66,7 @@ public abstract class YogFist extends Mob { state = HUNTING; - properties.add(Property.MINIBOSS); + properties.add(Property.BOSS); properties.add(Property.DEMONIC); } @@ -472,7 +472,10 @@ public abstract class YogFist extends Mob { int i; do { i = Random.Int(Dungeon.level.length()); - } while (Dungeon.level.heroFOV[i] || Dungeon.level.solid[i] || Actor.findChar(i) != null); + } while (Dungeon.level.heroFOV[i] + || Dungeon.level.solid[i] + || Actor.findChar(i) != null + || Dungeon.findStep(this, Dungeon.level.exit, Dungeon.level.passable, fieldOfView, false) == -1); ScrollOfTeleportation.appear(this, i); state = WANDERING; GameScene.flash(0xFFFFFF); @@ -539,7 +542,10 @@ public abstract class YogFist extends Mob { int i; do { i = Random.Int(Dungeon.level.length()); - } while (Dungeon.level.heroFOV[i] || Dungeon.level.solid[i] || Actor.findChar(i) != null); + } while (Dungeon.level.heroFOV[i] + || Dungeon.level.solid[i] + || Actor.findChar(i) != null + || Dungeon.findStep(this, Dungeon.level.exit, Dungeon.level.passable, fieldOfView, false) == -1); ScrollOfTeleportation.appear(this, i); state = WANDERING; GameScene.flash(0, false);