Uploaded: 23 Dec, 2008
Previous uploads by this submitter: 0

Author: Darien

Downloads: 71

This is just a simple function designed to optimize how hits are delt.

if(is_hit(ch, victim, gsn_bash, true, false))
damage(ch, victim, <damage here>, gsn_bash, true, false);… or however your damage code goes.

In anycase, is_hit is a hack of one_hit, but it does no damage, just checks if you would hit, and returns true/false as required.

My recommendation is to use it in all skills, where they often use random variables, or just random chance to infact, have a successful hit. I also recommend that you use this in-side of your one_hit and replace all the internal thac0 coding, as it is all contained now within is_hit.

Anyways, this system won't work on a stock rom, because it requires WEAR_SECONDARY (dual wield) but with minor (extremely minor) work, it will work wonders.

I've also included a modifified bash skill, just to show how it could be used.
the bash is modified so the 'chance' variable only affects the damage done, not the actual chance to hit, because that is now taken care of within the is_hit function.

Fixed missing dam_type allocation. Whoopsies!