diff --git a/js/game.js b/js/game.js index 28ccaee..542729a 100644 --- a/js/game.js +++ b/js/game.js @@ -1025,6 +1025,7 @@ export class Level { // Bump tiles that we're even attempting to move into; this mostly reveals // invisible walls, blue floors, etc. + // XXX how to guarantee this only happens once... if (tile.type.on_bump) { tile.type.on_bump(tile, this, actor); } diff --git a/js/tiletypes.js b/js/tiletypes.js index ad5dcc4..a505606 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -892,6 +892,18 @@ const TILE_TYPES = { ice_block: true, frame_block: true, }, + on_bump(me, level, other) { + // Fireballs melt ice blocks on regular floor + // XXX what if i'm in motion? + if (other.type.name === 'fireball') { + let terrain = me.cell.get_terrain(); + if (terrain.type.name === 'floor') { + level.remove_tile(me); + level.transmute_tile(terrain, 'water'); + // FIXME splash? + } + } + }, }, frame_block: { // TODO directional, obviously