diff --git a/games/boybomb.p8 b/games/boybomb.p8 index e475aeb..5bd16b9 100644 --- a/games/boybomb.p8 +++ b/games/boybomb.p8 @@ -286,17 +286,26 @@ function process_block(x, y) add_explosion(x, y, {4, 15}) -- wood puzzle_grid[y][x] = GRID_EXPLODE elseif block == GRID_EXPLODE then + local ys = {0} + local xs = {0} if y > 1 then - explosion_adjacent(x, y-1) + add(ys, -1) end if y < GRID_H then - explosion_adjacent(x, y+1) + add(ys, 1) end if x > 1 then - explosion_adjacent(x-1, y) + add(xs, -1) end if x < GRID_W then - explosion_adjacent(x+1, y) + add(xs, 1) + end + for xx in all(xs) do + for yy in all(ys) do + if xx~=0 or yy~=0 then + explosion_adjacent(x+xx, y+yy) + end + end end puzzle_grid[y][x] = 0 end