case MIMIC_DEMON:
creature_ptr->resist_chaos = TRUE;
creature_ptr->resist_neth = TRUE;
- creature_ptr->resist_fire = TRUE;
creature_ptr->oppose_fire = 1;
creature_ptr->redraw |= PR_STATUS;
break;
case MIMIC_DEMON_LORD:
creature_ptr->resist_chaos = TRUE;
creature_ptr->resist_neth = TRUE;
- creature_ptr->immune_fire = TRUE;
- creature_ptr->resist_fire = TRUE;
creature_ptr->resist_cold = TRUE;
creature_ptr->resist_pois = TRUE;
creature_ptr->resist_conf = TRUE;
creature_ptr->resist_dark = TRUE;
break;
case RACE_DRACONIAN:
- if (creature_ptr->lev > 4)
- creature_ptr->resist_fire = TRUE;
if (creature_ptr->lev > 9)
creature_ptr->resist_cold = TRUE;
if (creature_ptr->lev > 34)
creature_ptr->resist_pois = TRUE;
break;
- case RACE_IMP:
- creature_ptr->resist_fire = TRUE;
- break;
case RACE_GOLEM:
creature_ptr->resist_pois = TRUE;
break;
creature_ptr->resist_sound = TRUE;
break;
case RACE_BALROG:
- creature_ptr->resist_fire = TRUE;
creature_ptr->resist_neth = TRUE;
if (creature_ptr->lev > 44) {
creature_ptr->oppose_fire = 1;
creature_ptr->resist_elec = TRUE;
}
+void have_resist_fire(player_type *creature_ptr)
+{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ creature_ptr->resist_fire = FALSE;
+
+ if (creature_ptr->mimic_form == MIMIC_DEMON || creature_ptr->mimic_form == MIMIC_DEMON_LORD) {
+ creature_ptr->resist_fire = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_DRACONIAN && creature_ptr->lev > 4) {
+ creature_ptr->resist_fire = TRUE;
+ }
+ if (!creature_ptr->mimic_form && (creature_ptr->prace == RACE_IMP || creature_ptr->prace == RACE_BALROG)) {
+ creature_ptr->resist_fire = TRUE;
+ }
+
+ if (creature_ptr->special_defense & KAMAE_SEIRYU) {
+ creature_ptr->resist_fire = TRUE;
+ }
+
+ if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
+ creature_ptr->resist_fire = 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_FIRE))
+ creature_ptr->resist_fire = TRUE;
+ }
+
+ if (creature_ptr->immune_fire)
+ creature_ptr->resist_fire = TRUE;
+}
void have_extra_blow(player_type *creature_ptr);
void have_resist_acid(player_type *creature_ptr);
void have_resist_elec(player_type *creature_ptr);
+void have_resist_fire(player_type *creature_ptr);
*/
static void clear_creature_bonuses(player_type *creature_ptr)
{
- creature_ptr->resist_fire = FALSE;
creature_ptr->resist_cold = FALSE;
creature_ptr->resist_pois = FALSE;
creature_ptr->resist_conf = FALSE;
have_extra_blow(creature_ptr);
have_resist_acid(creature_ptr);
have_resist_elec(creature_ptr);
+ have_resist_fire(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_fire)
- creature_ptr->resist_fire = TRUE;
if (creature_ptr->immune_cold)
creature_ptr->resist_cold = TRUE;
}
if (creature_ptr->special_defense & KAMAE_SEIRYU) {
- creature_ptr->resist_fire = TRUE;
creature_ptr->resist_cold = TRUE;
creature_ptr->resist_pois = TRUE;
} else if (creature_ptr->special_defense & KAMAE_GENBU) {
{
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
creature_ptr->lite = TRUE;
- creature_ptr->resist_fire = TRUE;
creature_ptr->resist_cold = TRUE;
creature_ptr->resist_pois = TRUE;
creature_ptr->resist_conf = TRUE;
if (have_flag(flgs, TR_IM_ELEC))
creature_ptr->immune_elec = TRUE;
- if (have_flag(flgs, TR_RES_FIRE))
- creature_ptr->resist_fire = TRUE;
if (have_flag(flgs, TR_RES_COLD))
creature_ptr->resist_cold = TRUE;
if (have_flag(flgs, TR_RES_POIS))