OSDN Git Service

Merge remote-tracking branch 'remotes/origin/feature/Refactoring-Hourier' into For2...
authordeskull <deskull@users.sourceforge.jp>
Thu, 9 Jan 2020 15:52:25 +0000 (00:52 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 9 Jan 2020 15:52:25 +0000 (00:52 +0900)
1  2 
src/player-status.c

diff --combined src/player-status.c
@@@ -4986,11 -4986,11 +4986,11 @@@ void update_creature(player_type *creat
  {
        if (!creature_ptr->update) return;
  
-       /* Actually do auto-destroy */
+       floor_type *floor_ptr = creature_ptr->current_floor_ptr;
        if (creature_ptr->update & (PU_AUTODESTROY))
        {
                creature_ptr->update &= ~(PU_AUTODESTROY);
-               autopick_delayed_alter();
+               autopick_delayed_alter(floor_ptr);
        }
        if (creature_ptr->update & (PU_COMBINE))
        {
        if (creature_ptr->update & (PU_UN_LITE))
        {
                creature_ptr->update &= ~(PU_UN_LITE);
-               forget_lite(p_ptr->current_floor_ptr);
+               forget_lite(floor_ptr);
        }
  
        if (creature_ptr->update & (PU_UN_VIEW))
        {
                creature_ptr->update &= ~(PU_UN_VIEW);
-               forget_view(creature_ptr->current_floor_ptr);
+               forget_view(floor_ptr);
        }
  
        if (creature_ptr->update & (PU_VIEW))
        {
                creature_ptr->update &= ~(PU_VIEW);
-               update_view(creature_ptr, p_ptr->current_floor_ptr);
+               update_view(creature_ptr, floor_ptr);
        }
  
        if (creature_ptr->update & (PU_LITE))
        {
                creature_ptr->update &= ~(PU_LITE);
-               update_lite(creature_ptr, p_ptr->current_floor_ptr);
+               update_lite(creature_ptr, floor_ptr);
        }
  
        if (creature_ptr->update & (PU_FLOW))
        {
                creature_ptr->update &= ~(PU_FLOW);
        if (creature_ptr->update & (PU_MON_LITE))
        {
                creature_ptr->update &= ~(PU_MON_LITE);
-               update_mon_lite(p_ptr, p_ptr->current_floor_ptr);
+               update_mon_lite(creature_ptr, floor_ptr);
        }
  
        /*
        if (creature_ptr->update & (PU_DELAY_VIS))
        {
                creature_ptr->update &= ~(PU_DELAY_VIS);
-               delayed_visual_update(creature_ptr->current_floor_ptr);
+               delayed_visual_update(floor_ptr);
        }
  
        if (creature_ptr->update & (PU_MONSTERS))
        }
  }
  
  /*!
   * @brief プレイヤーが魔道書を一冊も持っていないかを判定する
   * @return 魔道書を一冊も持っていないならTRUEを返す
@@@ -5369,29 -5369,31 +5369,29 @@@ void sanity_blast(player_type *creature
                msg_print(_("ネクロノミコンを読んで正気を失った!", "Your sanity is shaken by reading the Necronomicon!"));
        }
  
 -      if (saving_throw(creature_ptr->skill_sav - power))
 +      /* 過去の効果無効率再現のため5回saving_throw 実行 */
 +      if (saving_throw(creature_ptr->skill_sav - power)
 +              && saving_throw(creature_ptr->skill_sav - power)
 +              && saving_throw(creature_ptr->skill_sav - power)
 +              && saving_throw(creature_ptr->skill_sav - power)
 +              && saving_throw(creature_ptr->skill_sav - power)
 +              )
        {
                return;
        }
  
 -      do {
 -              (void)do_dec_stat(creature_ptr, A_INT);
 -      } while (randint0(100) > creature_ptr->skill_sav && one_in_(2));
 -
 -      do {
 -              (void)do_dec_stat(creature_ptr, A_WIS);
 -      } while (randint0(100) > creature_ptr->skill_sav && one_in_(2));
 -
 -      switch (randint1(21))
 +      switch (randint1(22))
        {
        case 1:
 -              if (!(creature_ptr->muta3 & MUT3_MORONIC) && one_in_(5))
 +              if (!(creature_ptr->muta3 & MUT3_MORONIC))
                {
                        if ((creature_ptr->stat_use[A_INT] < 4) && (creature_ptr->stat_use[A_WIS] < 4))
                        {
 -                              msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You current_world_ptr->game_turn into an utter moron!"));
 +                              msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You turn into an utter moron!"));
                        }
                        else
                        {
 -                              msg_print(_("あなたは完璧な馬鹿になった!", "You current_world_ptr->game_turn into an utter moron!"));
 +                              msg_print(_("あなたは完璧な馬鹿になった!", "You turn into an utter moron!"));
                        }
  
                        if (creature_ptr->muta3 & MUT3_HYPER_INT)
                }
                break;
        case 2:
 -      case 3:
 -      case 4:
                if (!(creature_ptr->muta2 & MUT2_COWARDICE) && !creature_ptr->resist_fear)
                {
                        msg_print(_("あなたはパラノイアになった!", "You become paranoid!"));
                        creature_ptr->muta2 |= MUT2_COWARDICE;
                }
                break;
 -      case 5:
 -      case 6:
 -      case 7:
 +      case 3:
                if (!(creature_ptr->muta2 & MUT2_HALLU) && !creature_ptr->resist_chaos)
                {
                        msg_print(_("幻覚をひき起こす精神錯乱に陥った!", "You are afflicted by a hallucinatory insanity!"));
                        creature_ptr->muta2 |= MUT2_HALLU;
                }
                break;
 -      case 8:
 -      case 9:
 -      case 10:
 -              if (!(creature_ptr->muta2 & MUT2_BERS_RAGE))
 +      case 4:
 +              if (!(creature_ptr->muta2 & MUT2_BERS_RAGE) && !creature_ptr->resist_conf)
                {
                        msg_print(_("激烈な感情の発作におそわれるようになった!", "You become subject to fits of berserk rage!"));
                        creature_ptr->muta2 |= MUT2_BERS_RAGE;
                }
                break;
 +      case 5:
 +      case 6:
 +      case 7:
 +      case 8:
 +      case 9:
 +      case 10:
        case 11:
        case 12:
 +              /* Mind blast */
 +              if (!creature_ptr->resist_conf)
 +              {
 +                      (void)set_confused(creature_ptr, creature_ptr->confused + randint0(4) + 4);
 +              }
 +              if (!creature_ptr->resist_chaos && one_in_(3))
 +              {
 +                      (void)set_image(creature_ptr, creature_ptr->image + randint0(250) + 150);
 +              }
 +              return;
 +              break;
        case 13:
        case 14:
        case 15:
 -      case 16:
                /* Brain smash */
                if (!creature_ptr->resist_conf)
                {
                {
                        (void)set_image(creature_ptr, creature_ptr->image + randint0(250) + 150);
                }
 +              do {
 +                      (void)do_dec_stat(creature_ptr, A_INT);
 +              } while (randint0(100) > creature_ptr->skill_sav && one_in_(2));
 +
 +              do {
 +                      (void)do_dec_stat(creature_ptr, A_WIS);
 +              } while (randint0(100) > creature_ptr->skill_sav && one_in_(2));
                break;
 +      case 16:
        case 17:
 +              /* Amnesia */
 +              if (lose_all_info(creature_ptr))
 +                      msg_print(_("あまりの恐怖に全てのことを忘れてしまった!", "You forget everything in your utmost terror!"));
 +              break;
        case 18:
        case 19:
        case 20:
        case 21:
 -              /* Amnesia */
 -              if (lose_all_info(creature_ptr))
 -                      msg_print(_("あまりの恐怖に全てのことを忘れてしまった!", "You forget everything in your utmost terror!"));
 +      case 22:
 +              /* Lose int & wis */
 +              do_dec_stat(creature_ptr, A_INT);
 +              do_dec_stat(creature_ptr, A_WIS);
 +              break;
 +      default:
                break;
        }
  
        handle_stuff();
  }
  
 -
  /*!
   * @brief プレイヤーの経験値について整合性のためのチェックと調整を行う /
   * Advance experience levels and print experience