static s16b calc_charisma_addition(player_type *creature_ptr);
static s16b calc_to_magic_chance(player_type *creature_ptr);
static ARMOUR_CLASS calc_base_ac(player_type *creature_ptr);
-static ARMOUR_CLASS calc_to_ac(player_type *creature_ptr, bool is_true_value);
+static ARMOUR_CLASS calc_to_ac(player_type *creature_ptr, bool is_real_value);
static s16b calc_speed(player_type *creature_ptr);
static s16b calc_double_weapon_penalty(player_type *creature_ptr, INVENTORY_IDX slot);
static void calc_use_status(player_type *creature_ptr, int status);
static s16b calc_riding_bow_penalty(player_type *creature_ptr);
static void put_equipment_warning(player_type *creature_ptr);
-static s16b calc_to_damage(player_type *creature_ptr, INVENTORY_IDX slot, bool is_true_value);
-static s16b calc_to_hit(player_type *creature_ptr, INVENTORY_IDX slot, bool is_true_value);
+static s16b calc_to_damage(player_type *creature_ptr, INVENTORY_IDX slot, bool is_real_value);
+static s16b calc_to_hit(player_type *creature_ptr, INVENTORY_IDX slot, bool is_real_value);
-static s16b calc_to_hit_bow(player_type *creature_ptr, bool is_true_value);
+static s16b calc_to_hit_bow(player_type *creature_ptr, bool is_real_value);
static s16b calc_to_damage_misc(player_type *creature_ptr);
static s16b calc_to_hit_misc(player_type *creature_ptr);
creature_ptr->stat_add[A_DEX] = calc_dexterity_addition(creature_ptr);
creature_ptr->stat_add[A_CON] = calc_constitution_addition(creature_ptr);
creature_ptr->stat_add[A_CHR] = calc_charisma_addition(creature_ptr);
- creature_ptr->to_m_chance = calc_to_magic_chance(creature_ptr);
- creature_ptr->ac = calc_base_ac(creature_ptr);
- creature_ptr->to_a = calc_to_ac(creature_ptr, TRUE);
- creature_ptr->dis_ac = calc_base_ac(creature_ptr);
- creature_ptr->dis_to_a = calc_to_ac(creature_ptr, FALSE);
for (int i = 0; i < A_MAX; i++) {
calc_top_status(creature_ptr, i);
creature_ptr->to_d_m = calc_to_damage_misc(creature_ptr);
creature_ptr->to_h_m = calc_to_hit_misc(creature_ptr);
creature_ptr->skill_dig = calc_skill_dig(creature_ptr);
+ creature_ptr->to_m_chance = calc_to_magic_chance(creature_ptr);
+ creature_ptr->ac = calc_base_ac(creature_ptr);
+ creature_ptr->to_a = calc_to_ac(creature_ptr, TRUE);
+ creature_ptr->dis_ac = calc_base_ac(creature_ptr);
+ creature_ptr->dis_to_a = calc_to_ac(creature_ptr, FALSE);
if (old_mighty_throw != creature_ptr->mighty_throw) {
creature_ptr->window |= PW_INVEN;
*/
static void calc_mana(player_type *creature_ptr)
{
- if (!mp_ptr->spell_book)
+ if (!mp_ptr->spell_book && mp_ptr->spell_first == SPELL_FIRST_NO_SPELL)
return;
int levels;
num_blow++;
if (blow_base > 58)
num_blow++;
-
- MAGIC_NUM1 current_ki = get_current_ki(creature_ptr);
- if (current_ki != i) {
- creature_ptr->to_d[i] += current_ki / 5;
- creature_ptr->dis_to_d[i] += current_ki / 5;
- }
} else {
if (blow_base > 12)
num_blow++;
num_blow /= 2;
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;
num_blow -= 2;
if ((creature_ptr->pclass == CLASS_MONK) && (creature_ptr->lev > 42))
num_blow--;
if (num_blow < 0)
num_blow = 0;
} else if (creature_ptr->special_defense & KAMAE_SUZAKU) {
- creature_ptr->to_h[i] -= (creature_ptr->lev / 3);
- creature_ptr->to_d[i] -= (creature_ptr->lev / 6);
-
- creature_ptr->dis_to_h[i] -= (creature_ptr->lev / 3);
- creature_ptr->dis_to_d[i] -= (creature_ptr->lev / 6);
num_blow /= 2;
}
return ac;
}
-static ARMOUR_CLASS calc_to_ac(player_type *creature_ptr, bool is_true_value)
+static ARMOUR_CLASS calc_to_ac(player_type *creature_ptr, bool is_real_value)
{
ARMOUR_CLASS ac = 0;
if (creature_ptr->yoiyami)
o_ptr = &creature_ptr->inventory_list[i];
if (!o_ptr->k_idx)
continue;
- if (is_true_value || object_is_known(o_ptr))
+ if (is_real_value || object_is_known(o_ptr))
ac += o_ptr->to_a;
if (o_ptr->curse_flags & TRC_LOW_AC) {
if (o_ptr->curse_flags & TRC_HEAVY_CURSE) {
- if (is_true_value || object_is_fully_known(o_ptr))
+ if (is_real_value || object_is_fully_known(o_ptr))
ac -= 30;
} else {
- if (is_true_value || object_is_fully_known(o_ptr))
+ if (is_real_value || object_is_fully_known(o_ptr))
ac -= 10;
}
}
}
}
- if (creature_ptr->special_defense & KAMAE_BYAKKO) {
+ if (creature_ptr->special_defense & KAMAE_GENBU) {
+ ac += (creature_ptr->lev * creature_ptr->lev) / 50;
+ } else if (creature_ptr->special_defense & KAMAE_BYAKKO) {
ac -= 40;
} else if (creature_ptr->special_defense & KAMAE_SEIRYU) {
ac -= 50;
}
}
-static s16b calc_to_damage(player_type *creature_ptr, INVENTORY_IDX slot, bool is_true_value)
+static s16b calc_to_damage(player_type *creature_ptr, INVENTORY_IDX slot, bool is_real_value)
{
object_type *o_ptr = &creature_ptr->inventory_list[slot];
BIT_FLAGS flgs[TR_FLAG_SIZE];
} else {
damage -= 10;
}
+ } else if (creature_ptr->pclass == CLASS_FORCETRAINER) {
+ // 練気術師は格闘ダメージに (気)/5 の修正を得る。
+ if (is_martial_arts_mode(creature_ptr) && calc_hand == PLAYER_HAND_MAIN) {
+ damage += get_current_ki(creature_ptr) / 5;
+ }
}
if ((creature_ptr->realm1 == REALM_HEX) && object_is_cursed(o_ptr)) {
|| (i == INVEN_SUB_HAND && has_melee_weapon(creature_ptr, i)) || i == INVEN_BOW)
continue;
- if (!object_is_known(o_ptr) && !is_true_value)
+ if (!object_is_known(o_ptr) && !is_real_value)
continue;
bonus_to_d = o_ptr->to_d;
damage += (creature_ptr->lev / 6);
}
+ // 朱雀の構えをとっているとき、格闘ダメージに -(レベル)/6 の修正を得る。
+ if (creature_ptr->special_defense & KAMAE_SUZAKU) {
+ if (is_martial_arts_mode(creature_ptr) && calc_hand == PLAYER_HAND_MAIN) {
+ damage -= (creature_ptr->lev / 6);
+ }
+ }
+
return damage;
}
* @details
* 'slot' MUST be INVEN_MAIN_HAND or INVEM_SUB_HAND.
*/
-static s16b calc_to_hit(player_type *creature_ptr, INVENTORY_IDX slot, bool is_true_value)
+static s16b calc_to_hit(player_type *creature_ptr, INVENTORY_IDX slot, bool is_real_value)
{
s16b hit = 0;
}
/* Low melee penalty */
- if ((object_is_fully_known(o_ptr) || is_true_value) && o_ptr->curse_flags & TRC_LOW_MELEE) {
+ if ((object_is_fully_known(o_ptr) || is_real_value) && o_ptr->curse_flags & TRC_LOW_MELEE) {
if (o_ptr->curse_flags & TRC_HEAVY_CURSE) {
hit -= 15;
} else {
continue;
/* Fake value does not include unknown objects' value */
- if (is_true_value || !object_is_known(o_ptr))
+ if (!object_is_known(o_ptr) && !is_real_value)
continue;
int bonus_to_h = o_ptr->to_h;
/* Two handed combat penalty */
hit -= calc_double_weapon_penalty(creature_ptr, slot);
+ // 朱雀の構えをとっているとき、格闘命中に -(レベル)/3 の修正を得る。
+ if (creature_ptr->special_defense & KAMAE_SUZAKU) {
+ if (is_martial_arts_mode(creature_ptr) && calc_hand == PLAYER_HAND_MAIN) {
+ hit -= (creature_ptr->lev / 3);
+ }
+ }
+
return hit;
}
-static s16b calc_to_hit_bow(player_type *creature_ptr, bool is_true_value)
+static s16b calc_to_hit_bow(player_type *creature_ptr, bool is_real_value)
{
s16b pow = 0;
bonus_to_h = (o_ptr->to_h + 1) / 2;
}
- if (is_true_value || object_is_known(o_ptr))
+ if (is_real_value || object_is_known(o_ptr))
pow += (s16b)bonus_to_h;
}
return PLAYER_HAND_MAIN;
}
return 0;
-}
\ No newline at end of file
+}