From 4b9162d0d22965f56d4c39834ca5a8a790fcfc38 Mon Sep 17 00:00:00 2001 From: deskull Date: Wed, 12 Aug 2020 13:56:15 +0900 Subject: [PATCH] [Refactor] #40514 Fixed a function declaration error. cheat_death() recovery processing arrangement. --- src/player/player-status-flags.h | 1 + src/player/player-status.c | 16 +++------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/player/player-status-flags.h b/src/player/player-status-flags.h index 2e3aec991..67c2d7323 100644 --- a/src/player/player-status-flags.h +++ b/src/player/player-status-flags.h @@ -74,5 +74,6 @@ void have_immune_cold(player_type *creature_ptr); void have_right_hand_weapon(player_type *creature_ptr); void have_left_hand_weapon(player_type *creature_ptr); void have_two_handed_weapons(player_type *creature_ptr); +void have_lite(player_type *creature_ptr); diff --git a/src/player/player-status.c b/src/player/player-status.c index 6d88ce629..9a82366a6 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -4210,19 +4210,9 @@ void cheat_death(player_type *creature_ptr) msg_print(NULL); (void)life_stream(creature_ptr, FALSE, FALSE); - if (creature_ptr->pclass == CLASS_MAGIC_EATER) { - int magic_idx; - for (magic_idx = 0; magic_idx < EATER_EXT * 2; magic_idx++) { - creature_ptr->magic_num1[magic_idx] = creature_ptr->magic_num2[magic_idx] * EATER_CHARGE; - } - for (; magic_idx < EATER_EXT * 3; magic_idx++) { - creature_ptr->magic_num1[magic_idx] = 0; - } - } - - creature_ptr->csp = creature_ptr->msp; - creature_ptr->csp_frac = 0; - if (creature_ptr->word_recall) { + (void)restore_mana(creature_ptr, TRUE); + + if (creature_ptr->word_recall) { msg_print(_("張りつめた大気が流れ去った...", "A tension leaves the air around you...")); msg_print(NULL); creature_ptr->word_recall = 0; -- 2.11.0