Files
wfrp-4e-de/scripts/bNhpJPWwoHLq68zD.js
T
alzer a7f30267fd Sync 621 missing item-effect scripts from FR and translate to German
scripts/ was missing 621 of FR's 2114 effect scripts (referenced via
game.wfrp4e.config.effectScripts by Foundry item id). Copied them all
over so the registry is complete, then translated the 129 that still
contained French user-facing text: skill/talent/trapping name arrays
in NPC-statblock-building scripts, chat/notification messages, and
dialog prompts. Skill/talent/trait names were cross-checked against
the already-translated core compendium rather than translated ad hoc,
since Foundry looks these up by exact document name.

Also fixed real bugs found along the way (present in FR's originals
too, just inherited via the copy):
- Two "let x / let x" duplicate-declaration scripts (SyntaxError)
- A "0rgs.actor" typo (ReferenceError) for "args.actor"
- Two "effet.update(...)" typos for "effect.update(...)"
- A corrupted ui.notifications.warn(...) template literal in 3 of the
  NPC-statblock scripts, mangled into stray leftover code text
- 19 scripts across the whole scripts/ folder (not just the 621) using
  the wrong game.i18n.localize() key (NAME.Résistance/Démoniaque/
  Mort-vivant instead of the actual English key names NAME.Endurance/
  Daemonic/Undead), which silently failed to resolve in any language

Rebuilt modules/loadScripts.js via `npm run build` (2114 scripts).

Known follow-up (out of scope here, pre-existing in the scripts DE
already had before this sync): 7 scripts elsewhere in scripts/ have
unrelated syntax bugs, and one has a lingering French accent.
2026-07-20 23:43:47 +02:00

67 lines
1.7 KiB
JavaScript

let actor = await DragDialog.create({title : this.effect.name, text : "Gib einen Tätowierer-Akteur an (schließen, um Proben zu überspringen)"})
if (!actor)
{
this.script.notification("Proben zum Anbringen der Tätowierungen übersprungen");
if (await foundry.applications.api.Dialog.confirm({
window: {title: this.effect.name},
content : "<p>Effekt des Grimnirschutzes anwenden?</p>"
}))
{
return;
}
else
{
return false;
}
}
let failed = false;
if (this.actor.itemTags.skill.find(i => i.name == "Wissen (Theologie)"))
{
let test = await this.actor.setupSkill("Wissen (Theologie)", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "vhard"}})
await test.roll();
if (test.failed)
{
failed = true;
}
}
else
{
this.script.notification("Fähigkeit Wissen (Theologie) nicht gefunden, kann nicht fortfahren.")
failed = true;
}
if (this.actor.itemTags.skill.find(i => i.name == "Wissen (Runen)"))
{
let test = await this.actor.setupSkill("Wissen (Runen)", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}})
await test.roll();
if (test.failed)
{
failed = true;
}
}
else
{
this.script.notification("Fähigkeit Wissen (Runen) nicht gefunden, kann nicht fortfahren.")
failed = true;
}
let test = await this.actor.setupSkill("Kunst (Tätowierungen)", {appendTitle : ` - ${this.effect.name}`})
await test.roll();
if (test.failed)
{
failed = true;
}
if (failed)
{
this.script.message("Eine oder mehrere Proben zum Anbringen der Tätowierungen sind fehlgeschlagen.")
return false;
}
else
{
return true;
}