nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
130 stars 92 forks source link

Removing Weapon Bonuses from Ranged Touch Attack #790

Open Arelith-Server opened 4 years ago

Arelith-Server commented 4 years ago

It's nice for us to add in high AB bonus weapons, espeically for single stack throwing weapons such as darts and shuriken.

Problem is we have warlocks and other casters running around with these so as to ensure their ranged touch attacks can't be beat.

Would be great to have all weapon effects removed from this calcutation!

GoLoT commented 4 years ago

If anyone wants to implement it, here is the code that I use for my custom touch attacks for reference. It can be wrapped in a NWScript function to expose it to NWScript, possibly in NWNX_Creature. https://gist.github.com/GoLoT/b8f6e47151f73b4f52878e592e80548d

The relevant part is:

if (bRanged)
            nAttackBonus = thisPtr->m_pStats->GetRangedAttackBonus(1, 1);

It can be changed to check for item basetypes (shuriken/darts) and only add the dex modifier or w/e.

Disclaimer: I wrote it quickly for a very specific need so it isn't tested thoroughly.

mtijanic commented 4 years ago

I'm taking this on, as promised to Irongron.