|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: single.c,v 1.82 2004/12/26 04:19:20 stpohle Exp $ */
|
|
|
|
/* $Id: single.c,v 1.83 2005/01/30 16:53:37 stpohle Exp $ */
|
|
|
|
/* single player */
|
|
|
|
/* single player */
|
|
|
|
|
|
|
|
|
|
|
|
#include "basic.h"
|
|
|
|
#include "basic.h"
|
|
|
@ -265,18 +265,20 @@ ai_bombpoints (_point pos, int range)
|
|
|
|
|
|
|
|
|
|
|
|
for (r = 0;
|
|
|
|
for (r = 0;
|
|
|
|
(r < range
|
|
|
|
(r < range
|
|
|
|
&& (map.field[p.x][p.y].type == FT_nothing
|
|
|
|
&& (p.x >= 0 && p.x < map.size.x && p.y >= 0 && p.y < map.size.y)
|
|
|
|
|| map.field[p.x][p.y].type == FT_tunnel)); r++) {
|
|
|
|
&& (map.field[p.x][p.y].type == FT_nothing || map.field[p.x][p.y].type == FT_tunnel)); r++) {
|
|
|
|
p.x += dir_change[d].x;
|
|
|
|
p.x += dir_change[d].x;
|
|
|
|
p.y += dir_change[d].y;
|
|
|
|
p.y += dir_change[d].y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (map.field[p.x][p.y].type != FT_nothing && map.field[p.x][p.y].type != FT_tunnel
|
|
|
|
if ((p.x >= 0 && p.x < map.size.x && p.y >= 0 && p.y < map.size.y)
|
|
|
|
|
|
|
|
&& map.field[p.x][p.y].type != FT_nothing && map.field[p.x][p.y].type != FT_tunnel
|
|
|
|
&& (map.field[p.x][p.y].type != FT_block || map.field[p.x][p.y].type == FT_shoe
|
|
|
|
&& (map.field[p.x][p.y].type != FT_block || map.field[p.x][p.y].type == FT_shoe
|
|
|
|
|| map.field[p.x][p.y].type == FT_bomb || map.field[p.x][p.y].type == FT_fire))
|
|
|
|
|| map.field[p.x][p.y].type == FT_bomb || map.field[p.x][p.y].type == FT_fire))
|
|
|
|
points++;
|
|
|
|
points++;
|
|
|
|
if (map.field[p.x][p.y].type == FT_shoe || map.field[p.x][p.y].type == FT_bomb ||
|
|
|
|
if ((p.x >= 0 && p.x < map.size.x && p.y >= 0 && p.y < map.size.y)
|
|
|
|
map.field[p.x][p.y].type == FT_fire)
|
|
|
|
&& (map.field[p.x][p.y].type == FT_shoe || map.field[p.x][p.y].type == FT_bomb ||
|
|
|
|
|
|
|
|
map.field[p.x][p.y].type == FT_fire))
|
|
|
|
points += 2;
|
|
|
|
points += 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|