OSDN Git Service

[Refactor] #39321 do_cmd_write_nikki() を exe_write_diary() に改名.
[hengband/hengband.git] / src / trap.c
index b08ecfd..c68eddf 100644 (file)
@@ -305,7 +305,7 @@ static void hit_trap_pit(int trap_feat_type)
                msg_format(_("%sが刺さった!", "You are impaled on %s!"), spike_name);
 
                dam = dam * 2;
-               (void)set_cut(p_ptr->cut + randint1(dam));
+               (void)set_cut(p_ptr,p_ptr->cut + randint1(dam));
 
                if (trap_feat_type == TRAP_POISON_PIT) {
                        if (p_ptr->resist_pois || IS_OPPOSE_POIS())
@@ -320,7 +320,7 @@ static void hit_trap_pit(int trap_feat_type)
                }
        }
 
-       take_hit(DAMAGE_NOESCAPE, dam, trap_name, -1);
+       take_hit(p_ptr, DAMAGE_NOESCAPE, dam, trap_name, -1);
 }
 
 /*!
@@ -334,8 +334,8 @@ static bool hit_trap_dart(void)
        if (check_hit(125))
        {
                msg_print(_("小さなダーツが飛んできて刺さった!", "A small dart hits you!"));
-               take_hit(DAMAGE_ATTACK, damroll(1, 4), _("ダーツの罠", "a dart trap"), -1);
-               if (!CHECK_MULTISHADOW()) hit = TRUE;
+               take_hit(p_ptr, DAMAGE_ATTACK, damroll(1, 4), _("ダーツの罠", "a dart trap"), -1);
+               if (!CHECK_MULTISHADOW(p_ptr)) hit = TRUE;
        }
        else
        {
@@ -366,7 +366,7 @@ static void hit_trap_slow(void)
 {
        if (hit_trap_dart())
        {
-               set_slow(p_ptr->slow + randint0(20) + 20, FALSE);
+               set_slow(p_ptr, p_ptr->slow + randint0(20) + 20, FALSE);
        }
 }
 
@@ -437,13 +437,13 @@ void hit_trap(bool break_trap)
                        dam = damroll(2, 8);
                        name = _("落とし戸", "a trap door");
 
-                       take_hit(DAMAGE_NOESCAPE, dam, name, -1);
+                       take_hit(p_ptr, DAMAGE_NOESCAPE, dam, name, -1);
 
                        /* Still alive and autosave enabled */
                        if (autosave_l && (p_ptr->chp >= 0))
                                do_cmd_save_game(TRUE);
 
-                       do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("落とし戸に落ちた", "You have fallen through a trap door!"));
+                       exe_write_diary(p_ptr, NIKKI_BUNSHOU, 0, _("落とし戸に落ちた", "You have fallen through a trap door!"));
                        prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_DOWN | CFM_RAND_PLACE | CFM_RAND_CONNECT);
                        p_ptr->leaving = TRUE;
                }
@@ -566,7 +566,7 @@ void hit_trap(bool break_trap)
                                msg_print(_("身の毛もよだつ光景が頭に浮かんだ。", "A horrible vision enters your mind."));
 
                                /* Have some nightmares */
-                               sanity_blast(NULL, FALSE);
+                               sanity_blast(p_ptr, NULL, FALSE);
 
                        }
                        (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(10) + 5);