Skip to content

Commit

Permalink
Launchers can contribute to projectile damage (adapted from SpliceHack).
Browse files Browse the repository at this point in the history
/* In NerfHack, launchers can contribute to damage. This
* change was adapted from SpliceHack, but tempered back
* a bit to balance things out. For example, since the
* cavemen starts with a +2 sling we don't want them
* getting a +2 damage bonus right off the bat.
* This version of the mechanic also ignores the enchant
* level of the ammo and only concerns the launcher. */
  • Loading branch information
elunna committed Dec 14, 2024
1 parent d7b7bc7 commit cecb558
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/uhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1479,10 +1479,21 @@ hmon_hitmon_weapon_melee(
&& ammo_and_launcher(obj, uwep)) {
hmd->dmg += rnd(7);
}

if (hmd->material == SILVER && mon_hates_silver(mon)) {
hmd->silvermsg = hmd->silverobj = TRUE;
}

/* In NerfHack, launchers can contribute to damage. This
* change was adapted from SpliceHack, but tempered back
* a bit to balance things out. For example, since the
* cavemen starts with a +2 sling we don't want them
* getting a +2 damage bonus right off the bat.
* This version of the mechanic also ignores the enchant
* level of the ammo and only concerns the launcher. */
if (uwep && ammo_and_launcher(obj, uwep) && uwep->spe > 2)
hmd->dmg += rnd(uwep->spe / 3); /* Max possible bonus up to +4 */

if (artifact_light(obj) && obj->lamplit
&& mon_hates_light(mon))
hmd->lightobj = TRUE;
Expand Down

0 comments on commit cecb558

Please sign in to comment.