Skip to content

Commit

Permalink
[Refactor] hengband#1498 Replaced player_ptr->stun to PlayerStun::cur…
Browse files Browse the repository at this point in the history
…rent() and so on
  • Loading branch information
Hourier committed Sep 18, 2021
1 parent 010e6c9 commit b0826ad
Show file tree
Hide file tree
Showing 26 changed files with 92 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/action/action-limited.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bool cmd_limit_image(player_type *player_ptr)

bool cmd_limit_stun(player_type *player_ptr)
{
if (player_ptr->stun) {
if (player_ptr->effects()->stun()->is_stunned()) {
msg_print(_("頭が朦朧としていて集中できない!", "You are too stunned!"));
return true;
}
Expand Down
16 changes: 12 additions & 4 deletions src/action/movement-execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
bool do_past = false;
if (g_ptr->m_idx && (m_ptr->ml || p_can_enter || p_can_kill_walls)) {
monster_race *r_ptr = &r_info[m_ptr->r_idx];
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if (!is_hostile(m_ptr)
&& !(player_ptr->confused || player_ptr->image || !m_ptr->ml || player_ptr->stun
&& !(player_ptr->confused || player_ptr->image || !m_ptr->ml || is_stunned
|| (player_ptr->muta.has(MUTA::BERS_RAGE) && is_shero(player_ptr)))
&& pattern_seq(player_ptr, player_ptr->y, player_ptr->x, y, x) && (p_can_enter || p_can_kill_walls)) {
(void)set_monster_csleep(player_ptr, g_ptr->m_idx, 0);
Expand Down Expand Up @@ -271,10 +273,13 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
lite_spot(player_ptr, y, x);
}
} else {
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if (boundary_floor(g_ptr, f_ptr, mimic_f_ptr)) {
msg_print(_("それ以上先には進めない。", "You cannot go any more."));
if (!(player_ptr->confused || player_ptr->stun || player_ptr->image))
if (!(player_ptr->confused || is_stunned || player_ptr->image)) {
energy.reset_player_turn();
}
} else {
if (easy_open && is_closed_door(player_ptr, feat) && easy_open_door(player_ptr, y, x))
return;
Expand All @@ -284,7 +289,7 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
#else
msg_format("There is %s %s blocking your way.", is_a_vowel(name[0]) ? "an" : "a", name);
#endif
if (!(player_ptr->confused || player_ptr->stun || player_ptr->image))
if (!(player_ptr->confused || is_stunned || player_ptr->image))
energy.reset_player_turn();
}
}
Expand All @@ -295,8 +300,11 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
}

if (can_move && !pattern_seq(player_ptr, player_ptr->y, player_ptr->x, y, x)) {
if (!(player_ptr->confused || player_ptr->stun || player_ptr->image))
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if (!(player_ptr->confused || is_stunned || player_ptr->image)) {
energy.reset_player_turn();
}

disturb(player_ptr, false, true);
can_move = false;
Expand Down
10 changes: 6 additions & 4 deletions src/action/racial-execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ PERCENTAGE racial_chance(player_type *player_ptr, rpi_type *rpi_ptr)
if (difficulty == 0)
return 100;

if (player_ptr->stun) {
difficulty += (PERCENTAGE)player_ptr->stun;
auto player_stun = player_ptr->effects()->stun();
if (player_stun->is_stunned()) {
difficulty += player_stun->current();
} else if (player_ptr->lev > rpi_ptr->min_level) {
PERCENTAGE lev_adj = (PERCENTAGE)((player_ptr->lev - rpi_ptr->min_level) / 3);
if (lev_adj > 10)
Expand Down Expand Up @@ -88,8 +89,9 @@ static void adjust_racial_power_difficulty(player_type *player_ptr, rpi_type *rp
if (*difficulty == 0)
return;

if (player_ptr->stun) {
*difficulty += player_ptr->stun;
auto player_stun = player_ptr->effects()->stun();
if (player_stun->is_stunned()) {
*difficulty += player_stun->current();
} else if (player_ptr->lev > rpi_ptr->min_level) {
int lev_adj = ((player_ptr->lev - rpi_ptr->min_level) / 3);
if (lev_adj > 10)
Expand Down
5 changes: 4 additions & 1 deletion src/blue-magic/blue-magic-checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ void learn_spell(player_type *player_ptr, int monspell)
return;
if (player_ptr->magic_num2[monspell])
return;
if (player_ptr->confused || player_ptr->blind || player_ptr->image || player_ptr->stun || player_ptr->paralyzed)

auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if (player_ptr->confused || player_ptr->blind || player_ptr->image || is_stunned || player_ptr->paralyzed)
return;
if (randint1(player_ptr->lev + 70) > monster_powers[monspell].level + 40) {
player_ptr->magic_num2[monspell] = 1;
Expand Down
7 changes: 5 additions & 2 deletions src/cmd-action/cmd-attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "system/monster-type-definition.h"
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
#include "wizard/wizard-messages.h"

Expand Down Expand Up @@ -189,7 +190,9 @@ bool do_cmd_attack(player_type *player_ptr, POSITION y, POSITION x, combat_optio
health_track(player_ptr, g_ptr->m_idx);
}

if ((r_ptr->flags1 & RF1_FEMALE) && !(player_ptr->stun || player_ptr->confused || player_ptr->image || !m_ptr->ml)) {
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if (any_bits(r_ptr->flags1, RF1_FEMALE) && !(is_stunned || player_ptr->confused || player_ptr->image || !m_ptr->ml)) {
if ((player_ptr->inventory_list[INVEN_MAIN_HAND].name1 == ART_ZANTETSU) || (player_ptr->inventory_list[INVEN_SUB_HAND].name1 == ART_ZANTETSU)) {
msg_print(_("拙者、おなごは斬れぬ!", "I can not attack women!"));
return false;
Expand All @@ -202,7 +205,7 @@ bool do_cmd_attack(player_type *player_ptr, POSITION y, POSITION x, combat_optio
}

bool stormbringer = false;
if (!is_hostile(m_ptr) && !(player_ptr->stun || player_ptr->confused || player_ptr->image || is_shero(player_ptr) || !m_ptr->ml)) {
if (!is_hostile(m_ptr) && !(is_stunned || player_ptr->confused || player_ptr->image || is_shero(player_ptr) || !m_ptr->ml)) {
if (player_ptr->inventory_list[INVEN_MAIN_HAND].name1 == ART_STORMBRINGER)
stormbringer = true;
if (player_ptr->inventory_list[INVEN_SUB_HAND].name1 == ART_STORMBRINGER)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd-action/cmd-mind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static void check_mind_mindcrafter(player_type *player_ptr, cm_type *cm_ptr)
}

if (cm_ptr->b < 90) {
set_stun(player_ptr, player_ptr->stun + randint1(8));
set_stun(player_ptr, player_ptr->effects()->stun()->current() + randint1(8));
return;
}

Expand Down
4 changes: 3 additions & 1 deletion src/cmd-action/cmd-move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,10 @@ void do_cmd_rest(player_type *player_ptr)
if (command_arg > 100)
chg_virtue(player_ptr, V_DILIGENCE, -1);

auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if ((player_ptr->chp == player_ptr->mhp) && (player_ptr->csp == player_ptr->msp) && !player_ptr->blind && !player_ptr->confused
&& !player_ptr->poisoned && !player_ptr->afraid && !player_ptr->stun && !player_ptr->cut && !player_ptr->slow && !player_ptr->paralyzed
&& !player_ptr->poisoned && !player_ptr->afraid && !is_stunned && !player_ptr->cut && !player_ptr->slow && !player_ptr->paralyzed
&& !player_ptr->image && !player_ptr->word_recall && !player_ptr->alter_reality)
chg_virtue(player_ptr, V_DILIGENCE, -1);

Expand Down
3 changes: 2 additions & 1 deletion src/cmd-action/cmd-shoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ void do_cmd_fire(player_type *player_ptr, SPELL_IDX snipe_type)
if (snipe_type == SP_AWAY)
teleport_player(player_ptr, 10 + (player_ptr->concent * 2), TELEPORT_SPONTANEOUS);

auto effects = player_ptr->effects();
if (snipe_type == SP_FINAL) {
msg_print(_("射撃の反動が体を襲った。", "The weapon's recoil stuns you. "));
(void)set_slow(player_ptr, player_ptr->slow + randint0(7) + 7, false);
(void)set_stun(player_ptr, player_ptr->stun + randint1(25));
(void)set_stun(player_ptr, effects->stun()->current() + randint1(25));
}
}
6 changes: 4 additions & 2 deletions src/core/magic-effects-timeout-reducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void reduce_magic_effects_timeout(player_type *player_ptr)
(void)set_mimic(player_ptr, player_ptr->tim_mimic - 1, player_ptr->mimic_form, true);
}

auto effects = player_ptr->effects();
if (player_ptr->image) {
(void)set_image(player_ptr, player_ptr->image - dec_count);
}
Expand Down Expand Up @@ -210,9 +211,10 @@ void reduce_magic_effects_timeout(player_type *player_ptr)
(void)set_poisoned(player_ptr, player_ptr->poisoned - adjust);
}

if (player_ptr->stun) {
auto player_stun = effects->stun();
if (player_stun->is_stunned()) {
int adjust = adj_con_fix[player_ptr->stat_index[A_CON]] + 1;
(void)set_stun(player_ptr, player_ptr->stun - adjust);
(void)set_stun(player_ptr, player_stun->current() - adjust);
}

if (player_ptr->cut) {
Expand Down
8 changes: 6 additions & 2 deletions src/core/player-processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ void process_player(player_type *player_ptr)
set_action(player_ptr, ACTION_NONE);
}
} else if (player_ptr->resting == COMMAND_ARG_REST_UNTIL_DONE) {
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if ((player_ptr->chp == player_ptr->mhp) && (player_ptr->csp >= player_ptr->msp) && !player_ptr->blind && !player_ptr->confused
&& !player_ptr->poisoned && !player_ptr->afraid && !player_ptr->stun && !player_ptr->cut && !player_ptr->slow
&& !player_ptr->poisoned && !player_ptr->afraid && !is_stunned && !player_ptr->cut && !player_ptr->slow
&& !player_ptr->paralyzed && !player_ptr->image && !player_ptr->word_recall && !player_ptr->alter_reality) {
set_action(player_ptr, ACTION_NONE);
}
Expand Down Expand Up @@ -267,11 +269,13 @@ void process_player(player_type *player_ptr)

PlayerEnergy energy(player_ptr);
energy.reset_player_turn();
auto effects = player_ptr->effects();
auto is_unconscious = effects->stun()->get_rank() == StunRank::UNCONSCIOUS;
if (player_ptr->phase_out) {
move_cursor_relative(player_ptr->y, player_ptr->x);
command_cmd = SPECIAL_KEY_BUILDING;
process_command(player_ptr);
} else if ((player_ptr->paralyzed || player_ptr->stun >= 100) && !cheat_immortal) {
} else if ((player_ptr->paralyzed || is_unconscious) && !cheat_immortal) {
energy.set_player_turn_energy(100);
} else if (player_ptr->action == ACTION_REST) {
if (player_ptr->resting > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/effect/effect-monster-charm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static void effect_monster_domination_corrupted_addition(player_type *player_ptr
{
switch (randint1(4)) {
case 1:
set_stun(player_ptr, player_ptr->stun + em_ptr->dam / 2);
set_stun(player_ptr, player_ptr->effects()->stun()->current() + em_ptr->dam / 2);
break;
case 2:
set_confused(player_ptr, player_ptr->confused + em_ptr->dam / 2);
Expand Down
2 changes: 1 addition & 1 deletion src/effect/effect-monster-psi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void effect_monster_psi_reflect_extra_effect(player_type *player_ptr, eff
set_confused(player_ptr, player_ptr->confused + 3 + randint1(em_ptr->dam));
break;
case 2:
set_stun(player_ptr, player_ptr->stun + randint1(em_ptr->dam));
set_stun(player_ptr, player_ptr->effects()->stun()->current() + randint1(em_ptr->dam));
break;
case 3: {
if (any_bits(em_ptr->r_ptr->flags3, RF3_NO_FEAR))
Expand Down
14 changes: 7 additions & 7 deletions src/effect/effect-player-resist-hurt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void effect_player_plasma(player_type *player_ptr, effect_player_type *ep_ptr)

if (!has_resist_sound(player_ptr) && !check_multishadow(player_ptr)) {
int plus_stun = (randint1((ep_ptr->dam > 40) ? 35 : (ep_ptr->dam * 3 / 4 + 5)));
(void)set_stun(player_ptr, player_ptr->stun + plus_stun);
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + plus_stun);
}

if (!(has_resist_fire(player_ptr) || is_oppose_fire(player_ptr) || has_immune_fire(player_ptr)))
Expand Down Expand Up @@ -203,7 +203,7 @@ void effect_player_water(player_type *player_ptr, effect_player_type *ep_ptr)

if (!check_multishadow(player_ptr)) {
if (!has_resist_sound(player_ptr) && !has_res_water) {
set_stun(player_ptr, player_ptr->stun + randint1(40));
set_stun(player_ptr, player_ptr->effects()->stun()->current() + randint1(40));
}
if (!has_resist_conf(player_ptr) && !has_res_water) {
set_confused(player_ptr, player_ptr->confused + randint1(5) + 5);
Expand Down Expand Up @@ -277,7 +277,7 @@ void effect_player_sound(player_type *player_ptr, effect_player_type *ep_ptr)

if (!has_resist_sound(player_ptr) && !check_multishadow(player_ptr)) {
int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
(void)set_stun(player_ptr, player_ptr->stun + plus_stun);
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + plus_stun);
}

if (!has_resist_sound(player_ptr) || one_in_(13))
Expand Down Expand Up @@ -333,7 +333,7 @@ void effect_player_force(player_type *player_ptr, effect_player_type *ep_ptr)
if (player_ptr->blind)
msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
if (!has_resist_sound(player_ptr) && !check_multishadow(player_ptr)) {
(void)set_stun(player_ptr, player_ptr->stun + randint1(20));
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + randint1(20));
}

ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
Expand All @@ -344,7 +344,7 @@ void effect_player_rocket(player_type *player_ptr, effect_player_type *ep_ptr)
if (player_ptr->blind)
msg_print(_("爆発があった!", "There is an explosion!"));
if (!has_resist_sound(player_ptr) && !check_multishadow(player_ptr)) {
(void)set_stun(player_ptr, player_ptr->stun + randint1(20));
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + randint1(20));
}

ep_ptr->dam = ep_ptr->dam * calc_rocket_damage_rate(player_ptr, CALC_RAND) / 100;
Expand Down Expand Up @@ -525,7 +525,7 @@ void effect_player_gravity(player_type *player_ptr, effect_player_type *ep_ptr)
(void)set_slow(player_ptr, player_ptr->slow + randint0(4) + 4, false);
if (!(has_resist_sound(player_ptr) || player_ptr->levitation)) {
int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
(void)set_stun(player_ptr, player_ptr->stun + plus_stun);
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + plus_stun);
}
}

Expand Down Expand Up @@ -598,7 +598,7 @@ void effect_player_icee(player_type *player_ptr, effect_player_type *ep_ptr)
}

if (!has_resist_sound(player_ptr)) {
(void)set_stun(player_ptr, player_ptr->stun + randint1(15));
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + randint1(15));
}

if ((!(has_resist_cold(player_ptr) || is_oppose_cold(player_ptr))) || one_in_(12)) {
Expand Down
4 changes: 3 additions & 1 deletion src/floor/pattern-walk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ bool pattern_seq(player_type *player_ptr, POSITION c_y, POSITION c_x, POSITION n
int pattern_type_cur = is_pattern_tile_cur ? cur_f_ptr->subtype : NOT_PATTERN_TILE;
int pattern_type_new = is_pattern_tile_new ? new_f_ptr->subtype : NOT_PATTERN_TILE;
if (pattern_type_new == PATTERN_TILE_START) {
if (!is_pattern_tile_cur && !player_ptr->confused && !player_ptr->stun && !player_ptr->image) {
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if (!is_pattern_tile_cur && !player_ptr->confused && !is_stunned && !player_ptr->image) {
if (get_check(_("パターンの上を歩き始めると、全てを歩かなければなりません。いいですか?",
"If you start walking the Pattern, you must walk the whole way. Ok? ")))
return true;
Expand Down
3 changes: 2 additions & 1 deletion src/load/player-info-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ static void rd_status(player_type *player_ptr)
rd_s16b(&player_ptr->slow);
rd_s16b(&player_ptr->afraid);
rd_s16b(&player_ptr->cut);
rd_s16b(&player_ptr->stun);
int16_t tmp16s = player_ptr->effects()->stun()->current();
rd_s16b(&tmp16s);
rd_s16b(&player_ptr->poisoned);
rd_s16b(&player_ptr->image);
rd_s16b(&player_ptr->protevil);
Expand Down
13 changes: 9 additions & 4 deletions src/mind/mind-ninja.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,18 @@ bool kawarimi(player_type *player_ptr, bool success)
{
object_type forge;
object_type *q_ptr = &forge;

if (player_ptr->is_dead)
if (player_ptr->is_dead) {
return false;
if (player_ptr->confused || player_ptr->blind || player_ptr->paralyzed || player_ptr->image)
}

auto effects = player_ptr->effects();
if (player_ptr->confused || player_ptr->blind || player_ptr->paralyzed || player_ptr->image) {
return false;
if (randint0(200) < player_ptr->stun)
}

if (effects->stun()->current() > randint0(200)) {
return false;
}

if (!success && one_in_(3)) {
msg_print(_("変わり身失敗!逃げられなかった。", "Kawarimi failed! You couldn't run away."));
Expand Down
3 changes: 2 additions & 1 deletion src/mind/mind-samurai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ bool choose_kata(player_type *player_ptr)
if (cmd_limit_confused(player_ptr))
return false;

if (player_ptr->stun) {
auto effects = player_ptr->effects();
if (effects->stun()->is_stunned()) {
msg_print(_("意識がはっきりとしない。", "You are not clear-headed"));
return false;
}
Expand Down
4 changes: 3 additions & 1 deletion src/mind/monk-attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ static int select_blow(player_type *player_ptr, player_attack_type *pa_ptr, int
min_level = pa_ptr->ma_ptr->min_level;
} while ((min_level > player_ptr->lev) || (randint1(player_ptr->lev) < pa_ptr->ma_ptr->chance));

if ((pa_ptr->ma_ptr->min_level <= old_ptr->min_level) || player_ptr->stun || player_ptr->confused) {
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
if ((pa_ptr->ma_ptr->min_level <= old_ptr->min_level) || is_stunned || player_ptr->confused) {
pa_ptr->ma_ptr = old_ptr;
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/monster-attack/monster-attack-player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static void calc_player_stun(player_type *player_ptr, monap_type *monap_ptr)
}

if (stun_plus > 0) {
(void)set_stun(player_ptr, player_ptr->stun + stun_plus);
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + stun_plus);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/monster-attack/monster-attack-status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void process_stun_attack(player_type *player_ptr, monap_type *monap_ptr)
}

auto *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
if (set_stun(player_ptr, player_ptr->stun + 10 + randint1(r_ptr->level / 4)))
if (set_stun(player_ptr, player_ptr->effects()->stun()->current() + 10 + randint1(r_ptr->level / 4)))
monap_ptr->obvious = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/object-use/quaff-execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static bool detonation(player_type *player_ptr)
{
msg_print(_("体の中で激しい爆発が起きた!", "Massive explosions rupture your body!"));
take_hit(player_ptr, DAMAGE_NOESCAPE, damroll(50, 20), _("爆発の薬", "a potion of Detonation"));
(void)set_stun(player_ptr, player_ptr->stun + 75);
(void)set_stun(player_ptr, player_ptr->effects()->stun()->current() + 75);
(void)set_cut(player_ptr, player_ptr->cut + 5000);
return true;
}
Expand Down
4 changes: 3 additions & 1 deletion src/player-info/self-info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

static void set_bad_status_info(player_type *player_ptr, self_info_type *self_ptr)
{
auto effects = player_ptr->effects();
if (player_ptr->blind)
self_ptr->info[self_ptr->line++] = _("あなたは目が見えない。", "You cannot see.");

Expand All @@ -43,7 +44,8 @@ static void set_bad_status_info(player_type *player_ptr, self_info_type *self_pt
if (player_ptr->cut)
self_ptr->info[self_ptr->line++] = _("あなたは出血している。", "You are bleeding.");

if (player_ptr->stun)
auto is_stunned = effects->stun()->is_stunned();
if (is_stunned)
self_ptr->info[self_ptr->line++] = _("あなたはもうろうとしている。", "You are stunned.");

if (player_ptr->poisoned)
Expand Down

0 comments on commit b0826ad

Please sign in to comment.