diff --git a/js/format-c2g.js b/js/format-c2g.js index c1376f3..63b15e3 100644 --- a/js/format-c2g.js +++ b/js/format-c2g.js @@ -808,6 +808,10 @@ const TILE_ENCODING = { has_next: true, is_extension: true, }, + 0xd5: { + name: 'spikes', + is_extension: true, + }, 0xe0: { name: 'gift_bow', has_next: true, diff --git a/js/main-editor.js b/js/main-editor.js index bbb9d08..e5f2a6d 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -1608,7 +1608,8 @@ const EDITOR_PALETTE = [{ 'hole', 'cracked_floor', 'cracked_ice', - 'score_5x' + 'score_5x', + 'spikes' ], }]; @@ -2227,6 +2228,10 @@ const EDITOR_TILE_DESCRIPTIONS = { name: "×5 bonus", desc: "Quintuples the player's current bonus points. Can be collected by doppelgangers, rovers, and bowling balls, but will not grant bonus points.", }, + spikes: { + name: "Spikes", + desc: "Stops players (and doppelgangers) unless they have hiking boots. Everything else can pass.", + }, }; const SPECIAL_PALETTE_ENTRIES = { diff --git a/js/tileset.js b/js/tileset.js index 3f3648a..0168201 100644 --- a/js/tileset.js +++ b/js/tileset.js @@ -1063,6 +1063,7 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, { cracked_floor: [11, 43], cracked_ice: [7, 40], score_5x: [10, 40], + spikes: [5, 40], }); export const TILESET_LAYOUTS = { diff --git a/js/tiletypes.js b/js/tiletypes.js index fc23969..b6b3890 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -687,6 +687,12 @@ const TILE_TYPES = { blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2, speed_factor: 0.5, }, + spikes: { + layer: LAYERS.terrain, + blocks(me, level, other) { + return !(!other.type.is_player || other.has_item('hiking_boots')); + }, + }, fire_sticks: { layer: LAYERS.terrain, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover & ~COLLISION.fireball),