case CLASS_MINDCRAFTER:
if (creature_ptr->lev > 9)
creature_ptr->resist_fear = TRUE;
- if (creature_ptr->lev > 29)
- creature_ptr->resist_conf = TRUE;
break;
case CLASS_BARD:
creature_ptr->resist_sound = TRUE;
void set_personality_flags(player_type *creature_ptr)
{
- if (creature_ptr->pseikaku == PERSONALITY_CHARGEMAN) {
- creature_ptr->resist_conf = TRUE;
- }
-
if (creature_ptr->pseikaku == PERSONALITY_LUCKY)
creature_ptr->muta3 |= MUT3_GOOD_LUCK;
if (creature_ptr->pseikaku == PERSONALITY_MUNCHKIN) {
creature_ptr->resist_blind = TRUE;
- creature_ptr->resist_conf = TRUE;
if (creature_ptr->pclass != CLASS_NINJA)
creature_ptr->lite = TRUE;
}
case MIMIC_DEMON_LORD:
creature_ptr->resist_chaos = TRUE;
creature_ptr->resist_neth = TRUE;
- creature_ptr->resist_conf = TRUE;
creature_ptr->resist_disen = TRUE;
creature_ptr->resist_nexus = TRUE;
creature_ptr->resist_fear = TRUE;
if (creature_ptr->lev > 19)
creature_ptr->immune_acid = TRUE;
break;
- case RACE_KLACKON:
- creature_ptr->resist_conf = TRUE;
- break;
case RACE_KOBOLD:
creature_ptr->resist_pois = TRUE;
break;
creature_ptr->resist_lite = TRUE;
break;
case RACE_BEASTMAN:
- creature_ptr->resist_conf = TRUE;
creature_ptr->resist_sound = TRUE;
break;
case RACE_BALROG:
creature_ptr->oppose_fire = 1;
creature_ptr->redraw |= PR_STATUS;
}
-
- break;
- case RACE_KUTAR:
- creature_ptr->resist_conf = TRUE;
break;
case RACE_MERFOLK:
creature_ptr->resist_water = TRUE;
}
}
+void have_resist_conf(player_type *creature_ptr)
+{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ creature_ptr->resist_conf = FALSE;
+
+ if (creature_ptr->pclass == CLASS_MINDCRAFTER && creature_ptr->lev > 29)
+ creature_ptr->resist_conf = TRUE;
+
+ if (creature_ptr->pseikaku == PERSONALITY_CHARGEMAN || creature_ptr->pseikaku == PERSONALITY_MUNCHKIN) {
+ creature_ptr->resist_conf = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && (creature_ptr->prace == RACE_KLACKON || creature_ptr->prace == RACE_BEASTMAN || creature_ptr->prace == RACE_KUTAR)) {
+ creature_ptr->resist_conf = TRUE;
+ }
+
+ if (creature_ptr->mimic_form == MIMIC_DEMON_LORD) {
+ creature_ptr->resist_conf = TRUE;
+ }
+
+ if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
+ creature_ptr->resist_conf = TRUE;
+ }
+
+ if (creature_ptr->magicdef) {
+ creature_ptr->resist_conf = 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_CONF))
+ creature_ptr->resist_conf = TRUE;
+ }
+}
void have_resist_fire(player_type *creature_ptr);
void have_resist_cold(player_type *creature_ptr);
void have_resist_pois(player_type *creature_ptr);
+void have_resist_conf(player_type *creature_ptr);
*/
static void clear_creature_bonuses(player_type *creature_ptr)
{
- creature_ptr->resist_conf = FALSE;
creature_ptr->resist_sound = FALSE;
creature_ptr->resist_lite = FALSE;
creature_ptr->resist_dark = FALSE;
have_resist_fire(creature_ptr);
have_resist_cold(creature_ptr);
have_resist_pois(creature_ptr);
+ have_resist_conf(creature_ptr);
calc_race_status(creature_ptr);
{
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
creature_ptr->lite = TRUE;
- creature_ptr->resist_conf = TRUE;
creature_ptr->resist_sound = TRUE;
creature_ptr->resist_lite = TRUE;
creature_ptr->resist_dark = TRUE;
if (creature_ptr->magicdef) {
creature_ptr->resist_blind = TRUE;
- creature_ptr->resist_conf = TRUE;
}
if (creature_ptr->ele_immune) {
if (have_flag(flgs, TR_RES_FEAR))
creature_ptr->resist_fear = TRUE;
- if (have_flag(flgs, TR_RES_CONF))
- creature_ptr->resist_conf = TRUE;
if (have_flag(flgs, TR_RES_SOUND))
creature_ptr->resist_sound = TRUE;
if (have_flag(flgs, TR_RES_LITE))