screen_load();
}
-s16b calc_expect_crit_shot(int weight, int plus, int dam)
+s16b calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow, int dam)
{
u32b num;
int i, k, crit;
/* Extract "shot" power */
- i = ((p_ptr->to_h_b + plus) * 4) + (p_ptr->lev * 2);
-
+ i = p_ptr->to_h_b * 4 + plus_ammo + (p_ptr->lev * 2);
+
/* Snipers can shot more critically with crossbows */
if (p_ptr->concent) i += ((i * p_ptr->concent) / 5);
if ((p_ptr->pclass == CLASS_SNIPER) && (p_ptr->tval_ammo == TV_BOLT)) i *= 2;
+ /* Good bow makes more critical */
+ i += MAX(0, plus_bow - 15) * 4 * (p_ptr->concent ? p_ptr->concent + 5 : 5);
+
if (i < 0) i = 0;
k = 0;
* Critical hits (from objects thrown by player)
* Factor in item weight, total plusses, and player level.
*/
-s16b critical_shot(int weight, int plus, int dam)
+s16b critical_shot(int weight, int plus_ammo, int plus_bow, int dam)
{
int i, k;
-
+
/* Extract "shot" power */
- i = ((p_ptr->to_h_b + plus) * 4) + (p_ptr->lev * 2);
-
+ i = p_ptr->to_h_b * 4 + plus_ammo + (p_ptr->lev * 2);
+
/* Snipers can shot more critically with crossbows */
if (p_ptr->concent) i += ((i * p_ptr->concent) / 5);
if ((p_ptr->pclass == CLASS_SNIPER) && (p_ptr->tval_ammo == TV_BOLT)) i *= 2;
-
+
+ /* Good bow makes more critical */
+ i += MAX(0, plus_bow - 15) * 4 * (p_ptr->concent ? p_ptr->concent + 5 : 5);
+
/* Critical hit */
if (randint1(5000) <= i)
{
{
/* Apply special damage XXX XXX XXX */
tdam = tot_dam_aux_shot(q_ptr, tdam, m_ptr);
- tdam = critical_shot(q_ptr->weight, q_ptr->to_h, tdam);
+ tdam = critical_shot(q_ptr->weight, q_ptr->to_h, j_ptr->to_h, tdam);
/* No negative damage */
if (tdam < 0) tdam = 0;
tdam = damroll(dd, ds);
/* Apply special damage XXX XXX XXX */
tdam = tot_dam_aux(q_ptr, tdam, m_ptr, 0, TRUE);
- tdam = critical_shot(q_ptr->weight, q_ptr->to_h, tdam);
+ tdam = critical_shot(q_ptr->weight, q_ptr->to_h, 0, tdam);
if (q_ptr->to_d > 0)
tdam += q_ptr->to_d;
else
/* cmd1.c */
extern bool test_hit_fire(int chance, int ac, int vis);
extern bool test_hit_norm(int chance, int ac, int vis);
-extern s16b critical_shot(int weight, int plus, int dam);
+extern s16b critical_shot(int weight, int plus_ammo, int plus_bow, int dam);
extern s16b critical_norm(int weight, int plus, int dam, s16b meichuu, int mode);
extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown);
extern void search(void);
extern int quest_number(int level);
extern int random_quest_number(int level);
extern bool tele_town(void);
-extern s16b calc_expect_crit_shot(int weight, int plus, int dam);
+extern s16b calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, int dam);
extern s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari);
/* util.c */
t = object_desc_str(t, "/shot, ");
/* Apply Expect damage of Critical */
- avgdam = calc_expect_crit_shot(o_ptr->weight, o_ptr->to_h, avgdam);
+ avgdam = calc_expect_crit_shot(o_ptr->weight, o_ptr->to_h, bow_ptr->to_h, avgdam);
t = object_desc_num(t, avgdam);
t = object_desc_str(t, "/crit, ");