Roll damages and so on
All checks were successful
Release Creation / build (release) Successful in 56s
All checks were successful
Release Creation / build (release) Successful in 56s
This commit is contained in:
@@ -1139,6 +1139,20 @@ export default class LethalFantasyRoll extends Roll {
|
||||
}
|
||||
}
|
||||
|
||||
// Récupérer les informations de l'arme pour les attaques réussies
|
||||
let weaponDamageOptions = null
|
||||
console.log("Roll type:", this.type, "rollTarget:", this.rollTarget, "Has weapon:", !!this.rollTarget?.weapon)
|
||||
if (this.type === "weapon-attack" && this.rollTarget?.weapon) {
|
||||
const weapon = this.rollTarget.weapon
|
||||
weaponDamageOptions = {
|
||||
weaponId: weapon._id || weapon.id,
|
||||
weaponName: weapon.name,
|
||||
damageS: weapon.system?.damage?.damageS,
|
||||
damageM: weapon.system?.damage?.damageM
|
||||
}
|
||||
console.log("Weapon damage options:", weaponDamageOptions)
|
||||
}
|
||||
|
||||
const cardData = {
|
||||
css: [SYSTEM.id, "dice-roll"],
|
||||
data: this.data,
|
||||
@@ -1163,7 +1177,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
badResult: this.badResult,
|
||||
rollData: this.rollData,
|
||||
isPrivate: isPrivate,
|
||||
combatants: combatants
|
||||
combatants: combatants,
|
||||
weaponDamageOptions: weaponDamageOptions
|
||||
}
|
||||
cardData.cssClass = cardData.css.join(" ")
|
||||
cardData.tooltip = isPrivate ? "" : await this.getTooltip()
|
||||
|
||||
Reference in New Issue
Block a user