Skip to content

Added NWNX_Damage_DealMeleeDamage() #1571

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

Open
wants to merge 100 commits into
base: master
Choose a base branch
from

Conversation

Cjreek
Copy link
Contributor

@Cjreek Cjreek commented Jan 26, 2023

Added a function to deal melee damage from an attacker to a target as if the attacker would have hit the target with its weapon.

Includes a lot of arguments to customize. For example:

  • Artificial damage multiplier to apply before resistances/immunities/reductions (default 1.0)
  • Critical damage flags (deal no crit damage, roll for crit, always deal crit damage)
  • Sneak attack damage flags (deal no sneak attack damage / check if sneak attack conditions apply / always deal sneak attack damage)
  • On Hit effects and On Hit Spells (plus maximum number of triggered On Hit spells: default 1)
  • Automatically roll maximum damage (default: false)
  • Don't kill the target on a devastating crit (default: false)

Returns 1 for a regular hit, 3 for a crit and 10 for a devastating critical hit.
0 if something went wrong (invalid parameters)

niv and others added 30 commits January 6, 2023 14:24
@Cjreek
Copy link
Contributor Author

Cjreek commented Jan 26, 2023

Please don't merge yet. The death attack saving throw is not correct.

@Cjreek
Copy link
Contributor Author

Cjreek commented Jan 26, 2023

Fixed.

@Daztek Daztek changed the base branch from build8193.35 to master April 9, 2023 20:22
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

Successfully merging this pull request may close these issues.

5 participants