v0.8.2: Fixed the following bugs:

- Freezes if caustic slimes or DM-201s died over pits
- Talisman of foresight taking no time to scry
- Talisman of foresight not gaining exp in some cases
- Wand of Warding healing sentries for more HP than intended
- Dropped items not using new step SFX
This commit is contained in:
Evan Debenham 2020-07-17 19:07:18 -04:00
parent 3db661770a
commit 93fc235aab
5 changed files with 25 additions and 25 deletions

View File

@ -57,7 +57,7 @@ public class CausticSlime extends Slime {
int ofs; int ofs;
do { do {
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)]; ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
} while (!Dungeon.level.passable[pos + ofs]); } while (Dungeon.level.solid[pos + ofs]);
Dungeon.level.drop( new GooBlob(), pos + ofs ).sprite.drop( pos ); Dungeon.level.drop( new GooBlob(), pos + ofs ).sprite.drop( pos );
} }
} }

View File

@ -126,7 +126,7 @@ public class DM201 extends DM200 {
int ofs; int ofs;
do { do {
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)]; ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
} while (!Dungeon.level.passable[pos + ofs]); } while (Dungeon.level.solid[pos + ofs]);
Dungeon.level.drop( new MetalShard(), pos + ofs ).sprite.drop( pos ); Dungeon.level.drop( new MetalShard(), pos + ofs ).sprite.drop( pos );
} }

View File

@ -156,20 +156,16 @@ public class TalismanOfForesight extends Artifact {
} }
if (Dungeon.level.secret[cell]) { if (Dungeon.level.secret[cell]) {
Dungeon.level.discover(cell); int oldValue = Dungeon.level.map[cell];
GameScene.discoverTile(cell, oldValue);
Dungeon.level.discover( cell );
ScrollOfMagicMapping.discover(cell);
noticed = true;
if (Dungeon.level.heroFOV[cell]) { if (oldValue == Terrain.SECRET_TRAP){
int oldValue = Dungeon.level.map[cell]; earnedExp += 10;
GameScene.discoverTile(cell, Dungeon.level.map[cell]); } else if (oldValue == Terrain.SECRET_DOOR){
Dungeon.level.discover( cell ); earnedExp += 100;
ScrollOfMagicMapping.discover(cell);
noticed = true;
if (oldValue == Terrain.SECRET_TRAP){
earnedExp += 10;
} else if (oldValue == Terrain.SECRET_DOOR){
earnedExp += 100;
}
} }
} }
@ -214,6 +210,7 @@ public class TalismanOfForesight extends Artifact {
GameScene.updateFog(); GameScene.updateFog();
curUser.sprite.zap(target); curUser.sprite.zap(target);
curUser.spend(Actor.TICK);
Sample.INSTANCE.play(Assets.Sounds.TELEPORT); Sample.INSTANCE.play(Assets.Sounds.TELEPORT);
if (noticed) Sample.INSTANCE.play(Assets.Sounds.SECRET); if (noticed) Sample.INSTANCE.play(Assets.Sounds.SECRET);

View File

@ -250,15 +250,12 @@ public class WandOfWarding extends Wand {
return; return;
case 4: case 4:
heal = 8; heal = 8;
HP = Math.min(HT, HP+9);
break; break;
case 5: case 5:
heal = 10; heal = 10;
HP = Math.min(HT, HP+10);
break; break;
case 6: case 6:
heal = 15; heal = 15;
HP = Math.min(HT, HP+15);
break; break;
} }

View File

@ -322,17 +322,23 @@ public class ItemSprite extends MovieClip {
place(heap.pos); place(heap.pos);
if (visible) { if (visible) {
boolean water = Dungeon.level.water[heap.pos];
if (water) { if (Dungeon.level.water[heap.pos]) {
GameScene.ripple(heap.pos); GameScene.ripple(heap.pos);
} else {
int cell = Dungeon.level.map[heap.pos];
water = (cell == Terrain.WELL || cell == Terrain.ALCHEMY);
} }
if (!(heap.peek() instanceof Gold)) { if (Dungeon.level.water[heap.pos]) {
Sample.INSTANCE.play(water ? Assets.Sounds.WATER : Assets.Sounds.STEP, 0.8f, 0.8f, 1.2f); Sample.INSTANCE.play( Assets.Sounds.WATER, 0.8f, Random.Float( 1f, 1.45f ) );
} else if (Dungeon.level.map[heap.pos] == Terrain.EMPTY_SP) {
Sample.INSTANCE.play( Assets.Sounds.STURDY, 0.8f, Random.Float( 1.16f, 1.25f ) );
} else if (Dungeon.level.map[heap.pos] == Terrain.GRASS
|| Dungeon.level.map[heap.pos] == Terrain.EMBERS
|| Dungeon.level.map[heap.pos] == Terrain.FURROWED_GRASS){
Sample.INSTANCE.play( Assets.Sounds.GRASS, 0.8f, Random.Float( 1.16f, 1.25f ) );
} else if (Dungeon.level.map[heap.pos] == Terrain.HIGH_GRASS) {
Sample.INSTANCE.play( Assets.Sounds.STEP, 0.8f, Random.Float( 1.16f, 1.25f ) );
} else {
Sample.INSTANCE.play( Assets.Sounds.STEP, 0.8f, Random.Float( 1.16f, 1.25f ));
} }
} }
} }