From 78b03a0f8e47ad77dd41b9908bfbbc6bea25e284 Mon Sep 17 00:00:00 2001 From: iks Date: Tue, 10 Nov 2020 01:04:47 +0900 Subject: [PATCH] =?utf8?q?[Imprement]=20=E8=B5=A4=E5=A4=96=E7=B7=9A?= =?utf8?q?=E8=A6=96=E5=8A=9B=E3=81=AE=E7=A8=AE=E6=97=8F=E7=9A=84/=E4=B8=80?= =?utf8?q?=E6=99=82=E7=9A=84=E6=9C=89=E7=84=A1=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?utf8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82=20=20/=20Display=20a=20flag?= =?utf8?q?=20of=20infravision=20tempolary=20or=20permanently.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/player/permanent-resistances.c | 5 +++++ src/player/temporary-resistances.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/player/permanent-resistances.c b/src/player/permanent-resistances.c index 1f307ae21..a47031834 100644 --- a/src/player/permanent-resistances.c +++ b/src/player/permanent-resistances.c @@ -196,6 +196,11 @@ static void add_mimic_form_flags(player_type *creature_ptr, BIT_FLAGS *flags) */ static void add_race_flags(player_type *creature_ptr, BIT_FLAGS *flags) { + /* Common for all races */ + if (rp_ptr->infra > 0) + add_flag(flags, TR_INFRA); + + /* Unique for each race */ switch (creature_ptr->prace) { case RACE_ELF: diff --git a/src/player/temporary-resistances.c b/src/player/temporary-resistances.c index 522c35849..2f9143915 100644 --- a/src/player/temporary-resistances.c +++ b/src/player/temporary-resistances.c @@ -28,6 +28,8 @@ void tim_player_flags(player_type *creature_ptr, BIT_FLAGS *flags) if (is_hero(creature_ptr) || is_shero(creature_ptr)) add_flag(flags, TR_RES_FEAR); + if (creature_ptr->tim_infra) + add_flag(flags, TR_INFRA); if (creature_ptr->tim_invis) add_flag(flags, TR_SEE_INVIS); if (creature_ptr->tim_regen) -- 2.11.0