Allow ghosts to pass through thin walls

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-14 23:59:38 -07:00
parent dae66de160
commit 2d7df413ee
3 changed files with 6 additions and 3 deletions

View File

@ -59,8 +59,10 @@ export class Tile {
if (this.type.blocks_collision & other.type.collision_mask)
return true;
// FIXME get this out of here
if (this.type.thin_walls &&
this.type.thin_walls.has(DIRECTIONS[direction].opposite))
this.type.thin_walls.has(DIRECTIONS[direction].opposite) &&
other.type.name !== 'ghost')
return true;
if (this.type.blocks)

View File

@ -2098,7 +2098,7 @@ class PackTestDialog extends DialogOverlay {
if (index === undefined)
return;
this.close();
this.conductor.change_level(index);
this.conductor.change_level(parseInt(index, 10));
});
this.main.append(

View File

@ -40,7 +40,7 @@ function on_ready_force_floor(me, level) {
}
function blocks_leaving_thin_walls(me, actor, direction) {
return me.type.thin_walls.has(direction);
return me.type.thin_walls.has(direction) && actor.type.name !== 'ghost';
}
function player_visual_state(me) {
@ -2276,6 +2276,7 @@ const TILE_TYPES = {
is_player: true,
is_monster: true,
collision_mask: COLLISION.player1,
// FIXME these fuckers should block each OTHER though
blocks_collision: COLLISION.all_but_player,
has_inventory: true,
can_reveal_walls: true, // XXX i think?