OSDN Git Service

[Imprement] 赤外線視力の種族的/一時的有無の表示を追加。
authoriks <iks@users.sorceforge.jp>
Mon, 9 Nov 2020 16:04:47 +0000 (01:04 +0900)
committeriks <iks@users.sorceforge.jp>
Mon, 9 Nov 2020 16:04:47 +0000 (01:04 +0900)
 / Display a flag of infravision tempolary or permanently.

src/player/permanent-resistances.c
src/player/temporary-resistances.c

index 1f307ae..a470318 100644 (file)
@@ -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:
index 522c358..2f91439 100644 (file)
@@ -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)