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:
@@ -120,7 +120,7 @@ export default class LethalFantasyActor extends Actor {
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
fuzzyNameSearchWeaponSkills(weaponName, weaponClass=null) {
|
||||
fuzzyNameSearchWeaponSkills(weaponName, weaponClass = null) {
|
||||
// Get all weapon skills without the " skill" suffix
|
||||
let skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass === weaponClass && i.system.category === "weapon")
|
||||
// Remove parenthesis in the weapon name for better matching
|
||||
@@ -227,11 +227,14 @@ export default class LethalFantasyActor extends Actor {
|
||||
ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound"))
|
||||
return
|
||||
}
|
||||
rollTarget = skill
|
||||
rollTarget.weapon = weapon
|
||||
rollTarget.weaponSkillModifier = skill.weaponSkillModifier
|
||||
rollTarget.rollKey = rollKey
|
||||
rollTarget.combat = foundry.utils.duplicate(this.system.combat)
|
||||
// Créer un objet plain au lieu de modifier directement le skill
|
||||
rollTarget = {
|
||||
...skill,
|
||||
weapon: weapon,
|
||||
weaponSkillModifier: skill.weaponSkillModifier,
|
||||
rollKey: rollKey,
|
||||
combat: foundry.utils.duplicate(this.system.combat)
|
||||
}
|
||||
if (rollType === "weapon-damage-small" || rollType === "weapon-damage-medium") {
|
||||
rollTarget.grantedDice = this.system.granted.damageDice
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user