diff --git a/js/game.js b/js/game.js index e900aba..8bb66b7 100644 --- a/js/game.js +++ b/js/game.js @@ -195,7 +195,7 @@ export class Cell extends Array { } has(name) { - return this.some(tile => tile.name === name); + return this.some(tile => tile.type.name === name); } try_leaving(actor, direction) { diff --git a/js/tiletypes.js b/js/tiletypes.js index e073f3b..bc2416e 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -135,6 +135,12 @@ const TILE_TYPES = { // Floors and walls floor: { draw_layer: DRAW_LAYERS.terrain, + on_arrive(me, level, other) { + if (other.type.name === 'blob' && other.previous_cell && other.previous_cell.has('slime')) { + // Blobs spread slime onto floor + level.transmute_tile(me, 'slime'); + } + }, }, floor_letter: { draw_layer: DRAW_LAYERS.terrain,