diff --git a/js/format-c2g.js b/js/format-c2g.js index 50dce51..28951f3 100644 --- a/js/format-c2g.js +++ b/js/format-c2g.js @@ -859,6 +859,11 @@ const TILE_ENCODING = { has_next: true, is_extension: true, }, + 0xed: { + name: 'fire_sticks', + has_next: true, + is_extension: true, + }, }; const REVERSE_TILE_ENCODING = {}; for (let [tile_byte, spec] of Object.entries(TILE_ENCODING)) { diff --git a/js/main-editor.js b/js/main-editor.js index 068ab6a..1a1cf37 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -1601,6 +1601,7 @@ const EDITOR_PALETTE = [{ 'terraformer_n', 'global_cycler', 'halo', + 'fire_sticks', ], }]; @@ -2187,6 +2188,10 @@ const EDITOR_TILE_DESCRIPTIONS = { name: "Halo", desc: "Protects the player from death once, destroying the would-be killer in the process.", }, + fire_sticks: { + name: "Dormant Lava", + desc: "Acts like dirt. However, fireballs will enter it and turn it into Fire in the process.", + }, }; const SPECIAL_PALETTE_ENTRIES = { diff --git a/js/tileset.js b/js/tileset.js index 6bffb4e..30c4644 100644 --- a/js/tileset.js +++ b/js/tileset.js @@ -1037,6 +1037,7 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, { terraformer_w: [3, 43], global_cycler: [4, 43], halo: [5, 43], + fire_sticks: [6, 43], }); diff --git a/js/tiletypes.js b/js/tiletypes.js index dd287e4..d541a01 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -681,6 +681,30 @@ const TILE_TYPES = { blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2, speed_factor: 0.5, }, + fire_sticks: { + layer: LAYERS.terrain, + blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover & ~COLLISION.fireball), + blocks(me, level, other) { + return ((other.type.name === 'player2' || other.type.name === 'doppelganger2') && + ! other.has_item('hiking_boots')); + }, + on_arrive(me, level, other) { + // Bizarre interaction + if (other.type.name === 'ghost' && ! other.has_item('hiking_boots')) + return; + if (other.type.name === 'fireball') + { + level.transmute_tile(me, 'fire'); + } + else + { + level.transmute_tile(me, 'floor'); + } + if (other === level.player) { + level.sfx.play_once('step-gravel', me.cell); + } + }, + }, // Hazards fire: { diff --git a/tileset-lexy.png b/tileset-lexy.png index c1d72c5..0956538 100644 Binary files a/tileset-lexy.png and b/tileset-lexy.png differ