OSDN Git Service

[Refactor] #40514 set_mutation_flags()整理の上削除. / Deleted after organizing set_mutation...
authordeskull <deskull@users.sourceforge.jp>
Wed, 12 Aug 2020 07:41:57 +0000 (16:41 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 12 Aug 2020 07:41:57 +0000 (16:41 +0900)
src/mutation/mutation-calculator.c
src/mutation/mutation-calculator.h
src/player/player-status-flags.c
src/player/player-status.c

index e4b892a..d7fdf14 100644 (file)
@@ -53,21 +53,3 @@ int calc_mutant_regenerate_mod(player_type *creature_ptr)
 
     return (regen);
 }
-
-void set_mutation_flags(player_type *creature_ptr)
-{
-    if (creature_ptr->muta3 == 0)
-        return;
-
-    if (creature_ptr->muta3 & MUT3_FIRE_BODY) {
-        creature_ptr->lite = TRUE;
-    }
-
-    if (creature_ptr->muta3 & MUT3_WINGS)
-        creature_ptr->levitation = TRUE;
-
-    if (creature_ptr->muta3 & MUT3_FEARLESS)
-        creature_ptr->resist_fear = TRUE;
-
-
-}
index cf2e838..595873d 100644 (file)
@@ -3,4 +3,3 @@
 #include "system/angband.h"
 
 int calc_mutant_regenerate_mod(player_type *creature_ptr);
-void set_mutation_flags(player_type *creature_ptr);
index 2f02eff..927491f 100644 (file)
@@ -1097,6 +1097,9 @@ void have_levitation(player_type *creature_ptr)
         creature_ptr->levitation = TRUE;
     }
 
+    if (creature_ptr->muta3 & MUT3_WINGS)
+        creature_ptr->levitation = TRUE;
+
     if (!creature_ptr->mimic_form
         && (creature_ptr->prace == RACE_DRACONIAN || creature_ptr->prace == RACE_SPECTRE || creature_ptr->prace == RACE_SPRITE
             || creature_ptr->prace == RACE_ARCHON || creature_ptr->prace == RACE_S_FAIRY)) {
@@ -1914,7 +1917,10 @@ void have_resist_fear(player_type *creature_ptr)
     BIT_FLAGS flgs[TR_FLAG_SIZE];
     creature_ptr->resist_fear = FALSE;
 
-    switch (creature_ptr->pclass) {
+       if (creature_ptr->muta3 & MUT3_FEARLESS)
+        creature_ptr->resist_fear = TRUE;
+
+       switch (creature_ptr->pclass) {
     case CLASS_WARRIOR:
         if (creature_ptr->lev > 29)
             creature_ptr->resist_fear = TRUE;
@@ -2114,7 +2120,11 @@ void have_lite(player_type *creature_ptr)
         creature_ptr->lite = TRUE;
     }
 
-    if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_VAMPIRE)
+    if (creature_ptr->muta3 & MUT3_FIRE_BODY) {
+        creature_ptr->lite = TRUE;
+    }
+
+       if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_VAMPIRE)
         creature_ptr->lite = TRUE;
 
     if (creature_ptr->sh_fire)
index 46e0f10..0a65c26 100644 (file)
@@ -719,9 +719,6 @@ void calc_bonuses(player_type *creature_ptr)
 
     calc_class_status(creature_ptr);
     set_personality_flags(creature_ptr);
-
-    set_mutation_flags(creature_ptr);
-
     calc_equipment_status(creature_ptr);
 
     if (old_mighty_throw != creature_ptr->mighty_throw) {