creature_ptr->tval_xtra = 0;
creature_ptr->tval_ammo = 0;
creature_ptr->cursed = 0L;
- creature_ptr->bless_blade = FALSE;
creature_ptr->impact[0] = FALSE;
creature_ptr->impact[1] = FALSE;
- creature_ptr->dec_mana = FALSE;
- creature_ptr->easy_spell = FALSE;
- creature_ptr->heavy_spell = FALSE;
- creature_ptr->see_inv = FALSE;
creature_ptr->free_act = FALSE;
creature_ptr->slow_digest = FALSE;
creature_ptr->regenerate = FALSE;
creature_ptr->can_swim = FALSE;
creature_ptr->levitation = FALSE;
- creature_ptr->hold_exp = FALSE;
- creature_ptr->telepathy = FALSE;
- creature_ptr->esp_troll = FALSE;
- creature_ptr->esp_giant = FALSE;
- creature_ptr->esp_dragon = FALSE;
- creature_ptr->esp_human = FALSE;
- creature_ptr->esp_good = FALSE;
- creature_ptr->esp_nonliving = FALSE;
- creature_ptr->esp_unique = FALSE;
creature_ptr->lite = FALSE;
creature_ptr->sustain_str = FALSE;
creature_ptr->sustain_int = FALSE;
creature_ptr->resist_time = FALSE;
creature_ptr->resist_water = FALSE;
creature_ptr->resist_fear = FALSE;
- creature_ptr->reflect = FALSE;
- creature_ptr->sh_fire = FALSE;
- creature_ptr->sh_elec = FALSE;
- creature_ptr->sh_cold = FALSE;
- creature_ptr->anti_magic = FALSE;
- creature_ptr->anti_tele = FALSE;
- creature_ptr->warning = FALSE;
- creature_ptr->mighty_throw = FALSE;
- creature_ptr->see_nocto = FALSE;
creature_ptr->immune_acid = FALSE;
creature_ptr->immune_elec = FALSE;
creature_ptr->immune_fire = FALSE;
creature_ptr->two_handed_weapon = FALSE;
creature_ptr->right_hand_weapon = FALSE;
creature_ptr->left_hand_weapon = FALSE;
- creature_ptr->no_flowed = FALSE;
- creature_ptr->yoiyami = FALSE;
- creature_ptr->easy_2weapon = FALSE;
- creature_ptr->down_saving = FALSE;
}
/*!
bool omoi = FALSE;
floor_type *floor_ptr = creature_ptr->current_floor_ptr;
- bool have_sw = FALSE, have_kabe = FALSE;
- OBJECT_IDX this_o_idx, next_o_idx = 0;
-
/* Save the old vision stuff */
bool old_telepathy = creature_ptr->telepathy;
bool old_esp_animal = creature_ptr->esp_animal;
have_esp_undead(creature_ptr);
have_esp_demon(creature_ptr);
have_esp_orc(creature_ptr);
+ have_esp_troll(creature_ptr);
+ have_esp_giant(creature_ptr);
+ have_esp_dragon(creature_ptr);
+ have_esp_human(creature_ptr);
+ have_esp_good(creature_ptr);
+ have_esp_nonliving(creature_ptr);
+ have_esp_unique(creature_ptr);
+ have_esp_telepathy(creature_ptr);
+ have_bless_blade(creature_ptr);
+ have_easy2_weapon(creature_ptr);
+ have_down_saving(creature_ptr);
+ have_no_ac(creature_ptr);
+ have_mighty_throw(creature_ptr);
+ have_dec_mana(creature_ptr);
+ have_reflect(creature_ptr);
+ have_see_nocto(creature_ptr);
+ have_warning(creature_ptr);
+ have_anti_magic(creature_ptr);
+ have_anti_tele(creature_ptr);
+ have_sh_fire(creature_ptr);
+ have_sh_elec(creature_ptr);
+ have_sh_cold(creature_ptr);
+ have_easy_spell(creature_ptr);
+ have_heavy_spell(creature_ptr);
+ have_hold_exp(creature_ptr);
+ have_see_inv(creature_ptr);
calc_race_status(creature_ptr);
if (creature_ptr->realm1 == REALM_HEX) {
if (hex_spelling(creature_ptr, HEX_DEMON_AURA)) {
- creature_ptr->sh_fire = TRUE;
creature_ptr->regenerate = TRUE;
}
-
- if (hex_spelling(creature_ptr, HEX_ICE_ARMOR)) {
- creature_ptr->sh_cold = TRUE;
- }
-
- if (hex_spelling(creature_ptr, HEX_SHOCK_CLOAK)) {
- creature_ptr->sh_elec = TRUE;
- }
}
calc_strength_addition(creature_ptr);
put_equipment_warning(creature_ptr);
- for (int i = 0; i < INVEN_PACK; i++) {
- if ((creature_ptr->inventory_list[i].tval == TV_NATURE_BOOK) && (creature_ptr->inventory_list[i].sval == 2))
- have_sw = TRUE;
- if ((creature_ptr->inventory_list[i].tval == TV_CRAFT_BOOK) && (creature_ptr->inventory_list[i].sval == 2))
- have_kabe = TRUE;
- }
-
- for (this_o_idx = floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx) {
- o_ptr = &floor_ptr->o_list[this_o_idx];
- next_o_idx = o_ptr->next_o_idx;
-
- if ((o_ptr->tval == TV_NATURE_BOOK) && (o_ptr->sval == 2))
- have_sw = TRUE;
- if ((o_ptr->tval == TV_CRAFT_BOOK) && (o_ptr->sval == 2))
- have_kabe = TRUE;
- }
-
- if (creature_ptr->pass_wall && !creature_ptr->kill_wall)
- creature_ptr->no_flowed = TRUE;
-
- if (have_sw && ((creature_ptr->realm1 == REALM_NATURE) || (creature_ptr->realm2 == REALM_NATURE) || (creature_ptr->pclass == CLASS_SORCERER))) {
- const magic_type *s_ptr = &mp_ptr->info[REALM_NATURE - 1][SPELL_SW];
- if (creature_ptr->lev >= s_ptr->slevel)
- creature_ptr->no_flowed = TRUE;
- }
-
- if (have_kabe && ((creature_ptr->realm1 == REALM_CRAFT) || (creature_ptr->realm2 == REALM_CRAFT) || (creature_ptr->pclass == CLASS_SORCERER))) {
- const magic_type *s_ptr = &mp_ptr->info[REALM_CRAFT - 1][SPELL_WALL];
- if (creature_ptr->lev >= s_ptr->slevel)
- creature_ptr->no_flowed = TRUE;
- }
}
static void calc_alignment(player_type *creature_ptr)
creature_ptr->resist_elec = TRUE;
creature_ptr->resist_cold = TRUE;
creature_ptr->resist_pois = TRUE;
- creature_ptr->sh_fire = TRUE;
- creature_ptr->sh_elec = TRUE;
- creature_ptr->sh_cold = TRUE;
creature_ptr->levitation = TRUE;
} else if (creature_ptr->special_defense & KAMAE_GENBU) {
creature_ptr->to_a += (creature_ptr->lev * creature_ptr->lev) / 50;
creature_ptr->dis_to_a += (creature_ptr->lev * creature_ptr->lev) / 50;
- creature_ptr->reflect = TRUE;
creature_ptr->num_blow[i] -= 2;
if ((creature_ptr->pclass == CLASS_MONK) && (creature_ptr->lev > 42))
creature_ptr->num_blow[i]--;
void calc_timelimit_status(player_type *creature_ptr)
{
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
- creature_ptr->see_inv = TRUE;
creature_ptr->free_act = TRUE;
creature_ptr->slow_digest = TRUE;
creature_ptr->regenerate = TRUE;
creature_ptr->levitation = TRUE;
- creature_ptr->hold_exp = TRUE;
- creature_ptr->telepathy = TRUE;
creature_ptr->lite = TRUE;
creature_ptr->sustain_str = TRUE;
creature_ptr->sustain_int = TRUE;
creature_ptr->resist_blind = TRUE;
creature_ptr->resist_neth = TRUE;
creature_ptr->resist_fear = TRUE;
- creature_ptr->reflect = TRUE;
- creature_ptr->sh_fire = TRUE;
- creature_ptr->sh_elec = TRUE;
- creature_ptr->sh_cold = TRUE;
}
if (creature_ptr->tim_res_nether) {
creature_ptr->resist_neth = TRUE;
}
- if (creature_ptr->tim_sh_fire) {
- creature_ptr->sh_fire = TRUE;
- }
-
if (creature_ptr->tim_res_time) {
creature_ptr->resist_time = TRUE;
}
- if (creature_ptr->wraith_form) {
- creature_ptr->reflect = TRUE;
- }
if (creature_ptr->magicdef) {
creature_ptr->resist_blind = TRUE;
creature_ptr->resist_conf = TRUE;
- creature_ptr->reflect = TRUE;
creature_ptr->free_act = TRUE;
creature_ptr->levitation = TRUE;
}
- if (is_time_limit_esp(creature_ptr)) {
- creature_ptr->telepathy = TRUE;
- }
if (creature_ptr->ele_immune) {
if (creature_ptr->special_defense & DEFENSE_ACID)
creature_ptr->immune_cold = TRUE;
}
- if (creature_ptr->tim_invis) {
- creature_ptr->see_inv = TRUE;
- }
-
if (creature_ptr->tim_regen) {
creature_ptr->regenerate = TRUE;
}
creature_ptr->levitation = TRUE;
}
- if (creature_ptr->tim_reflect) {
- creature_ptr->reflect = TRUE;
- }
-
if (is_hero(creature_ptr) || creature_ptr->shero) {
creature_ptr->resist_fear = TRUE;
}
creature_ptr->cursed |= TRC_FAST_DIGEST;
if (have_flag(flgs, TR_SLOW_REGEN))
creature_ptr->cursed |= TRC_SLOW_REGEN;
- if (have_flag(flgs, TR_DEC_MANA))
- creature_ptr->dec_mana = TRUE;
- if (have_flag(flgs, TR_BLESSED))
- creature_ptr->bless_blade = TRUE;
if (have_flag(flgs, TR_SLOW_DIGEST))
creature_ptr->slow_digest = TRUE;
if (have_flag(flgs, TR_REGEN))
creature_ptr->regenerate = TRUE;
- if (have_flag(flgs, TR_TELEPATHY))
- creature_ptr->telepathy = TRUE;
- if (have_flag(flgs, TR_ESP_TROLL))
- creature_ptr->esp_troll = TRUE;
- if (have_flag(flgs, TR_ESP_GIANT))
- creature_ptr->esp_giant = TRUE;
- if (have_flag(flgs, TR_ESP_DRAGON))
- creature_ptr->esp_dragon = TRUE;
- if (have_flag(flgs, TR_ESP_HUMAN))
- creature_ptr->esp_human = TRUE;
- if (have_flag(flgs, TR_ESP_GOOD))
- creature_ptr->esp_good = TRUE;
- if (have_flag(flgs, TR_ESP_NONLIVING))
- creature_ptr->esp_nonliving = TRUE;
- if (have_flag(flgs, TR_ESP_UNIQUE))
- creature_ptr->esp_unique = TRUE;
-
- if (have_flag(flgs, TR_SEE_INVIS))
- creature_ptr->see_inv = TRUE;
+
if (have_flag(flgs, TR_LEVITATION))
creature_ptr->levitation = TRUE;
if (have_flag(flgs, TR_FREE_ACT))
creature_ptr->free_act = TRUE;
- if (have_flag(flgs, TR_HOLD_EXP))
- creature_ptr->hold_exp = TRUE;
- if (have_flag(flgs, TR_WARNING)) {
- if (!o_ptr->inscription || !(angband_strchr(quark_str(o_ptr->inscription), '$')))
- creature_ptr->warning = TRUE;
- }
if (have_flag(flgs, TR_TELEPORT)) {
if (object_is_cursed(o_ptr))
if (have_flag(flgs, TR_RES_NETHER))
creature_ptr->resist_neth = TRUE;
- if (have_flag(flgs, TR_REFLECT))
- creature_ptr->reflect = TRUE;
- if (have_flag(flgs, TR_SH_FIRE))
- creature_ptr->sh_fire = TRUE;
- if (have_flag(flgs, TR_SH_ELEC))
- creature_ptr->sh_elec = TRUE;
- if (have_flag(flgs, TR_SH_COLD))
- creature_ptr->sh_cold = TRUE;
- if (have_flag(flgs, TR_NO_MAGIC))
- creature_ptr->anti_magic = TRUE;
- if (have_flag(flgs, TR_NO_TELE))
- creature_ptr->anti_tele = TRUE;
-
if (have_flag(flgs, TR_SUST_STR))
creature_ptr->sustain_str = TRUE;
if (have_flag(flgs, TR_SUST_INT))
if (have_flag(flgs, TR_SUST_CHR))
creature_ptr->sustain_chr = TRUE;
- if (o_ptr->name2 == EGO_YOIYAMI)
- creature_ptr->yoiyami = TRUE;
- if (o_ptr->name2 == EGO_2WEAPON)
- creature_ptr->easy_2weapon = TRUE;
if (o_ptr->name2 == EGO_RING_RES_TIME)
creature_ptr->resist_time = TRUE;
- if (o_ptr->name2 == EGO_RING_THROW)
- creature_ptr->mighty_throw = TRUE;
- if (have_flag(flgs, TR_EASY_SPELL))
- creature_ptr->easy_spell = TRUE;
- if (o_ptr->name2 == EGO_AMU_FOOL)
- creature_ptr->heavy_spell = TRUE;
- if (o_ptr->name2 == EGO_AMU_NAIVETY)
- creature_ptr->down_saving = TRUE;
if (o_ptr->tval == TV_CAPTURE)
continue;