From 1f8ed184105e789ec203b8f5cd130d1a5cc17147 Mon Sep 17 00:00:00 2001 From: nothere Date: Sat, 7 Jun 2003 15:13:07 +0000 Subject: [PATCH] =?utf8?q?monster=5Fdeath()=E3=81=AE=E6=95=B4=E7=90=86?= =?utf8?q?=E3=81=A8=E5=A4=89=E6=9B=B4.=20*=20=E3=83=A2=E3=83=B3=E3=82=B9?= =?utf8?q?=E3=82=BF=E3=83=BC=E5=9B=BA=E6=9C=89=E3=81=AE=E3=82=A2=E3=82=A4?= =?utf8?q?=E3=83=86=E3=83=A0=E3=82=84=E3=82=A2=E3=83=BC=E3=83=86=E3=82=A3?= =?utf8?q?=E3=83=95=E3=82=A1=E3=82=AF=E3=83=88,=20=E5=8F=8A=E3=81=B3?= =?utf8?q?=E3=82=AC=E3=83=BC=E3=83=87=E3=82=A3=E3=82=A2=E3=83=B3=E3=81=AE?= =?utf8?q?=E5=9B=BA=E5=AE=9A=20=20=20=E5=A0=B1=E9=85=AC=E3=82=92=E8=90=BD?= =?utf8?q?=E3=81=A8=E3=81=99=E6=9D=A1=E4=BB=B6=E3=82=92=E3=81=BE=E3=81=A8?= =?utf8?q?=E3=82=81=E7=9B=B4=E3=81=97,=20drop=5Fitem=E3=81=8CTRUE=E3=81=8B?= =?utf8?q?=E3=81=A4=E9=9D=9E=E3=82=AF=E3=83=AD=E3=83=BC=E3=83=B3=E3=81=8B?= =?utf8?q?=E3=81=A4=E3=82=A2=20=20=20=E3=83=AA=E3=83=BC=E3=83=8A=E5=A4=96?= =?utf8?q?=E3=81=8B=E3=81=A4=E3=83=A2=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=BC?= =?utf8?q?=E6=A0=BC=E9=97=98=E5=A0=B4=E3=81=AE=E5=A4=96=E3=81=8B=E3=81=A4?= =?utf8?q?=E3=83=9A=E3=83=83=E3=83=88=E3=81=A7=E3=81=AA=E3=81=84=E3=81=93?= =?utf8?q?=E3=81=A8=E3=81=A8=E3=81=97=E3=81=9F.=20*=20=E3=81=AA=E3=81=BE?= =?utf8?q?=E3=81=91=E3=82=82=E3=81=AE=E3=81=A7=E3=81=AE=E4=B8=89=E7=A8=AE?= =?utf8?q?=E3=81=AE=E7=A5=9E=E5=99=A8=E3=81=AE=E7=94=9F=E6=88=90=E3=82=B3?= =?utf8?q?=E3=83=BC=E3=83=89=E3=82=92=E3=83=A2=E3=83=B3=E3=82=B9=E3=82=BF?= =?utf8?q?=E3=83=BC=E3=81=AE=E5=9B=BA=E6=9C=89=E3=82=A2=E3=83=BC=E3=83=86?= =?utf8?q?=E3=82=A3=E3=83=95=E3=82=A1=20=20=20=E3=82=AF=E3=83=88=E3=81=AE?= =?utf8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=81=A8=E5=88=A5=E6=89=B1=E3=81=84?= =?utf8?q?=E3=81=AB=E3=81=97=E3=81=9F.=20*=20=E3=82=AB=E3=82=AA=E3=82=B9?= =?utf8?q?=E3=83=91=E3=83=88=E3=83=AD=E3=83=B3=E3=81=8B=E3=82=89=E3=81=AE*?= =?utf8?q?=E5=8B=9D=E5=88=A9*=E7=A5=9D=E3=81=84=E3=81=AE=E8=A8=80=E8=91=89?= =?utf8?q?=E3=81=AF=E5=A4=89=E7=95=B0=E3=81=A7=E3=83=91=E3=83=88=E3=83=AD?= =?utf8?q?=E3=83=B3=E3=81=8C=E4=BB=98=E3=81=84=E3=81=A6=E3=81=84=E3=82=8B?= =?utf8?q?=E3=83=97=20=20=20=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=81=AB?= =?utf8?q?=E3=82=82=E4=B8=8E=E3=81=88=E3=82=89=E3=82=8C=E3=82=8B=E3=82=88?= =?utf8?q?=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4.=20*=20=E3=83=AD=E3=83=AC?= =?utf8?q?=E3=83=B3=E3=83=88=E3=81=AE=E8=87=AA=E7=88=86=E3=82=B3=E3=83=BC?= =?utf8?q?=E3=83=89=E3=82=92EXPLODE=E3=81=AE=E3=83=AB=E3=83=BC=E3=83=97?= =?utf8?q?=E3=81=8B=E3=82=89=E5=A4=96=E3=81=97,=20m=5Fptr->r=5Fidx?= =?utf8?q?=E3=81=A7=E5=88=86=E5=B2=90=E3=81=99=20=20=20=E3=82=8B=E9=83=A8?= =?utf8?q?=E5=88=86=E3=81=AB=E5=85=A5=E3=82=8C=E3=81=9F.=20*=20=E5=BF=B5?= =?utf8?q?=E3=81=AE=E3=81=9F=E3=82=81,=20=E3=80=8E=E6=B7=B7=E6=B2=8C?= =?utf8?q?=E3=81=AE=E3=82=B5=E3=83=BC=E3=83=9A=E3=83=B3=E3=83=88=E3=80=8F?= =?utf8?q?=E3=81=AE=E3=82=AF=E3=83=AD=E3=83=BC=E3=83=B3=E3=81=A7=E3=81=AF*?= =?utf8?q?=E5=8B=9D=E5=88=A9*=E3=83=95=E3=83=A9=E3=82=B0=E3=82=92=E7=AB=8B?= =?utf8?q?=E3=81=A6=E3=81=AA=E3=81=84=20=20=20=E3=82=88=E3=81=86=E3=81=AB?= =?utf8?q?=E5=A4=89=E6=9B=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/xtra2.c | 842 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 436 insertions(+), 406 deletions(-) diff --git a/src/xtra2.c b/src/xtra2.c index d9bd8d7d2..a7c2c50df 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -654,6 +654,9 @@ void monster_death(int m_idx, bool drop_item) object_type forge; object_type *q_ptr; + bool drop_chosen_item = drop_item && !cloned && !p_ptr->inside_arena + && !p_ptr->inside_battle && !is_pet(m_ptr); + if (world_monster) world_monster = FALSE; @@ -682,21 +685,14 @@ void monster_death(int m_idx, bool drop_item) /* Let monsters explode! */ for (i = 0; i < 4; i++) { - if ((r_ptr->blow[i].method == RBM_EXPLODE) || (m_ptr->r_idx == MON_ROLENTO)) + if (r_ptr->blow[i].method == RBM_EXPLODE) { int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL; - int typ = GF_MISSILE; + int typ = mbe_info[r_ptr->blow[i].effect].explode_type; int d_dice = r_ptr->blow[i].d_dice; int d_side = r_ptr->blow[i].d_side; int damage = damroll(d_dice, d_side); - if (m_ptr->r_idx == MON_ROLENTO) - { - typ = GF_FIRE; - damage = damroll(20, 10); - } - else typ = mbe_info[r_ptr->blow[i].effect].explode_type; - project(m_idx, 3, y, x, damage, typ, flg, -1); break; } @@ -818,527 +814,562 @@ msg_print(" /* Drop objects being carried */ monster_drop_carried_objects(m_ptr); - /* - * Mega^3-hack: killing a 'Warrior of the Dawn' is likely to - * spawn another in the fallen one's place! - */ - if (m_ptr->r_idx == MON_DAWN && - !(p_ptr->inside_arena || p_ptr->inside_battle)) + switch (m_ptr->r_idx) { - if (!one_in_(7)) + case MON_PINK_HORROR: + /* Pink horrors are replaced with 2 Blue horrors */ + if (!(p_ptr->inside_arena || p_ptr->inside_battle)) { - int wy = py, wx = px; - int attempts = 100; - bool pet = is_pet(m_ptr); + bool notice = FALSE; - do - { - scatter(&wy, &wx, py, px, 20, 0); - } - while (!(in_bounds(wy, wx) && cave_floor_bold(wy, wx)) && --attempts); - - if (attempts > 0) + for (i = 0; i < 2; i++) { + int wy = y, wx = x; + bool pet = is_pet(m_ptr); u32b mode = 0L; + if (pet) mode |= PM_FORCE_PET; - if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode)) + if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode)) { if (player_can_see_bold(wy, wx)) + notice = TRUE; + } + } + + if (notice) #ifdef JP - msg_print("¿·¤¿¤ÊÀï»Î¤¬¸½¤ì¤¿¡ª"); + msg_print("¥Ô¥ó¥¯¡¦¥Û¥é¡¼¤ÏʬÎö¤·¤¿¡ª"); #else - msg_print("A new warrior steps forth!"); + msg_print("The Pink horror divides!"); #endif - - } - } } - } - - /* Pink horrors are replaced with 2 Blue horrors */ - else if (m_ptr->r_idx == MON_PINK_HORROR && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - bool notice = FALSE; + break; - for (i = 0; i < 2; i++) + case MON_BLOODLETTER: + /* Bloodletters of Khorne may drop a blade of chaos */ + if (drop_chosen_item && (randint1(100) < 15)) { - int wy = y, wx = x; - bool pet = is_pet(m_ptr); - u32b mode = 0L; + /* Get local object */ + q_ptr = &forge; - if (pet) mode |= PM_FORCE_PET; + /* Prepare to make a Blade of Chaos */ + object_prep(q_ptr, lookup_kind(TV_SWORD, SV_BLADE_OF_CHAOS)); - if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode)) - { - if (player_can_see_bold(wy, wx)) - notice = TRUE; - } + apply_magic(q_ptr, object_level, FALSE, FALSE, FALSE, FALSE); + + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); } + break; - if (notice) -#ifdef JP - msg_print("¥Ô¥ó¥¯¡¦¥Û¥é¡¼¤ÏʬÎö¤·¤¿¡ª"); -#else - msg_print("The Pink horror divides!"); -#endif + case MON_RAAL: + if (drop_chosen_item && (dun_level > 9)) + { + /* Get local object */ + q_ptr = &forge; - } - /* One more ultra-hack: An Unmaker goes out with a big bang! */ - else if (m_ptr->r_idx == MON_UNMAKER) + /* Wipe the object */ + object_wipe(q_ptr); - { - int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL; - (void)project(m_idx, 6, y, x, 100, GF_CHAOS, flg, -1); - } + /* Activate restriction */ + if ((dun_level > 49) && one_in_(5)) + get_obj_num_hook = kind_is_good_book; + else + get_obj_num_hook = kind_is_book; - /* Bloodletters of Khorne may drop a blade of chaos */ - else if (m_ptr->r_idx == MON_BLOODLETTER && + /* Prepare allocation table */ + get_obj_num_prep(); - (randint1(100) < 15) && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - /* Get local object */ - q_ptr = &forge; - - /* Prepare to make a Blade of Chaos */ - object_prep(q_ptr, lookup_kind(TV_SWORD, SV_BLADE_OF_CHAOS)); + /* Make a book */ + make_object(q_ptr, FALSE, FALSE); - apply_magic(q_ptr, object_level, FALSE, FALSE, FALSE, FALSE); + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + case MON_DAWN: + /* + * Mega^3-hack: killing a 'Warrior of the Dawn' is likely to + * spawn another in the fallen one's place! + */ + if (!p_ptr->inside_arena && !p_ptr->inside_battle) + { + if (!one_in_(7)) + { + int wy = py, wx = px; + int attempts = 100; + bool pet = is_pet(m_ptr); - else if (m_ptr->r_idx == MON_RAAL && - (dun_level > 9) && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - /* Get local object */ - q_ptr = &forge; + do + { + scatter(&wy, &wx, py, px, 20, 0); + } + while (!(in_bounds(wy, wx) && cave_floor_bold(wy, wx)) && --attempts); - /* Wipe the object */ - object_wipe(q_ptr); + if (attempts > 0) + { + u32b mode = 0L; + if (pet) mode |= PM_FORCE_PET; - /* Activate restriction */ - if ((dun_level > 49) && one_in_(5)) - get_obj_num_hook = kind_is_good_book; - else - get_obj_num_hook = kind_is_book; + if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode)) + { + if (player_can_see_bold(wy, wx)) +#ifdef JP + msg_print("¿·¤¿¤ÊÀï»Î¤¬¸½¤ì¤¿¡ª"); +#else + msg_print("A new warrior steps forth!"); +#endif - /* Prepare allocation table */ - get_obj_num_prep(); + } + } + } + } + break; - /* Make a book */ - make_object(q_ptr, FALSE, FALSE); + case MON_UNMAKER: + /* One more ultra-hack: An Unmaker goes out with a big bang! */ + { + int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL; + (void)project(m_idx, 6, y, x, 100, GF_CHAOS, flg, -1); + } + break; - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + case MON_UNICORN_ORD: + case MON_MORGOTH: + case MON_ONE_RING: + /* Reward for "lazy" player */ + if (p_ptr->pseikaku == SEIKAKU_NAMAKE) + { + int a_idx; - else if (m_ptr->r_idx == MON_B_DEATH_SWORD && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - /* Get local object */ - q_ptr = &forge; + if (!drop_chosen_item) break; + do + { + switch (randint0(3)) + { + case 0: + a_idx = ART_NAMAKE_HAMMER; + break; + case 1: + a_idx = ART_NAMAKE_BOW; + break; + case 2: + a_idx = ART_NAMAKE_ARMOR; + break; + } + } + while (a_info[a_idx].cur_num); - /* Prepare to make a broken sword */ - object_prep(q_ptr, lookup_kind(TV_SWORD, randint1(2))); + if (a_info[a_idx].cur_num == 0) + { + /* Create the artifact */ + create_named_art(a_idx, y, x); + a_info[a_idx].cur_num = 1; + } + } + break; - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + case MON_SERPENT: + if (!drop_chosen_item) break; - else if ((r_ptr->d_char == '|') && !(m_ptr->r_idx == MON_STORMBRINGER) && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { /* Get local object */ q_ptr = &forge; - /* Wipe the object */ - object_wipe(q_ptr); - - /* Activate restriction */ - get_obj_num_hook = kind_is_sword; + /* Mega-Hack -- Prepare to make "Grond" */ + object_prep(q_ptr, lookup_kind(TV_HAFTED, SV_GROND)); - /* Prepare allocation table */ - get_obj_num_prep(); + /* Mega-Hack -- Mark this item as "Grond" */ + q_ptr->name1 = ART_GROND; - /* Make a sword */ - make_object(q_ptr, FALSE, FALSE); + /* Mega-Hack -- Actually create "Grond" */ + apply_magic(q_ptr, -1, TRUE, TRUE, TRUE, FALSE); /* Drop it in the dungeon */ (void)drop_near(q_ptr, -1, y, x); - } - else if ((r_ptr->d_char == '(') && (dun_level > 0) && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { /* Get local object */ q_ptr = &forge; - /* Wipe the object */ - object_wipe(q_ptr); - - /* Activate restriction */ - get_obj_num_hook = kind_is_cloak; + /* Mega-Hack -- Prepare to make "Chaos" */ + object_prep(q_ptr, lookup_kind(TV_CROWN, SV_CHAOS)); - /* Prepare allocation table */ - get_obj_num_prep(); + /* Mega-Hack -- Mark this item as "Chaos" */ + q_ptr->name1 = ART_CHAOS; - /* Make a cloak */ - make_object(q_ptr, FALSE, FALSE); + /* Mega-Hack -- Actually create "Chaos" */ + apply_magic(q_ptr, -1, TRUE, TRUE, TRUE, FALSE); /* Drop it in the dungeon */ (void)drop_near(q_ptr, -1, y, x); - } + break; - else if ((r_ptr->d_char == '/') && (dun_level > 4) && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - /* Get local object */ - q_ptr = &forge; + case MON_B_DEATH_SWORD: + if (drop_chosen_item) + { + /* Get local object */ + q_ptr = &forge; - /* Wipe the object */ - object_wipe(q_ptr); + /* Prepare to make a broken sword */ + object_prep(q_ptr, lookup_kind(TV_SWORD, randint1(2))); - /* Activate restriction */ - get_obj_num_hook = kind_is_polearm; + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; - /* Prepare allocation table */ - get_obj_num_prep(); + case MON_A_GOLD: + case MON_A_SILVER: + if (drop_chosen_item && ((m_ptr->r_idx == MON_A_GOLD) || + ((m_ptr->r_idx == MON_A_SILVER) && !((r_ptr->r_pkills + 1) % 5)))) + { + /* Get local object */ + q_ptr = &forge; - /* Make a poleweapon */ - make_object(q_ptr, FALSE, FALSE); + /* Prepare to make a Can of Toys */ + object_prep(q_ptr, lookup_kind(TV_CHEST, SV_CHEST_KANDUME)); - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + apply_magic(q_ptr, object_level, FALSE, FALSE, FALSE, FALSE); - else if ((r_ptr->d_char == '[') && (dun_level > 19) && - !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - /* Get local object */ - q_ptr = &forge; + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; - /* Wipe the object */ - object_wipe(q_ptr); + case MON_ROLENTO: + { + int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL; + (void)project(m_idx, 3, y, x, damroll(20, 10), GF_FIRE, flg, -1); + break; + } + break; - /* Activate restriction */ - get_obj_num_hook = kind_is_armor; + default: + if (!drop_chosen_item) break; - /* Prepare allocation table */ - get_obj_num_prep(); + switch (r_ptr->d_char) + { + case '(': + if (dun_level > 0) + { + /* Get local object */ + q_ptr = &forge; - /* Make a hard armor */ - make_object(q_ptr, FALSE, FALSE); + /* Wipe the object */ + object_wipe(q_ptr); - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + /* Activate restriction */ + get_obj_num_hook = kind_is_cloak; - else if ((m_ptr->r_idx == MON_A_GOLD || (m_ptr->r_idx == MON_A_SILVER && !((r_ptr->r_pkills+1)%5))) && !(p_ptr->inside_arena || p_ptr->inside_battle)) - { - /* Get local object */ - q_ptr = &forge; + /* Prepare allocation table */ + get_obj_num_prep(); - /* Prepare to make a Can of Toys */ - object_prep(q_ptr, lookup_kind(TV_CHEST, SV_CHEST_KANDUME)); + /* Make a cloak */ + make_object(q_ptr, FALSE, FALSE); - apply_magic(q_ptr, object_level, FALSE, FALSE, FALSE, FALSE); + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + case '/': + if (dun_level > 4) + { + /* Get local object */ + q_ptr = &forge; - /* Mega-Hack -- drop "winner" treasures */ - else if (!cloned) - { - if (m_ptr->r_idx == MON_SERPENT) - { - /* Get local object */ - q_ptr = &forge; + /* Wipe the object */ + object_wipe(q_ptr); - /* Mega-Hack -- Prepare to make "Grond" */ - object_prep(q_ptr, lookup_kind(TV_HAFTED, SV_GROND)); + /* Activate restriction */ + get_obj_num_hook = kind_is_polearm; - /* Mega-Hack -- Mark this item as "Grond" */ - q_ptr->name1 = ART_GROND; + /* Prepare allocation table */ + get_obj_num_prep(); - /* Mega-Hack -- Actually create "Grond" */ - apply_magic(q_ptr, -1, TRUE, TRUE, TRUE, FALSE); + /* Make a poleweapon */ + make_object(q_ptr, FALSE, FALSE); - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; - /* Get local object */ - q_ptr = &forge; + case '[': + if (dun_level > 19) + { + /* Get local object */ + q_ptr = &forge; - /* Mega-Hack -- Prepare to make "Chaos" */ - object_prep(q_ptr, lookup_kind(TV_CROWN, SV_CHAOS)); + /* Wipe the object */ + object_wipe(q_ptr); - /* Mega-Hack -- Mark this item as "Chaos" */ - q_ptr->name1 = ART_CHAOS; + /* Activate restriction */ + get_obj_num_hook = kind_is_armor; - /* Mega-Hack -- Actually create "Chaos" */ - apply_magic(q_ptr, -1, TRUE, TRUE, TRUE, FALSE); + /* Prepare allocation table */ + get_obj_num_prep(); - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } - else - { - int a_idx = 0; - int chance = 0; + /* Make a hard armor */ + make_object(q_ptr, FALSE, FALSE); - switch (m_ptr->r_idx) + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; + + case '|': + if (m_ptr->r_idx != MON_STORMBRINGER) { - case MON_OBERON: - if (one_in_(3)) - { - a_idx = ART_JUDGE; - chance = 33; - } - else - { - a_idx = ART_AMBER; - chance = 50; - } - break; + /* Get local object */ + q_ptr = &forge; - case MON_UNICORN_ORD: - case MON_MORGOTH: - case MON_ONE_RING: - if (p_ptr->pseikaku == SEIKAKU_NAMAKE) - { - do - { - switch (randint0(3)) - { - case 0: - a_idx = ART_NAMAKE_HAMMER; - break; - case 1: - a_idx = ART_NAMAKE_BOW; - break; - case 2: - a_idx = ART_NAMAKE_ARMOR; - break; - } - } - while (a_info[a_idx].cur_num); + /* Wipe the object */ + object_wipe(q_ptr); - chance = 100; - } - break; + /* Activate restriction */ + get_obj_num_hook = kind_is_sword; - case MON_GHB: - a_idx = ART_GHB; - chance = 100; - break; + /* Prepare allocation table */ + get_obj_num_prep(); - case MON_STORMBRINGER: - a_idx = ART_STORMBRINGER; - chance = 100; - break; + /* Make a sword */ + make_object(q_ptr, FALSE, FALSE); - case MON_ECHIZEN: - a_idx = ART_CRIMSON; + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } + break; + } + break; + } + + /* Mega-Hack -- drop fixed artifacts */ + if (drop_chosen_item) + { + int a_idx = 0; + int chance = 0; + + switch (m_ptr->r_idx) + { + case MON_OBERON: + if (one_in_(3)) + { + a_idx = ART_JUDGE; + chance = 33; + } + else + { + a_idx = ART_AMBER; chance = 50; - break; + } + break; - case MON_GANDALF: - a_idx = ART_ICANUS; - chance = 20; - break; + case MON_GHB: + a_idx = ART_GHB; + chance = 100; + break; - case MON_OROCHI: - a_idx = ART_KUSANAGI; - chance = 25; - break; + case MON_STORMBRINGER: + a_idx = ART_STORMBRINGER; + chance = 100; + break; - case MON_DWORKIN: - a_idx = ART_JUDGE; - chance = 20; - break; + case MON_ECHIZEN: + a_idx = ART_CRIMSON; + chance = 50; + break; - case MON_SAURON: - if (one_in_(10)) - { - a_idx = ART_POWER; - chance = 100; - } - else - { - a_idx = ART_AHO; - chance = 100; - } - break; + case MON_GANDALF: + a_idx = ART_ICANUS; + chance = 20; + break; - case MON_BRAND: - if (!one_in_(3)) - { - a_idx = ART_BRAND; - chance = 25; - } - else - { - a_idx = ART_WEREWINDLE; - chance = 33; - } - break; + case MON_OROCHI: + a_idx = ART_KUSANAGI; + chance = 25; + break; - case MON_CORWIN: - if (!one_in_(3)) - { - a_idx = ART_GRAYSWANDIR; - chance = 33; - } - else - { - a_idx = ART_CORWIN; - chance = 33; - } - break; + case MON_DWORKIN: + a_idx = ART_JUDGE; + chance = 20; + break; - case MON_SURTUR: - a_idx = ART_TWILIGHT; - chance = 66; - break; + case MON_SAURON: + if (one_in_(10)) + { + a_idx = ART_POWER; + chance = 100; + } + else + { + a_idx = ART_AHO; + chance = 100; + } + break; - case MON_SARUMAN: - a_idx = ART_ELENDIL; + case MON_BRAND: + if (!one_in_(3)) + { + a_idx = ART_BRAND; + chance = 25; + } + else + { + a_idx = ART_WEREWINDLE; chance = 33; - break; - - case MON_FIONA: - a_idx = ART_FIONA; - chance = 50; - break; + } + break; - case MON_JULIAN: - a_idx = ART_JULIAN; - chance = 45; - break; + case MON_CORWIN: + if (!one_in_(3)) + { + a_idx = ART_GRAYSWANDIR; + chance = 33; + } + else + { + a_idx = ART_CORWIN; + chance = 33; + } + break; - case MON_KLING: - a_idx = ART_DESTINY; - chance = 40; - break; + case MON_SURTUR: + a_idx = ART_TWILIGHT; + chance = 66; + break; - case MON_GOEMON: - a_idx = ART_ZANTETSU; - chance = 75; - break; + case MON_SARUMAN: + a_idx = ART_ELENDIL; + chance = 33; + break; - case MON_HAGEN: - a_idx = ART_HAGEN; - chance = 66; - break; + case MON_FIONA: + a_idx = ART_FIONA; + chance = 50; + break; - case MON_CAINE: - a_idx = ART_CAINE; - chance = 50; - break; + case MON_JULIAN: + a_idx = ART_JULIAN; + chance = 45; + break; - case MON_BULLGATES: - a_idx = ART_WINBLOWS; - chance = 66; - break; + case MON_KLING: + a_idx = ART_DESTINY; + chance = 40; + break; - case MON_LUNGORTHIN: - a_idx = ART_CALRIS; - chance = 50; - break; + case MON_GOEMON: + a_idx = ART_ZANTETSU; + chance = 75; + break; - case MON_JACK_SHADOWS: - a_idx = ART_JACK; - chance = 15; - break; + case MON_HAGEN: + a_idx = ART_HAGEN; + chance = 66; + break; - case MON_DIO: - a_idx = ART_STONEMASK; - chance = 20; - break; + case MON_CAINE: + a_idx = ART_CAINE; + chance = 50; + break; - case MON_BELD: - a_idx = ART_SOULCRUSH; - chance = 10; - break; + case MON_BULLGATES: + a_idx = ART_WINBLOWS; + chance = 66; + break; - case MON_PIP: - a_idx = ART_EXCALIBUR_J; - chance = 50; - break; + case MON_LUNGORTHIN: + a_idx = ART_CALRIS; + chance = 50; + break; - case MON_SHUTEN: - a_idx = ART_SHUTEN_DOJI; - chance = 33; - break; + case MON_JACK_SHADOWS: + a_idx = ART_JACK; + chance = 15; + break; - case MON_GOTHMOG: - a_idx = ART_GOTHMOG; - chance = 33; - break; + case MON_DIO: + a_idx = ART_STONEMASK; + chance = 20; + break; - case MON_FUNDIN: - a_idx = ART_FUNDIN; - chance = 5; - break; - } + case MON_BELD: + a_idx = ART_SOULCRUSH; + chance = 10; + break; - if ((a_idx > 0) && ((randint0(100) < chance) || (p_ptr->wizard))) - { - if (a_info[a_idx].cur_num == 0) - { - /* Create the artifact */ - create_named_art(a_idx, y, x); + case MON_PIP: + a_idx = ART_EXCALIBUR_J; + chance = 50; + break; - a_info[a_idx].cur_num = 1; - } - } - } - } + case MON_SHUTEN: + a_idx = ART_SHUTEN_DOJI; + chance = 33; + break; - if ((r_ptr->flags7 & RF7_GUARDIAN) && !p_ptr->inside_battle && (d_info[dungeon_type].final_guardian == m_ptr->r_idx) && !cloned) - { - int k_idx = lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT); /* Acquirement */; + case MON_GOTHMOG: + a_idx = ART_GOTHMOG; + chance = 33; + break; - if (d_info[dungeon_type].final_object) - k_idx = d_info[dungeon_type].final_object; + case MON_FUNDIN: + a_idx = ART_FUNDIN; + chance = 5; + break; + } - if (d_info[dungeon_type].final_artifact) + if ((a_idx > 0) && ((randint0(100) < chance) || p_ptr->wizard)) { - int a_idx = d_info[dungeon_type].final_artifact; if (a_info[a_idx].cur_num == 0) { /* Create the artifact */ create_named_art(a_idx, y, x); - a_info[a_idx].cur_num = 1; - k_idx = 0; } } - if (k_idx) + if ((r_ptr->flags7 & RF7_GUARDIAN) && (d_info[dungeon_type].final_guardian == m_ptr->r_idx)) { - /* Get local object */ - q_ptr = &forge; + int k_idx = lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT); /* Acquirement */; - /* Prepare to make a reward */ - object_prep(q_ptr, k_idx); + if (d_info[dungeon_type].final_object) + k_idx = d_info[dungeon_type].final_object; - apply_magic(q_ptr, object_level, FALSE, TRUE, FALSE, FALSE); + if (d_info[dungeon_type].final_artifact) + { + int a_idx = d_info[dungeon_type].final_artifact; + if (a_info[a_idx].cur_num == 0) + { + /* Create the artifact */ + create_named_art(a_idx, y, x); - /* Drop it in the dungeon */ - (void)drop_near(q_ptr, -1, y, x); - } + a_info[a_idx].cur_num = 1; + k_idx = 0; + } + } + + if (k_idx) + { + /* Get local object */ + q_ptr = &forge; + + /* Prepare to make a reward */ + object_prep(q_ptr, k_idx); + + apply_magic(q_ptr, object_level, FALSE, TRUE, FALSE, FALSE); + + /* Drop it in the dungeon */ + (void)drop_near(q_ptr, -1, y, x); + } #ifdef JP - msg_format("¤¢¤Ê¤¿¤Ï%s¤òÀ©ÇƤ·¤¿¡ª",d_name+d_info[dungeon_type].name); + msg_format("¤¢¤Ê¤¿¤Ï%s¤òÀ©ÇƤ·¤¿¡ª",d_name+d_info[dungeon_type].name); #else - msg_format("You have conquered %s!",d_name+d_info[dungeon_type].name); + msg_format("You have conquered %s!",d_name+d_info[dungeon_type].name); #endif + } } /* Determine how much we can drop */ @@ -1414,7 +1445,7 @@ msg_print(" if (p_ptr->inside_battle) return; /* Winner? */ - if (m_ptr->r_idx == MON_SERPENT) + if ((m_ptr->r_idx == MON_SERPENT) && !cloned) { /* Total winner */ p_ptr->total_winner = TRUE; @@ -1428,7 +1459,7 @@ msg_print(" do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "become *WINNER* of Hengband finely!"); #endif - if (p_ptr->pclass == CLASS_CHAOS_WARRIOR) + if ((p_ptr->pclass == CLASS_CHAOS_WARRIOR) || (p_ptr->muta2 & MUT2_CHAOS_GIFT)) { #ifdef JP msg_format("%s¤«¤é¤ÎÀ¼¤¬¶Á¤¤¤¿¡£", chaos_patrons[p_ptr->chaos_patron]); @@ -1441,23 +1472,22 @@ msg_print(" /* Congratulations */ #ifdef JP -msg_print("*** ¤ª¤á¤Ç¤È¤¦ ***"); + msg_print("*** ¤ª¤á¤Ç¤È¤¦ ***"); #else msg_print("*** CONGRATULATIONS ***"); #endif #ifdef JP -msg_print("¤¢¤Ê¤¿¤Ï¥²¡¼¥à¤ò¥³¥ó¥×¥ê¡¼¥È¤·¤Þ¤·¤¿¡£"); + msg_print("¤¢¤Ê¤¿¤Ï¥²¡¼¥à¤ò¥³¥ó¥×¥ê¡¼¥È¤·¤Þ¤·¤¿¡£"); #else msg_print("You have won the game!"); #endif #ifdef JP -msg_print("½àÈ÷¤¬À°¤Ã¤¿¤é°úÂà(¼«»¦¥³¥Þ¥ó¥É)¤·¤Æ¤â·ë¹½¤Ç¤¹¡£"); + msg_print("½àÈ÷¤¬À°¤Ã¤¿¤é°úÂà(¼«»¦¥³¥Þ¥ó¥É)¤·¤Æ¤â·ë¹½¤Ç¤¹¡£"); #else msg_print("You may retire (commit suicide) when you are ready."); #endif - } } -- 2.11.0