Vestibule Violator
Posts: 1533
Joined: Thursday, 16th December 2010, 20:52
Need to understand orcish bonuses for weapon spreadsheet
From fight.cc:1571:
- Code:
if (get_equip_race(*weapon) == ISFLAG_ORCISH
&& you.species == SP_HILL_ORC)
{
if (you.religion == GOD_BEOGH && !player_under_penance())
{
#ifdef DEBUG_DIAGNOSTICS
const int orig_damage = damage;
#endif
if (you.piety > 80 || coinflip())
damage++;
damage +=
random2avg(
div_rand_round(
std::min(static_cast<int>(you.piety), 180), 33), 2);
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "Damage: %d -> %d, Beogh bonus: %d",
orig_damage, damage, damage - orig_damage);
#endif
}
if (coinflip())
damage++;
}
I assume coinflip is a 50% probability.
Working up from the bottom:
- You have a 50% chance of adding 1 to base damage for any orcish character with orcish weapons.
- If you worship Beogh and are not under penance:
- if piety is over 80, you get another 50% chance of another +1 base damage
- you have a chance of _up to_ another 2 to base damage that depends somehow on your piety and the factors of 180 and 33.
It's that last part I don't know how to interpret. Can anyone help?