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

Add a message on a critical hit #29

Open
kaelad02 opened this issue Aug 10, 2022 · 3 comments
Open

Add a message on a critical hit #29

kaelad02 opened this issue Aug 10, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@kaelad02
Copy link
Owner

Define a new flag, flags.adv-reminder.message.damage.critical, that shows messages when a critical hit happens. Would be useful for some of the new feats like Crusher that can do something extra if a critical hit occurs.

Right now, the only way to detect that a critical hit occurred is either with flags for certain statuses or if using Midi and it detected the crit. The way things are ordered in Advantage Reminder is the flags are done after messages, making the first one harder. Nothing that can't be switched though. The tougher problem is that Advantage Reminder runs before Midi so it won't know that a nat 20 was rolled since Midi would set the critical flag for that. There's an upcoming system feature that adds a bunch of hooks that I might switch over to. That would make this possible, assuming Midi will call those hooks too when it overrides the rollDamage function.

@kaelad02 kaelad02 added the enhancement New feature or request label Aug 10, 2022
@kaelad02 kaelad02 self-assigned this Aug 10, 2022
@kaelad02
Copy link
Owner Author

added code attempting this to the critical-message branch

@YenBenGrey
Copy link

Hello there, I have just started not using MidiQol and just wanted to know if this was a thing that can be used without MidiQol?
Would you have to put the flag above in every weapon and spell that attacks and does damage?

@kaelad02
Copy link
Owner Author

No, that "flags for certain statuses" was more about the critical option that's passed in the rollDamage function, not a flag on the items themselves. The main issue is AR cannot tell that it's a critical hit or not when the dialog is presented, even with Midi b/c of the order. I tried to implement it but struck out and this is the reminder of that. If things change I can revisit it, but it's still the case.

@kaelad02 kaelad02 removed their assignment Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants