OSDN Git Service

[Refactor] #40236 Separated write-diary.c/h from cmd-dump.c/h
[hengband/hengband.git] / src / patron.c
index 25ec5e8..5554e1c 100644 (file)
@@ -2,7 +2,8 @@
 #include "angband.h"
 #include "util.h"
 
-#include "cmd-dump.h"
+#include "io/write-diary.h"
+#include "cmd/cmd-dump.h"
 #include "patron.h"
 #include "cmd-pet.h"
 #include "object-curse.h"
@@ -387,7 +388,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
 
                        for (dummy = 0; dummy < randint1(5) + 1; dummy++)
                        {
-                               (void)summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+                               (void)summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
                        }
                        reward = _("モンスターを召喚された。", "summoning hostile monsters");
                        break;
@@ -501,7 +502,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
                                dummy = INVEN_LARM;
                                if (has_melee_weapon(creature_ptr, INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
                        }
-                       object_desc(o_name, &creature_ptr->inventory_list[dummy], OD_NAME_ONLY);
+                       object_desc(creature_ptr, o_name, &creature_ptr->inventory_list[dummy], OD_NAME_ONLY);
                        (void)curse_weapon_object(creature_ptr, FALSE, &creature_ptr->inventory_list[dummy]);
                        reward = format(_("%sが破壊された。", "destroying %s"), o_name);
                        break;
@@ -512,7 +513,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
                        msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]);
                        msg_print(_("「汝、防具に頼ることなかれ。」", "'Thou reliest too much on thine equipment.'"));
 
-                       object_desc(o_name, &creature_ptr->inventory_list[INVEN_BODY], OD_NAME_ONLY);
+                       object_desc(creature_ptr, o_name, &creature_ptr->inventory_list[INVEN_BODY], OD_NAME_ONLY);
                        (void)curse_armor(creature_ptr);
                        reward = format(_("%sが破壊された。", "destroying %s"), o_name);
                        break;
@@ -542,14 +543,14 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
                                                dummy = INVEN_LARM;
                                                if (has_melee_weapon(creature_ptr, INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
                                        }
-                                       object_desc(o_name, &creature_ptr->inventory_list[dummy], OD_NAME_ONLY);
+                                       object_desc(creature_ptr, o_name, &creature_ptr->inventory_list[dummy], OD_NAME_ONLY);
                                        (void)curse_weapon_object(creature_ptr, FALSE, &creature_ptr->inventory_list[dummy]);
                                        reward = format(_("%sが破壊された。", "destroying %s"), o_name);
                                }
                                else
                                {
                                        if (!creature_ptr->inventory_list[INVEN_BODY].k_idx) break;
-                                       object_desc(o_name, &creature_ptr->inventory_list[INVEN_BODY], OD_NAME_ONLY);
+                                       object_desc(creature_ptr, o_name, &creature_ptr->inventory_list[INVEN_BODY], OD_NAME_ONLY);
                                        (void)curse_armor(creature_ptr);
                                        reward = format(_("%sが破壊された。", "destroying %s"), o_name);
                                }
@@ -633,7 +634,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
 
                        msg_format(_("%sは褒美として悪魔の使いをよこした!", "%s rewards you with a demonic servant!"), chaos_patrons[creature_ptr->chaos_patron]);
 
-                       if (!summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, PM_FORCE_PET))
+                       if (!summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, PM_FORCE_PET))
                                msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
                        else
                                reward = _("悪魔がペットになった。", "a demonic servant");
@@ -643,7 +644,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
                case REW_SER_MONS:
                        msg_format(_("%sは褒美として使いをよこした!", "%s rewards you with a servant!"), chaos_patrons[creature_ptr->chaos_patron]);
 
-                       if (!summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, PM_FORCE_PET))
+                       if (!summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, PM_FORCE_PET))
                                msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
                        else
                                reward = _("モンスターがペットになった。", "a servant");
@@ -653,7 +654,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
                case REW_SER_UNDE:
                        msg_format(_("%sは褒美としてアンデッドの使いをよこした。", "%s rewards you with an undead servant!"), chaos_patrons[creature_ptr->chaos_patron]);
 
-                       if (!summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, PM_FORCE_PET))
+                       if (!summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, PM_FORCE_PET))
                                msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
                        else
                                reward = _("アンデッドがペットになった。", "an undead servant");