--- src/object1.c.orig 2010-08-01 04:28:32.000000000 -0400 +++ src/object1.c 2010-11-16 19:57:46.000000000 -0500 @@ -2928,6 +2928,39 @@ } /* + * Describe damage and range of a thrown boulder + */ +void display_boulder_damage(object_type *o_ptr) +{ + int boulder_add = get_skill_scale(SKILL_BOULDER, 80); + int boulder_mult = get_skill_scale(SKILL_BOULDER, 6); + int mul = 10 + (2 * (p_ptr->throw_mult - 1)) + (2 * boulder_mult); + int div = ((o_ptr->weight > 10) ? o_ptr->weight : 10); + int tdam, tdis; + + tdam = (o_ptr->dd + (o_ptr->dd * o_ptr->ds)) * 5; + tdam += (o_ptr->to_d + boulder_add) * 10; + tdam *= p_ptr->throw_mult + boulder_mult; + + tdis = (adj_str_blow[p_ptr->stat_ind[A_STR]] + 20) * mul / div; + if (tdis > mul) tdis = mul; + + text_out("\nUsing it you would do an average damage per throw of "); + if (tdam > 0) + { + if (tdam % 10) + text_out_c(TERM_L_GREEN, format("%d.%d", tdam / 10, tdam % 10)); + else + text_out_c(TERM_L_GREEN, format("%d", tdam / 10)); + } + else + text_out_c(TERM_L_RED, "0"); + text_out(" with a range of "); + text_out_c(TERM_L_GREEN, format("%d", tdis)); + text_out("."); +} + +/* * Describe a magic stick powers */ void describe_device(object_type *o_ptr) @@ -3913,6 +3946,14 @@ display_ammo_damage(o_ptr); } + /* Breakage/damage/range display for boulders */ + if ((o_ptr->tval == TV_JUNK) && (o_ptr->sval == SV_BOULDER) && (get_skill(SKILL_BOULDER))) + { + text_out("\nIt has "); + text_out_c(TERM_L_RED, format("%d", breakage_chance(o_ptr))); + text_out("% chance to break upon hit."); + display_boulder_damage(o_ptr); + } /* Monster recall for totems and corpses */ if (o_ptr->tval == TV_TOTEM) {