OSDN Git Service

[Refactor] #40514 is_vuln_acid()を実装. / Implement is_vuln_acid().
authordeskull <deskull@users.sourceforge.jp>
Sun, 6 Sep 2020 02:14:39 +0000 (11:14 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 6 Sep 2020 02:14:39 +0000 (11:14 +0900)
src/player/player-status-flags.c
src/player/player-status-flags.h

index 1d3fb8b..efac498 100644 (file)
@@ -922,6 +922,19 @@ BIT_FLAGS is_resist_acid(player_type *creature_ptr)
     return result;
 }
 
+BIT_FLAGS is_vuln_acid(player_type *creature_ptr)
+{
+    BIT_FLAGS result = 0L;
+    if (creature_ptr->muta3 & MUT3_VULN_ELEM) {
+        result |= FLAG_CAUSE_MUTATION;
+    }
+
+    if (creature_ptr->special_defense & KATA_KOUKIJIN) {
+        result |= FLAG_CAUSE_BATTLE_FORM;
+    }
+    return result;
+}
+
 BIT_FLAGS is_resist_elec(player_type *creature_ptr)
 {
     BIT_FLAGS result = 0L;
index 03c1711..3344757 100644 (file)
@@ -71,6 +71,7 @@ void has_curses(player_type *creature_ptr);
 BIT_FLAGS has_impact(player_type *creature_ptr);
 void has_extra_blow(player_type *creature_ptr);
 BIT_FLAGS is_resist_acid(player_type *creature_ptr);
+BIT_FLAGS is_vuln_acid(player_type *creature_ptr);
 BIT_FLAGS is_resist_elec(player_type *creature_ptr);
 BIT_FLAGS is_resist_fire(player_type *creature_ptr);
 BIT_FLAGS is_resist_cold(player_type *creature_ptr);