Allow the bowling ball to slide normally
This commit is contained in:
parent
f858668ca8
commit
55abe8b53a
@ -1270,15 +1270,20 @@ export class Level {
|
||||
let success = false;
|
||||
for (let dest of teleporter.type.teleport_dest_order(teleporter, this, actor)) {
|
||||
// Teleporters already containing an actor are blocked and unusable
|
||||
// FIXME should check collision?
|
||||
if (dest.cell.some(tile => tile.type.is_actor && tile !== actor))
|
||||
continue;
|
||||
|
||||
// Physically move the actor to the new teleporter
|
||||
// XXX lynx treats this as a slide and does it in a pass in the main loop
|
||||
// XXX not especially undo-efficient
|
||||
// FIXME the new aggressive move checker could help here!
|
||||
this.remove_tile(actor);
|
||||
this.add_tile(actor, dest.cell);
|
||||
|
||||
// FIXME teleport overrides... also allow block slapping... seems like horizontal
|
||||
// wins...
|
||||
|
||||
// Red and green teleporters attempt to spit you out in every direction before
|
||||
// giving up on a destination (but not if you return to the original).
|
||||
// Note that we use actor.direction here (rather than original_direction) because
|
||||
|
||||
@ -2058,8 +2058,9 @@ const TILE_TYPES = {
|
||||
dynamite_lit: {
|
||||
draw_layer: DRAW_LAYERS.item,
|
||||
is_actor: true,
|
||||
// FIXME collision?
|
||||
// FIXME kills player on touch
|
||||
is_monster: true,
|
||||
// FIXME ???????
|
||||
collision_mask: COLLISION.block_cc2,
|
||||
// FIXME inherits a copy of player's inventory!
|
||||
// FIXME holds down buttons, so needs an on_arrive
|
||||
// FIXME speaking of buttons, destroyed actors should on_depart
|
||||
@ -2155,14 +2156,18 @@ const TILE_TYPES = {
|
||||
draw_layer: DRAW_LAYERS.actor,
|
||||
is_actor: true,
|
||||
has_inventory: true,
|
||||
// FIXME collision...?
|
||||
// FIXME ???????
|
||||
collision_mask: COLLISION.block_cc2,
|
||||
// FIXME do i start moving immediately when dropped, or next turn?
|
||||
movement_speed: 4,
|
||||
decide_movement(me, level) {
|
||||
return [me.direction];
|
||||
},
|
||||
// FIXME feel like this should be on_blocked?
|
||||
// FIXME specific case for player!
|
||||
on_bump(me, level, other) {
|
||||
if (me.slide_mode)
|
||||
return;
|
||||
if (other.type.is_actor) {
|
||||
level.transmute_tile(me, 'explosion');
|
||||
level.transmute_tile(other, 'explosion');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user