Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - the entire getSingleRollForItem function #196

Open
4m2c4bl3 opened this issue Jan 9, 2025 · 3 comments
Open

Bug - the entire getSingleRollForItem function #196

4m2c4bl3 opened this issue Jan 9, 2025 · 3 comments
Assignees

Comments

@4m2c4bl3
Copy link
Contributor

4m2c4bl3 commented Jan 9, 2025

So this started as me trying to figure out why the bonus accuracy in an 'Other Action' NPC item wasn't showing up in the roll breakdown.

image
image
This skill has a +4 that shows in the sheet but does not show up under 'Mod'. You can see it's being used in the result formula, by the total number displayed above the individual sections.

I look in the function being used, and it creates the values for the roll, and then after re-creates the values only to be used in the final output message. However the second values are determined completely differently and don't represent the correct numbers at all.

I use a weapon to get the accuracy and suddenly the result in chat is giving me damage, despite that option not being checked in the ability, and the numbers are all over the place.
image
image

Where is the extra 4 accuracy coming from?
Why is it showing damage if the option is not checked?
Why is it warning about no offhand weapon? The weapon used is two-handed, for extra confusion!

I think this function is completely messed up, hasn't been noticed because I guess no one uses it?? And needs to be heavily re-evaluated and rewritten.

@Shourn
Copy link
Collaborator

Shourn commented Jan 11, 2025

Yeah, we should probably get rid of that at some point.
Just to make sure, are you using "ChecksV2"? (it's an options in the settings)

@4m2c4bl3
Copy link
Contributor Author

4m2c4bl3 commented Jan 12, 2025

Yeah, I'm using V2. I was really hoping I could find a way to get it to work, since I really want to use an ability found in the Game Masters Toolkit that does no damage but requires an accuracy roll, and isn't a spell.

One of this adversary’s basic attacks does not deal damage but removes all spells with a duration of “Scene” from any target hit by the attack, applying them immediately to this foe, without spending Mind Points.

Is there any reason you want to just get rid of it? Is there a suitable replacement?

@Shourn
Copy link
Collaborator

Shourn commented Jan 14, 2025

The getSingleRollForItem function and the createChatMessage function it is used in are very old and with data models we now have a way to properly split that logic.
I'd argue createChatMessage violates the single-responsibility principle by having to know exactly how each and every type of item should be presented in the chat.
Simply put it's a maintenance burden that should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants