diff --git a/js/game.js b/js/game.js index b73af09..e2a4716 100644 --- a/js/game.js +++ b/js/game.js @@ -92,8 +92,11 @@ export class Tile { other.type.name !== 'ghost') return true; - if (this.type.blocks) - return this.type.blocks(this, level, other, direction); + if (this.type.blocks && this.type.blocks(this, level, other, direction)) + return true; + + if (other.type.blocked_by && other.type.blocked_by(other, level, this)) + return true; return false; } diff --git a/js/tiletypes.js b/js/tiletypes.js index bcdc279..d2c6d61 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -1350,6 +1350,9 @@ const TILE_TYPES = { on_finishing_move(me, level) { this.try_pickup_item(me, level); }, + blocked_by(me, level, other) { + return other.cell.get_item() !== null && me.encased_item !== null; + }, on_death(me, level) { //needs to be called by transmute_tile to ttl and by lit_dynamite before remove_tile if (me.encased_item !== null) {