v0.8.0: Various bugfixes for:

- Goo's health bar not appearing in some cases
- Viscocity not considering sources of extra damage reduction
- Bolts from wand of warding not pressing tiles if they fail to summon
This commit is contained in:
Evan Debenham 2019-10-30 18:46:27 -04:00
parent f9511ab03a
commit 75b8459cf0
3 changed files with 9 additions and 1 deletions

View File

@ -211,6 +211,9 @@ public class Goo extends Mob {
@Override
public void damage(int dmg, Object src) {
if (!BossHealthBar.isAssigned()){
BossHealthBar.assignBoss( this );
}
boolean bleeding = (HP*2 <= HT);
super.damage(dmg, src);
if ((HP*2 <= HT) && !bleeding){

View File

@ -45,7 +45,7 @@ public class Viscosity extends Glyph {
//FIXME this glyph should really just proc after DR is accounted for.
//should build in functionality for that, but this works for now
int realDamage = damage - Random.NormalIntRange( armor.DRMin(), armor.DRMax());
int realDamage = damage - defender.drRoll();
if (realDamage <= 0) {
return 0;

View File

@ -78,6 +78,7 @@ public class WandOfWarding extends Wand {
Char ch = Actor.findChar(bolt.collisionPos);
if (!curUser.fieldOfView[bolt.collisionPos] || !Dungeon.level.passable[bolt.collisionPos]){
GLog.w( Messages.get(this, "bad_location"));
Dungeon.level.pressCell(bolt.collisionPos);
} else if (ch != null){
if (ch instanceof Ward){
@ -89,7 +90,9 @@ public class WandOfWarding extends Wand {
ch.sprite.emitter().burst(MagicMissile.WardParticle.UP, ((Ward) ch).tier);
} else {
GLog.w( Messages.get(this, "bad_location"));
Dungeon.level.pressCell(bolt.collisionPos);
}
} else if (canPlaceWard(bolt.collisionPos)){
Ward ward = new Ward();
ward.pos = bolt.collisionPos;
@ -97,8 +100,10 @@ public class WandOfWarding extends Wand {
GameScene.add(ward, 1f);
Dungeon.level.occupyCell(ward);
ward.sprite.emitter().burst(MagicMissile.WardParticle.UP, ward.tier);
} else {
GLog.w( Messages.get(this, "bad_location"));
Dungeon.level.pressCell(bolt.collisionPos);
}
}