Skip to content

Commit

Permalink
fix: make applying damage from chat card context function (#1733)
Browse files Browse the repository at this point in the history
This fix corrects an error when trying to apply damage for the chat card context (right-click menu).  Thanks to Bonger for finding.
  • Loading branch information
marvin9257 authored Jan 22, 2025
1 parent d249f87 commit 6bf8faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module/hooks/addChatContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function applyChatCardDamage(li, multiplier) {
if (["traveller", "robot", "animal"].includes(t.actor.type)) {
const damage = Math.floor(effect * multiplier);
if (damage > 0) {
t.actor.damageActor(Math.floor(effect * multiplier), transfer?.payload.armorPiercingValue ?? 0, transfer?.payload.damageType ?? "", true);
(<TwodsixActor>t.actor).damageActor({damageValue: damage, armorPiercingValue: transfer?.payload.armorPiercingValue ?? 0, damageType: transfer?.payload.damageType ?? ""}, true);
} else if (multiplier < 0) {
t.actor.healActor(effect);
}
Expand Down

0 comments on commit 6bf8faa

Please sign in to comment.