v0.8.0b: various mob fixes/improvements:

- Fixed warlocks not dealing normalized damage with their magic attack
- Fixed Yog-Dzewa fight glitching in rare cases where the eye and last fist are killed at the same time
- Fixed Bright/Dark fist very rarely teleporting into enclosed spaces
- Yog's fists are now considered bosses, not minibosses
This commit is contained in:
Evan Debenham 2020-05-05 12:35:20 -04:00
parent f2d0aa959a
commit 6698d97ce2
4 changed files with 27 additions and 9 deletions

View File

@ -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) {

View File

@ -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;
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){

View File

@ -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);