return result;
}
+PERCENTAGE calc_vuln_elec_rate(player_type *creature_ptr)
+{
+ PERCENTAGE per = 100;
+ int i;
+ BIT_FLAGS flgs = is_vuln_elec(creature_ptr);
+ for (i = 0; i < FLAG_CAUSE_MAX; i++) {
+ if (flgs & (0x01 << i)) {
+ if (i == FLAG_CAUSE_MUTATION) {
+ per *= 2;
+ } else {
+ per += per / 3;
+ }
+ }
+ }
+ return per;
+}
+
BIT_FLAGS is_resist_fire(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
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);
+PERCENTAGE calc_vuln_acid_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_elec(player_type *creature_ptr);
BIT_FLAGS is_vuln_elec(player_type *creature_ptr);
+PERCENTAGE calc_vuln_elec_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_fire(player_type *creature_ptr);
BIT_FLAGS is_vuln_fire(player_type *creature_ptr);
BIT_FLAGS is_resist_cold(player_type *creature_ptr);