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:
parent
f2d0aa959a
commit
6698d97ce2
|
@ -111,7 +111,7 @@ public class Warlock extends Mob implements Callback {
|
||||||
Buff.prolong( enemy, Degrade.class, Degrade.DURATION );
|
Buff.prolong( enemy, Degrade.class, Degrade.DURATION );
|
||||||
}
|
}
|
||||||
|
|
||||||
int dmg = Random.Int( 12, 18 );
|
int dmg = Random.NormalIntRange( 12, 18 );
|
||||||
enemy.damage( dmg, new DarkBolt() );
|
enemy.damage( dmg, new DarkBolt() );
|
||||||
|
|
||||||
if (!enemy.isAlive() && enemy == Dungeon.hero) {
|
if (!enemy.isAlive() && enemy == Dungeon.hero) {
|
||||||
|
|
|
@ -112,6 +112,11 @@ public class YogDzewa extends Mob {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
|
//catches an error-case from 0.8.0 & 0.8.0a
|
||||||
|
if (!isAlive()){
|
||||||
|
die(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (phase == 0){
|
if (phase == 0){
|
||||||
if (Dungeon.hero.viewDistance >= Dungeon.level.distance(pos, Dungeon.hero.pos)) {
|
if (Dungeon.hero.viewDistance >= Dungeon.level.distance(pos, Dungeon.hero.pos)) {
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
|
@ -280,15 +285,22 @@ public class YogDzewa extends Mob {
|
||||||
|
|
||||||
int preHP = HP;
|
int preHP = HP;
|
||||||
super.damage( dmg, src );
|
super.damage( dmg, src );
|
||||||
int dmgTaken = preHP - HP;
|
|
||||||
|
|
||||||
if (phase == 0 || findFist() != null) return;
|
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;
|
abilityCooldown -= dmgTaken / 10f;
|
||||||
summonCooldown -= dmgTaken / 10f;
|
summonCooldown -= dmgTaken / 10f;
|
||||||
|
}
|
||||||
|
|
||||||
if (phase < 4 && HP <= HT - 300*phase){
|
if (phase < 4 && HP <= HT - 300*phase){
|
||||||
HP = HT - 300*phase;
|
|
||||||
|
|
||||||
Dungeon.level.viewDistance = Math.max(1, Dungeon.level.viewDistance-1);
|
Dungeon.level.viewDistance = Math.max(1, Dungeon.level.viewDistance-1);
|
||||||
if (Dungeon.hero.buff(Light.class) == null){
|
if (Dungeon.hero.buff(Light.class) == null){
|
||||||
|
|
|
@ -66,7 +66,7 @@ public abstract class YogFist extends Mob {
|
||||||
|
|
||||||
state = HUNTING;
|
state = HUNTING;
|
||||||
|
|
||||||
properties.add(Property.MINIBOSS);
|
properties.add(Property.BOSS);
|
||||||
properties.add(Property.DEMONIC);
|
properties.add(Property.DEMONIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,7 +472,10 @@ public abstract class YogFist extends Mob {
|
||||||
int i;
|
int i;
|
||||||
do {
|
do {
|
||||||
i = Random.Int(Dungeon.level.length());
|
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);
|
ScrollOfTeleportation.appear(this, i);
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
GameScene.flash(0xFFFFFF);
|
GameScene.flash(0xFFFFFF);
|
||||||
|
@ -539,7 +542,10 @@ public abstract class YogFist extends Mob {
|
||||||
int i;
|
int i;
|
||||||
do {
|
do {
|
||||||
i = Random.Int(Dungeon.level.length());
|
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);
|
ScrollOfTeleportation.appear(this, i);
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
GameScene.flash(0, false);
|
GameScene.flash(0, false);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user