extern void discharge_minion(void);
extern void kawarimi(bool success);
extern bool rush_attack(bool *mdeath);
+extern void remove_all_mirrors(bool explode);
/* spells3.c */
extern bool teleport_away(int m_idx, int dis, bool dec_valour);
/* Preserve pets and prepare to take these to next floor */
preserve_pet();
+ /* Remove all mirrors without explosion */
+ remove_all_mirrors(FALSE);
+
/* New floor is not yet prepared */
new_floor_id = 0;
{
if (command == -3)
{
- int x, y;
- for (x = 0; x < cur_wid; x++)
- {
- for (y = 0; y < cur_hgt; y++)
- {
- if (is_mirror_grid(&cave[y][x]))
- {
- remove_mirror(y, x);
- project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
- (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
- }
- }
- }
+ /* Explode all mirrors */
+ remove_all_mirrors(TRUE);
}
else if (command == -4)
{
if (mdeath) *mdeath = tmp_mdeath;
return TRUE;
}
+
+
+/*
+ * Remove all mirrors in this floor
+ */
+void remove_all_mirrors(bool explode)
+{
+ int x, y;
+
+ for (x = 0; x < cur_wid; x++)
+ {
+ for (y = 0; y < cur_hgt; y++)
+ {
+ if (is_mirror_grid(&cave[y][x]))
+ {
+ remove_mirror(y, x);
+ if (explode)
+ project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
+ (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
+ }
+ }
+ }
+}