return result;
}
-void has_resist_nexus(player_type *creature_ptr)
+BIT_FLAGS has_resist_nexus(player_type *creature_ptr)
{
- object_type *o_ptr;
- BIT_FLAGS flgs[TR_FLAG_SIZE];
- creature_ptr->resist_nexus = FALSE;
+ BIT_FLAGS result = 0L;
if (creature_ptr->mimic_form == MIMIC_DEMON_LORD) {
- creature_ptr->resist_nexus = TRUE;
+ result |= FLAG_CAUSE_RACE;
}
- if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
- creature_ptr->resist_nexus = TRUE;
+ if (creature_ptr->special_defense & KATA_MUSOU) {
+ result |= FLAG_CAUSE_BATTLE_FORM;
}
- for (inventory_slot_type 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 (has_flag(flgs, TR_RES_NEXUS))
- creature_ptr->resist_nexus = TRUE;
+ if (creature_ptr->ult_res) {
+ result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
+
+ result |= check_equipment_flags(creature_ptr, TR_RES_NEXUS);
+ return result;
}
void has_resist_blind(player_type *creature_ptr)
BIT_FLAGS has_resist_chaos(player_type *creature_ptr);
BIT_FLAGS has_resist_disen(player_type *creature_ptr);
BIT_FLAGS has_resist_shard(player_type *creature_ptr);
-void has_resist_nexus(player_type *creature_ptr);
+BIT_FLAGS has_resist_nexus(player_type *creature_ptr);
void has_resist_blind(player_type *creature_ptr);
void has_resist_neth(player_type *creature_ptr);
void has_resist_time(player_type *creature_ptr);
creature_ptr->resist_chaos = has_resist_chaos(creature_ptr);
creature_ptr->resist_disen = has_resist_disen(creature_ptr);
creature_ptr->resist_shard = has_resist_shard(creature_ptr);
- has_resist_nexus(creature_ptr);
+ creature_ptr->resist_nexus = has_resist_nexus(creature_ptr);
has_resist_blind(creature_ptr);
has_resist_neth(creature_ptr);
has_resist_time(creature_ptr);
BIT_FLAGS resist_chaos; /* Resist chaos */
BIT_FLAGS resist_disen; /* Resist disenchant */
BIT_FLAGS resist_shard; /* Resist shards */
- bool resist_nexus; /* Resist nexus */
+ BIT_FLAGS resist_nexus; /* Resist nexus */
bool resist_blind; /* Resist blindness */
bool resist_neth; /* Resist nether */
bool resist_fear; /* Resist fear */