From ed09e682baaae8193906b596bb8b39375096d20c Mon Sep 17 00:00:00 2001 From: nothere Date: Sun, 31 Aug 2003 08:06:15 +0000 Subject: [PATCH] =?utf8?q?=E3=83=AD=E3=83=AC=E3=83=B3=E3=83=88=E3=81=AE?= =?utf8?q?=E6=89=8B=E6=A6=B4=E5=BC=BE=E3=81=B0=E3=82=89=E6=92=92=E3=81=8D?= =?utf8?q?=E3=81=A7=E6=95=91=E6=8F=B4=E5=8F=AC=E5=96=9A=E3=81=8C=E3=83=A9?= =?utf8?q?=E3=83=BC=E3=83=8B=E3=83=B3=E3=82=B0=E3=81=A7=E3=81=8D=E3=82=8B?= =?utf8?q?=E3=81=AE=E3=81=AF=E3=81=8A=E3=81=8B=E3=81=97=E3=81=84=E7=AD=89?= =?utf8?q?=E3=81=AE=20=E7=90=86=E7=94=B1=E3=81=AB=E3=82=88=E3=82=8A,=20?= =?utf8?q?=E6=89=8B=E6=A6=B4=E5=BC=BE=E3=81=B0=E3=82=89=E6=92=92=E3=81=8D?= =?utf8?q?=E3=82=92=E6=95=91=E6=8F=B4=E5=8F=AC=E5=96=9A=E3=81=8B=E3=82=89?= =?utf8?q?=E7=89=B9=E6=AE=8A=E3=81=AA=E8=A1=8C=E5=8B=95=E3=81=AB=E7=A7=BB?= =?utf8?q?=E8=BB=A2.=20=E5=8F=8D=E9=AD=94=E6=B3=95=E3=81=AE=E6=B4=9E=20?= =?utf8?q?=E7=AA=9F=E3=81=A7=E3=82=82=E4=BD=BF=E7=94=A8=E3=81=A7=E3=81=8D?= =?utf8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=AA=E3=82=8B.=20?= =?utf8?q?=E3=83=9A=E3=83=83=E3=83=88=E5=8F=AC=E5=96=9A=E3=81=AE=E5=B7=BB?= =?utf8?q?=E7=89=A9=E7=AD=89=E3=81=A7=E3=83=9A=E3=83=83=E3=83=88=E3=81=AB?= =?utf8?q?=E3=81=AA=E3=81=A3=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AE=20?= =?utf8?q?=E6=89=8B=E6=A6=B4=E5=BC=BE=E3=81=B0=E3=82=89=E6=92=92=E3=81=8D?= =?utf8?q?=E3=81=AE=E4=BD=BF=E7=94=A8=E6=9D=A1=E4=BB=B6=E3=81=AF=20"?= =?utf8?q?=E6=94=BB=E6=92=83=E9=AD=94=E6=B3=95=E8=A8=B1=E5=8F=AF"=20?= =?utf8?q?=E3=81=8B=E3=81=A4=20"=E5=8F=AC=E5=96=9A=E9=AD=94=E6=B3=95?= =?utf8?q?=E8=A8=B1=E5=8F=AF"=20=E3=81=A7=E3=81=82=E3=82=8B=20=E3=81=93?= =?utf8?q?=E3=81=A8=E3=81=A8=E3=81=97=E3=81=9F.=20=E3=81=AA=E3=81=8A,=20?= =?utf8?q?=E4=BB=A5=E4=B8=8B=E3=81=AE=E5=A4=89=E6=9B=B4=E3=82=92=E5=90=AB?= =?utf8?q?=E3=82=80.=20*=20=E6=95=91=E6=8F=B4=E5=8F=AC=E5=96=9A=E3=81=AEID?= =?utf8?q?=E5=88=86=E5=B2=90=E3=82=92switch=E6=96=87=E3=81=A7=E6=95=B4?= =?utf8?q?=E7=90=86.=20*=20=E3=83=A2=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=BC?= =?utf8?q?=E5=90=8C=E5=A3=AB=E3=81=AE=E6=88=A6=E3=81=84=E3=81=A7=E3=81=AE?= =?utf8?q?=E3=80=8E=E6=B7=B7=E6=B2=8C=E3=81=AE=E3=82=B5=E3=83=BC=E3=83=9A?= =?utf8?q?=E3=83=B3=E3=83=88=E3=80=8F,=20=E3=82=B5=E3=83=BC=E3=83=9A?= =?utf8?q?=E3=83=B3=E3=83=88=E3=83=BB=E3=82=BE=E3=83=B3=E3=83=93=E3=81=AE?= =?utf8?q?=20=20=20=E3=83=80=E3=83=B3=E3=82=B8=E3=83=A7=E3=83=B3=E3=81=AE?= =?utf8?q?=E4=B8=BB=E5=8F=AC=E5=96=9A=E6=99=82=E3=81=AB,=20=E3=83=9F?= =?utf8?q?=E3=83=89=E3=82=AC=E3=83=AB=E3=83=89=E3=81=AE=E5=A4=A7=E8=9B=87?= =?utf8?q?=E3=80=8E=E3=83=A8=E3=83=AB=E3=83=A0=E3=83=B3=E3=82=AC=E3=83=B3?= =?utf8?q?=E3=83=89=E3=80=8F=E7=94=9F=E5=AD=98=E6=99=82=E3=81=AF=20=20=20?= =?utf8?q?=E5=AF=BE=E3=83=97=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=81=AE?= =?utf8?q?=E6=99=82=E5=90=8C=E6=A7=98=E3=81=AB1/6=E3=81=A7=E6=B0=B4?= =?utf8?q?=E3=81=8C=E5=90=B9=E3=81=8D=E5=87=BA=E3=82=8B=E3=82=88=E3=81=86?= =?utf8?q?=E3=81=AB=E5=A4=89=E6=9B=B4.=20*=20=E7=8E=8B=E8=9F=B2=E3=81=8C?= =?utf8?q?=E9=AD=94=E6=B3=95=E3=81=A8=E3=81=97=E3=81=A6=E7=89=B9=E6=AE=8A?= =?utf8?q?=E3=81=AA=E8=A1=8C=E5=8B=95=E3=82=92=E9=81=B8=E3=81=B6=E3=82=B3?= =?utf8?q?=E3=83=BC=E3=83=89=E3=81=8C=E6=AE=8B=E3=81=A3=E3=81=A6=E3=81=84?= =?utf8?q?=E3=81=9F=E3=81=AE=E3=81=A7=E5=89=8A=E9=99=A4.=20*=20=E3=82=B3?= =?utf8?q?=E3=83=A1=E3=83=B3=E3=83=88=E3=81=A7,=20"RF6=5FSUMMON=5FKIN"=20-?= =?utf8?q?>=20"RF6=5FS=5FKIN".?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/mspells1.c | 175 ++++++++++++++++++++++++++++++++------------------------- src/mspells2.c | 164 ++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 211 insertions(+), 128 deletions(-) diff --git a/src/mspells1.c b/src/mspells1.c index e055943e8..a5a851612 100644 --- a/src/mspells1.c +++ b/src/mspells1.c @@ -1051,16 +1051,17 @@ static int choose_attack_spell(int m_idx, byte spells[], byte num) if (special_num) { bool success = FALSE; - switch(m_ptr->r_idx) + switch (m_ptr->r_idx) { case MON_OHMU: - if (randint0(100) < 50) success = TRUE; + case MON_BANOR: + case MON_LUPART: break; case MON_BANORLUPART: if (randint0(100) < 70) success = TRUE; break; - case MON_BANOR: - case MON_LUPART: + case MON_ROLENTO: + if (randint0(100) < 40) success = TRUE; break; default: if (randint0(100) < 50) success = TRUE; @@ -1450,6 +1451,8 @@ bool make_attack_spell(int m_idx) f4 &= ~(RF4_SUMMON_MASK); f5 &= ~(RF5_SUMMON_MASK); f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL); + + if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL); } /* No spells left */ @@ -1488,6 +1491,15 @@ bool make_attack_spell(int m_idx) f6 &= ~(RF6_RAISE_DEAD); } + /* Special moves restriction */ + if (f6 & RF6_SPECIAL) + { + if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(y, x)) + { + f6 &= ~(RF6_SPECIAL); + } + } + /* No spells left */ if (!f4 && !f5 && !f6) return (FALSE); } @@ -3485,7 +3497,7 @@ msg_format("%^s int k; disturb(1, 0); - switch(m_ptr->r_idx) + switch (m_ptr->r_idx) { case MON_OHMU: /* Moved to process_monster(), like multiplication */ @@ -3515,8 +3527,9 @@ msg_format("%^s break; } - case MON_BANOR: - case MON_LUPART: + + case MON_BANOR: + case MON_LUPART: { int dummy_hp = 0; int dummy_maxhp = 0; @@ -3551,6 +3564,30 @@ msg_format("%^s break; } + case MON_ROLENTO: +#ifdef JP + if (blind) msg_format("%^s¤¬²¿¤«ÂçÎ̤ËÅꤲ¤¿¡£", m_name); + else msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", m_name); +#else + if (blind) msg_format("%^s spreads something.", m_name); + else msg_format("%^s throws some hand grenades.", m_name); +#endif + + { + int num = 1 + randint1(3); + + for (k = 0; k < num; k++) + { + count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, mode); + } + } +#ifdef JP + if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¤Ð¤é¤Þ¤«¤ì¤ë²»¤¬¤¹¤ë¡£"); +#else + if (blind && count) msg_print("You hear many things are scattered nearby."); +#endif + break; + default: if (r_ptr->d_char == 'B') { @@ -3831,25 +3868,11 @@ else msg_format("%^s break; } - /* RF6_SUMMON_KIN */ + /* RF6_S_KIN */ case 160+16: { disturb(1, 0); - if (m_ptr->r_idx == MON_ROLENTO) - { -#ifdef JP - if (blind) - msg_format("%^s¤¬²¿¤«ÂçÎ̤ËÅꤲ¤¿¡£", m_name); - else - msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", m_name); -#else - if (blind) - msg_format("%^s spreads something.", m_name); - else - msg_format("%^s throws some hand grenades.", m_name); -#endif - } - else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) + if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) { #ifdef JP if (blind) @@ -3884,85 +3907,87 @@ else msg_format("%^s #endif } - if(m_ptr->r_idx == MON_ROLENTO) - { - int num = 1 + randint1(3); - - for (k = 0; k < num; k++) - { - count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, mode); - } - } - else if(m_ptr->r_idx == MON_THORONDOR || - m_ptr->r_idx == MON_GWAIHIR || - m_ptr->r_idx == MON_MENELDOR) - { - int num = 4 + randint1(3); - for (k = 0; k < num; k++) - { - count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE)); - } - } - else if(m_ptr->r_idx == MON_LOUSY) + switch (m_ptr->r_idx) { - int num = 2 + randint1(3); - for (k = 0; k < num; k++) + case MON_MENELDOR: + case MON_GWAIHIR: + case MON_THORONDOR: { - count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP); - } - } - else if(m_ptr->r_idx == MON_BULLGATES) - { - int num = 2 + randint1(3); - for (k = 0; k < num; k++) - { - count += summon_named_creature(m_idx, y, x, MON_IE, mode); + int num = 4 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE)); + } } - } - else if (m_ptr->r_idx == MON_CALDARM) - { - int num = randint1(3); - for (k = 0; k < num; k++) + break; + + case MON_BULLGATES: { - count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, mode); + int num = 2 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_named_creature(m_idx, y, x, MON_IE, mode); + } } - } - else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) - { - int num = 2 + randint1(3); + break; - if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6)) + case MON_SERPENT: + case MON_ZOMBI_SERPENT: { + int num = 2 + randint1(3); + + if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6)) + { #ifdef JP - msg_print("ÃÏÌ̤«¤é¿å¤¬¿á¤­½Ð¤·¤¿¡ª"); + msg_print("ÃÏÌ̤«¤é¿å¤¬¿á¤­½Ð¤·¤¿¡ª"); #else - msg_print("Water blew off from the ground!"); + msg_print("Water blew off from the ground!"); #endif - fire_ball_hide(GF_WATER_FLOW, 0, 3, 8); + fire_ball_hide(GF_WATER_FLOW, 0, 3, 8); + } + + for (k = 0; k < num; k++) + { + count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE)); + } } + break; - for (k = 0; k < num; k++) + case MON_CALDARM: { - count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE)); + int num = randint1(3); + for (k = 0; k < num; k++) + { + count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, mode); + } } - } - else - { + break; + case MON_LOUSY: + { + int num = 2 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP); + } + } + break; + + default: summon_kin_type = r_ptr->d_char; /* Big hack */ for (k = 0; k < 4; k++) { count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, PM_ALLOW_GROUP); } + break; } #ifdef JP -if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£"); + if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£"); #else if (blind && count) msg_print("You hear many things appear nearby."); #endif - break; } diff --git a/src/mspells2.c b/src/mspells2.c index 985e078e4..4ff208501 100644 --- a/src/mspells2.c +++ b/src/mspells2.c @@ -324,7 +324,8 @@ bool monst_spell_monst(int m_idx) /* Remove unimplemented special moves */ if (f6 & RF6_SPECIAL) { - if (r_ptr->d_char != 'B') f6 &= ~(RF6_SPECIAL); + if ((m_ptr->r_idx != MON_ROLENTO) && (r_ptr->d_char != 'B')) + f6 &= ~(RF6_SPECIAL); } if (in_no_magic_dungeon && !(r_ptr->flags2 & RF2_STUPID)) @@ -339,6 +340,8 @@ bool monst_spell_monst(int m_idx) f4 &= ~(RF4_SUMMON_MASK); f5 &= ~(RF5_SUMMON_MASK); f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL); + + if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL); } if (p_ptr->inside_battle && !one_in_(3)) @@ -452,7 +455,12 @@ bool monst_spell_monst(int m_idx) /* Special moves restriction */ if (f6 & RF6_SPECIAL) { - if (r_ptr->d_char == 'B') + if (m_ptr->r_idx == MON_ROLENTO) + { + if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) != (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) + f6 &= ~(RF6_SPECIAL); + } + else if (r_ptr->d_char == 'B') { if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT)) f6 &= ~(RF6_SPECIAL); @@ -494,6 +502,15 @@ bool monst_spell_monst(int m_idx) /* Remove raise dead spell */ f6 &= ~(RF6_RAISE_DEAD); } + + /* Special moves restriction */ + if (f6 & RF6_SPECIAL) + { + if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(t_ptr->fy, t_ptr->fx)) + { + f6 &= ~(RF6_SPECIAL); + } + } } if (r_ptr->flags2 & RF2_SMART) @@ -3265,6 +3282,39 @@ bool monst_spell_monst(int m_idx) /* Moved to process_monster(), like multiplication */ return FALSE; + case MON_ROLENTO: + if (known) + { + if (see_either) + { + disturb(1, 0); + +#ifdef JP + msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", m_name); +#else + msg_format("%^s throws some hand grenades.", m_name); +#endif + } + else + { + mon_fight = TRUE; + } + } + + { + int num = 1 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, p_mode); + } + } + + if (known && !see_t && count) + { + mon_fight = TRUE; + } + break; + default: if (r_ptr->d_char == 'B') { @@ -3644,7 +3694,7 @@ bool monst_spell_monst(int m_idx) animate_dead(m_idx, m_ptr->fy, m_ptr->fx); break; - /* RF6_SUMMON_KIN */ + /* RF6_S_KIN */ case 160+16: if (known) { @@ -3652,17 +3702,7 @@ bool monst_spell_monst(int m_idx) { disturb(1, 0); - if (m_ptr->r_idx == MON_ROLENTO) - { -#ifdef JP - msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", - m_name); -#else - msg_format("%^s throws some hand grenades.", - m_name); -#endif - } - else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) + if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) { #ifdef JP msg_format("%^s¤¬¥À¥ó¥¸¥ç¥ó¤Î¼ç¤ò¾¤´­¤·¤¿¡£", m_name); @@ -3688,64 +3728,82 @@ bool monst_spell_monst(int m_idx) } } - if(m_ptr->r_idx == MON_ROLENTO) + switch (m_ptr->r_idx) { - int num = 1 + randint1(3); - for (k = 0; k < num; k++) + case MON_MENELDOR: + case MON_GWAIHIR: + case MON_THORONDOR: { - count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, p_mode); + int num = 4 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | p_mode)); + } } - } - else if(m_ptr->r_idx == MON_THORONDOR || - m_ptr->r_idx == MON_GWAIHIR || - m_ptr->r_idx == MON_MENELDOR) - { - int num = 4 + randint1(3); - for (k = 0; k < num; k++) + break; + + case MON_BULLGATES: { - count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | p_mode)); + int num = 2 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_named_creature(m_idx, y, x, MON_IE, p_mode); + } } - } - else if(m_ptr->r_idx == MON_LOUSY) - { - int num = 2 + randint1(3); - for (k = 0; k < num; k++) + break; + + case MON_SERPENT: + case MON_ZOMBI_SERPENT: + if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6)) { - count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP | p_mode)); + if (known && see_t) + { +#ifdef JP + msg_print("ÃÏÌ̤«¤é¿å¤¬¿á¤­½Ð¤·¤¿¡ª"); +#else + msg_print("Water blew off from the ground!"); +#endif + } + project(t_idx, 8, y, x, 3, GF_WATER_FLOW, PROJECT_GRID | PROJECT_HIDE, -1); } - } - else if(m_ptr->r_idx == MON_BULLGATES) - { - int num = 2 + randint1(3); - for (k = 0; k < num; k++) + { - count += summon_named_creature(m_idx, y, x, MON_IE, p_mode); + int num = 2 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE)); + } } - } - else if (m_ptr->r_idx == MON_CALDARM) - { - int num = randint1(3); - for (k = 0; k < num; k++) + break; + + case MON_CALDARM: { - count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, p_mode); + int num = randint1(3); + for (k = 0; k < num; k++) + { + count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, p_mode); + } } - } - else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) - { - int num = 2 + randint1(3); - for (k = 0; k < num; k++) + break; + + case MON_LOUSY: { - count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE)); + int num = 2 + randint1(3); + for (k = 0; k < num; k++) + { + count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP | p_mode)); + } } - } - else - { + break; + + default: summon_kin_type = r_ptr->d_char; for (k = 0; k < 4; k++) { count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, (PM_ALLOW_GROUP | p_mode)); } + break; } if (known && !see_t && count) -- 2.11.0