From d72aac886a650021a934e983ab4cf54e43a33666 Mon Sep 17 00:00:00 2001 From: nothere Date: Sun, 29 Jun 2003 14:52:45 +0000 Subject: [PATCH] =?utf8?q?=E3=82=AB=E3=82=AA=E3=82=B9=E9=AD=94=E6=B3=95=20?= =?utf8?q?"=E8=99=9A=E7=84=A1=E5=8F=AC=E6=9D=A5"=20=E3=81=AE*=E7=A0=B4?= =?utf8?q?=E5=A3=8A*=E3=83=A2=E3=83=BC=E3=83=89=E6=99=82=E3=81=AB,=201/666?= =?utf8?q?=E3=81=A7=E3=83=95=E3=83=AD=E3=82=A2=E5=85=A8=E3=81=A6=E3=81=AE?= =?utf8?q?=E6=B0=B8=E4=B9=85=E5=B2=A9=E4=BB=A5=20=E5=A4=96=E3=81=AE?= =?utf8?q?=E5=A3=81=E3=81=8C=E5=BA=8A=E3=81=AB=E5=A4=89=E3=82=8F=E3=81=A3?= =?utf8?q?=E3=81=A6=E5=B7=A8=E5=A4=A7=E3=81=AA=E3=82=A2=E3=83=AA=E3=83=BC?= =?utf8?q?=E3=83=8A=E3=81=AB=E3=81=AA=E3=82=8A,=20=E3=83=95=E3=83=AD?= =?utf8?q?=E3=82=A2=E4=B8=AD=E3=81=AE=E3=83=A2=E3=83=B3=E3=82=B9=E3=82=BF?= =?utf8?q?=E3=83=BC=E3=81=8C=E8=B5=B7=E3=81=8D=20=E3=82=8B=E5=8A=B9?= =?utf8?q?=E6=9E=9C=E3=81=8C=E7=99=BA=E5=8B=95=E3=81=99=E3=82=8B=E3=82=88?= =?utf8?q?=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/spells3.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 149 insertions(+), 7 deletions(-) diff --git a/src/spells3.c b/src/spells3.c index 6267120b5..6ccdd6a69 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -1430,6 +1430,139 @@ msg_print("° } +/* + * Determine if a "feature" is a "vanishable" + * Non-permanent walls, trees, mountains, or doors + */ +#define vanishable_feat(F) \ + ((!feat_floor(F) && (((F) < FEAT_PERM_EXTRA) || ((F) > FEAT_PERM_SOLID))) || \ + ((F) == FEAT_OPEN) || ((F) == FEAT_BROKEN)) + +/* + * Vanish all walls in this floor + */ +static bool vanish_dungeon(void) +{ + int y, x; + cave_type *c_ptr; + monster_type *m_ptr; + char m_name[80]; + byte feat; + + /* Prevent vasishing of quest levels and town */ + if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level) + { + return FALSE; + } + + /* Scan all normal grids */ + for (y = 1; y < cur_hgt - 1; y++) + { + for (x = 1; x < cur_wid - 1; x++) + { + c_ptr = &cave[y][x]; + + /* Seeing true feature code (ignore mimic) */ + feat = c_ptr->feat; + + /* Lose room and vault */ + c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY); + + /* Awake monster */ + if (c_ptr->m_idx) + { + m_ptr = &m_list[c_ptr->m_idx]; + + /* Reset sleep counter */ + m_ptr->csleep = 0; + + /* Notice the "waking up" */ + if (m_ptr->ml) + { + /* Acquire the monster name */ + monster_desc(m_name, m_ptr, 0); + + /* Dump a message */ +#ifdef JP + msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name); +#else + msg_format("%^s wakes up.", m_name); +#endif + + /* Redraw the health bar */ + if (p_ptr->health_who == c_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH); + if (p_ptr->riding == c_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH); + } + } + + /* Process all walls, doors and patterns */ + if (vanishable_feat(feat) || pattern_tile(y, x)) + { + /* Create floor */ + cave_set_feat(y, x, floor_type[randint0(100)]); + } + } + } + + /* Special boundary walls -- Top and bottom */ + for (x = 0; x < cur_wid; x++) + { + c_ptr = &cave[0][x]; + + /* Lose room and vault */ + c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY); + + /* Set boundary mimic if needed */ + if (c_ptr->mimic && vanishable_feat(c_ptr->mimic)) c_ptr->mimic = floor_type[randint0(100)]; + + c_ptr = &cave[cur_hgt - 1][x]; + + /* Lose room and vault */ + c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY); + + /* Set boundary mimic if needed */ + if (c_ptr->mimic && vanishable_feat(c_ptr->mimic)) c_ptr->mimic = floor_type[randint0(100)]; + } + + /* Special boundary walls -- Left and right */ + for (y = 1; y < (cur_hgt - 1); y++) + { + c_ptr = &cave[y][0]; + + /* Lose room and vault */ + c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY); + + /* Set boundary mimic if needed */ + if (c_ptr->mimic && vanishable_feat(c_ptr->mimic)) c_ptr->mimic = floor_type[randint0(100)]; + + c_ptr = &cave[y][cur_wid - 1]; + + /* Lose room and vault */ + c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY); + + /* Set boundary mimic if needed */ + if (c_ptr->mimic && vanishable_feat(c_ptr->mimic)) c_ptr->mimic = floor_type[randint0(100)]; + } + + /* Mega-Hack -- Forget the view and lite */ + p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE); + + /* Update stuff */ + p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE); + + /* Update the monsters */ + p_ptr->update |= (PU_MONSTERS); + + /* Redraw map */ + p_ptr->redraw |= (PR_MAP); + + /* Window stuff */ + p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON); + + return TRUE; +} + + void call_the_(void) { int i; @@ -1489,21 +1622,30 @@ void call_the_(void) msg_print("There is a loud explosion!"); #endif - - if (destroy_area(py, px, 15 + p_ptr->lev + randint0(11), FALSE)) + if (one_in_(666)) + { #ifdef JP - msg_print("¥À¥ó¥¸¥ç¥ó¤¬Êø²õ¤·¤¿..."); + if (!vanish_dungeon()) msg_print("¥À¥ó¥¸¥ç¥ó¤Ï°ì½ÖÀŤޤêÊ֤ä¿¡£"); #else - msg_print("The dungeon collapses..."); + if (!vanish_dungeon()) msg_print("The dungeon silences a moment."); #endif - + } else + { + if (destroy_area(py, px, 15 + p_ptr->lev + randint0(11), FALSE)) #ifdef JP - msg_print("¥À¥ó¥¸¥ç¥ó¤ÏÂ礭¤¯Íɤ줿¡£"); + msg_print("¥À¥ó¥¸¥ç¥ó¤¬Êø²õ¤·¤¿..."); #else - msg_print("The dungeon trembles."); + msg_print("The dungeon collapses..."); #endif + else +#ifdef JP + msg_print("¥À¥ó¥¸¥ç¥ó¤ÏÂ礭¤¯Íɤ줿¡£"); +#else + msg_print("The dungeon trembles."); +#endif + } #ifdef JP take_hit(DAMAGE_NOESCAPE, 100 + randint1(150), "¼«»¦Åª¤Êµõ̵¾·Íè", -1); -- 2.11.0