OSDN Git Service

[Refactor] #1576 Habu氏の指摘に則ってコードを修正した (エルドリッチホラー)
authorHourier <66951241+Hourier@users.noreply.github.com>
Wed, 22 Sep 2021 10:33:18 +0000 (19:33 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Wed, 22 Sep 2021 11:37:03 +0000 (20:37 +0900)
src/player/eldritch-horror.cpp

index 53c9a1a..9666a95 100644 (file)
@@ -121,10 +121,9 @@ void sanity_blast(player_type *player_ptr, monster_type *m_ptr, bool necro)
 
         if (player_ptr->hallucinated) {
             msg_format(_("%s%sの顔を見てしまった!", "You behold the %s visage of %s!"), funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
-
             if (one_in_(3)) {
                 msg_print(funny_comments[randint0(MAX_SAN_COMMENT)]);
-                player_ptr->hallucinated = player_ptr->hallucinated + randint1(r_ptr->level);
+                BadStatusSetter(player_ptr).hallucination(player_ptr->hallucinated + randint1(r_ptr->level));
             }
 
             return;
@@ -172,10 +171,9 @@ void sanity_blast(player_type *player_ptr, monster_type *m_ptr, bool necro)
 
         if (player_ptr->hallucinated) {
             msg_format(_("%s%sの顔を見てしまった!", "You behold the %s visage of %s!"), funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
-
             if (one_in_(3)) {
                 msg_print(funny_comments[randint0(MAX_SAN_COMMENT)]);
-                player_ptr->hallucinated = player_ptr->hallucinated + randint1(r_ptr->level);
+                BadStatusSetter(player_ptr).hallucination(player_ptr->hallucinated + randint1(r_ptr->level));
             }
 
             return;