Implement a few quirks of ghost movement

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-14 23:35:11 -07:00
parent 6d4326fe5b
commit 2103c649f6

View File

@ -607,6 +607,12 @@ const TILE_TYPES = {
else if (other.type.is_real_player) { else if (other.type.is_real_player) {
level.fail('burned'); level.fail('burned');
} }
else if (other.type.name === 'ghost') {
if (other.has_item('fire_boots')) {
// ?????
level.transmute_tile(me, 'floor');
}
}
else { else {
level.remove_tile(other); level.remove_tile(other);
} }
@ -614,7 +620,11 @@ const TILE_TYPES = {
}, },
water: { water: {
draw_layer: DRAW_LAYERS.terrain, draw_layer: DRAW_LAYERS.terrain,
blocks_collision: COLLISION.ghost, blocks(me, level, other) {
// Water blocks ghosts... unless they have flippers
if (other.type.name === 'ghost' && ! other.has_item('flippers'))
return true;
},
on_arrive(me, level, other) { on_arrive(me, level, other) {
// TODO cc1 allows items under water, i think; water was on the upper layer // TODO cc1 allows items under water, i think; water was on the upper layer
level.sfx.play_once('splash', me.cell); level.sfx.play_once('splash', me.cell);