… | |
… | |
1292 | unordered_mapwalk (op, -range, -range, range, range) |
1292 | unordered_mapwalk (op, -range, -range, range, range) |
1293 | { |
1293 | { |
1294 | mapspace &ms = m->at (nx, ny); |
1294 | mapspace &ms = m->at (nx, ny); |
1295 | |
1295 | |
1296 | if (ms.flags () & P_IS_ALIVE) |
1296 | if (ms.flags () & P_IS_ALIVE) |
1297 | for (object *tmp = ms.bot; tmp; tmp = tmp->above) |
1297 | for (object *next, *tmp = ms.bot; tmp; tmp = next) |
|
|
1298 | { |
|
|
1299 | next = tmp->above; |
|
|
1300 | |
1298 | if (tmp->flag [FLAG_ALIVE] || tmp->is_player ()) |
1301 | if (tmp->flag [FLAG_ALIVE] || tmp->is_player ()) |
1299 | { |
1302 | { |
1300 | tmp = tmp->head_ (); |
1303 | tmp = tmp->head_ (); |
1301 | |
1304 | |
1302 | if ((friendly && !tmp->flag [FLAG_FRIENDLY] && !tmp->is_player ()) |
1305 | if ((friendly && !tmp->flag [FLAG_FRIENDLY] && !tmp->is_player ()) |
1303 | || (!friendly && (tmp->flag [FLAG_FRIENDLY] || tmp->is_player ()))) |
1306 | || (!friendly && (tmp->flag [FLAG_FRIENDLY] || tmp->is_player ()))) |
1304 | { |
1307 | { |
1305 | if (spell_ob->subtype == SP_DESTRUCTION) |
1308 | if (spell_ob->subtype == SP_DESTRUCTION) |
1306 | { |
1309 | { |
1307 | hit_player (tmp, dam, op, spell_ob->attacktype, 0); |
1310 | hit_player (tmp, dam, op, spell_ob->attacktype, 0); |
1308 | |
1311 | |
1309 | if (spell_ob->other_arch) |
1312 | if (spell_ob->other_arch) |
1310 | m->insert (spell_ob->other_arch->instance (), nx, ny, op); |
1313 | m->insert (spell_ob->other_arch->instance (), nx, ny, op); |
1311 | } |
1314 | } |
1312 | else if (spell_ob->subtype == SP_FAERY_FIRE && tmp->resist [ATNR_MAGIC] != 100) |
1315 | else if (spell_ob->subtype == SP_FAERY_FIRE && tmp->resist [ATNR_MAGIC] != 100) |
1313 | { |
1316 | { |
1314 | if (make_object_glow (tmp, 1, dur) && spell_ob->other_arch) |
1317 | if (make_object_glow (tmp, 1, dur) && spell_ob->other_arch) |
1315 | m->insert (spell_ob->other_arch->instance (), nx, ny, op); |
1318 | m->insert (spell_ob->other_arch->instance (), nx, ny, op); |
1316 | } |
1319 | } |
1317 | } |
1320 | } |
1318 | } |
1321 | } |
|
|
1322 | } |
1319 | } |
1323 | } |
1320 | |
1324 | |
1321 | op->skill = skill; |
1325 | op->skill = skill; |
1322 | return 1; |
1326 | return 1; |
1323 | } |
1327 | } |