v0.8.0: various bugfixes:
- fixed rare crash bugs with crystal mimics - fixed items landing in DK's throne if he dies there - fixed DK using abilities through paralysis - fixed doom debuff messing with phases 2 and 3 of DK fight - fixed ghouls acting instantly when they shouldn't in some cases - fixed some visual layering issues with one part of DM-300 arena - fixed rare deadlock crashes caused by health indicators
This commit is contained in:
parent
9b7fbbf0f6
commit
2de6ff5031
|
@ -447,7 +447,7 @@ public abstract class Char extends Actor {
|
|||
if (this.buff(MagicalSleep.class) != null){
|
||||
Buff.detach(this, MagicalSleep.class);
|
||||
}
|
||||
if (this.buff(Doom.class) != null){
|
||||
if (this.buff(Doom.class) != null && !isImmune(Doom.class)){
|
||||
dmg *= 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ public class CrystalMimic extends Mimic {
|
|||
} else {
|
||||
Buff.affect(this, Haste.class, 1f);
|
||||
}
|
||||
if (Dungeon.level.heroFOV[pos] && Actor.chars().contains(this)) {
|
||||
if (Actor.chars().contains(this) && Dungeon.level.heroFOV[pos]) {
|
||||
enemy = Dungeon.hero;
|
||||
target = Dungeon.hero.pos;
|
||||
enemySeen = true;
|
||||
|
|
|
@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LifeLink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Beam;
|
||||
|
@ -38,6 +39,8 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.ArmorKit;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
||||
|
@ -143,6 +146,11 @@ public class DwarfKing extends Mob {
|
|||
summonCooldown--;
|
||||
}
|
||||
|
||||
if (paralysed > 0){
|
||||
spend(TICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (abilityCooldown <= 0){
|
||||
|
||||
if (lastAbility == NONE) {
|
||||
|
@ -409,15 +417,19 @@ public class DwarfKing extends Mob {
|
|||
|
||||
GameScene.bossSlain();
|
||||
|
||||
if (!Dungeon.level.solid[pos]) {
|
||||
Dungeon.level.drop(new ArmorKit(), pos).sprite.drop();
|
||||
} else {
|
||||
//if the king is on his throne, drop the toolkit below
|
||||
Dungeon.level.drop( new ArmorKit(), pos + Dungeon.level.width() ).sprite.drop( pos );
|
||||
}
|
||||
|
||||
super.die( cause );
|
||||
|
||||
if (Dungeon.level.solid[pos]){
|
||||
Heap h = Dungeon.level.heaps.get(pos);
|
||||
for (Item i : h.items){
|
||||
Dungeon.level.drop(i, pos + Dungeon.level.width());
|
||||
}
|
||||
h.destroy();
|
||||
Dungeon.level.drop(new ArmorKit(), pos + Dungeon.level.width()).sprite.drop(pos);
|
||||
} else {
|
||||
Dungeon.level.drop(new ArmorKit(), pos).sprite.drop();
|
||||
}
|
||||
|
||||
Badges.validateBossSlain();
|
||||
|
||||
Dungeon.level.unseal();
|
||||
|
@ -434,6 +446,15 @@ public class DwarfKing extends Mob {
|
|||
yell( Messages.get(this, "defeated") );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isImmune(Class effect) {
|
||||
//immune to damage amplification from doomed in 2nd phase or later, but it can still be applied
|
||||
if (phase > 1 && effect == Doom.class && buff(Doom.class) != null ){
|
||||
return true;
|
||||
}
|
||||
return super.isImmune(effect);
|
||||
}
|
||||
|
||||
public static class Summoning extends Buff {
|
||||
|
||||
private int delay;
|
||||
|
|
|
@ -173,12 +173,6 @@ public class Ghoul extends Mob {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAdd() {
|
||||
spend(-cooldown());
|
||||
super.onAdd();
|
||||
}
|
||||
|
||||
private class Sleeping extends Mob.Sleeping {
|
||||
@Override
|
||||
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
||||
|
@ -300,6 +294,7 @@ public class Ghoul extends Mob {
|
|||
}
|
||||
}
|
||||
Actor.add(ghoul);
|
||||
ghoul.spend(-ghoul.cooldown());
|
||||
Dungeon.level.mobs.add(ghoul);
|
||||
Dungeon.level.occupyCell( ghoul );
|
||||
ghoul.sprite.idle();
|
||||
|
|
|
@ -572,7 +572,7 @@ public class NewCavesBossLevel extends Level {
|
|||
private static short[] entryWay = new short[]{
|
||||
0, 7, 7, 7, 4,
|
||||
0, 15, 15, 15, 4,
|
||||
8, 23, 23, 23, 12,
|
||||
-1, 23, 23, 23, -1,
|
||||
-1, -1, -1, -1, -1,
|
||||
-1, 6, -1, 14, -1,
|
||||
-1, -1, -1, -1, -1,
|
||||
|
|
|
@ -47,7 +47,7 @@ public class CharHealthIndicator extends HealthBar {
|
|||
public void update() {
|
||||
super.update();
|
||||
|
||||
if (target != null && target.isAlive() && target.sprite.visible && Actor.chars().contains(target)) {
|
||||
if (target != null && target.isAlive() && target.sprite.visible) {
|
||||
CharSprite sprite = target.sprite;
|
||||
width = sprite.width()*(4/6f);
|
||||
x = sprite.x + sprite.width()/6f;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class TargetHealthIndicator extends HealthBar {
|
|||
public void update() {
|
||||
super.update();
|
||||
|
||||
if (target != null && target.isAlive() && target.sprite.visible && Actor.chars().contains(target)) {
|
||||
if (target != null && target.isAlive() && target.sprite.visible) {
|
||||
CharSprite sprite = target.sprite;
|
||||
width = sprite.width();
|
||||
x = sprite.x;
|
||||
|
|
Loading…
Reference in New Issue
Block a user