orffen / basicfantasyrpg

The Basic Fantasy RPG system for FoundryVTT!
Other
10 stars 8 forks source link

Monster Attack Bonus calculation breaks at 32HD #35

Closed totallybanjaxed closed 1 year ago

totallybanjaxed commented 1 year ago

Hey Orffen, it looks like the method to calculate AB for Monsters based on HD has an issue. If I create a new Monster and add 31 HD then the AB is correctly showing as 15. However when I go up to 32HD instead of being an AB of 16 it just matches the HD value i.e. 32. Each subsequent number follows the same pattern.

I've only checked this on v10 of fvtt so far. I'm stepping through the compendium that Stew-RT has and trying to add whatever is missing, and it was there that I noticed it. I think it only affects Giant Roc and Sperm Whale from the Core rules, but a custom Monster with HD that large would have the same problem.

orffen commented 1 year ago

Thanks! I'll take a look at this one, but I don't think I'll have time until next week.

orffen commented 1 year ago

This is happening because we have a case used to calculate this, and anything above 31 takes the default:

In /module/documents/actor.mjs: default: return this.system.hitDice.number;

The SRD table shows it should actually be +16.

Easy fix, will update and include in the next release.