foundryvtt-wh4-lang-fr-fr/modules/loadScripts.js

5 lines
467 KiB
JavaScript
Raw Normal View History

export default function()
{
2024-06-11 07:57:54 +02:00
mergeObject(game.wfrp4e.config.effectScripts, {"00ZCnahnTGvzG9KA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item])","01VFjGVxkjb5P1ve":"return args.item?.system?.isRanged && args.data.targets[0]?.actor?.sizeNum < 3","03mJu59V4iByWlsO":"// The imbiber immediately\n// takes 3 Poisoned Conditions that cannot be resisted at first,\nawait this.actor.addCondition(\"poisoned\", 3)\n\n// recovers a number of Wounds equal to their Toughness Bonus, \nawait this.actor.modifyWounds(this.actor.system.characteristics.t.bonus)\n\n// and acquires the Regenerate Creature Trait.\nconst hasRegenerate = this.actor.has(\"Régénération\")\nif (hasRegenerate === undefined) {\n fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\").then(trait => {\n let traitItem = trait.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [traitItem], {fromEffect: this.effect.id})\n })\n}\n\nthis.script.scriptMessage(`<p><strong>${this.actor.prototypeToken.name}</strong> :\n <ul>\n <li>Reçoit 3 états Empoisonnés, sans Test de Résistance possible</li>\n <li>Récupère ${this.actor.system.characteristics.t.bonus} Blessures</li>\n <li>Acuiert le Trait de Creature Régénération.</li>\n </ul>\n C'est à Ranaldde choisir si la régénératin peut guérir de l'empoisonnement.</p>\n <p>Lorsque tout les états Empoisonnés sont terminés, le Trait Régénération est perdu également.</p>`, \n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true }) \n","04bAiHISSW53w94Y":"this.actor.addCondition(\"blinded\", 3)","06IaVCOC0RCJbxEf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.8piWcBKFlQ2J1E3A\")\nlet data = item.toObject();\ndata.system.location.key= this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","09sSpnW8z2zcVEdf":"if (!args.flags.quietenedApplied)\n{\n args.fields.modifier += 10;\n args.flags.quietenedApplied = true\n}","0BP5l7bIkf744G1k":"return !args.options.terror && !args.extendedTest?.flags.wfrp4e?.fear","0FNOq4J1AdPd2A0q":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Row\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","0FWto1oEr3jbWggw":"let spells = await game.wfrp4e.utility.findAll(\"spell\", \"Chargement des sorts\")\n\nlet text = (await game.wfrp4e.tables.rollTable(\"random-caster\", {hideDSN: true})).result\n\nlore = Array.from(text.matchAll(/{(.+?)}/gm))[0][1]\n\nif (text == \"GM's Choice\")\n{\n return this.script.scriptNotification(text)\n}\n\nif (spellsWithLore.length > 0)\n{\n let spellsWithLore = spells.filter(i => game.wfrp4e.config.magicLores[i.system.lore.value] == lore)\n let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]\n this.script.scriptNotification(selectedSpell.name);\n this.actor.createEmbeddedDocuments(\"Item\", [selectedSpell])\n}\nelse\n{\n ui.notifications.notify(`Impossible de trouver le sort ${lore}. Essayez à nouveau`)\n}","0KG3HoTNoZhaINIj":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.4CMKeDTDrRQZbPIJ\")\nlet fixation = (await game.wfrp4e.tables.rollTable(\"fixations\"))\nlet data = item.toObject();\ndata.system.specification.value = fixation.result;\nthis.item.updateSource({name : this.item.name += ` (${fixation.result})`});\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","0LCQtsiK2aUfYRmD":"return ![\"t\", \"wp\"].includes(args.characteristic)","0R0QAr3D024kWPfo":"let table = game.wfrp4e.tables.findTable(\"mutatephys\");\nif (!table)\n{\n\treturn ui.notifications.error(\"La table des Mutations n'a pas été trouvée. Assurez vous que la table avec la clé `mutatephys` est bien importée dans le monde.\")\n}\nlet result = (await table.roll()).results[0];\nlet uuid = `Compendium.${result.documentCollection}.${result.documentId}`\nlet item = await fromUuid(uuid);\n\nif (item)\n{\n this.script.scriptNotification(`${item.name} added`)\n this.actor.createEmbeddedDocum
}