Implement the Dormant Lava
Acts like dirt. However, fireballs will enter it and turn it into Fire in the process.
This commit is contained in:
parent
ba5d6c966c
commit
e134b4cbd9
@ -859,6 +859,11 @@ const TILE_ENCODING = {
|
|||||||
has_next: true,
|
has_next: true,
|
||||||
is_extension: true,
|
is_extension: true,
|
||||||
},
|
},
|
||||||
|
0xed: {
|
||||||
|
name: 'fire_sticks',
|
||||||
|
has_next: true,
|
||||||
|
is_extension: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
const REVERSE_TILE_ENCODING = {};
|
const REVERSE_TILE_ENCODING = {};
|
||||||
for (let [tile_byte, spec] of Object.entries(TILE_ENCODING)) {
|
for (let [tile_byte, spec] of Object.entries(TILE_ENCODING)) {
|
||||||
|
|||||||
@ -1601,6 +1601,7 @@ const EDITOR_PALETTE = [{
|
|||||||
'terraformer_n',
|
'terraformer_n',
|
||||||
'global_cycler',
|
'global_cycler',
|
||||||
'halo',
|
'halo',
|
||||||
|
'fire_sticks',
|
||||||
],
|
],
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@ -2187,6 +2188,10 @@ const EDITOR_TILE_DESCRIPTIONS = {
|
|||||||
name: "Halo",
|
name: "Halo",
|
||||||
desc: "Protects the player from death once, destroying the would-be killer in the process.",
|
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 = {
|
const SPECIAL_PALETTE_ENTRIES = {
|
||||||
|
|||||||
@ -1037,6 +1037,7 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, {
|
|||||||
terraformer_w: [3, 43],
|
terraformer_w: [3, 43],
|
||||||
global_cycler: [4, 43],
|
global_cycler: [4, 43],
|
||||||
halo: [5, 43],
|
halo: [5, 43],
|
||||||
|
fire_sticks: [6, 43],
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -681,6 +681,30 @@ const TILE_TYPES = {
|
|||||||
blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2,
|
blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2,
|
||||||
speed_factor: 0.5,
|
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
|
// Hazards
|
||||||
fire: {
|
fire: {
|
||||||
|
|||||||
BIN
tileset-lexy.png
BIN
tileset-lexy.png
Binary file not shown.
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 94 KiB |
Loading…
Reference in New Issue
Block a user