Add all systems effects scripts

This commit is contained in:
2024-05-16 17:57:51 +02:00
parent b42df99b27
commit 0b286ac994
1282 changed files with 9990 additions and 384 deletions

View File

@ -0,0 +1,21 @@
let skills = this.actor.itemTypes.skill.filter(i => i.name.includes(game.i18n.localize("NAME.Melee")))
let skill = await ItemDialog.create(skills, 1, "Select the skill used by the weapon")
let group = game.wfrp4e.utility.extractParenthesesText(skill[0]?.name)
let groupKey = game.wfrp4e.utility.findKey(group, game.wfrp4e.config.weaponGroups)
let weapon = {
name : this.effect.name,
type : "weapon",
img : this.effect.img,
system : {
"damage.value" : this.actor.system.characteristics.wp.bonus,
"weaponGroup.value" : groupKey || "basic",
"twohanded.value" : ["polearm", "twohanded"].includes(groupKey),
"reach.value" : "average",
"qualities.value" : [{name : "magical"}]
},
}
Item.implementation.create(foundry.utils.expandObject(weapon), {parent : this.actor, fromEffect : this.effect.id})
this.script.scriptNotification("Item created. Further customization must be done manually within the Item's sheet");