Skip to content

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