219-fix weapon action damage and display of calculation. (#250)

* fix weapon action damage and display of calculation.

* modify weapon data to split formula.

* remove unused field
This commit is contained in:
IrkTheImp 2025-07-03 18:02:44 -05:00 committed by GitHub
parent 122621a57a
commit c4448226e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 36 additions and 29 deletions

View file

@ -231,6 +231,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
}
if (this.hasRoll) {
console.log(config);
const rollConfig = this.prepareRoll(config);
config.roll = rollConfig;
config = await this.actor.diceRoll(config);
@ -242,7 +243,6 @@ export class DHBaseAction extends foundry.abstract.DataModel {
if(t.hit) {
const target = game.canvas.tokens.get(t.id),
actor = target?.actor;
console.log(actor)
if(!actor) return;
actor.saveRoll({
event,
@ -629,7 +629,7 @@ export class DHAttackAction extends DHDamageAction {
return {
value: {
multiplier: 'prof',
dice: this.item?.system?.damage.value,
dice: this.item?.system?.damage.dice,
bonus: this.item?.system?.damage.bonus ?? 0
},
type: this.item?.system?.damage.type,