creature_ptr->resist_chaos = TRUE;
creature_ptr->resist_neth = TRUE;
creature_ptr->immune_fire = TRUE;
- creature_ptr->resist_acid = TRUE;
creature_ptr->resist_fire = TRUE;
creature_ptr->resist_cold = TRUE;
creature_ptr->resist_elec = TRUE;
creature_ptr->resist_sound = TRUE;
break;
case RACE_YEEK:
- creature_ptr->resist_acid = TRUE;
if (creature_ptr->lev > 19)
creature_ptr->immune_acid = TRUE;
break;
case RACE_KLACKON:
creature_ptr->resist_conf = TRUE;
- creature_ptr->resist_acid = TRUE;
break;
case RACE_KOBOLD:
creature_ptr->resist_pois = TRUE;
creature_ptr->resist_fire = TRUE;
if (creature_ptr->lev > 9)
creature_ptr->resist_cold = TRUE;
- if (creature_ptr->lev > 14)
- creature_ptr->resist_acid = TRUE;
if (creature_ptr->lev > 19)
creature_ptr->resist_elec = TRUE;
if (creature_ptr->lev > 34)
}
}
}
+
+void have_resist_acid(player_type *creature_ptr)
+{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ creature_ptr->resist_acid = FALSE;
+
+ if (creature_ptr->mimic_form == MIMIC_DEMON_LORD) {
+ creature_ptr->resist_acid = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && (creature_ptr->prace == RACE_YEEK || creature_ptr->prace == RACE_KLACKON)) {
+ creature_ptr->resist_acid = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_DRACONIAN && creature_ptr->lev > 14) {
+ creature_ptr->resist_acid = TRUE;
+ }
+
+ if (creature_ptr->special_defense & KAMAE_SEIRYU) {
+ creature_ptr->resist_acid = TRUE;
+ }
+
+ if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
+ creature_ptr->resist_acid = TRUE;
+ }
+
+ for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
+ o_ptr = &creature_ptr->inventory_list[i];
+ if (!o_ptr->k_idx)
+ continue;
+
+ object_flags(creature_ptr, o_ptr, flgs);
+ if (have_flag(flgs, TR_RES_ACID))
+ creature_ptr->resist_acid = TRUE;
+ }
+
+ if (creature_ptr->immune_acid)
+ creature_ptr->resist_acid = TRUE;
+}
void have_curses(player_type *creature_ptr);
void have_impact(player_type *creature_ptr);
void have_extra_blow(player_type *creature_ptr);
+void have_resist_acid(player_type *creature_ptr);
*/
static void clear_creature_bonuses(player_type *creature_ptr)
{
- creature_ptr->resist_acid = FALSE;
creature_ptr->resist_elec = FALSE;
creature_ptr->resist_fire = FALSE;
creature_ptr->resist_cold = FALSE;
have_curses(creature_ptr);
have_impact(creature_ptr);
have_extra_blow(creature_ptr);
+ have_resist_acid(creature_ptr);
calc_race_status(creature_ptr);
if (is_special_class && (empty_hands(creature_ptr, FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM)))
creature_ptr->two_handed_weapon = FALSE;
- if (creature_ptr->immune_acid)
- creature_ptr->resist_acid = TRUE;
if (creature_ptr->immune_elec)
creature_ptr->resist_elec = TRUE;
if (creature_ptr->immune_fire)
}
if (creature_ptr->special_defense & KAMAE_SEIRYU) {
- creature_ptr->resist_acid = TRUE;
creature_ptr->resist_fire = TRUE;
creature_ptr->resist_elec = TRUE;
creature_ptr->resist_cold = TRUE;
{
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
creature_ptr->lite = TRUE;
- creature_ptr->resist_acid = TRUE;
creature_ptr->resist_elec = TRUE;
creature_ptr->resist_fire = TRUE;
creature_ptr->resist_cold = TRUE;
if (have_flag(flgs, TR_IM_ELEC))
creature_ptr->immune_elec = TRUE;
- if (have_flag(flgs, TR_RES_ACID))
- creature_ptr->resist_acid = TRUE;
if (have_flag(flgs, TR_RES_ELEC))
creature_ptr->resist_elec = TRUE;
if (have_flag(flgs, TR_RES_FIRE))