Disallow pulling unpushable blocks; play a sound on bowling ball collision
This commit is contained in:
parent
1a7dc3e737
commit
d567a2553e
@ -1262,7 +1262,9 @@ export class Level extends LevelInterface {
|
|||||||
if (behind_cell) {
|
if (behind_cell) {
|
||||||
let behind_actor = behind_cell.get_actor();
|
let behind_actor = behind_cell.get_actor();
|
||||||
// FIXME something else happens during cooldown i think
|
// FIXME something else happens during cooldown i think
|
||||||
if (behind_actor && ! behind_actor.movement_cooldown) {
|
if (behind_actor && ! behind_actor.movement_cooldown &&
|
||||||
|
actor.can_push(behind_actor, direction))
|
||||||
|
{
|
||||||
this._set_tile_prop(behind_actor, 'is_pulled', true);
|
this._set_tile_prop(behind_actor, 'is_pulled', true);
|
||||||
this.attempt_out_of_turn_step(behind_actor, direction);
|
this.attempt_out_of_turn_step(behind_actor, direction);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2258,6 +2258,7 @@ const TILE_TYPES = {
|
|||||||
else {
|
else {
|
||||||
level.transmute_tile(other, 'explosion');
|
level.transmute_tile(other, 'explosion');
|
||||||
}
|
}
|
||||||
|
level.sfx.play_once('bomb', me.cell);
|
||||||
level.transmute_tile(me, 'explosion');
|
level.transmute_tile(me, 'explosion');
|
||||||
},
|
},
|
||||||
on_blocked(me, level, direction) {
|
on_blocked(me, level, direction) {
|
||||||
@ -2279,6 +2280,7 @@ const TILE_TYPES = {
|
|||||||
// Sliding bowling balls don't blow up if they hit a regular wall
|
// Sliding bowling balls don't blow up if they hit a regular wall
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
level.sfx.play_once('bomb', me.cell);
|
||||||
level.transmute_tile(me, 'explosion');
|
level.transmute_tile(me, 'explosion');
|
||||||
// Remove our slide mode so we don't attempt to bounce if on ice
|
// Remove our slide mode so we don't attempt to bounce if on ice
|
||||||
level.make_slide(me, null);
|
level.make_slide(me, null);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user