Skip to content

Commit

Permalink
Apply crit damage for /attack
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Nov 10, 2024
1 parent 6ebe811 commit b20090d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/incoming.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function roll_to_str(roll) {
@param {function(Object)} callback
*/
async function incoming_roll(actor, data, callback) {

// if ( ability === "concentration" ) this.actor.rollConcentration({ event, legacy: false });
// else if ( isSavingThrow ) this.actor.rollSavingThrow({ ability, event });
// else this.actor.rollAbilityCheck({ ability, event });
Expand Down Expand Up @@ -99,7 +98,12 @@ async function incoming_attack(actor, data, callback) {

dmg = (
await activity.rollDamage(
{attackMode: data.attack_mode},
{
attackMode: data.attack_mode,
event: {
altKey: atk.isCritical
}
},
{configure: false},
{data: {user: foundry_user?.id}}
)
Expand All @@ -115,7 +119,8 @@ async function incoming_attack(actor, data, callback) {
options: {
fastForward: true
},
spellLevel: data.spell_level
spellLevel: data.spell_level,
critical: atk.isCritical
})
}

Expand Down

0 comments on commit b20090d

Please sign in to comment.