if (creature_ptr->lev > 29)
creature_ptr->resist_conf = TRUE;
break;
- case CLASS_MONK:
- case CLASS_FORCETRAINER:
- if (!(heavy_armor(creature_ptr))) {
- if (creature_ptr->lev > 24)
- creature_ptr->free_act = TRUE;
- }
-
- break;
case CLASS_BARD:
creature_ptr->resist_sound = TRUE;
break;
creature_ptr->sustain_dex = TRUE;
creature_ptr->sustain_con = TRUE;
creature_ptr->regenerate = TRUE;
- creature_ptr->free_act = TRUE;
creature_ptr->redraw |= PR_STATUS;
break;
case CLASS_NINJA:
} else if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || creature_ptr->right_hand_weapon)
&& (!creature_ptr->inventory_list[INVEN_LARM].k_idx || creature_ptr->left_hand_weapon)) {
creature_ptr->skill_stl += (creature_ptr->lev) / 10;
- if (creature_ptr->lev > 24)
- creature_ptr->free_act = TRUE;
}
if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || creature_ptr->right_hand_weapon)
creature_ptr->see_inv = TRUE;
}
}
+
+void have_free_act(player_type *creature_ptr)
+{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ creature_ptr->free_act = FALSE;
+
+ if (creature_ptr->muta3 & MUT3_MOTION)
+ creature_ptr->free_act = TRUE;
+
+ if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_GNOME) {
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_GOLEM) {
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_SPECTRE) {
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_ANDROID) {
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (heavy_armor(creature_ptr) && (!creature_ptr->inventory_list[INVEN_RARM].k_idx || creature_ptr->right_hand_weapon)
+ && (!creature_ptr->inventory_list[INVEN_LARM].k_idx || creature_ptr->left_hand_weapon)) {
+ if (creature_ptr->lev > 24)
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (creature_ptr->pclass == CLASS_MONK || creature_ptr->pclass == CLASS_FORCETRAINER) {
+ if (!(heavy_armor(creature_ptr))) {
+ if (creature_ptr->lev > 24)
+ creature_ptr->free_act = TRUE;
+ }
+ }
+
+ if (creature_ptr->pclass == CLASS_BERSERKER) {
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
+ creature_ptr->free_act = TRUE;
+ }
+
+ if (creature_ptr->magicdef) {
+ creature_ptr->free_act = 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_FREE_ACT))
+ creature_ptr->free_act = TRUE;
+ }
+}
creature_ptr->cursed = 0L;
creature_ptr->impact[0] = FALSE;
creature_ptr->impact[1] = FALSE;
- creature_ptr->free_act = FALSE;
creature_ptr->slow_digest = FALSE;
creature_ptr->regenerate = FALSE;
creature_ptr->can_swim = FALSE;
clear_creature_bonuses(creature_ptr);
+ if (has_melee_weapon(creature_ptr, INVEN_RARM))
+ creature_ptr->right_hand_weapon = TRUE;
+ if (has_melee_weapon(creature_ptr, INVEN_LARM)) {
+ creature_ptr->left_hand_weapon = TRUE;
+ if (!creature_ptr->right_hand_weapon)
+ default_hand = 1;
+ }
+
+ if (can_two_hands_wielding(creature_ptr)) {
+ if (creature_ptr->right_hand_weapon && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_LARM)
+ && object_allow_two_hands_wielding(&creature_ptr->inventory_list[INVEN_RARM])) {
+ creature_ptr->two_handed_weapon = TRUE;
+ } else if (creature_ptr->left_hand_weapon && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_RARM)
+ && object_allow_two_hands_wielding(&creature_ptr->inventory_list[INVEN_LARM])) {
+ creature_ptr->two_handed_weapon = TRUE;
+ } else {
+ switch (creature_ptr->pclass) {
+ case CLASS_MONK:
+ case CLASS_FORCETRAINER:
+ case CLASS_BERSERKER:
+ if (empty_hands(creature_ptr, FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM)) {
+ creature_ptr->right_hand_weapon = TRUE;
+ creature_ptr->two_handed_weapon = TRUE;
+ }
+ }
+
+ default_hand = 1;
+ }
+ }
+
have_pass_wall(creature_ptr);
have_kill_wall(creature_ptr);
have_xtra_might(creature_ptr);
have_heavy_spell(creature_ptr);
have_hold_exp(creature_ptr);
have_see_inv(creature_ptr);
+ have_free_act(creature_ptr);
calc_race_status(creature_ptr);
- if (has_melee_weapon(creature_ptr, INVEN_RARM))
- creature_ptr->right_hand_weapon = TRUE;
- if (has_melee_weapon(creature_ptr, INVEN_LARM)) {
- creature_ptr->left_hand_weapon = TRUE;
- if (!creature_ptr->right_hand_weapon)
- default_hand = 1;
- }
-
- if (can_two_hands_wielding(creature_ptr)) {
- if (creature_ptr->right_hand_weapon && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_LARM)
- && object_allow_two_hands_wielding(&creature_ptr->inventory_list[INVEN_RARM])) {
- creature_ptr->two_handed_weapon = TRUE;
- } else if (creature_ptr->left_hand_weapon && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_RARM)
- && object_allow_two_hands_wielding(&creature_ptr->inventory_list[INVEN_LARM])) {
- creature_ptr->two_handed_weapon = TRUE;
- } else {
- switch (creature_ptr->pclass) {
- case CLASS_MONK:
- case CLASS_FORCETRAINER:
- case CLASS_BERSERKER:
- if (empty_hands(creature_ptr, FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM)) {
- creature_ptr->right_hand_weapon = TRUE;
- creature_ptr->two_handed_weapon = TRUE;
- }
- }
-
- default_hand = 1;
- }
- }
if (creature_ptr->special_defense & KAMAE_MASK) {
if (!(empty_hands_status & EMPTY_HAND_RARM)) {
void calc_timelimit_status(player_type *creature_ptr)
{
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
- creature_ptr->free_act = TRUE;
creature_ptr->slow_digest = TRUE;
creature_ptr->regenerate = TRUE;
creature_ptr->levitation = TRUE;
if (creature_ptr->magicdef) {
creature_ptr->resist_blind = TRUE;
creature_ptr->resist_conf = TRUE;
- creature_ptr->free_act = TRUE;
creature_ptr->levitation = 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_TELEPORT)) {
if (object_is_cursed(o_ptr))