Ajout de la commande /voyage et grosse MAJK de la commande /auberge
This commit is contained in:
34
scripts/VcE8Hie2jbpuyuM3.js
Normal file
34
scripts/VcE8Hie2jbpuyuM3.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const vomit = this.actor.itemTags.trait.find(t => t.name === "Vomissement");
|
||||
const name = "Bileful rollTest";
|
||||
|
||||
if (!vomit) return;
|
||||
|
||||
const effect = vomit.effects.find(e => e.name === "Vomissement");
|
||||
const scriptData = effect.system.scriptData;
|
||||
|
||||
// REMINDER
|
||||
|
||||
scriptData.push({
|
||||
label: 'Rappel des règles du sort',
|
||||
trigger: 'rollTest',
|
||||
script: `
|
||||
args.test.result.other.push("This rollTest attack follows the rules for the Lore of Nurgle spell @UUID[Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ].");
|
||||
`
|
||||
});
|
||||
|
||||
// /REMINDER
|
||||
|
||||
// update Effect's name
|
||||
await effet.update({
|
||||
name,
|
||||
"system.scriptData": scriptData
|
||||
});
|
||||
|
||||
|
||||
// update Trait's name
|
||||
await vomit.update({name});
|
||||
|
||||
// copy effect from Stream of Corruption spell
|
||||
const effectData = (await fromUuid("Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ.ActiveEffect.KAXAHr5NdusLTz6k")).toObject();
|
||||
|
||||
await vomit.createEmbeddedDocuments("ActiveEffect", [effectData]);
|
||||
Reference in New Issue
Block a user