From 0a1fa37e49c9018ec049eeb1927129482b36fd28 Mon Sep 17 00:00:00 2001
From: LeRatierBretonnien ${this.actor.prototypeToken.name} has
-
-
- It’s up to Ranald if their regenerating can outpace their poisoning.
When all Poisoned Conditions are lost, so too is Regenerate.
`, - { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) diff --git a/reference_scripts/04bAiHISSW53w94Y.js b/reference_scripts/04bAiHISSW53w94Y.js deleted file mode 100644 index 2909e9f..0000000 --- a/reference_scripts/04bAiHISSW53w94Y.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("blinded", 3) \ No newline at end of file diff --git a/reference_scripts/06IaVCOC0RCJbxEf.js b/reference_scripts/06IaVCOC0RCJbxEf.js deleted file mode 100644 index b2f49cb..0000000 --- a/reference_scripts/06IaVCOC0RCJbxEf.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.8piWcBKFlQ2J1E3A") -let data = item.toObject(); -data.system.location.key= this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data]) \ No newline at end of file diff --git a/reference_scripts/09sSpnW8z2zcVEdf.js b/reference_scripts/09sSpnW8z2zcVEdf.js deleted file mode 100644 index 7079a3c..0000000 --- a/reference_scripts/09sSpnW8z2zcVEdf.js +++ /dev/null @@ -1,5 +0,0 @@ -if (!args.flags.quietenedApplied) -{ - args.fields.modifier += 10; - args.flags.quietenedApplied = true -} \ No newline at end of file diff --git a/reference_scripts/0BP5l7bIkf744G1k.js b/reference_scripts/0BP5l7bIkf744G1k.js deleted file mode 100644 index 22f117a..0000000 --- a/reference_scripts/0BP5l7bIkf744G1k.js +++ /dev/null @@ -1 +0,0 @@ -return !args.options.terror && !args.extendedTest?.flags.wfrp4e?.fear \ No newline at end of file diff --git a/reference_scripts/0FNOq4J1AdPd2A0q.js b/reference_scripts/0FNOq4J1AdPd2A0q.js deleted file mode 100644 index ed69d87..0000000 --- a/reference_scripts/0FNOq4J1AdPd2A0q.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Row")) && !args.skill?.name.includes(game.i18n.localize("NAME.Sail")); \ No newline at end of file diff --git a/reference_scripts/0FWto1oEr3jbWggw.js b/reference_scripts/0FWto1oEr3jbWggw.js deleted file mode 100644 index 98fb028..0000000 --- a/reference_scripts/0FWto1oEr3jbWggw.js +++ /dev/null @@ -1,22 +0,0 @@ -let spells = await warhammer.utility.findAllItems("spell", "Loading Spells") - -let text = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).result - -lore = Array.from(text.matchAll(/{(.+?)}/gm))[0][1] - -if (text == "GM's Choice") -{ - return this.script.scriptNotification(text) -} - -if (spellsWithLore.length > 0) -{ - let spellsWithLore = spells.filter(i => game.wfrp4e.config.magicLores[i.system.lore.value] == lore) - let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)] - this.script.scriptNotification(selectedSpell.name); - this.actor.createEmbeddedDocuments("Item", [selectedSpell]) -} -else -{ - ui.notifications.notify(`Could not find ${lore} spell. Try Again`) -} \ No newline at end of file diff --git a/reference_scripts/0KG3HoTNoZhaINIj.js b/reference_scripts/0KG3HoTNoZhaINIj.js deleted file mode 100644 index 195442f..0000000 --- a/reference_scripts/0KG3HoTNoZhaINIj.js +++ /dev/null @@ -1,6 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.4CMKeDTDrRQZbPIJ") -let fixation = (await game.wfrp4e.tables.rollTable("fixations")) -let data = item.toObject(); -data.system.specification.value = fixation.result; -this.item.updateSource({name : this.item.name += ` (${fixation.result})`}); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/0LCQtsiK2aUfYRmD.js b/reference_scripts/0LCQtsiK2aUfYRmD.js deleted file mode 100644 index 8bdb4ef..0000000 --- a/reference_scripts/0LCQtsiK2aUfYRmD.js +++ /dev/null @@ -1 +0,0 @@ -return !["t", "wp"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/0R0QAr3D024kWPfo.js b/reference_scripts/0R0QAr3D024kWPfo.js deleted file mode 100644 index 1158f1b..0000000 --- a/reference_scripts/0R0QAr3D024kWPfo.js +++ /dev/null @@ -1,18 +0,0 @@ -let table = game.wfrp4e.tables.findTable("mutatephys"); -if (!table) -{ - return ui.notifications.error("Mutation table not found, please ensure a table with the `mutatephys` key is imported in the world.") -} -let result = (await table.roll()).results[0]; -let uuid = `Compendium.${result.documentCollection}.${result.documentId}` -let item = await fromUuid(uuid); - -if (item) -{ - this.script.scriptNotification(`${item.name} added`) - this.actor.createEmbeddedDocuments("Item", [item]) -} -else -{ - ui.notifications.error("Item could not be found: " + uuid) -} \ No newline at end of file diff --git a/reference_scripts/0Uly7OmkH0zqYbxQ.js b/reference_scripts/0Uly7OmkH0zqYbxQ.js deleted file mode 100644 index 1f6cc4b..0000000 --- a/reference_scripts/0Uly7OmkH0zqYbxQ.js +++ /dev/null @@ -1,21 +0,0 @@ -let location = this.item.system.location.key; - -if (location) -{ - let dropped = this.item.system.weaponsAtLocation; - - if (dropped.length) - { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) - for(let weapon of dropped) - { - await weapon.system.toggleEquip(); - } - } -} - -let roll = await new Roll("max(1, 1d10 - @system.characteristics.t.bonus)", this.actor).roll() - -roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); - -this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/0YKQGbsKdHSmYGE7.js b/reference_scripts/0YKQGbsKdHSmYGE7.js deleted file mode 100644 index bb5ad3c..0000000 --- a/reference_scripts/0YKQGbsKdHSmYGE7.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.skill?.name != game.i18n.localize("NAME.Gossip")) -{ - return true; -} -else -{ - args.data.canReverse = true; // Kind of a kludge here, the talent Tests has a specific condition, but the description simply says "any gossip test can be reversed" so check it here instead of submission -} - \ No newline at end of file diff --git a/reference_scripts/0abwNjpzo3SbEOeO.js b/reference_scripts/0abwNjpzo3SbEOeO.js deleted file mode 100644 index e114510..0000000 --- a/reference_scripts/0abwNjpzo3SbEOeO.js +++ /dev/null @@ -1,6 +0,0 @@ -if (args.applyAP && args.modifiers.ap.metal) -{ - args.modifiers.ap.ignored += args.modifiers.ap.metal - args.modifiers.ap.details.push("" + this.effect.name + ": Ignore Metal (" + args.modifiers.ap.metal + ")"); - args.modifiers.ap.metal = 0 -} \ No newline at end of file diff --git a/reference_scripts/0e0UZT2FodOJDdgW.js b/reference_scripts/0e0UZT2FodOJDdgW.js deleted file mode 100644 index b4db0a3..0000000 --- a/reference_scripts/0e0UZT2FodOJDdgW.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/0e7OkamNAaAk4Oit.js b/reference_scripts/0e7OkamNAaAk4Oit.js deleted file mode 100644 index 60cb5c0..0000000 --- a/reference_scripts/0e7OkamNAaAk4Oit.js +++ /dev/null @@ -1,10 +0,0 @@ -let item1 = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev") -let item2 = await fromUuid("Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU") - -let data1 = item1.toObject(); -data1.system.location.key = this.item.system.location.key - -let data2 = item2.toObject(); -data2.system.location.key = this.item.system.location.key - -this.actor.createEmbeddedDocuments("Item", [data1, data2], {fromEffect: this.effect.id}) diff --git a/reference_scripts/0iTLDgFHO9Rgc010.js b/reference_scripts/0iTLDgFHO9Rgc010.js deleted file mode 100644 index 5d34264..0000000 --- a/reference_scripts/0iTLDgFHO9Rgc010.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier -= 20; \ No newline at end of file diff --git a/reference_scripts/0mrUnxzufYgsR0Ph.js b/reference_scripts/0mrUnxzufYgsR0Ph.js deleted file mode 100644 index 2c22c29..0000000 --- a/reference_scripts/0mrUnxzufYgsR0Ph.js +++ /dev/null @@ -1,7 +0,0 @@ -this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { - await test.roll() - if (test.failed) - { - this.actor.addCondition("stunned") - } -}) diff --git a/reference_scripts/0vaYwAlMWTmOBl8k.js b/reference_scripts/0vaYwAlMWTmOBl8k.js deleted file mode 100644 index 002e76f..0000000 --- a/reference_scripts/0vaYwAlMWTmOBl8k.js +++ /dev/null @@ -1,7 +0,0 @@ -if (!args.flags.strikeToStun) -{ - args.flags.strikeToStun = true - args.fields.modifier += 20; - args.fields.hitLocation = "head"; -} -args.fields.successBonus++; \ No newline at end of file diff --git a/reference_scripts/0yyofYHeDRQlFliO.js b/reference_scripts/0yyofYHeDRQlFliO.js deleted file mode 100644 index dda0e0e..0000000 --- a/reference_scripts/0yyofYHeDRQlFliO.js +++ /dev/null @@ -1 +0,0 @@ -return args.options.terror || args.extendedTest?.flags.wfrp4e?.fear \ No newline at end of file diff --git a/reference_scripts/11uCC0mK2uL783al.js b/reference_scripts/11uCC0mK2uL783al.js deleted file mode 100644 index 100b843..0000000 --- a/reference_scripts/11uCC0mK2uL783al.js +++ /dev/null @@ -1,6 +0,0 @@ -let type = this.item.getFlag("wfrp4e", "breath"); - -if (["fire", "electricity", "poison"].includes(type)) -{ - args.applyAP = false; -} \ No newline at end of file diff --git a/reference_scripts/16nCOByUaSFDym1V.js b/reference_scripts/16nCOByUaSFDym1V.js deleted file mode 100644 index 7d16a24..0000000 --- a/reference_scripts/16nCOByUaSFDym1V.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier -= 20 diff --git a/reference_scripts/18MeEQ0As3JvER71.js b/reference_scripts/18MeEQ0As3JvER71.js deleted file mode 100644 index 122146a..0000000 --- a/reference_scripts/18MeEQ0As3JvER71.js +++ /dev/null @@ -1,7 +0,0 @@ -let state = !this.effect.disabled; -this.effect.update({"disabled": state}); - -if (state) - return ui.notifications.info("EFFECT.CreatureBackInWater", {localize: true}) - -return ui.notifications.info("EFFECT.CreatureOutOfWater", {localize: true}); \ No newline at end of file diff --git a/reference_scripts/190PHSHKGaJ74wsR.js b/reference_scripts/190PHSHKGaJ74wsR.js deleted file mode 100644 index dd52e55..0000000 --- a/reference_scripts/190PHSHKGaJ74wsR.js +++ /dev/null @@ -1,31 +0,0 @@ -if (!this.item.name.includes("(") || this.item.system.tests.value.includes("Terrain")) -{ - let tests = this.item.system.tests.value - let name = this.item.name - - // If name already specifies, make sure tests value reflects that - if (name.includes("(")) - { - let terrain = name.split("(")[1].split(")")[0] - tests = tests.replace("the Terrain", terrain) - } - else // If no sense specified, provide dialog choice - { - let choice = await ItemDialog.create(ItemDialog.objectToArray({ - coastal : "Coastal", - deserts : "Deserts", - marshes : "Marshes", - rocky : "Rocky", - tundra : "Tundra", - woodlands : "Woodlands" - }, this.item.img), 1, "Choose Terrain"); - if (choice[0]) - { - name = `${name.split("(")[0].trim()} (${choice[0].name})` - tests = tests.replace("the Terrain", choice[0].name + " Terrain") - } - } - - this.effect.updateSource({name}) - this.item.updateSource({name, "system.tests.value" : tests}) -} \ No newline at end of file diff --git a/reference_scripts/1A87vGLh2PXH0rG0.js b/reference_scripts/1A87vGLh2PXH0rG0.js deleted file mode 100644 index 8a4090c..0000000 --- a/reference_scripts/1A87vGLh2PXH0rG0.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/1BT0MWM2cbhlEnrn.js b/reference_scripts/1BT0MWM2cbhlEnrn.js deleted file mode 100644 index 46f9433..0000000 --- a/reference_scripts/1BT0MWM2cbhlEnrn.js +++ /dev/null @@ -1,40 +0,0 @@ - let characteristics = { - "ws" : 5, - "bs" : 5, - "s" : 5, - "t" : 0, - "i" : 5, - "ag" : 5, - "dex" : 5, - "int" : 0, - "wp" : 5, - "fel" : 5 - } - let items = [] - - let updateObj = this.actor.toObject(); - - let talents = (await Promise.all([game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents")])).map(i => i.text) - - for (let ch in characteristics) - { - updateObj.system.characteristics[ch].modifier += characteristics[ch]; - } - - for (let talent of talents) - { - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } - } - - - await this.actor.update(updateObj) - this.actor.createEmbeddedDocuments("Item", items); - diff --git a/reference_scripts/1E47r2ba6IGe8uFK.js b/reference_scripts/1E47r2ba6IGe8uFK.js deleted file mode 100644 index f6a8c61..0000000 --- a/reference_scripts/1E47r2ba6IGe8uFK.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic != "t" \ No newline at end of file diff --git a/reference_scripts/1IodsW9ImamYoEYz.js b/reference_scripts/1IodsW9ImamYoEYz.js deleted file mode 100644 index b72334a..0000000 --- a/reference_scripts/1IodsW9ImamYoEYz.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.details.move.run += 4 \ No newline at end of file diff --git a/reference_scripts/1JwxZujbDcueLWBL.js b/reference_scripts/1JwxZujbDcueLWBL.js deleted file mode 100644 index 133c071..0000000 --- a/reference_scripts/1JwxZujbDcueLWBL.js +++ /dev/null @@ -1,2 +0,0 @@ -await this.actor.addCondition("ablaze", 2) -await this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true})) \ No newline at end of file diff --git a/reference_scripts/1LDSzXeO5CzXgTOc.js b/reference_scripts/1LDSzXeO5CzXgTOc.js deleted file mode 100644 index 031e1ac..0000000 --- a/reference_scripts/1LDSzXeO5CzXgTOc.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) || args.skill?.name == `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})` \ No newline at end of file diff --git a/reference_scripts/1LDm3OB32skZe6Xv.js b/reference_scripts/1LDm3OB32skZe6Xv.js deleted file mode 100644 index f504f6b..0000000 --- a/reference_scripts/1LDm3OB32skZe6Xv.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic != "wp" \ No newline at end of file diff --git a/reference_scripts/1MDOKny7IirJPoI6.js b/reference_scripts/1MDOKny7IirJPoI6.js deleted file mode 100644 index 0826c2c..0000000 --- a/reference_scripts/1MDOKny7IirJPoI6.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` ${this.effect.name}`}) -await test.roll() -if (test.succeeded) -{ - this.effect.delete(); -} diff --git a/reference_scripts/1OpT3CXs07XFWWCT.js b/reference_scripts/1OpT3CXs07XFWWCT.js deleted file mode 100644 index 4e10bbf..0000000 --- a/reference_scripts/1OpT3CXs07XFWWCT.js +++ /dev/null @@ -1 +0,0 @@ -args.options.cardsharp = true; \ No newline at end of file diff --git a/reference_scripts/1PQPxFjmRlulHHzo.js b/reference_scripts/1PQPxFjmRlulHHzo.js deleted file mode 100644 index b3f0001..0000000 --- a/reference_scripts/1PQPxFjmRlulHHzo.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) -{ - args.actor.addCondition("bleeding", 2); -} - \ No newline at end of file diff --git a/reference_scripts/1UalUmNzjB4rp3SZ.js b/reference_scripts/1UalUmNzjB4rp3SZ.js deleted file mode 100644 index c76dee9..0000000 --- a/reference_scripts/1UalUmNzjB4rp3SZ.js +++ /dev/null @@ -1 +0,0 @@ -return ["ws", "bs", "s", "ag", "t", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/1ZArMNUI8qqH6zkX.js b/reference_scripts/1ZArMNUI8qqH6zkX.js deleted file mode 100644 index 4aaa318..0000000 --- a/reference_scripts/1ZArMNUI8qqH6zkX.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gained a Stunned Condition"}}) -await test.roll(); -if (test.failed) -{ - args.actor.addCondition("stunned") -} - diff --git a/reference_scripts/1ZrzpfVwPJHdwp23.js b/reference_scripts/1ZrzpfVwPJHdwp23.js deleted file mode 100644 index 31f227d..0000000 --- a/reference_scripts/1ZrzpfVwPJHdwp23.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(1, {source: this.effect, magical : true}) \ No newline at end of file diff --git a/reference_scripts/1exiWlVUHsXDLLAH.js b/reference_scripts/1exiWlVUHsXDLLAH.js deleted file mode 100644 index 8cd3baa..0000000 --- a/reference_scripts/1exiWlVUHsXDLLAH.js +++ /dev/null @@ -1 +0,0 @@ -this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); \ No newline at end of file diff --git a/reference_scripts/1fQr1Dg7DX0vfz3r.js b/reference_scripts/1fQr1Dg7DX0vfz3r.js deleted file mode 100644 index 13794a7..0000000 --- a/reference_scripts/1fQr1Dg7DX0vfz3r.js +++ /dev/null @@ -1,3 +0,0 @@ -let healed = parseInt(this.effect.sourceTest.result.SL) -this.actor.modifyWounds(healed) -this.script.scriptMessage(`Healed ${healed} Wounds`) \ No newline at end of file diff --git a/reference_scripts/1jQq9v8fXK8zuEBU.js b/reference_scripts/1jQq9v8fXK8zuEBU.js deleted file mode 100644 index 9ac57f6..0000000 --- a/reference_scripts/1jQq9v8fXK8zuEBU.js +++ /dev/null @@ -1,20 +0,0 @@ -let damage = this.effect.sourceActor.hasCondition("fatigued") ? 6 : 10; - -let loc = "body" - -let APatLoc = this.actor.system.status.armour[loc]; - -let metalAP = APatLoc.layers.reduce((metal, layer) => metal += ((layer.metal && !layer.magical) ? layer.value : 0), 0) - -let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location; - -damage -= (APused + this.actor.system.characteristics.t.bonus) - -let msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}); -msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})` -this.script.scriptMessage(msg) - -let test = await this.actor.setupSkill("Endurance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); -if (test.failed) - this.actor.addCondition("stunned"); \ No newline at end of file diff --git a/reference_scripts/1kB2su7hLRYDhZ2H.js b/reference_scripts/1kB2su7hLRYDhZ2H.js deleted file mode 100644 index 5b9bccf..0000000 --- a/reference_scripts/1kB2su7hLRYDhZ2H.js +++ /dev/null @@ -1,19 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}) -await test.roll(); -if (!test.succeeded) -{ - let item = await fromUuid("Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx") - let data = item.toObject(); - if (this.item.system.location.key == "rLeg") - { - data.system.location.value = "Right Toe" - data.system.location.key = "rToe"; - } - else if (this.item.system.location.key == "lLeg") - { - data.system.location.value = "Left Toe" - data.system.location.key = "lToe"; - } - this.actor.createEmbeddedDocuments("Item", [data]) -} -this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/1l7Jz2ZHbAWko7Vm.js b/reference_scripts/1l7Jz2ZHbAWko7Vm.js deleted file mode 100644 index ac7048c..0000000 --- a/reference_scripts/1l7Jz2ZHbAWko7Vm.js +++ /dev/null @@ -1 +0,0 @@ -args.options.ballockKnife = true; \ No newline at end of file diff --git a/reference_scripts/1mNkLj9JYNr3ofC6.js b/reference_scripts/1mNkLj9JYNr3ofC6.js deleted file mode 100644 index d64facd..0000000 --- a/reference_scripts/1mNkLj9JYNr3ofC6.js +++ /dev/null @@ -1,7 +0,0 @@ -this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { - await test.roll(); - if (test.failed) - { - this.actor.addCondition("stunned", 3) - } -}) \ No newline at end of file diff --git a/reference_scripts/1wEjrgff7ASxKVmy.js b/reference_scripts/1wEjrgff7ASxKVmy.js deleted file mode 100644 index ab9e51b..0000000 --- a/reference_scripts/1wEjrgff7ASxKVmy.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.effect.conditionId == "bleeding") - args.data.damage -= 1 \ No newline at end of file diff --git a/reference_scripts/1wKVvxRTHOyV4Qdv.js b/reference_scripts/1wKVvxRTHOyV4Qdv.js deleted file mode 100644 index 2ea9f2a..0000000 --- a/reference_scripts/1wKVvxRTHOyV4Qdv.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name?.includes(game.i18n.localize("NAME.Sail")) \ No newline at end of file diff --git a/reference_scripts/1wrPvP6lJwIAfmsl.js b/reference_scripts/1wrPvP6lJwIAfmsl.js deleted file mode 100644 index 1e94116..0000000 --- a/reference_scripts/1wrPvP6lJwIAfmsl.js +++ /dev/null @@ -1,10 +0,0 @@ -let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, "Choose Location"); - -let location = choice[0].id; - -let itemTargeted = this.actor.items.get(this.effect.getFlag("wfrp4e", "itemTargets")[0]) - -if (itemTargeted) -{ - itemTargeted.update({[`system.APdamage.${location}`] : itemTargeted.system.APdamage[location] + 1}) -} \ No newline at end of file diff --git a/reference_scripts/1yOvw74jzFfaI87b.js b/reference_scripts/1yOvw74jzFfaI87b.js deleted file mode 100644 index 73649e3..0000000 --- a/reference_scripts/1yOvw74jzFfaI87b.js +++ /dev/null @@ -1 +0,0 @@ -return args.options.reload diff --git a/reference_scripts/22bW97lkvCqisfHX.js b/reference_scripts/22bW97lkvCqisfHX.js deleted file mode 100644 index 5ab83db..0000000 --- a/reference_scripts/22bW97lkvCqisfHX.js +++ /dev/null @@ -1 +0,0 @@ -return args.type != "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) \ No newline at end of file diff --git a/reference_scripts/23HgjCB1oecxANvA.js b/reference_scripts/23HgjCB1oecxANvA.js deleted file mode 100644 index 275f379..0000000 --- a/reference_scripts/23HgjCB1oecxANvA.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.item.range && args.item.range.bands) -{ -args.item.range.bands[game.i18n.localize("Long Range")].modifier = 0 -args.item.range.bands[game.i18n.localize("Extreme")].modifier /= 2 -} \ No newline at end of file diff --git a/reference_scripts/23vWiHUjxtRQ3Efz.js b/reference_scripts/23vWiHUjxtRQ3Efz.js deleted file mode 100644 index 5fdc693..0000000 --- a/reference_scripts/23vWiHUjxtRQ3Efz.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM") -let data = item.toObject(); -data.system.location.value = "Back" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/2AOo7KUyzMrgIlgM.js b/reference_scripts/2AOo7KUyzMrgIlgM.js deleted file mode 100644 index 2982f22..0000000 --- a/reference_scripts/2AOo7KUyzMrgIlgM.js +++ /dev/null @@ -1 +0,0 @@ -game.wfrp4e.utility.postCorruptionTest(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}}) \ No newline at end of file diff --git a/reference_scripts/2AdSBXw7IwCiqawQ.js b/reference_scripts/2AdSBXw7IwCiqawQ.js deleted file mode 100644 index 00a7def..0000000 --- a/reference_scripts/2AdSBXw7IwCiqawQ.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/2Cw5j0iGAnFNegWr.js b/reference_scripts/2Cw5j0iGAnFNegWr.js deleted file mode 100644 index 4712207..0000000 --- a/reference_scripts/2Cw5j0iGAnFNegWr.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system.attackType diff --git a/reference_scripts/2GYAd4OC888oQFBp.js b/reference_scripts/2GYAd4OC888oQFBp.js deleted file mode 100644 index 5150b7b..0000000 --- a/reference_scripts/2GYAd4OC888oQFBp.js +++ /dev/null @@ -1 +0,0 @@ -return !["fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/2NLINicPQWbuvp2n.js b/reference_scripts/2NLINicPQWbuvp2n.js deleted file mode 100644 index f98dd93..0000000 --- a/reference_scripts/2NLINicPQWbuvp2n.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != game.i18n.localize("NAME.Navigation") \ No newline at end of file diff --git a/reference_scripts/2OqLHRqEBEjBm2LW.js b/reference_scripts/2OqLHRqEBEjBm2LW.js deleted file mode 100644 index 1a3189b..0000000 --- a/reference_scripts/2OqLHRqEBEjBm2LW.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += this.actor.system.characteristics.wp.bonus \ No newline at end of file diff --git a/reference_scripts/2QB0LjueuJcIaHaC.js b/reference_scripts/2QB0LjueuJcIaHaC.js deleted file mode 100644 index 7fd2601..0000000 --- a/reference_scripts/2QB0LjueuJcIaHaC.js +++ /dev/null @@ -1,8 +0,0 @@ -if (isNaN(parseInt(this.item.system.specification.value))) -{ - let value = await ValueDialog.create("Enter Armour value", this.effect.name); - if (value) - { - this.item.updateSource({"system.specification.value" : value}); - } -} \ No newline at end of file diff --git a/reference_scripts/2Qi1hwLYhdE6v6Hs.js b/reference_scripts/2Qi1hwLYhdE6v6Hs.js deleted file mode 100644 index 4983177..0000000 --- a/reference_scripts/2Qi1hwLYhdE6v6Hs.js +++ /dev/null @@ -1,9 +0,0 @@ -if (!["rLeg", "lLeg"].includes(this.effect.getFlag("wfrp4e", "location"))) - return true; - -if (args.options.dodge) -{ - args.abort = true; - this.script.scriptNotification("Cannot Dodge!") -} -return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/2VNnVrtktdGUqXEV.js b/reference_scripts/2VNnVrtktdGUqXEV.js deleted file mode 100644 index 38a1edd..0000000 --- a/reference_scripts/2VNnVrtktdGUqXEV.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) - await test.roll(); - if (test.failed && parseInt(args.opposedTest.attackerTest.result.SL) > 0) - { - args.actor.addCondition("stunned", parseInt(args.opposedTest.attackerTest.result.SL)) - } -} \ No newline at end of file diff --git a/reference_scripts/2W9uMTT6iJhfQ044.js b/reference_scripts/2W9uMTT6iJhfQ044.js deleted file mode 100644 index dd8d817..0000000 --- a/reference_scripts/2W9uMTT6iJhfQ044.js +++ /dev/null @@ -1,19 +0,0 @@ -let skill = `Trade (${this.item.parenthesesText})` -let currentCareer = this.actor.system.currentCareer; -let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); - -if (!currentCareer) return - - -let inCurrentCareer = currentCareer.system.skills.includes(skill); -let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {}; -if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name]) -{ - existingSkill.system.advances.costModifier = -5; -} -else -{ - craftsmanAdded[skill] = true; - currentCareer.system.skills.push(skill); - setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded) -} \ No newline at end of file diff --git a/reference_scripts/2WBq5gW780C6zfCp.js b/reference_scripts/2WBq5gW780C6zfCp.js deleted file mode 100644 index 90b4c35..0000000 --- a/reference_scripts/2WBq5gW780C6zfCp.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.weapon && this.item.system.usesLocation(args.weapon)) -{ - args.bleedingHand = true; - let success = await this.effect.manualScripts[0].execute({actor: this.actor}) - if (!success) - { - args.abort = true; - } -} \ No newline at end of file diff --git a/reference_scripts/2WSN306tL4apjRtD.js b/reference_scripts/2WSN306tL4apjRtD.js deleted file mode 100644 index 6931737..0000000 --- a/reference_scripts/2WSN306tL4apjRtD.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") -let data = item.toObject(); -data.name = data.name += " (Hearing)" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/2cKarG9ToyW2ptCd.js b/reference_scripts/2cKarG9ToyW2ptCd.js deleted file mode 100644 index deb9777..0000000 --- a/reference_scripts/2cKarG9ToyW2ptCd.js +++ /dev/null @@ -1,10 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.update({"system.quantity.value" : this.item.system.quantity.value - 0.25}) - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - actor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/2hzDv8ROulOe1elK.js b/reference_scripts/2hzDv8ROulOe1elK.js deleted file mode 100644 index 1a9e5bd..0000000 --- a/reference_scripts/2hzDv8ROulOe1elK.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(game.i18n.localize("NAME.Lore")); \ No newline at end of file diff --git a/reference_scripts/2mFNelLOAQ6iJsZl.js b/reference_scripts/2mFNelLOAQ6iJsZl.js deleted file mode 100644 index 76ff0b6..0000000 --- a/reference_scripts/2mFNelLOAQ6iJsZl.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.isFumble) -{ - args.test.result.other.push("@Table[doomrocket-fumble]") -} \ No newline at end of file diff --git a/reference_scripts/2miWWeRrEpq1beG4.js b/reference_scripts/2miWWeRrEpq1beG4.js deleted file mode 100644 index 579cd50..0000000 --- a/reference_scripts/2miWWeRrEpq1beG4.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl"); -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) diff --git a/reference_scripts/2p9IK6Y5Z4NQD6FY.js b/reference_scripts/2p9IK6Y5Z4NQD6FY.js deleted file mode 100644 index 2facb9d..0000000 --- a/reference_scripts/2p9IK6Y5Z4NQD6FY.js +++ /dev/null @@ -1 +0,0 @@ -args.prefillModifiers.difficulty = "hard" \ No newline at end of file diff --git a/reference_scripts/2rzxQlL7A9ujZ9uK.js b/reference_scripts/2rzxQlL7A9ujZ9uK.js deleted file mode 100644 index b1278eb..0000000 --- a/reference_scripts/2rzxQlL7A9ujZ9uK.js +++ /dev/null @@ -1,6 +0,0 @@ -if (args.opposedTest.result.winner == "attacker") { - if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) { - ui.notifications.notify(`${this.effect.name}: Gained ${this.item.Advances} Advantage`) - this.actor.setAdvantage(this.item.Advances) - } -} \ No newline at end of file diff --git a/reference_scripts/2sDH6RvoOAR40oqH.js b/reference_scripts/2sDH6RvoOAR40oqH.js deleted file mode 100644 index 6efdf20..0000000 --- a/reference_scripts/2sDH6RvoOAR40oqH.js +++ /dev/null @@ -1,20 +0,0 @@ - - -if (!["Goblin", "Orc"].includes(this.actor.system.details.species.value)) { - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { appendTitle: ` - ${this.effect.name}` }) - await test.roll(); - if (test.failed) { - let infection = await fromUuid("Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg") - this.actor.createEmbeddedDocuments("Item", [infection]) - } -} - -// Since wounds change when the effect is deleted, need to wait until after -// the max wounds have been recalculated to apply damage -game.wfrp4e.utility.sleep(1000).then(async () => { - let roll = await new Roll("1d10").roll(); - - roll.toMessage(this.script.getChatData()); - this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true })) - -}) \ No newline at end of file diff --git a/reference_scripts/2vTVR0quRZQtjNfQ.js b/reference_scripts/2vTVR0quRZQtjNfQ.js deleted file mode 100644 index 512f2c3..0000000 --- a/reference_scripts/2vTVR0quRZQtjNfQ.js +++ /dev/null @@ -1,18 +0,0 @@ -let currentCareer = this.actor.system.currentCareer; -if (!currentCareer) -{ - return; -} - -let talents = ["Aethyric Attunement", -"Arcane Magic (Any)", -"Chaos Magic (Tzeentch)", -"Fast Hands", -"Instinctive Diction", -"Magical Sense", -"Petty Magic", -"Second Sight", -"War Wizard", -"Witch!"].filter(t => !currentCareer.system.talents.includes(t)) - -currentCareer.system.talents = currentCareer.system.talents.concat(talents) \ No newline at end of file diff --git a/reference_scripts/2wk0yrRPlPsdqr3L.js b/reference_scripts/2wk0yrRPlPsdqr3L.js deleted file mode 100644 index 20b7014..0000000 --- a/reference_scripts/2wk0yrRPlPsdqr3L.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/2yctEihGmdCfTTVx.js b/reference_scripts/2yctEihGmdCfTTVx.js deleted file mode 100644 index a6d16a1..0000000 --- a/reference_scripts/2yctEihGmdCfTTVx.js +++ /dev/null @@ -1,2 +0,0 @@ -args.data.canReverse = true; -args.options.fieldDressing = true; \ No newline at end of file diff --git a/reference_scripts/2zeP2nMSURjxrqYz.js b/reference_scripts/2zeP2nMSURjxrqYz.js deleted file mode 100644 index a0ac1e4..0000000 --- a/reference_scripts/2zeP2nMSURjxrqYz.js +++ /dev/null @@ -1,6 +0,0 @@ -let wounds = this.actor.system.status.wounds -if (wounds.value == 0) - return this.script.scriptNotification("No effect at 0 Wounds", "error") - -this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus} Wounds`) -await this.actor.modifyWounds(this.actor.characteristics.t.bonus) \ No newline at end of file diff --git a/reference_scripts/33PWizq5F7pkKnQT.js b/reference_scripts/33PWizq5F7pkKnQT.js deleted file mode 100644 index 127ff99..0000000 --- a/reference_scripts/33PWizq5F7pkKnQT.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "spell") -{ - args.item.cn.value = Math.floor(args.item.cn.value / 2) -} \ No newline at end of file diff --git a/reference_scripts/33US8YRgaMqYu2We.js b/reference_scripts/33US8YRgaMqYu2We.js deleted file mode 100644 index 6569e71..0000000 --- a/reference_scripts/33US8YRgaMqYu2We.js +++ /dev/null @@ -1 +0,0 @@ -return !args.options.handling \ No newline at end of file diff --git a/reference_scripts/37UN17gb8suFeZIW.js b/reference_scripts/37UN17gb8suFeZIW.js deleted file mode 100644 index 145ebc8..0000000 --- a/reference_scripts/37UN17gb8suFeZIW.js +++ /dev/null @@ -1 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) \ No newline at end of file diff --git a/reference_scripts/3CdYFcInQVCIBUiE.js b/reference_scripts/3CdYFcInQVCIBUiE.js deleted file mode 100644 index 69af1ae..0000000 --- a/reference_scripts/3CdYFcInQVCIBUiE.js +++ /dev/null @@ -1,3 +0,0 @@ -args.actor.system.details.move.value += 2; -args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.5); -args.actor.system.details.price.gc *= 1.1; \ No newline at end of file diff --git a/reference_scripts/3Cn2TlRahlm5LkSj.js b/reference_scripts/3Cn2TlRahlm5LkSj.js deleted file mode 100644 index c1ee085..0000000 --- a/reference_scripts/3Cn2TlRahlm5LkSj.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.successBonus += 1; \ No newline at end of file diff --git a/reference_scripts/3D5ImpMgpOTPucvv.js b/reference_scripts/3D5ImpMgpOTPucvv.js deleted file mode 100644 index d69e334..0000000 --- a/reference_scripts/3D5ImpMgpOTPucvv.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.test.options.cardsharp && args.test.succeeded) -{ - -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) - -if (ones > SL) - args.test.result.other.push(``) -} \ No newline at end of file diff --git a/reference_scripts/3IGO7xEjRjat937X.js b/reference_scripts/3IGO7xEjRjat937X.js deleted file mode 100644 index f45a41d..0000000 --- a/reference_scripts/3IGO7xEjRjat937X.js +++ /dev/null @@ -1,7 +0,0 @@ -let fatigue = this.actor.hasCondition("fatigued") -if (fatigue) -{ - this.script.scriptNotification("Removing Fatigued Condition, disabled effect") - this.effect.update({disabled : true}) - await this.actor.removeCondition("fatigued") -} \ No newline at end of file diff --git a/reference_scripts/3JEzEzF1SeYA9lsV.js b/reference_scripts/3JEzEzF1SeYA9lsV.js deleted file mode 100644 index 1b8b828..0000000 --- a/reference_scripts/3JEzEzF1SeYA9lsV.js +++ /dev/null @@ -1,44 +0,0 @@ -let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choose Location"); -if (choice[0]) -{ - this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`}) -this.effect.updateSource({"flags.wfrp4e.location" : choice[0].id}) -} - -let location = choice[0].id; - -if (["lArm", "rArm"].includes(location)) -{ - let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location)); - - if (dropped.length) - { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) - for(let weapon of dropped) - { - await weapon.system.toggleEquip(); - } - } -} - -if (location == "body") -{ - await this.actor.addCondition("fatigued"); - test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) - await test.roll(); - if (test.failed) - { - this.actor.addCondition("prone"); - } -} - -if (location == "head") -{ - await this.actor.addCondition("stunned"); - test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) - await test.roll(); - if (test.failed) - { - this.actor.addCondition("unconscious"); - } -} \ No newline at end of file diff --git a/reference_scripts/3LLiSgj6KGtgqcmo.js b/reference_scripts/3LLiSgj6KGtgqcmo.js deleted file mode 100644 index 8a4090c..0000000 --- a/reference_scripts/3LLiSgj6KGtgqcmo.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/3R6Y4NpNTqPc83wh.js b/reference_scripts/3R6Y4NpNTqPc83wh.js deleted file mode 100644 index c0857ab..0000000 --- a/reference_scripts/3R6Y4NpNTqPc83wh.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.IPKRMGry6WotuS1G") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/3TesBGh8HnlGuafu.js b/reference_scripts/3TesBGh8HnlGuafu.js deleted file mode 100644 index 05ab756..0000000 --- a/reference_scripts/3TesBGh8HnlGuafu.js +++ /dev/null @@ -1,5 +0,0 @@ -let modifier = this.effect.sourceTest?.result.overcast.usage.other.current || 0 - -let test = await this.actor.setupCharacteristic("dex", {fields: {modifier}, skipTargets: true, appendTitle : " - " + this.script.label}); - -test.roll(); \ No newline at end of file diff --git a/reference_scripts/3Vbe6gdW8N0bIvXJ.js b/reference_scripts/3Vbe6gdW8N0bIvXJ.js deleted file mode 100644 index 5bf968e..0000000 --- a/reference_scripts/3Vbe6gdW8N0bIvXJ.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.item.type == "weapon" || args.item.type == "trait") -{ - args.item.qualities.value.push({name : "penetrating"}) - args.item.qualities.value.push({name : "impale"}) -} \ No newline at end of file diff --git a/reference_scripts/3aEzK0DehSHtVykd.js b/reference_scripts/3aEzK0DehSHtVykd.js deleted file mode 100644 index 9b294f4..0000000 --- a/reference_scripts/3aEzK0DehSHtVykd.js +++ /dev/null @@ -1 +0,0 @@ -this.effect.manualScripts[0].execute({actor : this.actor}); \ No newline at end of file diff --git a/reference_scripts/3eSaX0BeaUalNkEP.js b/reference_scripts/3eSaX0BeaUalNkEP.js deleted file mode 100644 index 077517d..0000000 --- a/reference_scripts/3eSaX0BeaUalNkEP.js +++ /dev/null @@ -1 +0,0 @@ -return args.options.mutate \ No newline at end of file diff --git a/reference_scripts/3fdCQ3h3iVuhdDs9.js b/reference_scripts/3fdCQ3h3iVuhdDs9.js deleted file mode 100644 index f3281db..0000000 --- a/reference_scripts/3fdCQ3h3iVuhdDs9.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += this.actor.characteristics.ag.bonus; \ No newline at end of file diff --git a/reference_scripts/3hfMQkUKYI4rCuBy.js b/reference_scripts/3hfMQkUKYI4rCuBy.js deleted file mode 100644 index 7cf8f33..0000000 --- a/reference_scripts/3hfMQkUKYI4rCuBy.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.CharmAnimal") && !args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining")); \ No newline at end of file diff --git a/reference_scripts/3jm0NoYpgB6ZuUSl.js b/reference_scripts/3jm0NoYpgB6ZuUSl.js deleted file mode 100644 index a7b132e..0000000 --- a/reference_scripts/3jm0NoYpgB6ZuUSl.js +++ /dev/null @@ -1 +0,0 @@ -args.options.useOnesAttractive = true; \ No newline at end of file diff --git a/reference_scripts/3l7MQSa10Kve2K3P.js b/reference_scripts/3l7MQSa10Kve2K3P.js deleted file mode 100644 index 0d12a2b..0000000 --- a/reference_scripts/3l7MQSa10Kve2K3P.js +++ /dev/null @@ -1,2 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(Math.ceil(CONFIG.Dice.randomUniform() * 10) + 6, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) -this.actor.addCondition("ablaze"); \ No newline at end of file diff --git a/reference_scripts/3nTSOcCmNZpQWK8b.js b/reference_scripts/3nTSOcCmNZpQWK8b.js deleted file mode 100644 index 49dd61a..0000000 --- a/reference_scripts/3nTSOcCmNZpQWK8b.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("blinded", 3); \ No newline at end of file diff --git a/reference_scripts/3plV9WFqs2prfAdp.js b/reference_scripts/3plV9WFqs2prfAdp.js deleted file mode 100644 index 9ec91ac..0000000 --- a/reference_scripts/3plV9WFqs2prfAdp.js +++ /dev/null @@ -1 +0,0 @@ -return !["NAME.Evaluate", "NAME.Gamble"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/3sfD1nedXLzuYoXJ.js b/reference_scripts/3sfD1nedXLzuYoXJ.js deleted file mode 100644 index 674133f..0000000 --- a/reference_scripts/3sfD1nedXLzuYoXJ.js +++ /dev/null @@ -1,4 +0,0 @@ -if (this.actor.hasCondition("surprised")) -{ - this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(test => test.roll()) -} diff --git a/reference_scripts/3tE8gFSl28EhCmo5.js b/reference_scripts/3tE8gFSl28EhCmo5.js deleted file mode 100644 index 9e28dce..0000000 --- a/reference_scripts/3tE8gFSl28EhCmo5.js +++ /dev/null @@ -1,2 +0,0 @@ -await args.actor.addCondition("ablaze") -await args.actor.addCondition("prone") \ No newline at end of file diff --git a/reference_scripts/454x3Q95pLvZm0Kx.js b/reference_scripts/454x3Q95pLvZm0Kx.js deleted file mode 100644 index 0072c5f..0000000 --- a/reference_scripts/454x3Q95pLvZm0Kx.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.ConsumeAlcohol"); \ No newline at end of file diff --git a/reference_scripts/4FGKZk2f0xrmIDnp.js b/reference_scripts/4FGKZk2f0xrmIDnp.js deleted file mode 100644 index 59535fd..0000000 --- a/reference_scripts/4FGKZk2f0xrmIDnp.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Research") && !args.skill?.name?.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/4HN98hMdQJxM35pA.js b/reference_scripts/4HN98hMdQJxM35pA.js deleted file mode 100644 index 23c0294..0000000 --- a/reference_scripts/4HN98hMdQJxM35pA.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.gz2xy41OSVZ8YBgI"); -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data]) diff --git a/reference_scripts/4JVIy5xtVwvadoqv.js b/reference_scripts/4JVIy5xtVwvadoqv.js deleted file mode 100644 index bb85425..0000000 --- a/reference_scripts/4JVIy5xtVwvadoqv.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.details.move.run *= 2 \ No newline at end of file diff --git a/reference_scripts/4MQ7u4INxp51oyyR.js b/reference_scripts/4MQ7u4INxp51oyyR.js deleted file mode 100644 index 95200bd..0000000 --- a/reference_scripts/4MQ7u4INxp51oyyR.js +++ /dev/null @@ -1,85 +0,0 @@ -let characteristics = { - "ws" : 25, - "bs" : 10, - "s" : 15, - "t" : 15, - "i" : 25, - "ag" : 20, - "dex" : 0, - "int" : 10, - "wp" : 25, - "fel" : 10 -} -let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"] -let skillAdvancements = [15, 15, 15, 15, 15, 10, 10] -let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Resolute", "War Leader"] -let trappings = ["Hand Weapon", "Shield"] -let items = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - -function equip(item) -{ - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true -} \ No newline at end of file diff --git a/reference_scripts/4QoxhoekgVeZcQA7.js b/reference_scripts/4QoxhoekgVeZcQA7.js deleted file mode 100644 index 4ebe285..0000000 --- a/reference_scripts/4QoxhoekgVeZcQA7.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/4XrAeL2DitxE8OaK.js b/reference_scripts/4XrAeL2DitxE8OaK.js deleted file mode 100644 index 93877a2..0000000 --- a/reference_scripts/4XrAeL2DitxE8OaK.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.0hn6UaKq8CoZP2zD") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/4cOZzUvu1nytcqNn.js b/reference_scripts/4cOZzUvu1nytcqNn.js deleted file mode 100644 index b5902b0..0000000 --- a/reference_scripts/4cOZzUvu1nytcqNn.js +++ /dev/null @@ -1 +0,0 @@ -args.initiative = "-10" \ No newline at end of file diff --git a/reference_scripts/4cumLUlcuJ7m8C6t.js b/reference_scripts/4cumLUlcuJ7m8C6t.js deleted file mode 100644 index ce8df65..0000000 --- a/reference_scripts/4cumLUlcuJ7m8C6t.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = args.actor.items.find(i => i.name.includes("Smoothing")); -let smoothing = item?.effects.find(e => e.name === "Smoothing"); -if (smoothing) - smoothing.disabled = true; \ No newline at end of file diff --git a/reference_scripts/4drWKXjMgasxY7Jy.js b/reference_scripts/4drWKXjMgasxY7Jy.js deleted file mode 100644 index 313f7b5..0000000 --- a/reference_scripts/4drWKXjMgasxY7Jy.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.1); \ No newline at end of file diff --git a/reference_scripts/4fnTKgl0HW9ZrWyJ.js b/reference_scripts/4fnTKgl0HW9ZrWyJ.js deleted file mode 100644 index e818ce4..0000000 --- a/reference_scripts/4fnTKgl0HW9ZrWyJ.js +++ /dev/null @@ -1,10 +0,0 @@ -this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test => -{ - await test.roll() - if (test.failed) - { - let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "s" : "t"; - this.script.scriptMessage(`${this.actor.name} lost 1 point of ${game.wfrp4e.config.characteristics[char]}`) - this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1}) - } -}) \ No newline at end of file diff --git a/reference_scripts/4gkz3LR7CK1b8ulK.js b/reference_scripts/4gkz3LR7CK1b8ulK.js deleted file mode 100644 index b6432a4..0000000 --- a/reference_scripts/4gkz3LR7CK1b8ulK.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system.attackType != "ranged" || this.actor.uuid != this.effect.sourceActor.uuid \ No newline at end of file diff --git a/reference_scripts/4iuTz0uInAfMaoGl.js b/reference_scripts/4iuTz0uInAfMaoGl.js deleted file mode 100644 index d3f97d5..0000000 --- a/reference_scripts/4iuTz0uInAfMaoGl.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name?.includes(game.i18n.localize("NAME.Language")) || args.type == "cast" \ No newline at end of file diff --git a/reference_scripts/4otpLq2TnDdgzpvc.js b/reference_scripts/4otpLq2TnDdgzpvc.js deleted file mode 100644 index ce5c7f0..0000000 --- a/reference_scripts/4otpLq2TnDdgzpvc.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.system.details.man -= 3; \ No newline at end of file diff --git a/reference_scripts/4pQW4WLyhjbZR85k.js b/reference_scripts/4pQW4WLyhjbZR85k.js deleted file mode 100644 index 8a2680f..0000000 --- a/reference_scripts/4pQW4WLyhjbZR85k.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}, context : {failure: "1 Corruption Point Gained"}}) -await test.roll(); -if (test.failed && this.actor.type == "character") -{ - this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) - this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/reference_scripts/4rTmV3TNxctUe0ly.js b/reference_scripts/4rTmV3TNxctUe0ly.js deleted file mode 100644 index 30a0737..0000000 --- a/reference_scripts/4rTmV3TNxctUe0ly.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("bleeding"); -} diff --git a/reference_scripts/4rb7LfMq9CTnlrpn.js b/reference_scripts/4rb7LfMq9CTnlrpn.js deleted file mode 100644 index 214bdc9..0000000 --- a/reference_scripts/4rb7LfMq9CTnlrpn.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}) - await test.roll(); - if (test.failed) - { - args.totalWoundLoss += 5; - args.modifiers.other.push({label : this.effect.name, value : 5}) - } -} \ No newline at end of file diff --git a/reference_scripts/4rhxLzau7jZ4SDxg.js b/reference_scripts/4rhxLzau7jZ4SDxg.js deleted file mode 100644 index 19f3d85..0000000 --- a/reference_scripts/4rhxLzau7jZ4SDxg.js +++ /dev/null @@ -1,2 +0,0 @@ -await args.actor.addCondition("grappling") -await args.actor.addCondition("entangled") \ No newline at end of file diff --git a/reference_scripts/4uAUUZmLgxBKSmXA.js b/reference_scripts/4uAUUZmLgxBKSmXA.js deleted file mode 100644 index 42f8c77..0000000 --- a/reference_scripts/4uAUUZmLgxBKSmXA.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.totalWoundLoss > 0) - this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/52kbfuWrOh6dsTtd.js b/reference_scripts/52kbfuWrOh6dsTtd.js deleted file mode 100644 index d5df29a..0000000 --- a/reference_scripts/52kbfuWrOh6dsTtd.js +++ /dev/null @@ -1,2 +0,0 @@ -if (!this.actor.hasCondition("blinded")) - this.actor.addCondition("blinded", 1, {"flags.wfrp4e.flockOfDoom" : true}) \ No newline at end of file diff --git a/reference_scripts/52mwb33mGrQjq89B.js b/reference_scripts/52mwb33mGrQjq89B.js deleted file mode 100644 index 33c3e75..0000000 --- a/reference_scripts/52mwb33mGrQjq89B.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Research"); \ No newline at end of file diff --git a/reference_scripts/53HFDNuMnX1Aw1a4.js b/reference_scripts/53HFDNuMnX1Aw1a4.js deleted file mode 100644 index d6198c0..0000000 --- a/reference_scripts/53HFDNuMnX1Aw1a4.js +++ /dev/null @@ -1 +0,0 @@ -return ["ws", "bs", "s", "ag", "dex", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/58rFc9HiBoX66J6p.js b/reference_scripts/58rFc9HiBoX66J6p.js deleted file mode 100644 index 1e3c7a2..0000000 --- a/reference_scripts/58rFc9HiBoX66J6p.js +++ /dev/null @@ -1,9 +0,0 @@ -let sourceActor = this.effect.sourceActor; -let damage = args.totalWoundLoss; -let tb = sourceActor.system.characteristics.t.bonus -args.abort = `${this.effect.name}: Damage applied to ${sourceActor.name}`; - -let message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}) - -this.script.scriptMessage(message.replace(`${tb} TB`, `${tb} × 2 TB`)) -args.abort = true; \ No newline at end of file diff --git a/reference_scripts/5DI6cHAg1LHo54Yv.js b/reference_scripts/5DI6cHAg1LHo54Yv.js deleted file mode 100644 index 6929228..0000000 --- a/reference_scripts/5DI6cHAg1LHo54Yv.js +++ /dev/null @@ -1,6 +0,0 @@ -if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") -{ - this.actor.update({"system.status.fortune.value" : Math.max(0, (this.actor.system.status.fortune?.value - 1) || 0)}) - this.script.scriptMessage(`Fortune point stolen from ${this.actor.name}`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")}) - -} \ No newline at end of file diff --git a/reference_scripts/5Fe1ELaS6Gnvy0Cj.js b/reference_scripts/5Fe1ELaS6Gnvy0Cj.js deleted file mode 100644 index ad46ad3..0000000 --- a/reference_scripts/5Fe1ELaS6Gnvy0Cj.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes("Channelling") || args.type == "channelling" || args.skill?.name == game.i18n.localize("NAME.Charm") || args.skill?.name.includes("Language (Magick)") || args.type == "cast" \ No newline at end of file diff --git a/reference_scripts/5IoYTyedCMYwt3ys.js b/reference_scripts/5IoYTyedCMYwt3ys.js deleted file mode 100644 index cedf74b..0000000 --- a/reference_scripts/5IoYTyedCMYwt3ys.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += 2; \ No newline at end of file diff --git a/reference_scripts/5JWC0l3JEpOsqbR9.js b/reference_scripts/5JWC0l3JEpOsqbR9.js deleted file mode 100644 index d2eb0b6..0000000 --- a/reference_scripts/5JWC0l3JEpOsqbR9.js +++ /dev/null @@ -1,85 +0,0 @@ -let characteristics = { - "ws" : 0, - "bs" : 5, - "s" : 0, - "t" : 0, - "i" : 10, - "ag" : 10, - "dex" : 0, - "int" : 0, - "wp" : 5, - "fel" : 0 -} -let skills = ["Dodge", "Perception"] -let skillAdvancements = [10, 10] -let talents = ["Flee!", "Marksman"] -let trappings = ["Hand Weapon"] -let items = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - -function equip(item) -{ - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true -} \ No newline at end of file diff --git a/reference_scripts/5JvKJZPcd6Hz5zvn.js b/reference_scripts/5JvKJZPcd6Hz5zvn.js deleted file mode 100644 index be61706..0000000 --- a/reference_scripts/5JvKJZPcd6Hz5zvn.js +++ /dev/null @@ -1,85 +0,0 @@ -let characteristics = { - "ws" : 10, - "bs" : 0, - "s" : 10, - "t" : 10, - "i" : 20, - "ag" : 10, - "dex" : 0, - "int" : 0, - "wp" : 15, - "fel" : 0 -} -let skills = ["Cool", "Dodge", "Intimidate", "Leadership"] -let skillAdvancements = [15, 15, 10, 5] -let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Resolute"] -let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Hand Weapon", "Shield"] -let items = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -updateObj.name = this.effect.name + " " + updateObj.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - -function equip(item) -{ - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true -} \ No newline at end of file diff --git a/reference_scripts/5LdJCKfQem1AQK24.js b/reference_scripts/5LdJCKfQem1AQK24.js deleted file mode 100644 index 7ec5f13..0000000 --- a/reference_scripts/5LdJCKfQem1AQK24.js +++ /dev/null @@ -1,6 +0,0 @@ - -if (!args.flags.howlingWarpGale) -{ - args.fields.modifier -= 10; - args.flags.howlingWarpGale = true; // prevent double application -} \ No newline at end of file diff --git a/reference_scripts/5M6IgCUncCwyxHok.js b/reference_scripts/5M6IgCUncCwyxHok.js deleted file mode 100644 index ceef2c0..0000000 --- a/reference_scripts/5M6IgCUncCwyxHok.js +++ /dev/null @@ -1,35 +0,0 @@ -let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject(); -etiquette.name += ` (Followers of Tzeentch)`; - -let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject(); -animosity.system.specification.value = "Followers of Nurgle"; - -let roll = await new Roll("ceil(1d10 / 3)").roll(); - -roll.toMessage(this.script.getChatData()); - -let mutations = []; -let msg = `Mutations Gained
` -for(let i = 0; i < roll.total; i++) -{ - let item; - let uuid; - let result; - if (i % 2 == 0) - { - result = await game.wfrp4e.tables.rollTable("mutatemental", {hideDSN: true}, "Tzeentch") - } - else - { - result = await game.wfrp4e.tables.rollTable("mutatephys", {hideDSN: true}, "Tzeentch") - } - uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`; - item = await fromUuid(uuid); - if (item) - { - msg += `@UUID[${uuid}]{${item.name}}
` - mutations.push(item.toObject()); - } -} -this.actor.createEmbeddedDocuments("Item", mutations.concat([etiquette, animosity]), {fromEffect : this.effect.id}) -this.script.scriptMessage(msg); \ No newline at end of file diff --git a/reference_scripts/5MxRDXzUBPfp2KKD.js b/reference_scripts/5MxRDXzUBPfp2KKD.js deleted file mode 100644 index 578674f..0000000 --- a/reference_scripts/5MxRDXzUBPfp2KKD.js +++ /dev/null @@ -1 +0,0 @@ -args.options.useOnesSupportive = true; \ No newline at end of file diff --git a/reference_scripts/5ScjIdRUOxblHdWS.js b/reference_scripts/5ScjIdRUOxblHdWS.js deleted file mode 100644 index 351ac87..0000000 --- a/reference_scripts/5ScjIdRUOxblHdWS.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'challenging'; -const target = 40; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/5dR7Erj3nwsxLAV7.js b/reference_scripts/5dR7Erj3nwsxLAV7.js deleted file mode 100644 index 443c65a..0000000 --- a/reference_scripts/5dR7Erj3nwsxLAV7.js +++ /dev/null @@ -1,85 +0,0 @@ -let characteristics = { - "ws" : 35, - "bs" : 10, - "s" : 25, - "t" : 30, - "i" : 30, - "ag" : 25, - "dex" : 0, - "int" : 15, - "wp" : 35, - "fel" : 15 -} -let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"] -let skillAdvancements = [25, 15, 25, 25, 30, 20, 20] -let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Luck", "Resolute", "Unshakable", "War Leader"] -let trappings = ["Hand Weapon", "Shield"] -let items = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - -function equip(item) -{ - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true -} \ No newline at end of file diff --git a/reference_scripts/5lc1eHIYQNpSRWip.js b/reference_scripts/5lc1eHIYQNpSRWip.js deleted file mode 100644 index 39f6f8b..0000000 --- a/reference_scripts/5lc1eHIYQNpSRWip.js +++ /dev/null @@ -1,8 +0,0 @@ -if (["death", "necromancy"].includes(args.spell?.system.lore.value)) -{ - args.fields.successBonus += 1 -} -else if(["life", "light", "heavens"].includes(args.spell?.system.lore.value)) -{ - args.fields.modifier -= 10; -} \ No newline at end of file diff --git a/reference_scripts/5o1XiceC4rutjMms.js b/reference_scripts/5o1XiceC4rutjMms.js deleted file mode 100644 index 2646b2f..0000000 --- a/reference_scripts/5o1XiceC4rutjMms.js +++ /dev/null @@ -1 +0,0 @@ -return !args.item?.name.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/reference_scripts/5sI9iYh5j2nx2XyT.js b/reference_scripts/5sI9iYh5j2nx2XyT.js deleted file mode 100644 index 4a9e7b3..0000000 --- a/reference_scripts/5sI9iYh5j2nx2XyT.js +++ /dev/null @@ -1 +0,0 @@ -return !(["Animal Care", "Charm Animal"].includes(args.item?.name) || args.item?.name.includes("Ride") || args.item?.name.includes("Animal Training")) \ No newline at end of file diff --git a/reference_scripts/5sYpJkT2WXIe0gIZ.js b/reference_scripts/5sYpJkT2WXIe0gIZ.js deleted file mode 100644 index c5b5bc6..0000000 --- a/reference_scripts/5sYpJkT2WXIe0gIZ.js +++ /dev/null @@ -1,19 +0,0 @@ -const rating = parseInt(this.effect.name.match(/\d+/)?.[0]) || 1; - -let crewList = foundry.utils.duplicate(this.actor.system.passengers.list); -let selectedCrew = []; - -while (selectedCrew.length < rating && crewList.length) { - selectedCrew.push(crewList.splice(crewList.length * Math.random() | 0, 1)[0]); -} - -for (let member of selectedCrew) { - let actor = game.actors.get(member.id); - actor.applyBasicDamage(9, { - damageType: game.wfrp4e.config.DAMAGE_TYPE.NORMAL, - minimumOne: true, - loc: "roll", - suppressMsg: false, - hideDSN: false - }); -} \ No newline at end of file diff --git a/reference_scripts/62Ky6bC1EnTllSJA.js b/reference_scripts/62Ky6bC1EnTllSJA.js deleted file mode 100644 index 8d0a535..0000000 --- a/reference_scripts/62Ky6bC1EnTllSJA.js +++ /dev/null @@ -1,4 +0,0 @@ -if (this.effect.sourceActor.uuid != args.actor.uuid) -{ - this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.overcast.usage.other.current, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true})); -} \ No newline at end of file diff --git a/reference_scripts/65o8pQj6oGNnXce6.js b/reference_scripts/65o8pQj6oGNnXce6.js deleted file mode 100644 index 6737896..0000000 --- a/reference_scripts/65o8pQj6oGNnXce6.js +++ /dev/null @@ -1,2 +0,0 @@ -let ch = this.effect.getFlag("wfrp4e", "characteristic") -this.actor.system.characteristics[ch].modifier += 10; \ No newline at end of file diff --git a/reference_scripts/65xE9OV5sA1ZWT7j.js b/reference_scripts/65xE9OV5sA1ZWT7j.js deleted file mode 100644 index 2e9318c..0000000 --- a/reference_scripts/65xE9OV5sA1ZWT7j.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.test.options.diceman && args.test.succeeded) -{ - -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) - -if (ones > SL) - args.test.result.other.push(``) -} \ No newline at end of file diff --git a/reference_scripts/6Aqq4F4Xui923sc6.js b/reference_scripts/6Aqq4F4Xui923sc6.js deleted file mode 100644 index 0a9ebf3..0000000 --- a/reference_scripts/6Aqq4F4Xui923sc6.js +++ /dev/null @@ -1,12 +0,0 @@ -// Imbibing this substance grants the user the Painless Creature Trait. -const hasColdBlooded = this.actor.has("Cold Blooded") -if (hasColdBlooded === undefined) -{ - let item = await fromUuid("Compendium.wfrp4e-core.items.mCh1KK9jomwFZcLB") - let data = item.toObject() - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - - this.script.scriptMessage(`${this.actor.prototypeToken.name} has gained the Cold Blooded Creature Trait and may reverse any failed Willpower based Tests.
-If they gain a Surprised Condition, this Condition is not lost the first time it should be (which is typically at the end of the Round or if they victim is attacked).
`, - {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) -} \ No newline at end of file diff --git a/reference_scripts/6BmvV9c03FkfisnE.js b/reference_scripts/6BmvV9c03FkfisnE.js deleted file mode 100644 index 3d03be7..0000000 --- a/reference_scripts/6BmvV9c03FkfisnE.js +++ /dev/null @@ -1,20 +0,0 @@ -// Apply changes when the mask is worn - -if (args.equipped) { - this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) - this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.Use Ward provided by ${this.effect.name}?`,
- buttons : {
- yes : {
- label : "Yes",
- callback: () => {
- return true;
- }
- },
- no : {
- label: "No",
- callback: () => {
- return false;
- }
- }
- }
-})
-
-if (useWard)
- args.ward = 9;
\ No newline at end of file
diff --git a/reference_scripts/6mpw9cGseG4W4eyd.js b/reference_scripts/6mpw9cGseG4W4eyd.js
deleted file mode 100644
index 1a3b985..0000000
--- a/reference_scripts/6mpw9cGseG4W4eyd.js
+++ /dev/null
@@ -1,12 +0,0 @@
-if (this.actor.system.status.advantage.value >= 2)
-{
- await this.actor.modifyAdvantage(-2);
- this.script.scriptNotification("Advantage Subtracted")
-}
-else
-{
- return this.script.scriptNotification("Not enough Advantage!", "error")
-}
-
-let test = await this.actor.setupTrait(this.item)
-await test.roll();
\ No newline at end of file
diff --git a/reference_scripts/6oSs8qKFNFz2lSmh.js b/reference_scripts/6oSs8qKFNFz2lSmh.js
deleted file mode 100644
index a96cb59..0000000
--- a/reference_scripts/6oSs8qKFNFz2lSmh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-if (args.actorsystem.details.move.sail.value > 0)
- args.actor.system.details.move.sail.value = 0;
diff --git a/reference_scripts/6qJP0hpShEM43ohx.js b/reference_scripts/6qJP0hpShEM43ohx.js
deleted file mode 100644
index 437b672..0000000
--- a/reference_scripts/6qJP0hpShEM43ohx.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const actor = args.actor;
-
-if (actor.itemTypes.skill.find(s => s.name === "Lore (Oceans)")) {
- const loreTest = await actor.setupSkill('Lore (Oceans)', {
- appendTitle: ` – ${this.effect.name}`,
- skipTargets: true,
- fields: {difficulty: 'hard'},
- characteristic: 'int',
- });
- await loreTest.roll();
-
- if (loreTest.succeeded) {
- loreTest.result.other.push(`${actor.name} recognizes lure of the Leviathan.`);
- loreTest.renderRollCard();
- return;
- }
-}
-
-let test = await actor.setupSkill('Cool', {
- appendTitle: ` – ${this.effect.name}`,
- skipTargets: true,
- fields: {difficulty: 'easy'},
- characteristic: 'wp',
-});
-await test.roll();
-
-if (!test.succeeded) {
- test.result.other.push(`${actor.name} became @Condition[Stunned] by the sight.`);
- test.renderRollCard();
- actor.addCondition("stunned");
-}
\ No newline at end of file
diff --git a/reference_scripts/6qUKKep5vhFYmo1J.js b/reference_scripts/6qUKKep5vhFYmo1J.js
deleted file mode 100644
index 0fc2aa5..0000000
--- a/reference_scripts/6qUKKep5vhFYmo1J.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.type == "channelling" || args.skill?.name.includes(game.i18n.localize("NAME.Channelling"))
\ No newline at end of file
diff --git a/reference_scripts/6tjn0RH4VyOPFneS.js b/reference_scripts/6tjn0RH4VyOPFneS.js
deleted file mode 100644
index 0001110..0000000
--- a/reference_scripts/6tjn0RH4VyOPFneS.js
+++ /dev/null
@@ -1 +0,0 @@
-return ["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name);
\ No newline at end of file
diff --git a/reference_scripts/6ubojp9zwbfJnosT.js b/reference_scripts/6ubojp9zwbfJnosT.js
deleted file mode 100644
index 0620aad..0000000
--- a/reference_scripts/6ubojp9zwbfJnosT.js
+++ /dev/null
@@ -1 +0,0 @@
-args.actor.system.details.move.value += 1;
\ No newline at end of file
diff --git a/reference_scripts/6uldpFvKOCoW92cC.js b/reference_scripts/6uldpFvKOCoW92cC.js
deleted file mode 100644
index 9f67eea..0000000
--- a/reference_scripts/6uldpFvKOCoW92cC.js
+++ /dev/null
@@ -1,8 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3")
-item = item.toObject()
-
-item.system.specification.value = 10;
-item.name += " (Fire)"
-setProperty(item, "flags.wfrp4e.breath", "fire")
-
-Item.create(item, {parent : this.actor, fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/6xTtJEhRc4OjcDTf.js b/reference_scripts/6xTtJEhRc4OjcDTf.js
deleted file mode 100644
index 5a8b642..0000000
--- a/reference_scripts/6xTtJEhRc4OjcDTf.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (getProperty(args.data, "system.status.fortune.value"))
-{
- this.script.scriptNotification("Cannot update Fortune");
- delete args.data.system.status.wounds.value;
-}
\ No newline at end of file
diff --git a/reference_scripts/715G1Bf0haOHvmYQ.js b/reference_scripts/715G1Bf0haOHvmYQ.js
deleted file mode 100644
index 56674c9..0000000
--- a/reference_scripts/715G1Bf0haOHvmYQ.js
+++ /dev/null
@@ -1 +0,0 @@
-return !(args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth")))
\ No newline at end of file
diff --git a/reference_scripts/71DmrxCTKGYL4Z7X.js b/reference_scripts/71DmrxCTKGYL4Z7X.js
deleted file mode 100644
index 159a835..0000000
--- a/reference_scripts/71DmrxCTKGYL4Z7X.js
+++ /dev/null
@@ -1 +0,0 @@
-return ["fel"].includes(args.characteristic)
\ No newline at end of file
diff --git a/reference_scripts/7Ck0fkzE4WQ62qVe.js b/reference_scripts/7Ck0fkzE4WQ62qVe.js
deleted file mode 100644
index 6850a0b..0000000
--- a/reference_scripts/7Ck0fkzE4WQ62qVe.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (args.item.type == "skill" && args.item.name == "Melee (Basic)")
-{
- args.item.system.modifier.value += 20;
-}
\ No newline at end of file
diff --git a/reference_scripts/7F3miqRA0ceMUBIu.js b/reference_scripts/7F3miqRA0ceMUBIu.js
deleted file mode 100644
index 1088080..0000000
--- a/reference_scripts/7F3miqRA0ceMUBIu.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.characteristic != "int" || args.skill
\ No newline at end of file
diff --git a/reference_scripts/7F6aGxZJjwxm5e5P.js b/reference_scripts/7F6aGxZJjwxm5e5P.js
deleted file mode 100644
index 18e9f56..0000000
--- a/reference_scripts/7F6aGxZJjwxm5e5P.js
+++ /dev/null
@@ -1,18 +0,0 @@
-if (args.test.result.castOutcome == "failure")
-{
- ValueDialog.create("Enter Wounds Lost to gain SL", this.effect.name, "0").then(async value => {
- value = Math.clamped(value, 0, 3)
- if (value == 0)
- {
- return;
- }
- else if (Number.isNumeric(value))
- {
- this.script.scriptNotification(`Lost ${value} Wounds`)
- this.actor.modifyWounds(-1 * value)
- await this.item.system.toggleEquip();
- args.test.addSL(value);
- args.test.preData.other.push(`${this.effect.name}: +${value} SL`)
- }
- })
-}
\ No newline at end of file
diff --git a/reference_scripts/7H6wYyJ6cpaoc2QQ.js b/reference_scripts/7H6wYyJ6cpaoc2QQ.js
deleted file mode 100644
index 05cbeea..0000000
--- a/reference_scripts/7H6wYyJ6cpaoc2QQ.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Cool");
\ No newline at end of file
diff --git a/reference_scripts/7JW9t8AYSDkkzG2V.js b/reference_scripts/7JW9t8AYSDkkzG2V.js
deleted file mode 100644
index 5e3d751..0000000
--- a/reference_scripts/7JW9t8AYSDkkzG2V.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Apply changes when the mask is worn
-
-if (args.equipped)
-{
- this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()])
- this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
- If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}.
- `,
- {whisper: ChatMessage.getWhisperRecipients("GM")})
-}
-
-// Notify of lingering effects when mask is removed
-else if (!args.equipped)
-{
- await this.item.effects.contents[0].delete();
- await this.item.update({name : this.item.name += " (Used)"})
- this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`,
- {whisper: ChatMessage.getWhisperRecipients("GM")}
- )
-
-}
\ No newline at end of file
diff --git a/reference_scripts/7OmrMjaU48o2FEZi.js b/reference_scripts/7OmrMjaU48o2FEZi.js
deleted file mode 100644
index 4ca0181..0000000
--- a/reference_scripts/7OmrMjaU48o2FEZi.js
+++ /dev/null
@@ -1,6 +0,0 @@
-
-this.actor.characteristics.t.bonus = 10
-
-this.actor.details.move.value = 0;
-this.actor.details.move.walk= 0;
-this.actor.details.move.run = 0;
\ No newline at end of file
diff --git a/reference_scripts/7ScfB4o1QhXnNUfq.js b/reference_scripts/7ScfB4o1QhXnNUfq.js
deleted file mode 100644
index a8f5e60..0000000
--- a/reference_scripts/7ScfB4o1QhXnNUfq.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["int", "wp"].includes(args.characteristic)
\ No newline at end of file
diff --git a/reference_scripts/7VAhXHov6pR1SkgD.js b/reference_scripts/7VAhXHov6pR1SkgD.js
deleted file mode 100644
index 67dfce8..0000000
--- a/reference_scripts/7VAhXHov6pR1SkgD.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.name == game.i18n.localize("NAME.Endurance");
\ No newline at end of file
diff --git a/reference_scripts/7WR2hJjHPhHhHxAq.js b/reference_scripts/7WR2hJjHPhHhHxAq.js
deleted file mode 100644
index 45d5ca2..0000000
--- a/reference_scripts/7WR2hJjHPhHhHxAq.js
+++ /dev/null
@@ -1,8 +0,0 @@
-let poisoned = args.actor.hasCondition("poisoned")
-if (poisoned)
-{
- this.script.scriptNotification(`Removed ${poisoned.conditionValue} Poisoned Conditions`)
- poisoned.delete();
-}
-else
- this.script.scriptNotification(`No Poisoned Conditions`)
\ No newline at end of file
diff --git a/reference_scripts/7ZoFUMDG2WJd8RMg.js b/reference_scripts/7ZoFUMDG2WJd8RMg.js
deleted file mode 100644
index 0ff8299..0000000
--- a/reference_scripts/7ZoFUMDG2WJd8RMg.js
+++ /dev/null
@@ -1 +0,0 @@
-this.script.scriptMessage(`Claimed ${this.effect.name} Bonus`);
\ No newline at end of file
diff --git a/reference_scripts/7e8FgQUF2oANANmx.js b/reference_scripts/7e8FgQUF2oANANmx.js
deleted file mode 100644
index b195380..0000000
--- a/reference_scripts/7e8FgQUF2oANANmx.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Melee (Brawling)" || args.item?.weaponGroup?.value == "brawling"
\ No newline at end of file
diff --git a/reference_scripts/7f6OsttTzE7Hvzfk.js b/reference_scripts/7f6OsttTzE7Hvzfk.js
deleted file mode 100644
index aff4c37..0000000
--- a/reference_scripts/7f6OsttTzE7Hvzfk.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (this.actor.statuses.has("infighting")) // Only add +10 if already infighting
- args.prefillModifiers.modifier += 10;
-
-
-args.prefillModifiers.successBonus += 1;
diff --git a/reference_scripts/7n3SEAGRA5ESK8gV.js b/reference_scripts/7n3SEAGRA5ESK8gV.js
deleted file mode 100644
index f577178..0000000
--- a/reference_scripts/7n3SEAGRA5ESK8gV.js
+++ /dev/null
@@ -1 +0,0 @@
-args.options.disarm = true;
\ No newline at end of file
diff --git a/reference_scripts/7szLG4VALuuy1cPm.js b/reference_scripts/7szLG4VALuuy1cPm.js
deleted file mode 100644
index 1fbcead..0000000
--- a/reference_scripts/7szLG4VALuuy1cPm.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}})
-await test.roll();
-if (test.failed)
-{
- await this.actor.addCondition("fatigued")
-}
\ No newline at end of file
diff --git a/reference_scripts/7w7QA7GBhzZ98OS0.js b/reference_scripts/7w7QA7GBhzZ98OS0.js
deleted file mode 100644
index 2227fc2..0000000
--- a/reference_scripts/7w7QA7GBhzZ98OS0.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const sin = this.effect.sourceActor.system.status.sin.value;
-const result = await WFRP_Tables.rollTable("manann-mood-made-meaningless", sin);
-let match = result.text.match(/b>([^<]+)/i);
-let key = match[1];
-let roll = new Roll("5d10");
-let value = undefined;
-
-await this.script.scriptMessage(result.text, {flavor: result.title});
-
-switch (key) {
- case 'Stromfels Triumphant!':
- value = 0;
- break;
- case 'Stromfels Ascends!':
- await roll.evaluate();
- if (this.actor.system.status.mood.value > 0)
- value = -roll.total;
- else if (this.actor.system.status.mood.value < 0)
- value = roll.total;
- break;
- case 'No effect.':
- break;
- case 'Manann Provoked!':
- await roll.evaluate();
- value = -roll.total;
- break;
-}
-
-if (roll._evaluated)
- await roll.toMessage();
-
-await this.effect.setFlag("wfrp4e-soc", "m4result", {result: key, value});
\ No newline at end of file
diff --git a/reference_scripts/7wBWUw05q0igh508.js b/reference_scripts/7wBWUw05q0igh508.js
deleted file mode 100644
index 95e3da1..0000000
--- a/reference_scripts/7wBWUw05q0igh508.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Imbibing this substance grants the user the Painless Creature Trait.
-const hasPainless = this.actor.has("Painless");
-if (hasPainless === undefined)
-{
- let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr");
- let data = item.toObject()
- this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
-
- this.script.scriptMessage(
- `
${this.actor.prototypeToken.name} has gained the Painless Creature Trait. This - effect lasts for one hour, after which it dissipates and the full effect - of all the imbiber's wounds come crashing down at once.
-Note that this does not prevent the user from acquiring a Critical - Wound or dying from one. It merely allows them to ignore most - of their effects.
`, - { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true}) -} \ No newline at end of file diff --git a/reference_scripts/84IB8CWa55XzoAkv.js b/reference_scripts/84IB8CWa55XzoAkv.js deleted file mode 100644 index 3cdc615..0000000 --- a/reference_scripts/84IB8CWa55XzoAkv.js +++ /dev/null @@ -1 +0,0 @@ -return (["Animal Care", "Charm Animal"].includes(args.item?.name) || args.item?.name.includes("Ride") || args.item?.name.includes("Animal Training")) \ No newline at end of file diff --git a/reference_scripts/86ivOsBQAuu0UmFg.js b/reference_scripts/86ivOsBQAuu0UmFg.js deleted file mode 100644 index e440e5a..0000000 --- a/reference_scripts/86ivOsBQAuu0UmFg.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`, skipTargets: true}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("poisoned"); -} \ No newline at end of file diff --git a/reference_scripts/87rrZ3ojHrXa3lCn.js b/reference_scripts/87rrZ3ojHrXa3lCn.js deleted file mode 100644 index 75193a6..0000000 --- a/reference_scripts/87rrZ3ojHrXa3lCn.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.modifyWounds(1) \ No newline at end of file diff --git a/reference_scripts/8AoA4bnstBtglRGZ.js b/reference_scripts/8AoA4bnstBtglRGZ.js deleted file mode 100644 index ff38d2d..0000000 --- a/reference_scripts/8AoA4bnstBtglRGZ.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/8ByuHnUZ4RNTdGVv.js b/reference_scripts/8ByuHnUZ4RNTdGVv.js deleted file mode 100644 index 37290b2..0000000 --- a/reference_scripts/8ByuHnUZ4RNTdGVv.js +++ /dev/null @@ -1,16 +0,0 @@ -let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10) -let tghLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10) - -if (!this.actor.has("Undead") && !this.actor.has("Daemonic")) -{ - this.actor.setupSkill(game.i18n.localize("NAME.Cool"), { appendTitle: " - " + this.effect.name, fields: { difficulty: "average" }, context: { failure: `Lost ${strLoss} Strength and ${tghLoss} Toughness` } }).then(async test => { - await test.roll(); - if (test.failed) { - this.actor.update({ "system.characteristics.s.initial": this.actor.system.characteristics.s.initial - strLoss, "system.characteristics.t.initial": this.actor.system.characteristics.t.initial - tghLoss }) - } - }) - -} -else { - this.script.scriptNotification(`${this.actor.name} is immune to ${this.effect.name}`) -} diff --git a/reference_scripts/8GyJgdHVBaLrHCY8.js b/reference_scripts/8GyJgdHVBaLrHCY8.js deleted file mode 100644 index 2ee98a7..0000000 --- a/reference_scripts/8GyJgdHVBaLrHCY8.js +++ /dev/null @@ -1,21 +0,0 @@ -let type = this.item.getFlag("wfrp4e", "breath") -let types = { - none : "None", - cold : "Cold", - corrosion : "Corrosion", - fire : "Fire", - electricity : "Electricity", - poison : "Poison", - smoke : "Smoke", - various : "Various" -} -if (!type) -{ - type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, "Choose Breath"))[0]?.id; - this.item.updateSource({"flags.wfrp4e.breath" : type}) -} - -if (!this.item.name.includes("(") && types[type] && type != "none") -{ - this.item.updateSource({name : this.item.name += ` (${types[type]})`, "system.specification.value" : this.item.system.specification.value.replace("(Type)", "").trim()}) -} \ No newline at end of file diff --git a/reference_scripts/8K9tpCwvFC9INk5V.js b/reference_scripts/8K9tpCwvFC9INk5V.js deleted file mode 100644 index 757ac38..0000000 --- a/reference_scripts/8K9tpCwvFC9INk5V.js +++ /dev/null @@ -1,8 +0,0 @@ -if (["t", "wp"].includes(args.characteristic)) -{ - args.fields.modifier += 10; -} -else if (["ag", "i", "int"].includes(args.characteristic)) -{ - args.fields.modifier -= 10; -} \ No newline at end of file diff --git a/reference_scripts/8LmUVQxOwTLSeabg.js b/reference_scripts/8LmUVQxOwTLSeabg.js deleted file mode 100644 index 32cd5df..0000000 --- a/reference_scripts/8LmUVQxOwTLSeabg.js +++ /dev/null @@ -1 +0,0 @@ -return args.data.targets.length > 0 || !args.weapon?.system.qualities.value.find(i => i.name == "shield") // Should count even if they don't have the skill \ No newline at end of file diff --git a/reference_scripts/8N3Uqjq1ZxPxo4pk.js b/reference_scripts/8N3Uqjq1ZxPxo4pk.js deleted file mode 100644 index 43dddd4..0000000 --- a/reference_scripts/8N3Uqjq1ZxPxo4pk.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name?.includes(game.i18n.localize("NAME.Lore")) \ No newline at end of file diff --git a/reference_scripts/8RNziYGGb4sp3BGQ.js b/reference_scripts/8RNziYGGb4sp3BGQ.js deleted file mode 100644 index b853c6b..0000000 --- a/reference_scripts/8RNziYGGb4sp3BGQ.js +++ /dev/null @@ -1,5 +0,0 @@ -if (!args.test.weapon?.name.includes("Drakefire")) -{ - args.test.result.misfire = game.i18n.localize("Misfire"); - args.test.result.misfireDamage = (0, eval)(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.weapon.system.Damage); -} \ No newline at end of file diff --git a/reference_scripts/8ShLVT0bK1eQpinj.js b/reference_scripts/8ShLVT0bK1eQpinj.js deleted file mode 100644 index 9783813..0000000 --- a/reference_scripts/8ShLVT0bK1eQpinj.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.k00PimCWkff11IA0") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data]) \ No newline at end of file diff --git a/reference_scripts/8TRiAJ8thIKE4IoL.js b/reference_scripts/8TRiAJ8thIKE4IoL.js deleted file mode 100644 index 3814c2c..0000000 --- a/reference_scripts/8TRiAJ8thIKE4IoL.js +++ /dev/null @@ -1,5 +0,0 @@ - -let SL = Number(getProperty(this.item, "flags.wfrp4e.sourceTest.result.SL") || 1) - -args.actor.characteristics.i.modifier += 10 * SL -args.actor.characteristics.ag.modifier += 10 * SL \ No newline at end of file diff --git a/reference_scripts/8ThudCYRqkjQIwJH.js b/reference_scripts/8ThudCYRqkjQIwJH.js deleted file mode 100644 index 0395373..0000000 --- a/reference_scripts/8ThudCYRqkjQIwJH.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.opposedTest.attackerTest.result.critical) -{ - args.actor.addCondition("ablaze") -} \ No newline at end of file diff --git a/reference_scripts/8WJsecxdndaHRxxS.js b/reference_scripts/8WJsecxdndaHRxxS.js deleted file mode 100644 index 5bd3474..0000000 --- a/reference_scripts/8WJsecxdndaHRxxS.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(this.actor.characteristics.wp.bonus, {source: this.effect, magical : true}) \ No newline at end of file diff --git a/reference_scripts/8WeYU5e5LN9UeWFs.js b/reference_scripts/8WeYU5e5LN9UeWFs.js deleted file mode 100644 index 7ede669..0000000 --- a/reference_scripts/8WeYU5e5LN9UeWFs.js +++ /dev/null @@ -1,8 +0,0 @@ -if (args.item.type == "spell") -{ - let range = parseInt(args.item.Range) - if (Number.isNumeric(range)) - { - args.item.system.range.value = "2 * " + args.item.system.range.value - } -} \ No newline at end of file diff --git a/reference_scripts/8ZAUBSH9CM9OTpTL.js b/reference_scripts/8ZAUBSH9CM9OTpTL.js deleted file mode 100644 index eb0439d..0000000 --- a/reference_scripts/8ZAUBSH9CM9OTpTL.js +++ /dev/null @@ -1,11 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}}); -await test.roll(); - -if (test.succeeded) -{ - this.actor.addCondition("stunned") -} -else if (test.failed) -{ - this.actor.addCondition("poisoned", 2); -} \ No newline at end of file diff --git a/reference_scripts/8araLuwmBq8GKEw3.js b/reference_scripts/8araLuwmBq8GKEw3.js deleted file mode 100644 index 66a5c92..0000000 --- a/reference_scripts/8araLuwmBq8GKEw3.js +++ /dev/null @@ -1,7 +0,0 @@ -let APIgnored = args.AP.layers.reduce((prev, current) => prev + ((current.weakpoints && !current.ignored) ? current.value : 0), 0) - -if (APIgnored) -{ - args.modifiers.ap.ignored += APIgnored - args.modifiers.ap.details.push(`${this.effect.name}: Ignore AP with Weakpoints (${APIgnored})`) -} \ No newline at end of file diff --git a/reference_scripts/8fefDfiYKFOWdPER.js b/reference_scripts/8fefDfiYKFOWdPER.js deleted file mode 100644 index dc649cd..0000000 --- a/reference_scripts/8fefDfiYKFOWdPER.js +++ /dev/null @@ -1 +0,0 @@ -args.update({texture : {scaleX : 2, scaleY: 2, src: "modules/wfrp4e-core/tokens/popout/gor.webp"}}); \ No newline at end of file diff --git a/reference_scripts/8g2iitsgaJarKQpr.js b/reference_scripts/8g2iitsgaJarKQpr.js deleted file mode 100644 index 4ce1574..0000000 --- a/reference_scripts/8g2iitsgaJarKQpr.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW") -let data = item.toObject() -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/8gCja0mfKt4nYVZc.js b/reference_scripts/8gCja0mfKt4nYVZc.js deleted file mode 100644 index d05c4f3..0000000 --- a/reference_scripts/8gCja0mfKt4nYVZc.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += 2 \ No newline at end of file diff --git a/reference_scripts/8hIyWDyfbgGAig65.js b/reference_scripts/8hIyWDyfbgGAig65.js deleted file mode 100644 index bdf054c..0000000 --- a/reference_scripts/8hIyWDyfbgGAig65.js +++ /dev/null @@ -1 +0,0 @@ -return ["ws", "bs", "s", "t", "ag", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/8jvEVPUCg3rKG48Y.js b/reference_scripts/8jvEVPUCg3rKG48Y.js deleted file mode 100644 index 38cef06..0000000 --- a/reference_scripts/8jvEVPUCg3rKG48Y.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.9fq6p9Q6H02LjaSi") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/8noxHUQKR55Kx1YN.js b/reference_scripts/8noxHUQKR55Kx1YN.js deleted file mode 100644 index d164bff..0000000 --- a/reference_scripts/8noxHUQKR55Kx1YN.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.system.status.corruption.max += 1 \ No newline at end of file diff --git a/reference_scripts/8oE0DTzz0krOfFlV.js b/reference_scripts/8oE0DTzz0krOfFlV.js deleted file mode 100644 index e4d4736..0000000 --- a/reference_scripts/8oE0DTzz0krOfFlV.js +++ /dev/null @@ -1,2 +0,0 @@ -args.item.system.qualities.value.push({name : "magical"}) -args.item.system.qualities.value.push({name : "impact"}) diff --git a/reference_scripts/8rq4GL5d5nCn4kO7.js b/reference_scripts/8rq4GL5d5nCn4kO7.js deleted file mode 100644 index 79c9046..0000000 --- a/reference_scripts/8rq4GL5d5nCn4kO7.js +++ /dev/null @@ -1,7 +0,0 @@ -let caster = this.effect.sourceActor -if (caster) -{ - let healed= caster.characteristics.wp.bonus - this.actor.modifyWounds(healed); - this.script.scriptMessage(`${this.actor.prototypeToken.name} regains ${healed} Wounds`) -} \ No newline at end of file diff --git a/reference_scripts/8tyMXDfHR8AJBdDu.js b/reference_scripts/8tyMXDfHR8AJBdDu.js deleted file mode 100644 index 9e0a473..0000000 --- a/reference_scripts/8tyMXDfHR8AJBdDu.js +++ /dev/null @@ -1,7 +0,0 @@ -let weakpointsAP = args.AP.layers.filter(i => !i.ignored && i.weakpoints).reduce((ap, layer) => ap + layer.value, 0); - -if (weakpointsAP > 0) -{ - args.modifiers.ap.ignored += weakpointsAP; - args.modifiers.ap.details.push(`${this.effect.name} - Ignore Weakpoints (${weakpointsAP})`); -} \ No newline at end of file diff --git a/reference_scripts/8vpAtJ93GIeye1qj.js b/reference_scripts/8vpAtJ93GIeye1qj.js deleted file mode 100644 index aefec45..0000000 --- a/reference_scripts/8vpAtJ93GIeye1qj.js +++ /dev/null @@ -1 +0,0 @@ -return args.type == "cast" \ No newline at end of file diff --git a/reference_scripts/8wG9l4T9fc1bM0TN.js b/reference_scripts/8wG9l4T9fc1bM0TN.js deleted file mode 100644 index a043287..0000000 --- a/reference_scripts/8wG9l4T9fc1bM0TN.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = (await fromUuid("Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT")).toObject(); -item.system.specification.value = 1; -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/8xqYrBIf1Zhlwizg.js b/reference_scripts/8xqYrBIf1Zhlwizg.js deleted file mode 100644 index 941661b..0000000 --- a/reference_scripts/8xqYrBIf1Zhlwizg.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished raisint the anchor.
`; -const test = 'Strength'; -const difficulty = 'vhard'; -const target = 20; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/8yBr6VbdKcrWUuqw.js b/reference_scripts/8yBr6VbdKcrWUuqw.js deleted file mode 100644 index ce24a5f..0000000 --- a/reference_scripts/8yBr6VbdKcrWUuqw.js +++ /dev/null @@ -1,4 +0,0 @@ -this.actor.characteristics.i.value= "-" -this.actor.characteristics.int.value= "-" -this.actor.characteristics.wp.value= "-" -this.actor.characteristics.fel.value = "-" \ No newline at end of file diff --git a/reference_scripts/8zTkDVziBPaNbMQX.js b/reference_scripts/8zTkDVziBPaNbMQX.js deleted file mode 100644 index c032cba..0000000 --- a/reference_scripts/8zTkDVziBPaNbMQX.js +++ /dev/null @@ -1,30 +0,0 @@ -let filters = [ - { - property : "type", - value : "spell" - }, - { - property : "system.lore.value", - value : "petty" - } -] - -let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 6, "Choose 6 Petty Spells") - - -filters = [ - { - property : "type", - value : "spell" - }, - { - property : "system.lore.value", - value : "" - } -] - -let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 9, "Choose 9 Arcane Spells") - -let items = petty.concat(arcane).map(i => i.toObject()) - -this.actor.createEmbeddedDocuments("Item", items); \ No newline at end of file diff --git a/reference_scripts/91S2GnBFYFbxmOCK.js b/reference_scripts/91S2GnBFYFbxmOCK.js deleted file mode 100644 index 3e28299..0000000 --- a/reference_scripts/91S2GnBFYFbxmOCK.js +++ /dev/null @@ -1,2 +0,0 @@ -this.actor.characteristics.s.bonus += 1 -this.actor.characteristics.s.calculationBonusModifier -= 1 \ No newline at end of file diff --git a/reference_scripts/93K85NnVwjVNXlZq.js b/reference_scripts/93K85NnVwjVNXlZq.js deleted file mode 100644 index 3b0ffe3..0000000 --- a/reference_scripts/93K85NnVwjVNXlZq.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Trade")); \ No newline at end of file diff --git a/reference_scripts/956dUb5sd6OtbWZR.js b/reference_scripts/956dUb5sd6OtbWZR.js deleted file mode 100644 index 3f6bdb7..0000000 --- a/reference_scripts/956dUb5sd6OtbWZR.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.successBonus++; \ No newline at end of file diff --git a/reference_scripts/96Y1yIH1lRjTs5hL.js b/reference_scripts/96Y1yIH1lRjTs5hL.js deleted file mode 100644 index 1fab3ce..0000000 --- a/reference_scripts/96Y1yIH1lRjTs5hL.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.test.succeeded) - return - -if (args.test.characteristicKey == "wp") - this.actor.addCondition("broken") \ No newline at end of file diff --git a/reference_scripts/98nKfcimlaPeM9h5.js b/reference_scripts/98nKfcimlaPeM9h5.js deleted file mode 100644 index dde67fd..0000000 --- a/reference_scripts/98nKfcimlaPeM9h5.js +++ /dev/null @@ -1,2 +0,0 @@ -await this.actor.addCondition("bleeding") -await this.script.scriptMessage(await this.actor.applyBasicDamage(10, {suppressMsg : true})); \ No newline at end of file diff --git a/reference_scripts/9A7rYY3FKi5XLihG.js b/reference_scripts/9A7rYY3FKi5XLihG.js deleted file mode 100644 index e8ade7a..0000000 --- a/reference_scripts/9A7rYY3FKi5XLihG.js +++ /dev/null @@ -1,6 +0,0 @@ -fromUuid("Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79").then(item => { - let data = item.toObject(); - data.system.tests.value = data.system.tests.value.replace("coins", "metal objects"); - data.system.description.value += "This Talent also extends to any metal object because of Metallic Affinity
" - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) -}) \ No newline at end of file diff --git a/reference_scripts/9EVj4bmZJex45Mt7.js b/reference_scripts/9EVj4bmZJex45Mt7.js deleted file mode 100644 index a17d972..0000000 --- a/reference_scripts/9EVj4bmZJex45Mt7.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Athletics"); \ No newline at end of file diff --git a/reference_scripts/9HWEDsnNxSykqbF5.js b/reference_scripts/9HWEDsnNxSykqbF5.js deleted file mode 100644 index 0ca9acf..0000000 --- a/reference_scripts/9HWEDsnNxSykqbF5.js +++ /dev/null @@ -1,3 +0,0 @@ -args.actor.system.details.move.value += 3; -args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.25); -args.actor.system.details.price.gc *= 1.1; \ No newline at end of file diff --git a/reference_scripts/9JnPK1jNUEso7Pv8.js b/reference_scripts/9JnPK1jNUEso7Pv8.js deleted file mode 100644 index 8c33cb3..0000000 --- a/reference_scripts/9JnPK1jNUEso7Pv8.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") -let data = item.toObject(); -data.name += ` (Smell)` -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/9MDi3ok9gPwtbALf.js b/reference_scripts/9MDi3ok9gPwtbALf.js deleted file mode 100644 index d6892bc..0000000 --- a/reference_scripts/9MDi3ok9gPwtbALf.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.details.move.value /= 2 \ No newline at end of file diff --git a/reference_scripts/9MwRUzRinhq1IjhG.js b/reference_scripts/9MwRUzRinhq1IjhG.js deleted file mode 100644 index 280ccc9..0000000 --- a/reference_scripts/9MwRUzRinhq1IjhG.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("grappling"); \ No newline at end of file diff --git a/reference_scripts/9RFoasDcFnYZ1txR.js b/reference_scripts/9RFoasDcFnYZ1txR.js deleted file mode 100644 index 8a60a20..0000000 --- a/reference_scripts/9RFoasDcFnYZ1txR.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Perception"); \ No newline at end of file diff --git a/reference_scripts/9VfeubiCV83LN9iY.js b/reference_scripts/9VfeubiCV83LN9iY.js deleted file mode 100644 index 83f9f95..0000000 --- a/reference_scripts/9VfeubiCV83LN9iY.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") -let data = item.toObject(); -data.name += ` (When Charging)` -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/9WZa63lr0K3SsP4G.js b/reference_scripts/9WZa63lr0K3SsP4G.js deleted file mode 100644 index bac4c09..0000000 --- a/reference_scripts/9WZa63lr0K3SsP4G.js +++ /dev/null @@ -1,7 +0,0 @@ -let sourceItem = this.effect.sourceItem; - -if (sourceItem) -{ - this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]}) - this.script.scriptNotification("Applied after effects"); -} \ No newline at end of file diff --git a/reference_scripts/9Yn9uViEjcuaESJ2.js b/reference_scripts/9Yn9uViEjcuaESJ2.js deleted file mode 100644 index f964391..0000000 --- a/reference_scripts/9Yn9uViEjcuaESJ2.js +++ /dev/null @@ -1,12 +0,0 @@ -if (this.item.getFlag("wfrp4e", "failedCool")) -{ - this.item.name += " (No AP)" - this.item.system.AP = { - "head": 0, - "lArm": 0, - "rArm": 0, - "lLeg": 0, - "rLeg": 0, - "body": 0 - } -} \ No newline at end of file diff --git a/reference_scripts/9ZFPDCk8M2TQxh7x.js b/reference_scripts/9ZFPDCk8M2TQxh7x.js deleted file mode 100644 index 3529480..0000000 --- a/reference_scripts/9ZFPDCk8M2TQxh7x.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier += 20 diff --git a/reference_scripts/9bJGJrLqslV5lBya.js b/reference_scripts/9bJGJrLqslV5lBya.js deleted file mode 100644 index 9023650..0000000 --- a/reference_scripts/9bJGJrLqslV5lBya.js +++ /dev/null @@ -1 +0,0 @@ - return args.characteristic == "bs" \ No newline at end of file diff --git a/reference_scripts/9eWR4mdaoCSQawDT.js b/reference_scripts/9eWR4mdaoCSQawDT.js deleted file mode 100644 index 82e0ef9..0000000 --- a/reference_scripts/9eWR4mdaoCSQawDT.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX"); -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) diff --git a/reference_scripts/9fK07tqqZyPg7dpx.js b/reference_scripts/9fK07tqqZyPg7dpx.js deleted file mode 100644 index baccb76..0000000 --- a/reference_scripts/9fK07tqqZyPg7dpx.js +++ /dev/null @@ -1,12 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: "veasy"}}) -await test.roll(); -if (test.failed) -{ - this.script.scriptNotification("Gained a Festering Wound") - let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb") - this.actor.createEmbeddedDocuments("Item", [item.toObject()]) -} -else -{ - this.script.scriptNotification("Avoided a Festering Wound") -} diff --git a/reference_scripts/9nroaZDkW3WXNkB7.js b/reference_scripts/9nroaZDkW3WXNkB7.js deleted file mode 100644 index 64deeef..0000000 --- a/reference_scripts/9nroaZDkW3WXNkB7.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.4MJJCiOKPkBByYwW"); -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/9ob2lPnk3PDot9Tx.js b/reference_scripts/9ob2lPnk3PDot9Tx.js deleted file mode 100644 index 1edbafd..0000000 --- a/reference_scripts/9ob2lPnk3PDot9Tx.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("blinded", this.effect.sourceTest.result.SL) \ No newline at end of file diff --git a/reference_scripts/9qWUuEF8F5nehF1y.js b/reference_scripts/9qWUuEF8F5nehF1y.js deleted file mode 100644 index 442e3d1..0000000 --- a/reference_scripts/9qWUuEF8F5nehF1y.js +++ /dev/null @@ -1,2 +0,0 @@ -args.item.system.qualities.value = args.item.system.qualities.value.concat([{name : "magical"}, {name : "unbreakable"}]) -args.item.system.damage.value += ` + ${this.effect.sourceActor.system.characteristics.wp.bonus}` \ No newline at end of file diff --git a/reference_scripts/A0OK0qAMmnf8iNJf.js b/reference_scripts/A0OK0qAMmnf8iNJf.js deleted file mode 100644 index b3df7c5..0000000 --- a/reference_scripts/A0OK0qAMmnf8iNJf.js +++ /dev/null @@ -1,8 +0,0 @@ -if (args.test.result.SL < 0) -{ - this.script.scriptMessage(`Gained ${Math.abs(args.test.result.SL)} Corruption points`, {whisper : ChatMessage.getWhisperRecipients("GM")}) - if (args.test.failed && this.actor.type == "character") - { - this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)}) - } -} \ No newline at end of file diff --git a/reference_scripts/A1odAcuRbq9797ZB.js b/reference_scripts/A1odAcuRbq9797ZB.js deleted file mode 100644 index 04c6e12..0000000 --- a/reference_scripts/A1odAcuRbq9797ZB.js +++ /dev/null @@ -1,94 +0,0 @@ -let choice1 = [ - { - type : "skill", - name : "Melee (Basic)", - diff : { - system : { - advances : { - value : 10 - } - } - } - } -] -let choice2 = [ - { - type : "skill", - name : "Melee (Polearm)", - diff : { - system : { - advances : { - value : 10 - } - } - } - } -] - -let choice = await Dialog.wait({ - title : "Choice", - content : - `- Select your choice -
-Apply damage with ${this.effect.name} to attacker?`,
- buttons: {
- yes: {
- label: "Yes",
- callback: () => {
- return true;
- }
- },
- no: {
- label: "No",
- callback: () => {
- return false;
- }
- }
- }
- })
-
- if (choice)
- {
- this.script.scriptMessage(await args.attacker.applyBasicDamage(this.actor.system.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}));
- }
-}
\ No newline at end of file
diff --git a/reference_scripts/CkE8NZOhzPkuRrKJ.js b/reference_scripts/CkE8NZOhzPkuRrKJ.js
deleted file mode 100644
index d4e519f..0000000
--- a/reference_scripts/CkE8NZOhzPkuRrKJ.js
+++ /dev/null
@@ -1,14 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS")
-let data = item.toObject();
-data.system.location.key = this.item.system.location.key
-this.actor.createEmbeddedDocuments("Item", [data])
-
-
-
-
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("unconscious")
-}
\ No newline at end of file
diff --git a/reference_scripts/CoImIH9OCMx9DfQZ.js b/reference_scripts/CoImIH9OCMx9DfQZ.js
deleted file mode 100644
index d5f9737..0000000
--- a/reference_scripts/CoImIH9OCMx9DfQZ.js
+++ /dev/null
@@ -1,4 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.nbhn2wX35b7Jrcbg")
-let data = item.toObject();
-data.system.location.value = "Jaw"
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/D5XmzrUGFa1JN0cl.js b/reference_scripts/D5XmzrUGFa1JN0cl.js
deleted file mode 100644
index fe0c170..0000000
--- a/reference_scripts/D5XmzrUGFa1JN0cl.js
+++ /dev/null
@@ -1,2 +0,0 @@
-args.prefillModifiers.modifier += 10
-
diff --git a/reference_scripts/DANLE5HxrkTNelhl.js b/reference_scripts/DANLE5HxrkTNelhl.js
deleted file mode 100644
index e8601ac..0000000
--- a/reference_scripts/DANLE5HxrkTNelhl.js
+++ /dev/null
@@ -1 +0,0 @@
-args.wounds += 4;
\ No newline at end of file
diff --git a/reference_scripts/DBafsY1HrclJRTtA.js b/reference_scripts/DBafsY1HrclJRTtA.js
deleted file mode 100644
index b3311bb..0000000
--- a/reference_scripts/DBafsY1HrclJRTtA.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.type != "cast"
\ No newline at end of file
diff --git a/reference_scripts/DHxUKY9LMyifFgCi.js b/reference_scripts/DHxUKY9LMyifFgCi.js
deleted file mode 100644
index a9beef0..0000000
--- a/reference_scripts/DHxUKY9LMyifFgCi.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Trade (Apothecary)" || args.skill?.name == "Trade (Alchemist)"
\ No newline at end of file
diff --git a/reference_scripts/DL9vYNft9aXdV2aW.js b/reference_scripts/DL9vYNft9aXdV2aW.js
deleted file mode 100644
index ef975b7..0000000
--- a/reference_scripts/DL9vYNft9aXdV2aW.js
+++ /dev/null
@@ -1,12 +0,0 @@
-let tooth = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv")
-tooth = tooth.toObject()
-tooth.system.specification.value = 3
-tooth.system.qualities.value = [{name : "magical"}]
-
-let claw = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")
-claw = claw.toObject()
-claw.system.specification.value = 4
-claw.system.qualities.value = [{name : "magical"}]
-claw.name = "Claw"
-
-this.actor.createEmbeddedDocuments("Item", [tooth, claw], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/DMQ0taEpBUJU5njV.js b/reference_scripts/DMQ0taEpBUJU5njV.js
deleted file mode 100644
index 8fb1dd8..0000000
--- a/reference_scripts/DMQ0taEpBUJU5njV.js
+++ /dev/null
@@ -1 +0,0 @@
-args.actor.status.fortune.value = 0
\ No newline at end of file
diff --git a/reference_scripts/DTiHS6RfwhF4THbf.js b/reference_scripts/DTiHS6RfwhF4THbf.js
deleted file mode 100644
index 1a7339b..0000000
--- a/reference_scripts/DTiHS6RfwhF4THbf.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Drive") && !args.skill?.name.includes(game.i18n.localize("NAME.Ride"));
\ No newline at end of file
diff --git a/reference_scripts/DVlZGbiuMIHEQOnM.js b/reference_scripts/DVlZGbiuMIHEQOnM.js
deleted file mode 100644
index 4395d41..0000000
--- a/reference_scripts/DVlZGbiuMIHEQOnM.js
+++ /dev/null
@@ -1,10 +0,0 @@
-if (this.actor.getFlag("wfrp4e", "isAttached"))
-{
- let roll = await new Roll("1d10").roll()
- await roll.toMessage(this.script.getChatData());
- if (roll.total == 9 || roll.total == 10)
- {
- this.script.scriptMessage(`${this.actor.name} attached to ${this.actor.getFlag("wfrp4e", "isAttached")} gorges and falls off.`)
- await this.actor.unsetFlag("wfrp4e", "isAttached")
- }
- }
\ No newline at end of file
diff --git a/reference_scripts/DWBxvzfWGcG7PVNP.js b/reference_scripts/DWBxvzfWGcG7PVNP.js
deleted file mode 100644
index 789e83f..0000000
--- a/reference_scripts/DWBxvzfWGcG7PVNP.js
+++ /dev/null
@@ -1,5 +0,0 @@
-let letter = this.item.system.location.key[0]; // "l" or "r";
-
-this.item.updateSource({"system.location.key" : letter + "Finger"})
-
-// We want the location to be Right or Left Hand, but the key to be rFinger or lFinger
\ No newline at end of file
diff --git a/reference_scripts/DcSJNRBXE9ZBBY7T.js b/reference_scripts/DcSJNRBXE9ZBBY7T.js
deleted file mode 100644
index 22c294b..0000000
--- a/reference_scripts/DcSJNRBXE9ZBBY7T.js
+++ /dev/null
@@ -1 +0,0 @@
-this.actor.addCondition("blinded", Math.max(0, this.effect.sourceTest.result.SL))
\ No newline at end of file
diff --git a/reference_scripts/DhZqJso1JWYtGrKk.js b/reference_scripts/DhZqJso1JWYtGrKk.js
deleted file mode 100644
index 5808036..0000000
--- a/reference_scripts/DhZqJso1JWYtGrKk.js
+++ /dev/null
@@ -1,3 +0,0 @@
-this.actor.addCondition("ablaze")
-let damage = this.effect.sourceTest.result.damage + this.effect.sourceTest.result.additionalDamage
-this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))
\ No newline at end of file
diff --git a/reference_scripts/DmbWR9s5I8LHBwxB.js b/reference_scripts/DmbWR9s5I8LHBwxB.js
deleted file mode 100644
index 0875467..0000000
--- a/reference_scripts/DmbWR9s5I8LHBwxB.js
+++ /dev/null
@@ -1,14 +0,0 @@
-let column = await ValueDialog.create("Select the column to roll on to determine Beast Head", "Select Column", "", ["Undivided", "Khorne", "Nurgle", "Slaanesh", "Tzeentch"]);
-
-if (column)
-{
- let result = await game.wfrp4e.tables.rollTable("beasthead", {}, column);
- this.script.scriptMessage(`${result.title}
${result.result}`);
- let uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`;
- let item = await fromUuid(uuid);
- if (item)
- {
- this.actor.createEmbeddedDocuments("Item", [item])
- this.item.delete();
- }
-}
\ No newline at end of file
diff --git a/reference_scripts/DpdSEHM6NMN1ey6h.js b/reference_scripts/DpdSEHM6NMN1ey6h.js
deleted file mode 100644
index aa9268a..0000000
--- a/reference_scripts/DpdSEHM6NMN1ey6h.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (parseInt(this.item.system.specification.value) > 0)
-{
- this.actor.system.status.ward.value = parseInt(this.item.system.specification.value);
-}
\ No newline at end of file
diff --git a/reference_scripts/DqJFo74trI916qXN.js b/reference_scripts/DqJFo74trI916qXN.js
deleted file mode 100644
index a2791f0..0000000
--- a/reference_scripts/DqJFo74trI916qXN.js
+++ /dev/null
@@ -1,3 +0,0 @@
-let fatigued = args.actor.hasCondition("fatigued")
-if (fatigued)
- setProperty(fatigued, "flags.wfrp4e.scriptData", getProperty(fatigued, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog"))
\ No newline at end of file
diff --git a/reference_scripts/DsE6rTSzxEn6uWMz.js b/reference_scripts/DsE6rTSzxEn6uWMz.js
deleted file mode 100644
index 63b87e9..0000000
--- a/reference_scripts/DsE6rTSzxEn6uWMz.js
+++ /dev/null
@@ -1,7 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}})
-await test.roll();
-if (test.failed)
-{
- await this.actor.addCondition("blinded");
- await this.actor.addCondition("fatigued")
-}
\ No newline at end of file
diff --git a/reference_scripts/DuM5l2Yb4bdvDeaG.js b/reference_scripts/DuM5l2Yb4bdvDeaG.js
deleted file mode 100644
index ddbd4db..0000000
--- a/reference_scripts/DuM5l2Yb4bdvDeaG.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != "Athletics"
\ No newline at end of file
diff --git a/reference_scripts/DxQnamsb2AuW0p2e.js b/reference_scripts/DxQnamsb2AuW0p2e.js
deleted file mode 100644
index fbdcd2f..0000000
--- a/reference_scripts/DxQnamsb2AuW0p2e.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.skill?.name.includes(game.i18n.localize("NAME.Lore"));
\ No newline at end of file
diff --git a/reference_scripts/DyZ1jH88EAp1ueOK.js b/reference_scripts/DyZ1jH88EAp1ueOK.js
deleted file mode 100644
index 3b86fbc..0000000
--- a/reference_scripts/DyZ1jH88EAp1ueOK.js
+++ /dev/null
@@ -1,5 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX")
-let data = item.toObject();
-data.system.location.key = this.item.system.location.key
-data.system.location.value = data.system.location.value.replace("Arm", "Wrist")
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
diff --git a/reference_scripts/Dzi2CKpYapRGwNVr.js b/reference_scripts/Dzi2CKpYapRGwNVr.js
deleted file mode 100644
index b5561ad..0000000
--- a/reference_scripts/Dzi2CKpYapRGwNVr.js
+++ /dev/null
@@ -1,3 +0,0 @@
-if (args.actor.system instanceof StandardActorModel) {
- args.actor.addCondition("unconscious");
-}
\ No newline at end of file
diff --git a/reference_scripts/E1Xo4RVuN1YRRxg7.js b/reference_scripts/E1Xo4RVuN1YRRxg7.js
deleted file mode 100644
index d6efa41..0000000
--- a/reference_scripts/E1Xo4RVuN1YRRxg7.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.attackType != "ranged"
\ No newline at end of file
diff --git a/reference_scripts/E1vUepgop09FF5wy.js b/reference_scripts/E1vUepgop09FF5wy.js
deleted file mode 100644
index 3da19b7..0000000
--- a/reference_scripts/E1vUepgop09FF5wy.js
+++ /dev/null
@@ -1,22 +0,0 @@
-if (this.actor.system.status.advantage.value == 0)
-{
- return this.script.scriptNotification("Not enough Advantage!", "error")
-}
-
-let hatred = await fromUuid("Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0")
-let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q");
-
-if (this.actor.system.status.advantage.value >= 3)
-{
- this.script.scriptNotification(`Adding ${frenzy.name}`)
- this.actor.setAdvantage(0)
- this.actor.createEmbeddedDocuments("Item", [frenzy])
-}
-else if (this.actor.system.status.advantage.value >= 1)
-{
- let data = hatred.toObject();
- data.system.specification.value = "Close Combat opponents"
- this.script.scriptNotification(`Adding ${hatred.name}`)
- this.actor.setAdvantage(0)
- this.actor.createEmbeddedDocuments("Item", [data])
-}
\ No newline at end of file
diff --git a/reference_scripts/E2VfOVuju67qO3VL.js b/reference_scripts/E2VfOVuju67qO3VL.js
deleted file mode 100644
index 200ae8f..0000000
--- a/reference_scripts/E2VfOVuju67qO3VL.js
+++ /dev/null
@@ -1,5 +0,0 @@
-let blinded = this.actor.hasCondition("blinded");
-if (blinded.getFlag("wfrp4e", "nightshroud"))
-{
- blinded.delete()
-}
\ No newline at end of file
diff --git a/reference_scripts/E3om295BMQojnM2F.js b/reference_scripts/E3om295BMQojnM2F.js
deleted file mode 100644
index 4e0d9d6..0000000
--- a/reference_scripts/E3om295BMQojnM2F.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let fatigued = this.actor.hasCondition("fatigued")
-if (fatigued)
-{
- fatigued.delete();
- this.script.scriptNotification("Removed Fatigued")
-}
\ No newline at end of file
diff --git a/reference_scripts/E4CHDe1xfmcV3oGv.js b/reference_scripts/E4CHDe1xfmcV3oGv.js
deleted file mode 100644
index c1e0400..0000000
--- a/reference_scripts/E4CHDe1xfmcV3oGv.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Navigation");
\ No newline at end of file
diff --git a/reference_scripts/E6DMqfDeczqmVMFV.js b/reference_scripts/E6DMqfDeczqmVMFV.js
deleted file mode 100644
index 2a0bc28..0000000
--- a/reference_scripts/E6DMqfDeczqmVMFV.js
+++ /dev/null
@@ -1,3 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}})
-
-await test.roll();
\ No newline at end of file
diff --git a/reference_scripts/E7D4bxz8gy4e1wL7.js b/reference_scripts/E7D4bxz8gy4e1wL7.js
deleted file mode 100644
index ec82dce..0000000
--- a/reference_scripts/E7D4bxz8gy4e1wL7.js
+++ /dev/null
@@ -1 +0,0 @@
-if (["Stealth (Rural)", "Track", "Outdoor Survival", "Swim", "Perception", "Intuition"].includes(args.item?.name))
\ No newline at end of file
diff --git a/reference_scripts/EBNrA6FNX4d05EUx.js b/reference_scripts/EBNrA6FNX4d05EUx.js
deleted file mode 100644
index 1ad25de..0000000
--- a/reference_scripts/EBNrA6FNX4d05EUx.js
+++ /dev/null
@@ -1 +0,0 @@
-return !args.options.crewTest;
\ No newline at end of file
diff --git a/reference_scripts/EC8cZmqrE095cDc2.js b/reference_scripts/EC8cZmqrE095cDc2.js
deleted file mode 100644
index c5e0b3e..0000000
--- a/reference_scripts/EC8cZmqrE095cDc2.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const actor = args.actor;
-
-if (actor.itemTypes.skill.find(s => s.name === "Lore (Riverways)")) {
- const loreTest = await actor.setupSkill('Lore (Riverways)', {
- appendTitle: ` – ${this.effect.name}`,
- skipTargets: true,
- fields: {difficulty: 'hard'},
- characteristic: 'int',
- });
- await loreTest.roll();
-
- if (loreTest.succeeded) {
- loreTest.result.other.push(`${actor.name} recognizes lures of Lurkerfish.`);
- loreTest.renderRollCard();
- return;
- }
-}
-
-let test = await actor.setupSkill('Cool', {
- appendTitle: ` – ${this.effect.name}`,
- skipTargets: true,
- fields: {difficulty: 'easy'},
- characteristic: 'wp',
-});
-await test.roll();
-
-if (!test.succeeded) {
- test.result.other.push(`${actor.name} became beguiled by the sight and unable to perform any action except moving towards the light.`);
- test.renderRollCard();
- actor.addCondition("unconscious");
-}
\ No newline at end of file
diff --git a/reference_scripts/EDAMEOzdBfkoKHxP.js b/reference_scripts/EDAMEOzdBfkoKHxP.js
deleted file mode 100644
index 6b1f28e..0000000
--- a/reference_scripts/EDAMEOzdBfkoKHxP.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name !== game.i18n.localize("NAME.Navigation");
\ No newline at end of file
diff --git a/reference_scripts/EGWF3LHav3e2zFL4.js b/reference_scripts/EGWF3LHav3e2zFL4.js
deleted file mode 100644
index cb217a7..0000000
--- a/reference_scripts/EGWF3LHav3e2zFL4.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Ranged")) || args.item?.isRanged || args.item?.name == game.i18n.localize("NAME.Charm");
\ No newline at end of file
diff --git a/reference_scripts/EJObiSth3WdcJOXN.js b/reference_scripts/EJObiSth3WdcJOXN.js
deleted file mode 100644
index a98ecba..0000000
--- a/reference_scripts/EJObiSth3WdcJOXN.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (args.test.characteristicKey == "wp" && args.test.failed && args.test.result.SL <= -3)
-{
- this.script.scriptNotification("Adding Prone");
- this.actor.addCondition("prone")
-}
\ No newline at end of file
diff --git a/reference_scripts/EJaBfqADqlo92Fx6.js b/reference_scripts/EJaBfqADqlo92Fx6.js
deleted file mode 100644
index 9fd2959..0000000
--- a/reference_scripts/EJaBfqADqlo92Fx6.js
+++ /dev/null
@@ -1,4 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.oGbDwnLOn3isPJpO")
-let data = item.toObject();
-data.name += " (To Be Determined)"
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/EKkdyp51Wf4csw2B.js b/reference_scripts/EKkdyp51Wf4csw2B.js
deleted file mode 100644
index e3d745d..0000000
--- a/reference_scripts/EKkdyp51Wf4csw2B.js
+++ /dev/null
@@ -1 +0,0 @@
-return this.actor.statuses.has("frenzy");
\ No newline at end of file
diff --git a/reference_scripts/ENGmwaItRXO5s0XY.js b/reference_scripts/ENGmwaItRXO5s0XY.js
deleted file mode 100644
index 0a79fa7..0000000
--- a/reference_scripts/ENGmwaItRXO5s0XY.js
+++ /dev/null
@@ -1,5 +0,0 @@
-await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 3)
-this.script.scriptMessage(`Heals ${this.actor.system.characteristics.t.bonus * 3} Wounds`)
-
-this.actor.hasCondition("bleeding")?.delete()
-this.actor.hasCondition("fatigued")?.delete()
diff --git a/reference_scripts/EQ5dtGW5kQhtAb87.js b/reference_scripts/EQ5dtGW5kQhtAb87.js
deleted file mode 100644
index 767e730..0000000
--- a/reference_scripts/EQ5dtGW5kQhtAb87.js
+++ /dev/null
@@ -1,7 +0,0 @@
-await this.actor.addCondition("prone")
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "hard"}, skipTargets: true, appendTitle : " - " + this.effect.name})
-await test.roll();
-if (test.failed)
-{
- await this.actor.addCondition("stunned")
-}
\ No newline at end of file
diff --git a/reference_scripts/ERxrWzSpw8qwxFVi.js b/reference_scripts/ERxrWzSpw8qwxFVi.js
deleted file mode 100644
index e0eaff5..0000000
--- a/reference_scripts/ERxrWzSpw8qwxFVi.js
+++ /dev/null
@@ -1 +0,0 @@
-this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); this.actor.addCondition("broken");
\ No newline at end of file
diff --git a/reference_scripts/EU5j0hnDTG9Z6d1e.js b/reference_scripts/EU5j0hnDTG9Z6d1e.js
deleted file mode 100644
index 82d6a1d..0000000
--- a/reference_scripts/EU5j0hnDTG9Z6d1e.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}})
-await test.roll();
-if(test.failed)
-{
- this.actor.addCondition("stunned", 2)
-}
\ No newline at end of file
diff --git a/reference_scripts/EVBSHEC5nmmj2X41.js b/reference_scripts/EVBSHEC5nmmj2X41.js
deleted file mode 100644
index c08a5ea..0000000
--- a/reference_scripts/EVBSHEC5nmmj2X41.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name != game.i18n.localize("NAME.Climb") && !args.skill?.name?.includes(game.i18n.localize("NAME.Stealth"));
\ No newline at end of file
diff --git a/reference_scripts/EYny6z5oTOhxGDfb.js b/reference_scripts/EYny6z5oTOhxGDfb.js
deleted file mode 100644
index 087904f..0000000
--- a/reference_scripts/EYny6z5oTOhxGDfb.js
+++ /dev/null
@@ -1 +0,0 @@
-args.fields.modifier -= 10;
diff --git a/reference_scripts/EaSNOmXUxAkUHnm5.js b/reference_scripts/EaSNOmXUxAkUHnm5.js
deleted file mode 100644
index 89a428d..0000000
--- a/reference_scripts/EaSNOmXUxAkUHnm5.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb")
-this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/Eay7GpDyfsEE40jT.js b/reference_scripts/Eay7GpDyfsEE40jT.js
deleted file mode 100644
index 14f4feb..0000000
--- a/reference_scripts/Eay7GpDyfsEE40jT.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (args.totalWoundLoss > 0)
-{
- args.actor.addCondition("ablaze")
-}
\ No newline at end of file
diff --git a/reference_scripts/EdTChmSouS0MSmk5.js b/reference_scripts/EdTChmSouS0MSmk5.js
deleted file mode 100644
index b5c9aed..0000000
--- a/reference_scripts/EdTChmSouS0MSmk5.js
+++ /dev/null
@@ -1,10 +0,0 @@
-let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
-await test.roll();
-if (test.succeeded)
-{
- this.script.scriptMessage("Can perform an Action or Move (choose one)")
-}
-else
-{
- this.script.scriptMessage("Cannot perform an Action or Move this round")
-}
\ No newline at end of file
diff --git a/reference_scripts/EiLaZW4b4ypw5sLV.js b/reference_scripts/EiLaZW4b4ypw5sLV.js
deleted file mode 100644
index 7761e61..0000000
--- a/reference_scripts/EiLaZW4b4ypw5sLV.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// can't use Damage application type because that checks if wounds were dealt
-args.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})
\ No newline at end of file
diff --git a/reference_scripts/EmXwcuycEH8slEn5.js b/reference_scripts/EmXwcuycEH8slEn5.js
deleted file mode 100644
index 4bd0b62..0000000
--- a/reference_scripts/EmXwcuycEH8slEn5.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}})
-await test.roll();
-if(test.failed)
-{
- this.actor.addCondition("unconscious")
-}
\ No newline at end of file
diff --git a/reference_scripts/EmmG49pMOPHRwDzR.js b/reference_scripts/EmmG49pMOPHRwDzR.js
deleted file mode 100644
index 8c92354..0000000
--- a/reference_scripts/EmmG49pMOPHRwDzR.js
+++ /dev/null
@@ -1,8 +0,0 @@
- let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)
- if (args.test.isFumble && roll == 1 && !args.test.result.misfire)
- {
- args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)"
- args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)
- }
- else if (args.test.isFumble && roll != 1)
- args.test.result.other.push("Misfire Roll: " + roll)
diff --git a/reference_scripts/EpdMj9d9SYPeP44q.js b/reference_scripts/EpdMj9d9SYPeP44q.js
deleted file mode 100644
index ebf9773..0000000
--- a/reference_scripts/EpdMj9d9SYPeP44q.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.characteristic != "ag" && args.item?.id != this.item?.id
\ No newline at end of file
diff --git a/reference_scripts/ErgOwSiVnm9VLVHN.js b/reference_scripts/ErgOwSiVnm9VLVHN.js
deleted file mode 100644
index f81a403..0000000
--- a/reference_scripts/ErgOwSiVnm9VLVHN.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT")
-this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/Et4tPHlrkueLqP3T.js b/reference_scripts/Et4tPHlrkueLqP3T.js
deleted file mode 100644
index 46d8efd..0000000
--- a/reference_scripts/Et4tPHlrkueLqP3T.js
+++ /dev/null
@@ -1 +0,0 @@
-if (args.item.type == "skill") args.item.system.modifier.value -= 10
\ No newline at end of file
diff --git a/reference_scripts/Ew3C2WmLCtc1KT46.js b/reference_scripts/Ew3C2WmLCtc1KT46.js
deleted file mode 100644
index 9e8991b..0000000
--- a/reference_scripts/Ew3C2WmLCtc1KT46.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) || args.item?.id == this.item?.id
\ No newline at end of file
diff --git a/reference_scripts/EwD053Fyy46b59ZI.js b/reference_scripts/EwD053Fyy46b59ZI.js
deleted file mode 100644
index 4512a9a..0000000
--- a/reference_scripts/EwD053Fyy46b59ZI.js
+++ /dev/null
@@ -1,2 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.Item.6l3jvIAvrKxt0lA9");
-this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id})
\ No newline at end of file
diff --git a/reference_scripts/Eye6dranWpNsILjm.js b/reference_scripts/Eye6dranWpNsILjm.js
deleted file mode 100644
index 917fad5..0000000
--- a/reference_scripts/Eye6dranWpNsILjm.js
+++ /dev/null
@@ -1,4 +0,0 @@
-if (this.actor.system.status.wounds.value <= 1)
-{
- this.effect.delete();
-}
\ No newline at end of file
diff --git a/reference_scripts/F2u4L4o0r1LTWeWK.js b/reference_scripts/F2u4L4o0r1LTWeWK.js
deleted file mode 100644
index 7f9ad7e..0000000
--- a/reference_scripts/F2u4L4o0r1LTWeWK.js
+++ /dev/null
@@ -1,8 +0,0 @@
-if (isNaN(parseInt(this.item.system.specification.value)))
-{
- let value = await ValueDialog.create("Enter Terror value", this.effect.name);
- if (value)
- {
- this.item.updateSource({"system.specification.value" : value});
- }
-}
\ No newline at end of file
diff --git a/reference_scripts/F4aGsdzJ9SYcX57F.js b/reference_scripts/F4aGsdzJ9SYcX57F.js
deleted file mode 100644
index 57eb47b..0000000
--- a/reference_scripts/F4aGsdzJ9SYcX57F.js
+++ /dev/null
@@ -1,10 +0,0 @@
-if (args.equipped)
-{
- let item = await fromUuid("Compendium.wfrp4e-core.items.HpFkVJ2lYPAWumUL")
- let data = item.toObject();
- this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
-}
-else
-{
- this.effect.deleteCreatedItems();
-}
\ No newline at end of file
diff --git a/reference_scripts/FAB12eLcSCAOOQwk.js b/reference_scripts/FAB12eLcSCAOOQwk.js
deleted file mode 100644
index 4e92511..0000000
--- a/reference_scripts/FAB12eLcSCAOOQwk.js
+++ /dev/null
@@ -1 +0,0 @@
-this.script.scirptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true});
\ No newline at end of file
diff --git a/reference_scripts/FAf4iXj5LkdvukS2.js b/reference_scripts/FAf4iXj5LkdvukS2.js
deleted file mode 100644
index a39a05c..0000000
--- a/reference_scripts/FAf4iXj5LkdvukS2.js
+++ /dev/null
@@ -1 +0,0 @@
-fromUuid("Compendium.wfrp4e-wom.items.0Xdm4r7l2EwC4fcg").then(item => Item.create(item.toObject(), {fromEffect : this.effect.id, parent : this.actor}))
\ No newline at end of file
diff --git a/reference_scripts/FMA16PvoObBV8vDl.js b/reference_scripts/FMA16PvoObBV8vDl.js
deleted file mode 100644
index 873a4f2..0000000
--- a/reference_scripts/FMA16PvoObBV8vDl.js
+++ /dev/null
@@ -1,5 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A")
-item = item.toObject()
-item.system.specification.value = 20
-this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id})
-this.script.scriptNotification(item.name + " added")
\ No newline at end of file
diff --git a/reference_scripts/FMSN5uRskkATexzB.js b/reference_scripts/FMSN5uRskkATexzB.js
deleted file mode 100644
index 913a79d..0000000
--- a/reference_scripts/FMSN5uRskkATexzB.js
+++ /dev/null
@@ -1 +0,0 @@
-game.wfrp4e.tables.rollToChat("crithead")
\ No newline at end of file
diff --git a/reference_scripts/FPYNcxm21678boLT.js b/reference_scripts/FPYNcxm21678boLT.js
deleted file mode 100644
index f08a8e4..0000000
--- a/reference_scripts/FPYNcxm21678boLT.js
+++ /dev/null
@@ -1,18 +0,0 @@
-if (args.attackerTest.data.preData.rollClass !== "CharacteristicTest") return;
-if (args.attackerTest.data.preData.characteristic !== "s") return;
-
-const SL = args.opposedTest.data.opposeResult.differenceSL;
-
-const targetId = this.effect.getFlag("wfrp4e", "target");
-const target = canvas.scene.tokens.get(targetId);
-
-if (SL > 4) {
- args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} was forced to let go of ${target.name}.`);
- return await this.effect.delete();
-}
-
-if (SL > 0) {
- args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} was prevented from squeezing ${target.name} for one turn.`);
- let turns = this.effect.getFlag("wfrp4e", "turns");
- this.effect.setFlag("wfrp4e", "turns", turns + 1);
-}
\ No newline at end of file
diff --git a/reference_scripts/FSqUqSByMiztYOQM.js b/reference_scripts/FSqUqSByMiztYOQM.js
deleted file mode 100644
index 5bf62e7..0000000
--- a/reference_scripts/FSqUqSByMiztYOQM.js
+++ /dev/null
@@ -1,2 +0,0 @@
-if (args.totalWoundLoss > 0)
- this.script.scriptMessage(`Infected: ${args.actor.name} must pass an Easy (+40) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM") })
\ No newline at end of file
diff --git a/reference_scripts/FUgCtIoj1Stgqxt7.js b/reference_scripts/FUgCtIoj1Stgqxt7.js
deleted file mode 100644
index acd0a25..0000000
--- a/reference_scripts/FUgCtIoj1Stgqxt7.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["ws", "bs", "s", "ag", "t", "dex"].includes(args.characteristic)
\ No newline at end of file
diff --git a/reference_scripts/FXuyiJoXdAh6WhRK.js b/reference_scripts/FXuyiJoXdAh6WhRK.js
deleted file mode 100644
index 6e7b684..0000000
--- a/reference_scripts/FXuyiJoXdAh6WhRK.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == "Ride (Horse)" && game.combat?.active
\ No newline at end of file
diff --git a/reference_scripts/FXwfqF0jpXlBQ9Y3.js b/reference_scripts/FXwfqF0jpXlBQ9Y3.js
deleted file mode 100644
index 31fa389..0000000
--- a/reference_scripts/FXwfqF0jpXlBQ9Y3.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.item?.system?.isMelee && this.actor.attacker
\ No newline at end of file
diff --git a/reference_scripts/FYUPfYyTYZkxRLFT.js b/reference_scripts/FYUPfYyTYZkxRLFT.js
deleted file mode 100644
index 35e86d3..0000000
--- a/reference_scripts/FYUPfYyTYZkxRLFT.js
+++ /dev/null
@@ -1 +0,0 @@
-return !["NAME.Endurance", "NAME.Cool"].map(i => game.i18n.localize(i)).includes(args.skill?.name)
\ No newline at end of file
diff --git a/reference_scripts/FZFOC7bip0oiWEzk.js b/reference_scripts/FZFOC7bip0oiWEzk.js
deleted file mode 100644
index 11e7cfd..0000000
--- a/reference_scripts/FZFOC7bip0oiWEzk.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)
-{
- args.actor.addCondition("bleeding", 2);
- this.script.scriptNotification("Added Bleeding")
-}
\ No newline at end of file
diff --git a/reference_scripts/FciJSTq7dZsZIPgl.js b/reference_scripts/FciJSTq7dZsZIPgl.js
deleted file mode 100644
index 0da31e8..0000000
--- a/reference_scripts/FciJSTq7dZsZIPgl.js
+++ /dev/null
@@ -1,10 +0,0 @@
-if (args.equipped)
-{
- let item = await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR")
- let data = item.toObject();
- this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
-}
-else
-{
- this.effect.deleteCreatedItems();
-}
\ No newline at end of file
diff --git a/reference_scripts/FfTqCPxCoxwGDTQs.js b/reference_scripts/FfTqCPxCoxwGDTQs.js
deleted file mode 100644
index bc75552..0000000
--- a/reference_scripts/FfTqCPxCoxwGDTQs.js
+++ /dev/null
@@ -1,3 +0,0 @@
-let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr")
-let data = item.toObject()
-this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
diff --git a/reference_scripts/FiD3mvWIBHNNIuO9.js b/reference_scripts/FiD3mvWIBHNNIuO9.js
deleted file mode 100644
index f9fadbe..0000000
--- a/reference_scripts/FiD3mvWIBHNNIuO9.js
+++ /dev/null
@@ -1,8 +0,0 @@
-if (args.opposedTest.result.hitloc.value == "body")
-{
- if ((await new Roll("1d2").roll()).total == 1)
- {
- args.opposedTest.result.hitloc.value = "head"
- this.script.scriptMessage(`Hit location changed to Head`)
- }
-}
\ No newline at end of file
diff --git a/reference_scripts/FkTwk8hfHpRLbAp2.js b/reference_scripts/FkTwk8hfHpRLbAp2.js
deleted file mode 100644
index cd051cb..0000000
--- a/reference_scripts/FkTwk8hfHpRLbAp2.js
+++ /dev/null
@@ -1,6 +0,0 @@
-let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});
-await test.roll();
-if (test.failed)
-{
- this.actor.addCondition("prone")
-}
\ No newline at end of file
diff --git a/reference_scripts/FmLx9pwOkzqqU7Ph.js b/reference_scripts/FmLx9pwOkzqqU7Ph.js
deleted file mode 100644
index c54d1df..0000000
--- a/reference_scripts/FmLx9pwOkzqqU7Ph.js
+++ /dev/null
@@ -1 +0,0 @@
-return args.skill?.name == game.i18n.localize("NAME.Track");
\ No newline at end of file
diff --git a/reference_scripts/FqevMs0ukQ9WuUHl.js b/reference_scripts/FqevMs0ukQ9WuUHl.js
deleted file mode 100644
index d352c76..0000000
--- a/reference_scripts/FqevMs0ukQ9WuUHl.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Each time the blade is used, the GM should secretly roll a d10.
-// On a 1, its poison has run dry,
-// and the next time it is employed it will shatter.
-
-if (this.item.getFlag("wfrp4e", "brittle"))
-{
- ChatMessage.create({content: `${this.item.name} shatters!`})
- this.item.update({name : `${this.item.name} (Shattered)`})
-}
\ No newline at end of file
diff --git a/reference_scripts/FtZf56VI6Qsspu0D.js b/reference_scripts/FtZf56VI6Qsspu0D.js
deleted file mode 100644
index 9ae4c74..0000000
--- a/reference_scripts/FtZf56VI6Qsspu0D.js
+++ /dev/null
@@ -1,53 +0,0 @@
-const repaired_message = `
Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'difficult'; -const target = 20; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/Fvlc4RkeF4dHjW3m.js b/reference_scripts/Fvlc4RkeF4dHjW3m.js deleted file mode 100644 index 1fc9418..0000000 --- a/reference_scripts/Fvlc4RkeF4dHjW3m.js +++ /dev/null @@ -1,16 +0,0 @@ -let caster = this.effect.sourceActor -if (caster && (this.actor.has(game.i18n.localize("NAME.Undead")) || this.actor.has(game.i18n.localize("NAME.Daemonic")))) { - let wp = caster.system.characteristics.wp.value - if (wp > this.actor.system.characteristics.t.value) { - if (this.actor.has(game.i18n.localize("NAME.Unstable"))) { - this.actor.update({ "system.status.wounds.value": 0 }) - this.actor.addCondition("dead") - } - else { - fromUuid("Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl").then(item => { - this.actor.createEmbeddedDocuments("Item", [item.toObject()], { fromEffect: this.effect.id }) - ChatMessage.create({ content: `Added Unstable to ${this.actor.prototypeToken.name}`, speaker: { alias: caster.name } }) - }) - } - } -} \ No newline at end of file diff --git a/reference_scripts/Fwk8WA8NfRivLFWJ.js b/reference_scripts/Fwk8WA8NfRivLFWJ.js deleted file mode 100644 index 5073111..0000000 --- a/reference_scripts/Fwk8WA8NfRivLFWJ.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name === "Entertain (Singing)"; \ No newline at end of file diff --git a/reference_scripts/G1RletYc6BzigJrK.js b/reference_scripts/G1RletYc6BzigJrK.js deleted file mode 100644 index 24f4082..0000000 --- a/reference_scripts/G1RletYc6BzigJrK.js +++ /dev/null @@ -1,2 +0,0 @@ -let ablaze = parseInt(this.effect.sourceTest.result.SL) + 5 -args.actor.addCondition("ablaze", ablaze) \ No newline at end of file diff --git a/reference_scripts/G7sFEnJlXZvfXL3V.js b/reference_scripts/G7sFEnJlXZvfXL3V.js deleted file mode 100644 index 758b802..0000000 --- a/reference_scripts/G7sFEnJlXZvfXL3V.js +++ /dev/null @@ -1,12 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.system.reduceQuantity(); - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - let effectData = this.item.effects.contents[1].convertToApplied(); - effectData.flags.wfrp4e.sourceItem = this.item.uuid - actor.applyEffect({effectData : [effectData]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/GAO8AozttWOyRkta.js b/reference_scripts/GAO8AozttWOyRkta.js deleted file mode 100644 index 796ff24..0000000 --- a/reference_scripts/GAO8AozttWOyRkta.js +++ /dev/null @@ -1,5 +0,0 @@ -if (!args.flags.lostHand) -{ - args.fields.lostHand = true; - args.fields.modifier += -20; -} \ No newline at end of file diff --git a/reference_scripts/GEfWIFBSrXt0ldBM.js b/reference_scripts/GEfWIFBSrXt0ldBM.js deleted file mode 100644 index b4de7ed..0000000 --- a/reference_scripts/GEfWIFBSrXt0ldBM.js +++ /dev/null @@ -1,2 +0,0 @@ -(await new Roll("1d10").roll()).toMessage(this.script.getChatData()) -await this.actor.addCondition("dead") \ No newline at end of file diff --git a/reference_scripts/GFaTz8f6PBNWrlad.js b/reference_scripts/GFaTz8f6PBNWrlad.js deleted file mode 100644 index 509844b..0000000 --- a/reference_scripts/GFaTz8f6PBNWrlad.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : `Confused: Determine behaviour by @Table[bewilder] Table.`}}) -await test.roll(); -return test.failed \ No newline at end of file diff --git a/reference_scripts/GFkVnx4m9OwYsKGH.js b/reference_scripts/GFkVnx4m9OwYsKGH.js deleted file mode 100644 index 864fe17..0000000 --- a/reference_scripts/GFkVnx4m9OwYsKGH.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.flags.ambi+= 1 \ No newline at end of file diff --git a/reference_scripts/GNl5Zk7BZ2jhRV1I.js b/reference_scripts/GNl5Zk7BZ2jhRV1I.js deleted file mode 100644 index fca7f72..0000000 --- a/reference_scripts/GNl5Zk7BZ2jhRV1I.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "armour") -{ - args.item.system.AP.head = 0; -} \ No newline at end of file diff --git a/reference_scripts/GOq4TcnWbfyfCo2V.js b/reference_scripts/GOq4TcnWbfyfCo2V.js deleted file mode 100644 index 3a51404..0000000 --- a/reference_scripts/GOq4TcnWbfyfCo2V.js +++ /dev/null @@ -1,26 +0,0 @@ -this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus * 2} Wounds`) -await this.actor.modifyWounds(this.actor.characteristics.t.bonus * 2) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - Side Effects`,fields : {difficulty : "difficult"}}) -await test.roll(); -if (test.failed) -{ - let roll = await new Roll("1d10").roll(); - await roll.toMessage(this.script.getChatData()) - if (roll.total <= 3) - { - this.actor.addCondition("blinded", 3) - } - else if (roll.total <= 6) - { - this.actor.addCondition("broken"); - } - else if (roll.total <= 9) - { - this.actor.addCondition("stunned"); - } - else if (roll.total == 10) - { - this.actor.addConditon("unconscious") - } -} \ No newline at end of file diff --git a/reference_scripts/GRfCxtYzmEx2LYU7.js b/reference_scripts/GRfCxtYzmEx2LYU7.js deleted file mode 100644 index dcc7340..0000000 --- a/reference_scripts/GRfCxtYzmEx2LYU7.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.totalWoundLoss >= 1) -{ - let roll = await new Roll("1d10").roll(); - await roll.toMessage(this.script.getChatData()); - if (roll.total == 9) - { - this.script.scriptMessage(`Two @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Blue Horror of Tzeentch} claw their way out of ${this.actor.name}'s screaming flesh, killing them in the process.`, {whisper : ChatMessage.getWhisperRecipients("GM")}) - } -} \ No newline at end of file diff --git a/reference_scripts/GTZUO73pUJKpM1JB.js b/reference_scripts/GTZUO73pUJKpM1JB.js deleted file mode 100644 index 3d99c30..0000000 --- a/reference_scripts/GTZUO73pUJKpM1JB.js +++ /dev/null @@ -1,3 +0,0 @@ - let roll = await new Roll("1d10").roll(); - game.dice3d?.showForRoll(roll); - this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) diff --git a/reference_scripts/GUkpYdPwoC5pc9BT.js b/reference_scripts/GUkpYdPwoC5pc9BT.js deleted file mode 100644 index 160e012..0000000 --- a/reference_scripts/GUkpYdPwoC5pc9BT.js +++ /dev/null @@ -1 +0,0 @@ -return !args.weapon?.system.properties.flaws.crewed \ No newline at end of file diff --git a/reference_scripts/GZFsuynUhgZqwTGo.js b/reference_scripts/GZFsuynUhgZqwTGo.js deleted file mode 100644 index bf5a7a7..0000000 --- a/reference_scripts/GZFsuynUhgZqwTGo.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.totalWoundLoss >= 1) -{ - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Gained a Poisoned Condition", success: "Resisted the poison" }}) - await test.roll(); - if (test.failed) - { - args.actor.addCondition("poisoned"); - } -} - \ No newline at end of file diff --git a/reference_scripts/GbPEy22VuCNzlNv2.js b/reference_scripts/GbPEy22VuCNzlNv2.js deleted file mode 100644 index be6b4de..0000000 --- a/reference_scripts/GbPEy22VuCNzlNv2.js +++ /dev/null @@ -1 +0,0 @@ -return !this.actor.isMounted || (!args.skill?.name?.includes(game.i18n.localize("NAME.Ride")) && !args.options.dodge) \ No newline at end of file diff --git a/reference_scripts/Gc8S5TYlVdV8NnOT.js b/reference_scripts/Gc8S5TYlVdV8NnOT.js deleted file mode 100644 index 154ee3e..0000000 --- a/reference_scripts/Gc8S5TYlVdV8NnOT.js +++ /dev/null @@ -1,8 +0,0 @@ -let test = await args.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name, context: { failure: "Gained a Broken Condition", success: "Resisted the Broken Condition" } }) - - await test.roll(); - - if (!test.succeeded) - { - args.actor.addCondition("broken"); - } \ No newline at end of file diff --git a/reference_scripts/GcIQtshex11AMmh2.js b/reference_scripts/GcIQtshex11AMmh2.js deleted file mode 100644 index 793a7a8..0000000 --- a/reference_scripts/GcIQtshex11AMmh2.js +++ /dev/null @@ -1,25 +0,0 @@ -if (this.item.system.isEquipped) -{ - let removeRepeater = false - if(!this.item.system.offhand.value) // main - { - let offhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && i.system.offhand.value) - if (offhandUsed) - { - removeRepeater = true; - } - } - else // offhand - { - let mainhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && !i.system.offhand.value) - if (mainhandUsed) - { - removeRepeater = true; - } - } - - if (removeRepeater) - { - this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != "repeater") - } -} \ No newline at end of file diff --git a/reference_scripts/Gh7OidY6UdpWBS1g.js b/reference_scripts/Gh7OidY6UdpWBS1g.js deleted file mode 100644 index 85ee2d0..0000000 --- a/reference_scripts/Gh7OidY6UdpWBS1g.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.KII1gWnxIZ8HzmU5") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/GjkxWj9wCAclM9WA.js b/reference_scripts/GjkxWj9wCAclM9WA.js deleted file mode 100644 index 6fefe6d..0000000 --- a/reference_scripts/GjkxWj9wCAclM9WA.js +++ /dev/null @@ -1,17 +0,0 @@ -let effects = foundry.utils.deepClone(this.item.effects.contents.filter(e => e.active)); - -effects.splice(effects.length - 1); - -if (effects.length == 0) -{ - return this.script.scriptNotification("All Effects have been used. Reset to select them again") -} -let choice = await ItemDialog.create(effects, 1, "Choose Power to Gain"); - -if (choice[0]) -{ - choice[0].update({disabled : true}) - let effect = choice[0].convertToApplied(); - effect.name += ` (${this.effect.name})` - this.actor.createEmbeddedDocuments("ActiveEffect", [effect]); -} \ No newline at end of file diff --git a/reference_scripts/GrF6tQ08jgKmUH4i.js b/reference_scripts/GrF6tQ08jgKmUH4i.js deleted file mode 100644 index 356b70b..0000000 --- a/reference_scripts/GrF6tQ08jgKmUH4i.js +++ /dev/null @@ -1 +0,0 @@ -return !["ws", "bs", "s", "ag", "i"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/GsAyB5xnK3ASeoah.js b/reference_scripts/GsAyB5xnK3ASeoah.js deleted file mode 100644 index d75b3ac..0000000 --- a/reference_scripts/GsAyB5xnK3ASeoah.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpentry)'; -const difficulty = 'easy'; -const target = 20; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/GuUCErVbk5hrFzR3.js b/reference_scripts/GuUCErVbk5hrFzR3.js deleted file mode 100644 index 85bf7f6..0000000 --- a/reference_scripts/GuUCErVbk5hrFzR3.js +++ /dev/null @@ -1 +0,0 @@ -args.multiplier.tb += 1 \ No newline at end of file diff --git a/reference_scripts/GuxbvztcvzJz2oH1.js b/reference_scripts/GuxbvztcvzJz2oH1.js deleted file mode 100644 index fb1c17c..0000000 --- a/reference_scripts/GuxbvztcvzJz2oH1.js +++ /dev/null @@ -1 +0,0 @@ -args.item.system.qualities.value = []; \ No newline at end of file diff --git a/reference_scripts/GzSFlqL1YrIK1dxh.js b/reference_scripts/GzSFlqL1YrIK1dxh.js deleted file mode 100644 index 1f5a252..0000000 --- a/reference_scripts/GzSFlqL1YrIK1dxh.js +++ /dev/null @@ -1,16 +0,0 @@ -let items = await Promise.all(["Compendium.wfrp4e-wom.items.Item.EjGYZ4CgX2jZW7Ot", -"Compendium.wfrp4e-wom.items.Item.O2v9RQiFf0obskP5", -"Compendium.wfrp4e-wom.items.Item.2cv6hhZ57iV6z5Il", -"Compendium.wfrp4e-wom.items.Item.YgDEUO0G0XcqQJqg", -"Compendium.wfrp4e-wom.items.Item.J6K5TPxI8qIGQKKH", -"Compendium.wfrp4e-wom.items.Item.K9FPtiDLwTkC7FuO", -"Compendium.wfrp4e-wom.items.Item.CkMYRYCLrkMnyVm5", -"Compendium.wfrp4e-wom.items.Item.0Xdm4r7l2EwC4fcg"].map(fromUuid)); - -let choice = await game.wfrp4e.apps.ItemDialog.create(items, 1, "Select Wind") -//this.actor.createEmbeddedDocuments("Item", items); - -this.item.update(choice[0]?.toObject(), {diff: false, recursive : false}); - -//this.actor.items.getName(this.effect.item.name).delete() // For some reason this.effect.item.delete() throws an error - diff --git a/reference_scripts/GzsuEg7gZy1f0ljy.js b/reference_scripts/GzsuEg7gZy1f0ljy.js deleted file mode 100644 index 3220372..0000000 --- a/reference_scripts/GzsuEg7gZy1f0ljy.js +++ /dev/null @@ -1,10 +0,0 @@ -let bleeding = this.actor.hasCondition("bleeding") -if (bleeding) -{ - this.script.scriptNotification(`Cleared ${bleeding.conditionValue} Bleeding Conditions`) - bleeding.delete(); -} -else -{ - this.script.scriptNotification(`No Bleeding Conditions`) -} \ No newline at end of file diff --git a/reference_scripts/H06Ysj7oPiemW7S6.js b/reference_scripts/H06Ysj7oPiemW7S6.js deleted file mode 100644 index 8c3872b..0000000 --- a/reference_scripts/H06Ysj7oPiemW7S6.js +++ /dev/null @@ -1,18 +0,0 @@ -if (args.test.options.income && !args.test.options.criminal) -{ - args.test.options.criminal = true; - let currentCareer = args.test.actor.system.currentCareer; - let coin = {1 : "b", 2 : "s", 3 : "s", 4 : "g"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter) - let term = {1 : "bp", 2 : "ss", 3 : "ss", 4 : "gc"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter) - let dieAmount = {1 : "2d10", 2 : "1d10", 3 : "2d10", 4 : "1"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter) - dieAmount = parseInt(dieAmount[0]) * this.item.system.Advances; // Multilpy that first letter by your standing (Brass 4 = 8d10 pennies) - if (coin != "g") // Don't roll for gold, just use standing value - { - dieAmount = dieAmount + "d10"; - } - let moneyEarned = (await new Roll(dieAmount.toString()).roll()).total; - let moneyString = `${moneyEarned}${coin}` - let transactionString = `${moneyEarned}${term}` - - this.script.scriptMessage(`Earned an additional ${game.wfrp4e.market.amountToString(game.wfrp4e.market.parseMoneyTransactionString(transactionString))}`, {whisper : ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/reference_scripts/H1z3nWW7Rj3Oisxy.js b/reference_scripts/H1z3nWW7Rj3Oisxy.js deleted file mode 100644 index a7b8f33..0000000 --- a/reference_scripts/H1z3nWW7Rj3Oisxy.js +++ /dev/null @@ -1 +0,0 @@ -return args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/H2CJvApKMnfGNNoo.js b/reference_scripts/H2CJvApKMnfGNNoo.js deleted file mode 100644 index 60892cb..0000000 --- a/reference_scripts/H2CJvApKMnfGNNoo.js +++ /dev/null @@ -1,7 +0,0 @@ - if (args.test.item?.type == "skill" && args.test.item.name.includes(game.i18n.localize("NAME.Stealth"))) -{ - args.test.result.description = "Astounding Failure"; - args.test.result.outcome = "failure"; - ChatMessage.create({content : "SQUEAK", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) - AudioHelper.play({ src: `${game.settings.get("wfrp4e", "soundPath")}squeek.wav` }, true); -} \ No newline at end of file diff --git a/reference_scripts/H3Wls12aVWAWTp9J.js b/reference_scripts/H3Wls12aVWAWTp9J.js deleted file mode 100644 index 32f6ee1..0000000 --- a/reference_scripts/H3Wls12aVWAWTp9J.js +++ /dev/null @@ -1,3 +0,0 @@ -this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : " - " + this.effect.name}).then(test => { - test.roll(); -}) \ No newline at end of file diff --git a/reference_scripts/H3pZ9UeIzIz3luKh.js b/reference_scripts/H3pZ9UeIzIz3luKh.js deleted file mode 100644 index c120317..0000000 --- a/reference_scripts/H3pZ9UeIzIz3luKh.js +++ /dev/null @@ -1,5 +0,0 @@ -args.actor.addCondition("bleeding") - -this.actor.setFlag("wfrp4e", "isAttached", args.actor.name) - -this.script.scriptMessage(`Attaches to ${args.actor.name}`) \ No newline at end of file diff --git a/reference_scripts/H85k4L3yICm7cfIk.js b/reference_scripts/H85k4L3yICm7cfIk.js deleted file mode 100644 index 57f847c..0000000 --- a/reference_scripts/H85k4L3yICm7cfIk.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Sail'; -const difficulty = 'easy'; -const target = 10; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/HASsi6wYHVALExWq.js b/reference_scripts/HASsi6wYHVALExWq.js deleted file mode 100644 index 93a5c23..0000000 --- a/reference_scripts/HASsi6wYHVALExWq.js +++ /dev/null @@ -1,14 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "1 Corruption Point Gained" } }) -await test.roll(); - -if (test.failed && args.actor.type == "character") -{ - let msg = "" - msg += `${this.actor.prototypeToken.name} gained a Corruption point
` - if (test.result.roll % 11 == 0 || test.result.roll == 100) - { - msg += `${args.actor.prototypeToken.name} gains a mutation (@Table[expandedmutatephys]{Physical} or @Table[expandedmutatemental]{Mental}) and gains @UUID[Compendium.wfrp4e-core.items.hiU7vhBOVpVI8c7C]{Chaos Magic (Tzeentch)}` - } - this.script.scriptMessage(msg, {whisper : ChatMessage.getWhisperRecipients("GM")}) - await this.actor.update({ "system.status.corruption.value": parseInt(args.actor.status.corruption.value) + 1 }) -} \ No newline at end of file diff --git a/reference_scripts/HJ2X4ZtXei0BXbxf.js b/reference_scripts/HJ2X4ZtXei0BXbxf.js deleted file mode 100644 index 9042978..0000000 --- a/reference_scripts/HJ2X4ZtXei0BXbxf.js +++ /dev/null @@ -1,19 +0,0 @@ - let choices = await Promise.all([game.wfrp4e.utility.findItemId("PzimjNx9Ojq4g6mV"), game.wfrp4e.utility.findItemId("rOPmyLWa37e7s9v6")]) - let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choose a Skill") - - items = items.map(i => i.toObject()) - items.forEach(i => i.system.advances.value = 20) - -items.forEach(i => equip(i)) - -this.actor.createEmbeddedDocuments("Item", items); - -function equip(item) -{ - if (item.type == "armour") - item.data.worn.value = true - else if (item.type == "weapon") - item.data.equipped = true - else if (item.type == "trapping" && item.data.trappingType.value == "clothingAccessories") - item.data.worn = true -} \ No newline at end of file diff --git a/reference_scripts/HKhyn0kijKfzW6cw.js b/reference_scripts/HKhyn0kijKfzW6cw.js deleted file mode 100644 index bb191fa..0000000 --- a/reference_scripts/HKhyn0kijKfzW6cw.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}) -await test.roll(); -this.item.updateSource({"flags.wfrp4e.passed" : test.succeeded}) \ No newline at end of file diff --git a/reference_scripts/HMC6hPND9DWLFfZE.js b/reference_scripts/HMC6hPND9DWLFfZE.js deleted file mode 100644 index b975613..0000000 --- a/reference_scripts/HMC6hPND9DWLFfZE.js +++ /dev/null @@ -1,43 +0,0 @@ -if (this.item.name.includes("(")) -{ - return; -} - -let index = game.packs -.filter(i => i.metadata.type == "Item") -.reduce((acc, pack) => acc.concat(pack.index.contents), []) -.filter(i => i.type == "skill" && i.name.includes(game.i18n.localize("NAME.Lore"))) -.map(i => { - i.id = i._id - return i -}) - -let choice = await ItemDialog.create(index, 1, "Choose a Lore") -let text; -if (!choice[0]) -{ - let custom = await Dialog.wait({ - title : "Enter Lore", - content : "", - buttons : { - confirm : { - label : game.i18n.localize("Confirm"), - callback : (dlg) => { - return dlg.find("input")[0].value - } - } - }, - default : "confirm", - close : () => { - return "" - } - }) - text = custom || "" -} -else -{ - text = game.wfrp4e.utility.extractParenthesesText(choice[0].name) -} - -await this.item.updateSource({name : this.item.name + ` (${text})`, "system.tests.value" : this.item.system.tests.value.replace("chosen Lore", text)}) -await this.effect.updateSource({name : this.effect.name + ` (${text})`}) \ No newline at end of file diff --git a/reference_scripts/HOt2hHOiHDZ7oBgW.js b/reference_scripts/HOt2hHOiHDZ7oBgW.js deleted file mode 100644 index af34a62..0000000 --- a/reference_scripts/HOt2hHOiHDZ7oBgW.js +++ /dev/null @@ -1,4 +0,0 @@ -if (["rLeg", "lLeg"].includes(this.effect.getFlag("wfrp4e", "location"))) -{ - args.actor.details.move.value /= 2 -} diff --git a/reference_scripts/HUKzssLxeQo1wbx9.js b/reference_scripts/HUKzssLxeQo1wbx9.js deleted file mode 100644 index f0ea092..0000000 --- a/reference_scripts/HUKzssLxeQo1wbx9.js +++ /dev/null @@ -1,11 +0,0 @@ - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}, appendTitle : " - Wounded"}) - await test.roll(); - if (test.failed) - { - fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb").then(disease => { - this.actor.createEmbeddedDocuments("Item", [disease.toObject()]) - this.script.scriptNotification("Gained " + disease.name) - }) - } - \ No newline at end of file diff --git a/reference_scripts/HX6CjNapYdC0VmQ8.js b/reference_scripts/HX6CjNapYdC0VmQ8.js deleted file mode 100644 index 36a39a6..0000000 --- a/reference_scripts/HX6CjNapYdC0VmQ8.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.epPBu7x6BRWp2PHG") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/HXJKkmpfxQUOnWOS.js b/reference_scripts/HXJKkmpfxQUOnWOS.js deleted file mode 100644 index 34affd7..0000000 --- a/reference_scripts/HXJKkmpfxQUOnWOS.js +++ /dev/null @@ -1,4 +0,0 @@ -if (!this.item.system.twohanded.value) -{ - this.item.system.flaws.value = this.item.system.flaws.value.concat([{name : "tiring"}, {name : "slow"}]) -} \ No newline at end of file diff --git a/reference_scripts/HYrl5aNMm8BAdqH7.js b/reference_scripts/HYrl5aNMm8BAdqH7.js deleted file mode 100644 index b628745..0000000 --- a/reference_scripts/HYrl5aNMm8BAdqH7.js +++ /dev/null @@ -1,8 +0,0 @@ - - let modifier = 0 - if (this.effect.name.includes("Moderate")) - modifier = -20 - else - modifier = -10 - args.fields.modifier += modifier - \ No newline at end of file diff --git a/reference_scripts/Hcpn1gU58DIKIhty.js b/reference_scripts/Hcpn1gU58DIKIhty.js deleted file mode 100644 index 6d5917a..0000000 --- a/reference_scripts/Hcpn1gU58DIKIhty.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "skill" && args.item.name == "Melee (Flail)") -{ - args.item.system.modifier.value += 10; -} \ No newline at end of file diff --git a/reference_scripts/HfCxNd7mFGZH4s9Y.js b/reference_scripts/HfCxNd7mFGZH4s9Y.js deleted file mode 100644 index 07fcf28..0000000 --- a/reference_scripts/HfCxNd7mFGZH4s9Y.js +++ /dev/null @@ -1,13 +0,0 @@ -// An opponent that takes more than a single Wound from a Warp Blade strike -// in melee combat must make an Average (+20) Endurance Test -// or take a Stunned Condition - - -if (args.totalWoundLoss > 1) { - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) - await test.roll(); - if(test.failed) - { - await args.actor.addCondition("stunned"); - } -} \ No newline at end of file diff --git a/reference_scripts/HiMBS6GeOwEydWYN.js b/reference_scripts/HiMBS6GeOwEydWYN.js deleted file mode 100644 index 9ad95cd..0000000 --- a/reference_scripts/HiMBS6GeOwEydWYN.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/reference_scripts/HmImVzvw6ecBy99l.js b/reference_scripts/HmImVzvw6ecBy99l.js deleted file mode 100644 index 1731116..0000000 --- a/reference_scripts/HmImVzvw6ecBy99l.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) -{ - args.actor.addCondition("bleeding", 2) - this.script.scriptNotification("Added Bleeding") -} \ No newline at end of file diff --git a/reference_scripts/HoNTnPphrJISSQr1.js b/reference_scripts/HoNTnPphrJISSQr1.js deleted file mode 100644 index ae73e8e..0000000 --- a/reference_scripts/HoNTnPphrJISSQr1.js +++ /dev/null @@ -1 +0,0 @@ -ChatMessage.create({content : "Speak and be known to me", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) \ No newline at end of file diff --git a/reference_scripts/Hq1G30lhJYvtOSNb.js b/reference_scripts/Hq1G30lhJYvtOSNb.js deleted file mode 100644 index 5dce3bd..0000000 --- a/reference_scripts/Hq1G30lhJYvtOSNb.js +++ /dev/null @@ -1,9 +0,0 @@ - - if (args.test.failed) - { - let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"]; - if (applicableCharacteristics.includes(args.preData.characteristic)) - { - this.actor.addCondition("stunned"); - } - } \ No newline at end of file diff --git a/reference_scripts/HrOBAXsEX073ReKl.js b/reference_scripts/HrOBAXsEX073ReKl.js deleted file mode 100644 index 89b90d3..0000000 --- a/reference_scripts/HrOBAXsEX073ReKl.js +++ /dev/null @@ -1,21 +0,0 @@ -let skill = `Entertain (Singing)` -let currentCareer = this.actor.system.currentCareer; -let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); - -if (!currentCareer) return - - -let inCurrentCareer = currentCareer.system.skills.includes(skill); -let perfectPitchAdded = this.actor.getFlag("wfrp4e", "perfectPitchAdded") || {}; -if (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name]) -{ - existingSkill.system.advances.costModifier = -5; -} -else -{ - perfectPitchAdded[skill] = true; - currentCareer.system.skills.push(skill); - setProperty(this.actor, "flags.wfrp4e.perfectPitchAdded", perfectPitchAdded) -} - - diff --git a/reference_scripts/HrYchgkdZBiu1yPF.js b/reference_scripts/HrYchgkdZBiu1yPF.js deleted file mode 100644 index 959e502..0000000 --- a/reference_scripts/HrYchgkdZBiu1yPF.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/reference_scripts/HwbgUIbpX0D8JLOR.js b/reference_scripts/HwbgUIbpX0D8JLOR.js deleted file mode 100644 index a9ddddc..0000000 --- a/reference_scripts/HwbgUIbpX0D8JLOR.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") - this.actor.addCondition("bleeding") \ No newline at end of file diff --git a/reference_scripts/I0Jo6cbNAJtXUloc.js b/reference_scripts/I0Jo6cbNAJtXUloc.js deleted file mode 100644 index 6066d3a..0000000 --- a/reference_scripts/I0Jo6cbNAJtXUloc.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.J9MK0AIaTbvd5oF6"); -this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/I0oRZ7AWde5KI5jw.js b/reference_scripts/I0oRZ7AWde5KI5jw.js deleted file mode 100644 index 57bbdb3..0000000 --- a/reference_scripts/I0oRZ7AWde5KI5jw.js +++ /dev/null @@ -1 +0,0 @@ -return !["t", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/I1J2m5uud84N50Lk.js b/reference_scripts/I1J2m5uud84N50Lk.js deleted file mode 100644 index 5f22ef9..0000000 --- a/reference_scripts/I1J2m5uud84N50Lk.js +++ /dev/null @@ -1,6 +0,0 @@ -if (["cast", "channelling", "pray"].includes(args.type)) -{ - args.abort = true; - this.script.scriptNotification("Cannot cast Spells or use Prayers"); -} -else return true; \ No newline at end of file diff --git a/reference_scripts/I7ieW0hNYvvX0KFg.js b/reference_scripts/I7ieW0hNYvvX0KFg.js deleted file mode 100644 index 5327a98..0000000 --- a/reference_scripts/I7ieW0hNYvvX0KFg.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Heal"); \ No newline at end of file diff --git a/reference_scripts/I93i49wI9ZrDHT4n.js b/reference_scripts/I93i49wI9ZrDHT4n.js deleted file mode 100644 index 54906f2..0000000 --- a/reference_scripts/I93i49wI9ZrDHT4n.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.jt0DmVK9IiF6Sd2h"); -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/I9QAPKbaXwMMMBT4.js b/reference_scripts/I9QAPKbaXwMMMBT4.js deleted file mode 100644 index 99b5ec4..0000000 --- a/reference_scripts/I9QAPKbaXwMMMBT4.js +++ /dev/null @@ -1,17 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty: "average"}, skipTargets: true, appendTitle : " - " + this.effect.name}) -await test.roll(); -if(test.failed) -{ - await this.actor.addCondition("stunned"); - let secondTest = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty: "easy"}, skipTargets: true, appendTitle : " - Despair"}) - await secondTest.roll(); - if(secondTest.failed) - { - this.effect.updateSource({name : "Taste of Death"}) - await this.actor.addCondition("fatigued"); - } - else - { - return false; - } -} \ No newline at end of file diff --git a/reference_scripts/IAGla7HJlYN0wa4H.js b/reference_scripts/IAGla7HJlYN0wa4H.js deleted file mode 100644 index 5840592..0000000 --- a/reference_scripts/IAGla7HJlYN0wa4H.js +++ /dev/null @@ -1,8 +0,0 @@ -if (args.test.characteristicKey == "wp") -{ - if (args.test.failed) - { - this.actor.addSystemEffect("convulsions") - this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @Symptom[Convulsions] for [[1d10]] hours`) - } -} \ No newline at end of file diff --git a/reference_scripts/ID8mCcjkl7PCQhDq.js b/reference_scripts/ID8mCcjkl7PCQhDq.js deleted file mode 100644 index 4691ac9..0000000 --- a/reference_scripts/ID8mCcjkl7PCQhDq.js +++ /dev/null @@ -1,8 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -if(test.failed) -{ - let damage = this.effect.sourceItem.system.computeSpellDamage("3", true); - this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {suppressMsg: true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})) -} \ No newline at end of file diff --git a/reference_scripts/IG4zYqtN9fRSYE7q.js b/reference_scripts/IG4zYqtN9fRSYE7q.js deleted file mode 100644 index 6fb0958..0000000 --- a/reference_scripts/IG4zYqtN9fRSYE7q.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("ablaze"); \ No newline at end of file diff --git a/reference_scripts/IKiZv9YSFmKmHo6a.js b/reference_scripts/IKiZv9YSFmKmHo6a.js deleted file mode 100644 index b0e3f02..0000000 --- a/reference_scripts/IKiZv9YSFmKmHo6a.js +++ /dev/null @@ -1 +0,0 @@ -return args.spell?.system.lore.value == "fire" \ No newline at end of file diff --git a/reference_scripts/ILqHxk7deotgI3KD.js b/reference_scripts/ILqHxk7deotgI3KD.js deleted file mode 100644 index fdb8958..0000000 --- a/reference_scripts/ILqHxk7deotgI3KD.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.item.type != "weapon") - return - -let reach = args.item.reach.value -let reachNum = game.wfrp4e.config.reachNum[reach] -reachNum = Math.min(reachNum + 2, 7) - -let key = game.wfrp4e.utility.findKey(reachNum, game.wfrp4e.config.reachNum) - -args.item.reach.value = key \ No newline at end of file diff --git a/reference_scripts/IOroJBqTsWvoakJN.js b/reference_scripts/IOroJBqTsWvoakJN.js deleted file mode 100644 index 504fa5a..0000000 --- a/reference_scripts/IOroJBqTsWvoakJN.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.actorsystem.details.move.oars.value > 0) - args.actor.system.details.move.oars.value -= 2; diff --git a/reference_scripts/IPPDvZdE8kn3H9z7.js b/reference_scripts/IPPDvZdE8kn3H9z7.js deleted file mode 100644 index a78deea..0000000 --- a/reference_scripts/IPPDvZdE8kn3H9z7.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); - -if (test.failed) -{ - await this.actor.addCondition("grappling") -} \ No newline at end of file diff --git a/reference_scripts/IR5URcjnCuWBFMoN.js b/reference_scripts/IR5URcjnCuWBFMoN.js deleted file mode 100644 index 69ed22a..0000000 --- a/reference_scripts/IR5URcjnCuWBFMoN.js +++ /dev/null @@ -1,15 +0,0 @@ -// If a full dose is imbibed, -// the victim must pass a Hard (-20) Endurance Test. - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}}) -await test.roll() -if (test.failed) -{ - this.script.scriptMessage(`${this.actor.prototypeToken.name} notices nothing amiss save that they become tired a little earlier than usual. At this point it is still possible to save the victim via a powerful antidote or magical means.
-Once they fall asleep however, it is almost impossible. At this point the victim must make a Hard (-20) Endurance Test. If they fail, they never awaken.
`, - { - whisper: ChatMessage.getWhisperRecipients("GM"), - blind: true - }) -} -return test.failed; \ No newline at end of file diff --git a/reference_scripts/IR86DuMbVdbGOJYt.js b/reference_scripts/IR86DuMbVdbGOJYt.js deleted file mode 100644 index 4316d1c..0000000 --- a/reference_scripts/IR86DuMbVdbGOJYt.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("blinded") \ No newline at end of file diff --git a/reference_scripts/IfEu1hO8sKEZBpvg.js b/reference_scripts/IfEu1hO8sKEZBpvg.js deleted file mode 100644 index 0b53314..0000000 --- a/reference_scripts/IfEu1hO8sKEZBpvg.js +++ /dev/null @@ -1,14 +0,0 @@ -let value = parseInt(this.item.specification.value) -let name = this.actor.prototypeToken.name - -if (game.user.isGM && game.user.targets.size) -{ - game.user.targets.forEach(t => { - t.actor.applyFear(value, name) - }) - game.user.updateTokenTargets([]); -} -else -{ - game.wfrp4e.utility.postFear(value, name) -} \ No newline at end of file diff --git a/reference_scripts/IkGegSuQwwVPhrjF.js b/reference_scripts/IkGegSuQwwVPhrjF.js deleted file mode 100644 index 97f7893..0000000 --- a/reference_scripts/IkGegSuQwwVPhrjF.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") -let data = item.toObject(); -data.system.specification.value = 1 -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Ip8sctF9SIE1Z2vF.js b/reference_scripts/Ip8sctF9SIE1Z2vF.js deleted file mode 100644 index 7cc82a8..0000000 --- a/reference_scripts/Ip8sctF9SIE1Z2vF.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.UnJ25lL8aUzem5JO") -let data = item.toObject(); -data.system.specification.value = 3 -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/IpoOOjYJs6RmVrpb.js b/reference_scripts/IpoOOjYJs6RmVrpb.js deleted file mode 100644 index c6867fc..0000000 --- a/reference_scripts/IpoOOjYJs6RmVrpb.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - args.attacker.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[1].uuid}) -} \ No newline at end of file diff --git a/reference_scripts/IrkWq7IiFS65bTvC.js b/reference_scripts/IrkWq7IiFS65bTvC.js deleted file mode 100644 index d775da2..0000000 --- a/reference_scripts/IrkWq7IiFS65bTvC.js +++ /dev/null @@ -1,7 +0,0 @@ -if (this.actor.flags.holed.half !== true) return; -if (this.actor.flags.holed.reminded === true) return; - -const speaker = ChatMessage.getSpeaker({actor: this.actor}); -this.script.scriptMessage(`${speaker.alias} sits heavily in the water. Unless the cargo is waterproof, it loses [[d10]]% of its value.
`); - -this.actor.flags.holed.reminded = true; \ No newline at end of file diff --git a/reference_scripts/IsLAvY9ikR1cOJWw.js b/reference_scripts/IsLAvY9ikR1cOJWw.js deleted file mode 100644 index c5a06ce..0000000 --- a/reference_scripts/IsLAvY9ikR1cOJWw.js +++ /dev/null @@ -1 +0,0 @@ -return !["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name); \ No newline at end of file diff --git a/reference_scripts/IslMfFgpgQq2brpu.js b/reference_scripts/IslMfFgpgQq2brpu.js deleted file mode 100644 index 02c913e..0000000 --- a/reference_scripts/IslMfFgpgQq2brpu.js +++ /dev/null @@ -1,5 +0,0 @@ -if (this.actor.hasCondition("broken")) -{ - this.actor.removeCondition("broken") - this.script.scriptNotification(`Cannot have Broken`); -} \ No newline at end of file diff --git a/reference_scripts/IukS0clr1yAleacc.js b/reference_scripts/IukS0clr1yAleacc.js deleted file mode 100644 index 5e4e743..0000000 --- a/reference_scripts/IukS0clr1yAleacc.js +++ /dev/null @@ -1,3 +0,0 @@ -this.actor.system.characteristics.ag.modifier -= parseInt(this.item.system.location.value) || 1 - -this.actor.system.characteristics.ws.modifier -= parseInt(this.item.system.location.value) || 1 \ No newline at end of file diff --git a/reference_scripts/IupskvzvoGyD2H5o.js b/reference_scripts/IupskvzvoGyD2H5o.js deleted file mode 100644 index 2677352..0000000 --- a/reference_scripts/IupskvzvoGyD2H5o.js +++ /dev/null @@ -1,23 +0,0 @@ -if (this.actor.type != "character") -{ - return; -} - -let god = await ValueDialog.create("Enter a Deity", "Blessed") - -if (god) -{ - let prayers = await warhammer.utility.findAllItems("prayer", "Loading Prayers") - let blessings = prayers.filter(p => p.system.god.value.split(",").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == "blessing") - if (blessings.length) - { - this.script.scriptNotification("Adding " + blessings.map(i => i.name).join(", ")) - await this.actor.createEmbeddedDocuments("Item", blessings, {fromEffect : this.effect.id}) - } - else - { - this.script.scriptNotification(`Could not find any Blessings associated with ${god}.`) - } - this.item.updateSource({name : this.item.name.replace("Any", god)}) - await this.actor.update({"system.details.god.value": god}) -} \ No newline at end of file diff --git a/reference_scripts/IzZcsSngI8TZH4d8.js b/reference_scripts/IzZcsSngI8TZH4d8.js deleted file mode 100644 index a63265f..0000000 --- a/reference_scripts/IzZcsSngI8TZH4d8.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp"); -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/IzoOmDywGLqLNljN.js b/reference_scripts/IzoOmDywGLqLNljN.js deleted file mode 100644 index 2dd5130..0000000 --- a/reference_scripts/IzoOmDywGLqLNljN.js +++ /dev/null @@ -1,19 +0,0 @@ -let skill = `Language (Magick)` -let currentCareer = this.actor.system.currentCareer; -let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); - -if (!currentCareer) return - - -let inCurrentCareer = currentCareer.system.skills.includes(skill); -let witchAdded = actor.getFlag("wfrp4e", "witchAdded") || {}; -if (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name]) -{ - existingSkill.system.advances.costModifier = -5; -} -else -{ - witchAdded[skill] = true; - currentCareer.system.skills.push(skill); - setProperty(this.actor, "flags.wfrp4e.witchAdded", witchAdded) -} \ No newline at end of file diff --git a/reference_scripts/J0IWUhxada2ONowP.js b/reference_scripts/J0IWUhxada2ONowP.js deleted file mode 100644 index aec5a9d..0000000 --- a/reference_scripts/J0IWUhxada2ONowP.js +++ /dev/null @@ -1 +0,0 @@ - return args.skill?.name == "Entertain (Sing)" || args.skill?.name == "Entertain (Singing)" || (args.skill?.name.includes("Language") && (args.skill?.name.includes("Magick") || args.skill?.name.includes("Elthárin") || args.skill?.name.includes("Cathayan"))) \ No newline at end of file diff --git a/reference_scripts/J1FPDdrXGctKDTZz.js b/reference_scripts/J1FPDdrXGctKDTZz.js deleted file mode 100644 index d72299d..0000000 --- a/reference_scripts/J1FPDdrXGctKDTZz.js +++ /dev/null @@ -1,16 +0,0 @@ -if (args.equipped) -{ - let ward = await fromUuid("Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh") - wardData = ward.toObject() - wardData.system.specification.value = "8" - - let mr = await fromUuid("Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ") - mrData = mr.toObject() - mrData.system.specification.value = 2 - - this.actor.createEmbeddedDocuments("Item", [wardData, mrData], {fromEffect : this.effect.id}) -} -else -{ - this.effect.deleteCreatedItems() -} \ No newline at end of file diff --git a/reference_scripts/J8aPichsl25t1QZ9.js b/reference_scripts/J8aPichsl25t1QZ9.js deleted file mode 100644 index e0eef4f..0000000 --- a/reference_scripts/J8aPichsl25t1QZ9.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("entangled", this.effect.sourceTest.result.SL) \ No newline at end of file diff --git a/reference_scripts/JBoKPBr27C3PMoSD.js b/reference_scripts/JBoKPBr27C3PMoSD.js deleted file mode 100644 index c1ae1c1..0000000 --- a/reference_scripts/JBoKPBr27C3PMoSD.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name === game.i18n.localize("NAME.Navigation"); \ No newline at end of file diff --git a/reference_scripts/JEbs0WlqhKNDOo5A.js b/reference_scripts/JEbs0WlqhKNDOo5A.js deleted file mode 100644 index 83eb600..0000000 --- a/reference_scripts/JEbs0WlqhKNDOo5A.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("unconscious") -} diff --git a/reference_scripts/JFgXyb6bKjZJLmF8.js b/reference_scripts/JFgXyb6bKjZJLmF8.js deleted file mode 100644 index 996b184..0000000 --- a/reference_scripts/JFgXyb6bKjZJLmF8.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic == "ag" \ No newline at end of file diff --git a/reference_scripts/JQruHprM5R5vZ9DA.js b/reference_scripts/JQruHprM5R5vZ9DA.js deleted file mode 100644 index ae80286..0000000 --- a/reference_scripts/JQruHprM5R5vZ9DA.js +++ /dev/null @@ -1,10 +0,0 @@ -let caster = this.effect.sourceActor; -if (caster) -{ - let healed= caster.system.characteristics.wp.bonus + caster.system.characteristics.int.bonus - await this.actor.modifyWounds(healed); - this.script.scriptMessage(`${this.actor.prototypeToken.name} regains ${healed} Wounds`) -} - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "vhard"}, context : {success : "1 Corruption point that was gained within the last hour is removed.", failure: "Nothing happens"}}) - await test.roll(); \ No newline at end of file diff --git a/reference_scripts/JXBUE0XuJOJNG7zE.js b/reference_scripts/JXBUE0XuJOJNG7zE.js deleted file mode 100644 index de285b5..0000000 --- a/reference_scripts/JXBUE0XuJOJNG7zE.js +++ /dev/null @@ -1,18 +0,0 @@ -if (args.totalWoundLoss <= 7) return; - -let options = { - appendTitle : " – " + this.effect.name, - skipTargets: true, - fields: {difficulty: 'average'}, - characteristic: 'wp', -} - -let test = await args.actor.setupSkill('Cool', options); -await test.roll(); - -if (!test.succeeded) { - const targetId = this.effect.getFlag("wfrp4e", "target"); - const target = canvas.scene.tokens.get(targetId); - await this.effect.delete(); - args.extraMessages.push(`${args.actor.name} lost ${args.totalWoundLoss} Wounds to an attack, which caused it to let go of ${target.name}.`); -} \ No newline at end of file diff --git a/reference_scripts/JZIn1dsKHFE3smJU.js b/reference_scripts/JZIn1dsKHFE3smJU.js deleted file mode 100644 index a07962a..0000000 --- a/reference_scripts/JZIn1dsKHFE3smJU.js +++ /dev/null @@ -1,2 +0,0 @@ -let ablaze = parseInt(this.effect.sourceTest.result.SL) + 1 -args.actor.addCondition("ablaze", ablaze) \ No newline at end of file diff --git a/reference_scripts/JaiC5P6nIgctOacH.js b/reference_scripts/JaiC5P6nIgctOacH.js deleted file mode 100644 index d3560ca..0000000 --- a/reference_scripts/JaiC5P6nIgctOacH.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.actor.system.details.species?.value?.toLowerCase() == "dwarf") -{ - args.weaponProperties.flaws.undamaging = true; -} \ No newline at end of file diff --git a/reference_scripts/JavuFNZ9Pj5elVLc.js b/reference_scripts/JavuFNZ9Pj5elVLc.js deleted file mode 100644 index 9c9591a..0000000 --- a/reference_scripts/JavuFNZ9Pj5elVLc.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") -let data = item.toObject(); -data.system.specification.value = 4 - this.actor.characteristics.s.bonus -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/JeThJbOf6Xmbtgo1.js b/reference_scripts/JeThJbOf6Xmbtgo1.js deleted file mode 100644 index 8125581..0000000 --- a/reference_scripts/JeThJbOf6Xmbtgo1.js +++ /dev/null @@ -1,8 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(8 + parseInt(this.effect.sourceTest.result.SL), {suppressMsg : true})) - -let test = await this.actor.setupSkill("Athletics", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone") -} \ No newline at end of file diff --git a/reference_scripts/JgCcgDVZX54slrWx.js b/reference_scripts/JgCcgDVZX54slrWx.js deleted file mode 100644 index b758160..0000000 --- a/reference_scripts/JgCcgDVZX54slrWx.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(game.i18n.localize("NAME.Melee")) || args.item?.isMelee || args.options.corruption \ No newline at end of file diff --git a/reference_scripts/JhbZWZhOJ23yOBmG.js b/reference_scripts/JhbZWZhOJ23yOBmG.js deleted file mode 100644 index 3f7c65c..0000000 --- a/reference_scripts/JhbZWZhOJ23yOBmG.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpentry)'; -const difficulty = 'hard'; -const target = 30; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/JibNjuQrJRnY0yf9.js b/reference_scripts/JibNjuQrJRnY0yf9.js deleted file mode 100644 index 03aff09..0000000 --- a/reference_scripts/JibNjuQrJRnY0yf9.js +++ /dev/null @@ -1 +0,0 @@ -return this.actor.flags.useless.rEye && this.actor.flags.useless.lEye && (["ws", "bs"].includes(args.characteristic) || args.skill?.name?.includes(game.i18n.localize("NAME.Ride")) || args.weapon || args.options.dodge) \ No newline at end of file diff --git a/reference_scripts/JjDzMnUxaWQePIYh.js b/reference_scripts/JjDzMnUxaWQePIYh.js deleted file mode 100644 index 70529bf..0000000 --- a/reference_scripts/JjDzMnUxaWQePIYh.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic != "int" \ No newline at end of file diff --git a/reference_scripts/JjiPprLSlSmmB5Ga.js b/reference_scripts/JjiPprLSlSmmB5Ga.js deleted file mode 100644 index bfe3c8a..0000000 --- a/reference_scripts/JjiPprLSlSmmB5Ga.js +++ /dev/null @@ -1 +0,0 @@ -args.item.system.damage.value += " + 1" \ No newline at end of file diff --git a/reference_scripts/Jjq3oPYbI26zjxME.js b/reference_scripts/Jjq3oPYbI26zjxME.js deleted file mode 100644 index dcf1d23..0000000 --- a/reference_scripts/Jjq3oPYbI26zjxME.js +++ /dev/null @@ -1,21 +0,0 @@ -let location = this.item.system.location.key; - -if (location) -{ - let dropped = this.item.system.weaponsAtLocation; - - if (dropped.length) - { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) - for(let weapon of dropped) - { - await weapon.system.toggleEquip(); - } - } -} - -let roll = await new Roll("1d10").roll() - -roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); - -this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/Jk7OHqx06oCUVAzb.js b/reference_scripts/Jk7OHqx06oCUVAzb.js deleted file mode 100644 index 44fed7e..0000000 --- a/reference_scripts/Jk7OHqx06oCUVAzb.js +++ /dev/null @@ -1 +0,0 @@ -return !["Language (Magick)", "Channelling (Hysh)"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/JmZQRvdWjm9ykYfn.js b/reference_scripts/JmZQRvdWjm9ykYfn.js deleted file mode 100644 index 90d6edc..0000000 --- a/reference_scripts/JmZQRvdWjm9ykYfn.js +++ /dev/null @@ -1,5 +0,0 @@ -if (this.actor.hasCondition("surprised")) -{ - this.actor.removeCondition("surprised") - this.script.scriptMessage(`Cannot be Surprised`); -} \ No newline at end of file diff --git a/reference_scripts/Jnp5c09sPzDD61EK.js b/reference_scripts/Jnp5c09sPzDD61EK.js deleted file mode 100644 index e9e5662..0000000 --- a/reference_scripts/Jnp5c09sPzDD61EK.js +++ /dev/null @@ -1,3 +0,0 @@ -this.script.scriptNotification(`${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!`) - -return true; // No need to show this in the dialog \ No newline at end of file diff --git a/reference_scripts/JstrA46EYSEuRSy5.js b/reference_scripts/JstrA46EYSEuRSy5.js deleted file mode 100644 index f5e7f96..0000000 --- a/reference_scripts/JstrA46EYSEuRSy5.js +++ /dev/null @@ -1,2 +0,0 @@ -if (this.actor.has(game.i18n.localize("NAME.Undead")) && this.actor.has(game.i18n.localize("NAME.Construct"))) - this.actor.addCondition("dead") \ No newline at end of file diff --git a/reference_scripts/JwYZJGkZMSM2M3Si.js b/reference_scripts/JwYZJGkZMSM2M3Si.js deleted file mode 100644 index 23dc567..0000000 --- a/reference_scripts/JwYZJGkZMSM2M3Si.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) - await test.roll() - if (test.failed) - { - args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus - args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus}) - } -} \ No newline at end of file diff --git a/reference_scripts/JwgFQmPQtXWAP94i.js b/reference_scripts/JwgFQmPQtXWAP94i.js deleted file mode 100644 index 7c989d6..0000000 --- a/reference_scripts/JwgFQmPQtXWAP94i.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("fatigued"); \ No newline at end of file diff --git a/reference_scripts/JyTxUG5dNW670Sf7.js b/reference_scripts/JyTxUG5dNW670Sf7.js deleted file mode 100644 index 9421a21..0000000 --- a/reference_scripts/JyTxUG5dNW670Sf7.js +++ /dev/null @@ -1,11 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU") -let data = item.toObject(); -data.system.location.key= this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("stunned") -} \ No newline at end of file diff --git a/reference_scripts/K06v93N4FXb70mB7.js b/reference_scripts/K06v93N4FXb70mB7.js deleted file mode 100644 index 051a245..0000000 --- a/reference_scripts/K06v93N4FXb70mB7.js +++ /dev/null @@ -1 +0,0 @@ -args.item.system.encumbrance.value = Math.max(0, args.item.system.encumbrance.value - 1); \ No newline at end of file diff --git a/reference_scripts/KD4nCSdSXJVJmk0R.js b/reference_scripts/KD4nCSdSXJVJmk0R.js deleted file mode 100644 index 7499473..0000000 --- a/reference_scripts/KD4nCSdSXJVJmk0R.js +++ /dev/null @@ -1,2 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg : true})) -await this.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/KF69WqF4PSEtpdb2.js b/reference_scripts/KF69WqF4PSEtpdb2.js deleted file mode 100644 index 4f434e6..0000000 --- a/reference_scripts/KF69WqF4PSEtpdb2.js +++ /dev/null @@ -1,2 +0,0 @@ -args.fields.slBonus += 2; - \ No newline at end of file diff --git a/reference_scripts/KG4TxnXiLLpfWOQO.js b/reference_scripts/KG4TxnXiLLpfWOQO.js deleted file mode 100644 index 14697ad..0000000 --- a/reference_scripts/KG4TxnXiLLpfWOQO.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.difficulty = "average" \ No newline at end of file diff --git a/reference_scripts/KGK9vL1Yl0qmCeCN.js b/reference_scripts/KGK9vL1Yl0qmCeCN.js deleted file mode 100644 index 78b37da..0000000 --- a/reference_scripts/KGK9vL1Yl0qmCeCN.js +++ /dev/null @@ -1,88 +0,0 @@ -let specification = this.item.system.specification.value; -let choice = []; - -if (!specification || specification == "Trained Skills") -{ - choice = await ItemDialog.create(ItemDialog.objectToArray({ - broken: "Broken", - drive: "Drive", - entertain: "Entertain", - fetch: "Fetch", - guard: "Guard", - home: "Home", - magic: "Magic", - mount: "Mount", - war: "War" - }, this.effect.img), "unlimited", "Choose Training"); -} -else -{ - choice = specification.split(", ").map(i => { - return { - id : i.toLowerCase(), - name : i - } - }); -} - -if (choice.length) -{ - let changes = foundry.utils.deepClone(this.effect.changes); - - for(let training of choice) - { - switch(training.id) - { - case "broken" : - let roll = await new Roll("2d10").roll(); - roll.toMessage(this.script.getChatData()); - changes.push({value : roll.total, mode : 2, key : "system.characteristics.fel.modifier"}) - - if (this.actor.type == "creature") - { - let bestial = this.actor.itemTypes.trait.find(i => i.name == "Bestial"); - if (bestial) - { - bestial.update({"system.disabled" : true}) - } - } - break; - - case "drive" : - - break; - - case "entertain" : - - break; - - case "fetch" : - - break; - - case "guard" : - let territorial = await fromUuid("Compendium.wfrp4e-core.items.Item.JIAe7i7dqTQBu4do"); - await this.actor.createEmbeddedDocuments("Item", [territorial], {fromEffect: this.effect.id}) - setProperty(args, "options.keepId", true); - break; - - case "home" : - - break; - - case "magic" : - - break; - - case "mount" : - - break; - - case "war" : - changes.push({value : 10, mode : 2, key : "system.characteristics.ws.modifier"}) - break; - } - } - this.effect.updateSource({name : `${this.effect.name} (${choice.map(i => i.name).join(", ")})`, changes, "flags.wfrp4e.trained" : choice.map(i => i.id)}) - this.item.updateSource({"system.specification.value" : `${choice.map(i => i.name).join(", ")}`}) -} \ No newline at end of file diff --git a/reference_scripts/KICZPwLvbUSxbDrE.js b/reference_scripts/KICZPwLvbUSxbDrE.js deleted file mode 100644 index 30a0d6f..0000000 --- a/reference_scripts/KICZPwLvbUSxbDrE.js +++ /dev/null @@ -1,18 +0,0 @@ -let table = game.wfrp4e.tables.findTable("mutatemental"); -if (!table) -{ - ui.notifications.error("Cannot find table with key: mutatemental") -} -let result = (await table.roll()).results[0]; -let uuid = `Compendium.${result.documentCollection}.${result.documentId}` -let item = await fromUuid(uuid); - -if (item) -{ - this.script.scriptNotification(`${item.name} added`) - this.actor.createEmbeddedDocuments("Item", [item]) -} -else -{ - ui.notifications.error("Item could not be found: " + uuid) -} \ No newline at end of file diff --git a/reference_scripts/KIoVBinAZK8sMOqD.js b/reference_scripts/KIoVBinAZK8sMOqD.js deleted file mode 100644 index 072c254..0000000 --- a/reference_scripts/KIoVBinAZK8sMOqD.js +++ /dev/null @@ -1,11 +0,0 @@ - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}, skipTargets: true, appendTitle : " - Wounded"}) - await test.roll(); - if (test.failed) - { - fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb").then(disease => { - this.actor.createEmbeddedDocuments("Item", [disease.toObject()]) - this.script.scriptNotification("Gained " + disease.name) - }) - } - \ No newline at end of file diff --git a/reference_scripts/KJLAan0glJlyOyqF.js b/reference_scripts/KJLAan0glJlyOyqF.js deleted file mode 100644 index e9a31c5..0000000 --- a/reference_scripts/KJLAan0glJlyOyqF.js +++ /dev/null @@ -1,11 +0,0 @@ - this.actor.getActiveTokens().forEach(t => t.document.update({light : { - "dim": 10, - "bright": 5, - "alpha": 0.5, - "animation": { - "speed": 4, - "intensity": 4, - "type": "flame", - }, - "color": "#ac9e6c", - }})); \ No newline at end of file diff --git a/reference_scripts/KPQfupKuaf4LCv4R.js b/reference_scripts/KPQfupKuaf4LCv4R.js deleted file mode 100644 index 9dcc016..0000000 --- a/reference_scripts/KPQfupKuaf4LCv4R.js +++ /dev/null @@ -1,2 +0,0 @@ -const talents = await Promise.all(["Schemer", "Second Sight"].map(game.wfrp4e.utility.findTalent)) -this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/KQmb5B27eJ1lkbVL.js b/reference_scripts/KQmb5B27eJ1lkbVL.js deleted file mode 100644 index 7adee1c..0000000 --- a/reference_scripts/KQmb5B27eJ1lkbVL.js +++ /dev/null @@ -1 +0,0 @@ -return this.item.system.quantity.value > 0 && args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/KQzbrpb0T5a7it4k.js b/reference_scripts/KQzbrpb0T5a7it4k.js deleted file mode 100644 index 1620dd8..0000000 --- a/reference_scripts/KQzbrpb0T5a7it4k.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.vMYEkrWj0ip6ZOdv"); -let data = item.toObject(); -data.name += ` (Disease)`; -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/KSjsDlsx3DD6cT16.js b/reference_scripts/KSjsDlsx3DD6cT16.js deleted file mode 100644 index f00b8b8..0000000 --- a/reference_scripts/KSjsDlsx3DD6cT16.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Bribery"); \ No newline at end of file diff --git a/reference_scripts/KT670CjGBEprx2fO.js b/reference_scripts/KT670CjGBEprx2fO.js deleted file mode 100644 index bbf4c65..0000000 --- a/reference_scripts/KT670CjGBEprx2fO.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.RWJrupj9seau0w31"); -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/KTBVDHUndI3qDOXM.js b/reference_scripts/KTBVDHUndI3qDOXM.js deleted file mode 100644 index b9aa611..0000000 --- a/reference_scripts/KTBVDHUndI3qDOXM.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance")) -await test.roll(); -if (!test.succeeded) -{ - args.actor.addCondition("stunned") -} \ No newline at end of file diff --git a/reference_scripts/KUx0deSF3xNzMucL.js b/reference_scripts/KUx0deSF3xNzMucL.js deleted file mode 100644 index 208679d..0000000 --- a/reference_scripts/KUx0deSF3xNzMucL.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(game.i18n.localize("NAME.Art")); \ No newline at end of file diff --git a/reference_scripts/KVpDUEjHhd3nLa0f.js b/reference_scripts/KVpDUEjHhd3nLa0f.js deleted file mode 100644 index a301dfb..0000000 --- a/reference_scripts/KVpDUEjHhd3nLa0f.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("enrage-beast")) -} \ No newline at end of file diff --git a/reference_scripts/KVuPduDztyMZQNt9.js b/reference_scripts/KVuPduDztyMZQNt9.js deleted file mode 100644 index c359f67..0000000 --- a/reference_scripts/KVuPduDztyMZQNt9.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += this.actor.system.characteristics.ag.bonus \ No newline at end of file diff --git a/reference_scripts/KXzDe7cN2vynHjJO.js b/reference_scripts/KXzDe7cN2vynHjJO.js deleted file mode 100644 index 41a9fa8..0000000 --- a/reference_scripts/KXzDe7cN2vynHjJO.js +++ /dev/null @@ -1,3 +0,0 @@ -this.actor.hasCondition("blinded")?.delete(); -this.actor.hasCondition("deafened")?.delete() -this.actor.hasCondition("unconscious")?.delete() \ No newline at end of file diff --git a/reference_scripts/KkjkYAGI9Em1NgiQ.js b/reference_scripts/KkjkYAGI9Em1NgiQ.js deleted file mode 100644 index 1790282..0000000 --- a/reference_scripts/KkjkYAGI9Em1NgiQ.js +++ /dev/null @@ -1,19 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.system.reduceQuantity(); - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Heal"), { appendTitle: ` - ${this.effect.name}`, skipTargets: true }) - await test.roll(); - if (test.succeeded) - { - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - actor.applyEffect({ effectData: [this.item.effects.contents[0].convertToApplied()] }) - } - else - { - this.script.scriptNotification("Heal Test failed!", "error") - } -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/KmngDrPD72xn22kZ.js b/reference_scripts/KmngDrPD72xn22kZ.js deleted file mode 100644 index 331fdca..0000000 --- a/reference_scripts/KmngDrPD72xn22kZ.js +++ /dev/null @@ -1,11 +0,0 @@ -if (this.actor.Species.toLowerCase() != "skaven") { - this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - Used ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async test => { - await test.roll() - if (test.failed) - { - let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10) - this.actor.update({ "system.characteristics.t.initial": this.actor.characteristics.t.initial - toughnessLost }) - this.script.scriptMessage(`${this.actor.prototypeToken.name} lost ${toughnessLost} Toughness`) - } - }) - } \ No newline at end of file diff --git a/reference_scripts/KnwYZbeRSBA94hfl.js b/reference_scripts/KnwYZbeRSBA94hfl.js deleted file mode 100644 index 11bc24c..0000000 --- a/reference_scripts/KnwYZbeRSBA94hfl.js +++ /dev/null @@ -1,5 +0,0 @@ -if (!args.flags.lostFingers) -{ - args.flags.lostFingers = true; - args.fields.modifier -= 5 * this.actor.flags.useless[this.item.system.location.key] -} \ No newline at end of file diff --git a/reference_scripts/KuUkUmOOLf05I4Bp.js b/reference_scripts/KuUkUmOOLf05I4Bp.js deleted file mode 100644 index b2e2144..0000000 --- a/reference_scripts/KuUkUmOOLf05I4Bp.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.hasCondition("broken")?.delete(); diff --git a/reference_scripts/KuuWAhoSzk0rCxxw.js b/reference_scripts/KuuWAhoSzk0rCxxw.js deleted file mode 100644 index 2d3f461..0000000 --- a/reference_scripts/KuuWAhoSzk0rCxxw.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier += -20; \ No newline at end of file diff --git a/reference_scripts/KyUPYV1RXJxPOfyA.js b/reference_scripts/KyUPYV1RXJxPOfyA.js deleted file mode 100644 index 5e60157..0000000 --- a/reference_scripts/KyUPYV1RXJxPOfyA.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "veasy"}}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("fatigued"); -} \ No newline at end of file diff --git a/reference_scripts/KyswmGj1uG3QS3ng.js b/reference_scripts/KyswmGj1uG3QS3ng.js deleted file mode 100644 index 81a6df2..0000000 --- a/reference_scripts/KyswmGj1uG3QS3ng.js +++ /dev/null @@ -1 +0,0 @@ -args.applyAP = false; \ No newline at end of file diff --git a/reference_scripts/L1RMLvKtRPFtnczI.js b/reference_scripts/L1RMLvKtRPFtnczI.js deleted file mode 100644 index 9e11b96..0000000 --- a/reference_scripts/L1RMLvKtRPFtnczI.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz"); -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/L2cdQppcPwxz24hN.js b/reference_scripts/L2cdQppcPwxz24hN.js deleted file mode 100644 index 8eabc28..0000000 --- a/reference_scripts/L2cdQppcPwxz24hN.js +++ /dev/null @@ -1 +0,0 @@ -return !args.weapon \ No newline at end of file diff --git a/reference_scripts/L89UcafRHqUfxoux.js b/reference_scripts/L89UcafRHqUfxoux.js deleted file mode 100644 index 092415c..0000000 --- a/reference_scripts/L89UcafRHqUfxoux.js +++ /dev/null @@ -1,3 +0,0 @@ -let injury = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev") -injury.updateSource({"system.location.key" : this.item.system.location.key}) -this.actor.createEmbeddedDocuments("Item", [injury], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/L9eAtDyaoHvqryk4.js b/reference_scripts/L9eAtDyaoHvqryk4.js deleted file mode 100644 index c5efbe5..0000000 --- a/reference_scripts/L9eAtDyaoHvqryk4.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Intimidate"); \ No newline at end of file diff --git a/reference_scripts/LAyLbcC0lOPwZP3U.js b/reference_scripts/LAyLbcC0lOPwZP3U.js deleted file mode 100644 index 328bcfe..0000000 --- a/reference_scripts/LAyLbcC0lOPwZP3U.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("ablaze", parseInt(this.effect.sourceTest.result.SL)) \ No newline at end of file diff --git a/reference_scripts/LHUUXfZVLBhWqRvb.js b/reference_scripts/LHUUXfZVLBhWqRvb.js deleted file mode 100644 index 9dae93e..0000000 --- a/reference_scripts/LHUUXfZVLBhWqRvb.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(5, {magical: true, source : this.effect}) \ No newline at end of file diff --git a/reference_scripts/LLqAT9wEUGMLfDhU.js b/reference_scripts/LLqAT9wEUGMLfDhU.js deleted file mode 100644 index 4102c46..0000000 --- a/reference_scripts/LLqAT9wEUGMLfDhU.js +++ /dev/null @@ -1 +0,0 @@ -return !args.item?.system.isRanged \ No newline at end of file diff --git a/reference_scripts/LOL2TGf8p8KxP14D.js b/reference_scripts/LOL2TGf8p8KxP14D.js deleted file mode 100644 index a462357..0000000 --- a/reference_scripts/LOL2TGf8p8KxP14D.js +++ /dev/null @@ -1,2 +0,0 @@ -let wind = this.effect.name.split(" ")[2] -return args.type != "cast" || game.wfrp4e.config.magicWind[args.item.system.lore.value] != wind; \ No newline at end of file diff --git a/reference_scripts/LQEWSN5KnHHATPsf.js b/reference_scripts/LQEWSN5KnHHATPsf.js deleted file mode 100644 index bd8c028..0000000 --- a/reference_scripts/LQEWSN5KnHHATPsf.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - this.script.scriptMessage(`${args.actor.name} must pass an Easy (+40) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/reference_scripts/LXEUhHuXe8keEPI9.js b/reference_scripts/LXEUhHuXe8keEPI9.js deleted file mode 100644 index 0683f16..0000000 --- a/reference_scripts/LXEUhHuXe8keEPI9.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupCharacteristic("wp", {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - let stuns = Math.max(1, Math.abs(test.result.SL)) - this.actor.addCondition("stunned", stuns) -} \ No newline at end of file diff --git a/reference_scripts/LeKLtvEDrWh4yHsx.js b/reference_scripts/LeKLtvEDrWh4yHsx.js deleted file mode 100644 index bfe04ec..0000000 --- a/reference_scripts/LeKLtvEDrWh4yHsx.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.CharmAnimal") || args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining")); \ No newline at end of file diff --git a/reference_scripts/LedRsrVo2f7lm3Ix.js b/reference_scripts/LedRsrVo2f7lm3Ix.js deleted file mode 100644 index 647d323..0000000 --- a/reference_scripts/LedRsrVo2f7lm3Ix.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Intimidate"); \ No newline at end of file diff --git a/reference_scripts/Lg1oRg4oNRvucsvi.js b/reference_scripts/Lg1oRg4oNRvucsvi.js deleted file mode 100644 index 42395c3..0000000 --- a/reference_scripts/Lg1oRg4oNRvucsvi.js +++ /dev/null @@ -1 +0,0 @@ -return !(args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name == game.i18n.localize("NAME.Athletics")) \ No newline at end of file diff --git a/reference_scripts/LjXPlgdXBdllnA3i.js b/reference_scripts/LjXPlgdXBdllnA3i.js deleted file mode 100644 index 402cd45..0000000 --- a/reference_scripts/LjXPlgdXBdllnA3i.js +++ /dev/null @@ -1 +0,0 @@ -return !["s", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/LjfScVGBf0Egr70E.js b/reference_scripts/LjfScVGBf0Egr70E.js deleted file mode 100644 index 07e1a29..0000000 --- a/reference_scripts/LjfScVGBf0Egr70E.js +++ /dev/null @@ -1,9 +0,0 @@ -let animalCare = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize("NAME.AnimalCare")); -let animalTrainings = this.actor.itemTypes.skill.filter(s => s.name.includes(game.i18n.localize("NAME.AnimalTraining"))); - -if (animalCare) - animalCare.system.modifier.value += 20; - -for (let training of animalTrainings) { - training.system.modifier.value += 30; -} \ No newline at end of file diff --git a/reference_scripts/LkPtgN9A36OI6Frh.js b/reference_scripts/LkPtgN9A36OI6Frh.js deleted file mode 100644 index 4bda5cb..0000000 --- a/reference_scripts/LkPtgN9A36OI6Frh.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Leadership"); \ No newline at end of file diff --git a/reference_scripts/LlRhPGorLl5qJCU8.js b/reference_scripts/LlRhPGorLl5qJCU8.js deleted file mode 100644 index 3393901..0000000 --- a/reference_scripts/LlRhPGorLl5qJCU8.js +++ /dev/null @@ -1,8 +0,0 @@ -if (this.actor.hasCondition("prone")) -{ - this.actor.addCondition("unconscious"); -} -else -{ - this.actor.addCondition("prone"); -} \ No newline at end of file diff --git a/reference_scripts/Lm9IBkc918Duw3US.js b/reference_scripts/Lm9IBkc918Duw3US.js deleted file mode 100644 index c27cbaf..0000000 --- a/reference_scripts/Lm9IBkc918Duw3US.js +++ /dev/null @@ -1,6 +0,0 @@ -let career = this.actor.itemTypes.career.find(c => c.getFlag("wfrp4e", "doubleLife")) - -if(career) -{ - career.system.current.value = true; -} \ No newline at end of file diff --git a/reference_scripts/Lp261O9fgEXmgPf3.js b/reference_scripts/Lp261O9fgEXmgPf3.js deleted file mode 100644 index 65d054e..0000000 --- a/reference_scripts/Lp261O9fgEXmgPf3.js +++ /dev/null @@ -1,5 +0,0 @@ -// If this actor wins a defending test, swap the test -if (!args.opposedTest.result.swapped && args.opposedTest.result.winner == "defender" && args.opposedTest.attackerTest.result.damage) -{ - args.opposedTest.swap(this.effect.label); -} \ No newline at end of file diff --git a/reference_scripts/Lpv2N9LK9loeumiW.js b/reference_scripts/Lpv2N9LK9loeumiW.js deleted file mode 100644 index ad3c30e..0000000 --- a/reference_scripts/Lpv2N9LK9loeumiW.js +++ /dev/null @@ -1,6 +0,0 @@ -if (this.actor.uuid != this.effect.sourceActor.uuid) -{ - this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: "hard"}, context : {failure : `${this.effect.name}: cannot move or take actions`}}).then(test => { - test.roll(); - }) -} \ No newline at end of file diff --git a/reference_scripts/Lrb1S2aK7SFVD0C7.js b/reference_scripts/Lrb1S2aK7SFVD0C7.js deleted file mode 100644 index 2f40127..0000000 --- a/reference_scripts/Lrb1S2aK7SFVD0C7.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) - await test.roll(); - if (test.failed) - { - await args.actor.addCondition("fatigued"); - } -} \ No newline at end of file diff --git a/reference_scripts/Lu27iXtJVkrJ8bOx.js b/reference_scripts/Lu27iXtJVkrJ8bOx.js deleted file mode 100644 index 73cb61d..0000000 --- a/reference_scripts/Lu27iXtJVkrJ8bOx.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name?.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/reference_scripts/LxdLkPxH3SFvYrCJ.js b/reference_scripts/LxdLkPxH3SFvYrCJ.js deleted file mode 100644 index 8f8a38c..0000000 --- a/reference_scripts/LxdLkPxH3SFvYrCJ.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.effect.conditionId == "ablaze") -{ - args.data.formula += ` - ${this.actor.system.characteristics.t.bonus}` -} \ No newline at end of file diff --git a/reference_scripts/LyAK0dVDS5L09yq2.js b/reference_scripts/LyAK0dVDS5L09yq2.js deleted file mode 100644 index e8b817a..0000000 --- a/reference_scripts/LyAK0dVDS5L09yq2.js +++ /dev/null @@ -1,9 +0,0 @@ -let caster = this.effect.sourceActor - -if (caster) -{ - let bonus = caster.system.characteristics.wp.bonus - this.actor.modifyWounds(bonus) - - this.script.scriptMessage(`${this.actor.prototypeToken.name} regains ${bonus} Wounds`) -} \ No newline at end of file diff --git a/reference_scripts/M0XhKnWjG14pk3iH.js b/reference_scripts/M0XhKnWjG14pk3iH.js deleted file mode 100644 index 1431d31..0000000 --- a/reference_scripts/M0XhKnWjG14pk3iH.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes("Channelling") && args.type != "channelling" && args.skill?.name != game.i18n.localize("NAME.Charm") && !args.skill?.name.includes("Language (Magick)") && args.type != "cast" \ No newline at end of file diff --git a/reference_scripts/M2FshTX4PjKFVU8y.js b/reference_scripts/M2FshTX4PjKFVU8y.js deleted file mode 100644 index 6aa49fc..0000000 --- a/reference_scripts/M2FshTX4PjKFVU8y.js +++ /dev/null @@ -1,9 +0,0 @@ -args.flags.earCount = Number.isNumeric(args.flags.earCount) ? args.flags.earCount+1 : 1; -if (args.characteristic == "fel") -{ - args.fields.modifier -= 5; -} -if (args.flags.earCount == 2 && args.skill?.name == game.i18n.localize("NAME.Perception")) -{ - args.fields.modifier -= 20; -} diff --git a/reference_scripts/M5bh0heeafA2fQQ8.js b/reference_scripts/M5bh0heeafA2fQQ8.js deleted file mode 100644 index 3583c70..0000000 --- a/reference_scripts/M5bh0heeafA2fQQ8.js +++ /dev/null @@ -1,8 +0,0 @@ -if (args.test.spell?.getFlag("wfrp4e", "boonOfTzeentch")) -{ - if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis) - { - this.script.scriptMessage(`${this.effect.name} quits your mind in disgust and erases itself from your grimoire!`) - this.effect.sourceItem.delete(); - } -} \ No newline at end of file diff --git a/reference_scripts/M9VgeYGiUO97ZUW4.js b/reference_scripts/M9VgeYGiUO97ZUW4.js deleted file mode 100644 index 4cb39af..0000000 --- a/reference_scripts/M9VgeYGiUO97ZUW4.js +++ /dev/null @@ -1,12 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY") -let data = item.toObject(); -data.system.location.value = "Jaw" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (!test.succeeded) -{ - args.actor.addCondition("unconscious") -} - diff --git a/reference_scripts/MCK6WyjwYT28lsTN.js b/reference_scripts/MCK6WyjwYT28lsTN.js deleted file mode 100644 index e13fea1..0000000 --- a/reference_scripts/MCK6WyjwYT28lsTN.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.u0CFf3xwiyidD9T5") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/MDLttXplnNthncGr.js b/reference_scripts/MDLttXplnNthncGr.js deleted file mode 100644 index b7a08ee..0000000 --- a/reference_scripts/MDLttXplnNthncGr.js +++ /dev/null @@ -1 +0,0 @@ -return args.type == "cast" && ["death", "necromancy", "life", "light", "heavens"].includes(args.spell?.system.lore.value) \ No newline at end of file diff --git a/reference_scripts/MFKhU9vp8bQpHP3I.js b/reference_scripts/MFKhU9vp8bQpHP3I.js deleted file mode 100644 index 126a0b5..0000000 --- a/reference_scripts/MFKhU9vp8bQpHP3I.js +++ /dev/null @@ -1,14 +0,0 @@ -let value = parseInt(this.item.specification.value) -let name = this.actor.prototypeToken.name - -if (game.user.isGM && game.user.targets.size) -{ - game.user.targets.forEach(t => { - t.actor.applyTerror(value, name) - }) - game.user.updateTokenTargets([]); -} -else -{ - game.wfrp4e.utility.postTerror(value, name) -} \ No newline at end of file diff --git a/reference_scripts/MI2GgNi3fZtUCtQD.js b/reference_scripts/MI2GgNi3fZtUCtQD.js deleted file mode 100644 index 4a7e8fc..0000000 --- a/reference_scripts/MI2GgNi3fZtUCtQD.js +++ /dev/null @@ -1 +0,0 @@ -return ["int", "wp"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/MIhYSuJ6MI9B65UT.js b/reference_scripts/MIhYSuJ6MI9B65UT.js deleted file mode 100644 index a1d2254..0000000 --- a/reference_scripts/MIhYSuJ6MI9B65UT.js +++ /dev/null @@ -1,4 +0,0 @@ -let specification = Number(this.item.specification.value) || 1; -args.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification); -args.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification); -args.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.2 * specification); \ No newline at end of file diff --git a/reference_scripts/MJB6WbZSF6Briz30.js b/reference_scripts/MJB6WbZSF6Briz30.js deleted file mode 100644 index 13bb16c..0000000 --- a/reference_scripts/MJB6WbZSF6Briz30.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name == game.i18n.localize("NAME.Leadership") \ No newline at end of file diff --git a/reference_scripts/MMv2B8TH7jxNCtdl.js b/reference_scripts/MMv2B8TH7jxNCtdl.js deleted file mode 100644 index a366058..0000000 --- a/reference_scripts/MMv2B8TH7jxNCtdl.js +++ /dev/null @@ -1,52 +0,0 @@ -let actor = this.actor; - let effect = this.effect; - let bleedingAmt; - let bleedingRoll; - let msg = "" - - let damage = effect.conditionValue; - let scriptArgs = {msg, damage}; - await Promise.all(actor.runScripts("preApplyCondition", {effect, data : scriptArgs})) - msg = scriptArgs.msg; - damage = scriptArgs.damage; - msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true}) - - if (actor.status.wounds.value == 0 && !actor.hasCondition("unconscious")) - { - await actor.addCondition("unconscious") - msg += "Finished repairing ${this.item.name}.
`; -const test = 'Sail'; -const difficulty = 'average'; -const target = 30; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/OvIELZLvnlN2H2uw.js b/reference_scripts/OvIELZLvnlN2H2uw.js deleted file mode 100644 index 73a23e7..0000000 --- a/reference_scripts/OvIELZLvnlN2H2uw.js +++ /dev/null @@ -1,11 +0,0 @@ -args.update({light : { - "dim": 2, - "bright": 1, - "alpha": 0.5, - "animation": { - "speed": 4, - "intensity": 4, - "type": "pulse", - }, - "color": "#949bff", -}}); \ No newline at end of file diff --git a/reference_scripts/OxsBnnVI3Smpknpb.js b/reference_scripts/OxsBnnVI3Smpknpb.js deleted file mode 100644 index 519a2a2..0000000 --- a/reference_scripts/OxsBnnVI3Smpknpb.js +++ /dev/null @@ -1,5 +0,0 @@ -if (this.actor.status.advantage.value && !this.actor.sameSideAs(this.effect.sourceActor)) -{ - this.actor.modifyAdvantage(-1); - this.script.scriptNotification(`${this.actor.name} loses 1 Advantage`); -} \ No newline at end of file diff --git a/reference_scripts/Oz7pWF9mEc1pQypj.js b/reference_scripts/Oz7pWF9mEc1pQypj.js deleted file mode 100644 index c206691..0000000 --- a/reference_scripts/Oz7pWF9mEc1pQypj.js +++ /dev/null @@ -1,3 +0,0 @@ -let roll = await new Roll("1d10").roll(); -roll.toMessage({flavor : this.effect.name, speaker : {alias : this.actor.prototypeToken.name}}) -this.actor.addCondition("stunned", roll.total) \ No newline at end of file diff --git a/reference_scripts/P29tT1eMMdAw3CPF.js b/reference_scripts/P29tT1eMMdAw3CPF.js deleted file mode 100644 index 28be2ef..0000000 --- a/reference_scripts/P29tT1eMMdAw3CPF.js +++ /dev/null @@ -1,12 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("unconscious") -} \ No newline at end of file diff --git a/reference_scripts/PBW6IZtwawNHxB6y.js b/reference_scripts/PBW6IZtwawNHxB6y.js deleted file mode 100644 index f0a42aa..0000000 --- a/reference_scripts/PBW6IZtwawNHxB6y.js +++ /dev/null @@ -1 +0,0 @@ -return args.options.dodge && this.actor.isMounted \ No newline at end of file diff --git a/reference_scripts/PI1QNaKFeqood6d7.js b/reference_scripts/PI1QNaKFeqood6d7.js deleted file mode 100644 index dcae646..0000000 --- a/reference_scripts/PI1QNaKFeqood6d7.js +++ /dev/null @@ -1,15 +0,0 @@ -if (args.attackerTest.weapon && args.defenderTest.weapon) -{ - - let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value] - let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value] - - if (attackerReach == defenderReach) - attackerReach = attackerReach < 7 ? attackerReach + 1 : attackerReach - - attackerReach = game.wfrp4e.utility.findKey(attackerReach, game.wfrp4e.config.reachNum) - defenderReach = game.wfrp4e.utility.findKey(defenderReach, game.wfrp4e.config.reachNum) - - args.attackerTest.weapon.reach.value = attackerReach - args.defenderTest.weapon.reach.value = defenderReach -} \ No newline at end of file diff --git a/reference_scripts/PMISUsaEDBA7D3od.js b/reference_scripts/PMISUsaEDBA7D3od.js deleted file mode 100644 index d9cd2ce..0000000 --- a/reference_scripts/PMISUsaEDBA7D3od.js +++ /dev/null @@ -1,33 +0,0 @@ -// After consumption, the user gains the Magic Resistance 3 Creature Trait, -// reducing the SL of any spell affecting it by 3. -// This effect lasts for one hour. -const hasMagicResistance = this.actor.has("Magic Resistance") - -if (hasMagicResistance === undefined) { - fromUuid("Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ").then(trait => { - let traitItem = trait.toObject() - traitItem.system.specification.value = 2 - this.actor.createEmbeddedDocuments("Item", [traitItem], {fromEffect: this.effect.id}) - }) - this.script.scriptMessage(`${this.actor.prototypeToken.name} has gained the Magic Resistance Trait. This effect lasts for one hour.
`, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) -} - -if (hasMagicResistance) { - // Multiple doses may be consumed at once, with each one adding an additional 1 to the Magic Resistance rating and increasing the duration by one hour. - let msg = `${this.actor.prototypeToken.name} has enhanced their Magic Resistance by 1 to Rating ${parseInt(hasMagicResistance.system.specification.value)}. This effect lasts for one hour.
` - - // Resist toxic effect - this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { - fields: {difficulty: "challenging"} - }).then(async test => { - await test.roll() - - // If they fail ... - if (!test.succeeded) { - msg += `However, they begin to ooze the thick, poisonous slime that coats every Dreadmaw. They have gained 1 Poisoned Condition now and should continue to receive an additional @Condition[Poisoned] Condition at the end of each of the round.
-If they are still alive at the end of 10 rounds, the effect ends and all Poisoned Conditions gained from ${this.effect.name} are removed.
` - this.actor.addCondition("poisoned", 1) - } - this.script.scriptMessage(msg, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) - }) -} diff --git a/reference_scripts/PVjaKAHTKDA0rA9J.js b/reference_scripts/PVjaKAHTKDA0rA9J.js deleted file mode 100644 index 8942127..0000000 --- a/reference_scripts/PVjaKAHTKDA0rA9J.js +++ /dev/null @@ -1,2 +0,0 @@ -let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); \ No newline at end of file diff --git a/reference_scripts/PdClojv7yNgQpOUc.js b/reference_scripts/PdClojv7yNgQpOUc.js deleted file mode 100644 index 071f833..0000000 --- a/reference_scripts/PdClojv7yNgQpOUc.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Endurance"); \ No newline at end of file diff --git a/reference_scripts/PeZYj8b0vedyJj00.js b/reference_scripts/PeZYj8b0vedyJj00.js deleted file mode 100644 index 51a0a44..0000000 --- a/reference_scripts/PeZYj8b0vedyJj00.js +++ /dev/null @@ -1,14 +0,0 @@ -// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor - -let mainEffect = this.item.effects.contents[0]; -if (mainEffect.name.includes("(Lore)")) -{ - let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choose Lore"); - if (choice.length) - { - mainEffect.update({name : mainEffect.name.replace("Lore", choice[0].name)}) - this.item.update({name : this.item.name += ` (${choice[0].name})`}) - } -} - -this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/Pg9C6nJX5QHIdqa9.js b/reference_scripts/Pg9C6nJX5QHIdqa9.js deleted file mode 100644 index f7d625b..0000000 --- a/reference_scripts/Pg9C6nJX5QHIdqa9.js +++ /dev/null @@ -1 +0,0 @@ -return !args.item?.system.attackType diff --git a/reference_scripts/Ph3TdQw1lGiFr049.js b/reference_scripts/Ph3TdQw1lGiFr049.js deleted file mode 100644 index f7e4852..0000000 --- a/reference_scripts/Ph3TdQw1lGiFr049.js +++ /dev/null @@ -1,19 +0,0 @@ - if (!args.test.context.phantasmal && - (this.actor.isOpposing || args.test.context.defending) && - args.test.result.roll % 11 == 0 && - args.test.succeeded && - ["Language (Magick)", "Dodge"].includes(args.test.item?.name)) - { - args.test.context.phantasmal = true; // Flag so items aren't readded if test is edited - let text = `${this.effect.name}: Adding Unstable and Ward` - args.test.result.other.push(text) - this.script.scriptNotification(text); - - let ward = await fromUuid("Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh") - let wardData = ward.toObject(); - wardData.system.specification.value = 9; - - let unstable = await fromUuid("Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl") - let unstableData = unstable.toObject(); - this.actor.createEmbeddedDocuments("Item", [wardData, unstableData], {fromEffect: this.effect.id}) - } diff --git a/reference_scripts/PjRxGuUDKGmSmVDc.js b/reference_scripts/PjRxGuUDKGmSmVDc.js deleted file mode 100644 index dd06719..0000000 --- a/reference_scripts/PjRxGuUDKGmSmVDc.js +++ /dev/null @@ -1,5 +0,0 @@ -fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A").then(item => { - item = item.toObject() - item.system.specification.value = this.actor.characteristics.ag.value - this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) -}) \ No newline at end of file diff --git a/reference_scripts/PmELrzD3RmF9qKkO.js b/reference_scripts/PmELrzD3RmF9qKkO.js deleted file mode 100644 index 3d5c0b3..0000000 --- a/reference_scripts/PmELrzD3RmF9qKkO.js +++ /dev/null @@ -1,9 +0,0 @@ -if (this.item.system.specification.value == "Size") -{ - let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.actorSizes, this.item.img), 1, "Choose Size"); - if (choice[0]) - { - this.item.updateSource({"system.specification.value" : choice[0].name}) - this.effect.updateSource({name : this.effect.name + ` (${choice[0].name})`}) - } -} \ No newline at end of file diff --git a/reference_scripts/Pn5fekTbkwlr61XU.js b/reference_scripts/Pn5fekTbkwlr61XU.js deleted file mode 100644 index 63064a6..0000000 --- a/reference_scripts/Pn5fekTbkwlr61XU.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Engineer)'; -const difficulty = 'easy'; -const target = 10; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/PoNnT5EqvLj2r5yf.js b/reference_scripts/PoNnT5EqvLj2r5yf.js deleted file mode 100644 index af693bc..0000000 --- a/reference_scripts/PoNnT5EqvLj2r5yf.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.OutdoorSurvival") && args.skill?.name != game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/reference_scripts/PsO7aTdELJt35eHP.js b/reference_scripts/PsO7aTdELJt35eHP.js deleted file mode 100644 index 08dcbea..0000000 --- a/reference_scripts/PsO7aTdELJt35eHP.js +++ /dev/null @@ -1,10 +0,0 @@ -let morale = await new Roll("-1d10").roll(); -let mood = await new Roll("-2d10").roll(); - -morale.toMessage(this.script.getChatData({flavor : "Morale"})); -mood.toMessage(this.script.getChatData({flavor : "Manann's Mood"})); - -await this.actor.system.status.morale.addEntry("Albatross Died", morale.total) -await this.actor.system.status.mood.addEntry("Albatross Died", mood.total); - -this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/PwqTmw7rsG8hzqCS.js b/reference_scripts/PwqTmw7rsG8hzqCS.js deleted file mode 100644 index 6ce47bf..0000000 --- a/reference_scripts/PwqTmw7rsG8hzqCS.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.test.result.critical && args.test.result.roll % 10 == 0) -{ - game.wfrp4e.tables.findTable("knuckleduster-diseases").roll().then(roll => { - let results = roll.results[0] - - this.script.scriptMessage(`${this.actor.name} contracts @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients("GM") }) - }) - - } - diff --git a/reference_scripts/Q1trEhtqjIiDvFPF.js b/reference_scripts/Q1trEhtqjIiDvFPF.js deleted file mode 100644 index edff223..0000000 --- a/reference_scripts/Q1trEhtqjIiDvFPF.js +++ /dev/null @@ -1 +0,0 @@ -args.prefillModifiers.modifier -= 10 * getProperty(this.effect, 'flags.wfrp4e.value') \ No newline at end of file diff --git a/reference_scripts/Q4EQgP4gZR8TTm7S.js b/reference_scripts/Q4EQgP4gZR8TTm7S.js deleted file mode 100644 index 2ae696c..0000000 --- a/reference_scripts/Q4EQgP4gZR8TTm7S.js +++ /dev/null @@ -1,9 +0,0 @@ -let penalty = 0 -if (args.item?.system.attackType) -{ - penalty -= 30 -} -if (args.actor.has("Second Sight", "talent")) - penalty += 10 - -args.prefillModifiers.modifier += penalty \ No newline at end of file diff --git a/reference_scripts/Q5gh5Y9dCdclcwsD.js b/reference_scripts/Q5gh5Y9dCdclcwsD.js deleted file mode 100644 index 50f5352..0000000 --- a/reference_scripts/Q5gh5Y9dCdclcwsD.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.skill?.name != `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})` \ No newline at end of file diff --git a/reference_scripts/Q68WiUWY7GxiXBbT.js b/reference_scripts/Q68WiUWY7GxiXBbT.js deleted file mode 100644 index 536d1ae..0000000 --- a/reference_scripts/Q68WiUWY7GxiXBbT.js +++ /dev/null @@ -1,5 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp") -let data = item.toObject(); -data.system.specification.value = "When Alone"; -data.effects[0].disabled = true; -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Q7eULXQ9AfDRmUGO.js b/reference_scripts/Q7eULXQ9AfDRmUGO.js deleted file mode 100644 index 233c0f9..0000000 --- a/reference_scripts/Q7eULXQ9AfDRmUGO.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'difficult'; -const target = 40; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/Q9EmlWmuDac83cJw.js b/reference_scripts/Q9EmlWmuDac83cJw.js deleted file mode 100644 index 65e9e2e..0000000 --- a/reference_scripts/Q9EmlWmuDac83cJw.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name?.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/QF8LanKNoAlTkQG0.js b/reference_scripts/QF8LanKNoAlTkQG0.js deleted file mode 100644 index bb333fb..0000000 --- a/reference_scripts/QF8LanKNoAlTkQG0.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.system.status.encumbrance.max += 2 \ No newline at end of file diff --git a/reference_scripts/QHQ7XmFOjT9wXgw1.js b/reference_scripts/QHQ7XmFOjT9wXgw1.js deleted file mode 100644 index 3a516b8..0000000 --- a/reference_scripts/QHQ7XmFOjT9wXgw1.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.actorsystem.details.move.oars.value > 0) - args.actor.system.details.move.oars.value -= 1; - -args.actor.system.details.man -= 2; \ No newline at end of file diff --git a/reference_scripts/QKTA2TqZ77pvHWSJ.js b/reference_scripts/QKTA2TqZ77pvHWSJ.js deleted file mode 100644 index 1a94aec..0000000 --- a/reference_scripts/QKTA2TqZ77pvHWSJ.js +++ /dev/null @@ -1,9 +0,0 @@ - this.actor.getActiveTokens().forEach(t => t.document.update({light : { - "dim": 0, - "bright": 0, - "alpha": 0.5, - "animation": { - "type": "", - }, - "color": "#000000", - }})); \ No newline at end of file diff --git a/reference_scripts/QKjR6P1WEHXf4K77.js b/reference_scripts/QKjR6P1WEHXf4K77.js deleted file mode 100644 index 1fee3fb..0000000 --- a/reference_scripts/QKjR6P1WEHXf4K77.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus -= 2 diff --git a/reference_scripts/QNxmImpLTou6WdMQ.js b/reference_scripts/QNxmImpLTou6WdMQ.js deleted file mode 100644 index 0e082dd..0000000 --- a/reference_scripts/QNxmImpLTou6WdMQ.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = args.test -if (test.result.minormis || test.result.majormis || test.result.catastrophicmis) - test.result.other.push("Can make a Difficult (-10) Willpower Test to prevent the Miscast") \ No newline at end of file diff --git a/reference_scripts/QPVVDPcJ4Xi5FmQl.js b/reference_scripts/QPVVDPcJ4Xi5FmQl.js deleted file mode 100644 index 340975c..0000000 --- a/reference_scripts/QPVVDPcJ4Xi5FmQl.js +++ /dev/null @@ -1,9 +0,0 @@ -if(this.actor.hasCondition("fatigued") && args.opposedTest.result.hitloc.value == "head" && (args.opposedTest.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0)) -{ - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { fields: { difficulty: "average" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) - await test.roll(); - if (test.failed) - { - this.actor.addCondition("unconscious") - } -} \ No newline at end of file diff --git a/reference_scripts/QQ2gHThZHdO4yLLX.js b/reference_scripts/QQ2gHThZHdO4yLLX.js deleted file mode 100644 index abb25c3..0000000 --- a/reference_scripts/QQ2gHThZHdO4yLLX.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Swim"); \ No newline at end of file diff --git a/reference_scripts/QQPiREc50HT5W2Tr.js b/reference_scripts/QQPiREc50HT5W2Tr.js deleted file mode 100644 index 7190682..0000000 --- a/reference_scripts/QQPiREc50HT5W2Tr.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.item.type == "weapon" && args.item.weaponGroup.value == "brawling") - args.item.damage.value += " + 1" \ No newline at end of file diff --git a/reference_scripts/QRSACifDrvojIXHB.js b/reference_scripts/QRSACifDrvojIXHB.js deleted file mode 100644 index 0527702..0000000 --- a/reference_scripts/QRSACifDrvojIXHB.js +++ /dev/null @@ -1,11 +0,0 @@ -if (!this.actor.effects.find(e => e.isCondition)) -{ - return this.script.scriptNotification("No Conditions on this Actor") -} - -let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choose a Condition") - -if (choice[0]) -{ - this.actor.removeCondition(choice[0].conditionId) -} diff --git a/reference_scripts/QaGNsqKm2Nf0zGVm.js b/reference_scripts/QaGNsqKm2Nf0zGVm.js deleted file mode 100644 index 3fc40b5..0000000 --- a/reference_scripts/QaGNsqKm2Nf0zGVm.js +++ /dev/null @@ -1 +0,0 @@ -return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/QbIYnshWeP1U8SUy.js b/reference_scripts/QbIYnshWeP1U8SUy.js deleted file mode 100644 index d6c5e61..0000000 --- a/reference_scripts/QbIYnshWeP1U8SUy.js +++ /dev/null @@ -1,2 +0,0 @@ -args.applyAP = false; -args.applyTB = false; \ No newline at end of file diff --git a/reference_scripts/QfTBRGXVfwQSghmd.js b/reference_scripts/QfTBRGXVfwQSghmd.js deleted file mode 100644 index 99a5992..0000000 --- a/reference_scripts/QfTBRGXVfwQSghmd.js +++ /dev/null @@ -1,18 +0,0 @@ -fromUuid(this.effect.origin).then(caster => { - if (caster) { - if (actor.items.find(it => it.name == game.i18n.localize("Bestial"))) { - let healed = caster.characteristics.wp.bonus - let wounds = duplicate(args.actor.status.wounds) - wounds.value += healed - - if (wounds.value > wounds.max) - wounds.value = wounds.max - - args.actor.update({ "system.status.wounds": wounds }) - ChatMessage.create({ content: `${this.actor.prototypeToken.name} regains ${healed} Wounds`, speaker: { alias: this.effect.name } }) - } else { - ui.notifications.warn("Target actor has no Bestial trait") - } - } -}) - diff --git a/reference_scripts/Qgn92fZyc3Psn8QJ.js b/reference_scripts/Qgn92fZyc3Psn8QJ.js deleted file mode 100644 index fcfd3fd..0000000 --- a/reference_scripts/Qgn92fZyc3Psn8QJ.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) -{ - -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) - -if (ones > SL) - args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) - args.test.result.other.push(`${this.effect.name}: Used unit dice as SL`) -} \ No newline at end of file diff --git a/reference_scripts/Qk7t2l5ep9RDVpgE.js b/reference_scripts/Qk7t2l5ep9RDVpgE.js deleted file mode 100644 index 80de579..0000000 --- a/reference_scripts/Qk7t2l5ep9RDVpgE.js +++ /dev/null @@ -1 +0,0 @@ -args.options.diceman= true; \ No newline at end of file diff --git a/reference_scripts/QoEOxRruQXYrZrv3.js b/reference_scripts/QoEOxRruQXYrZrv3.js deleted file mode 100644 index c084829..0000000 --- a/reference_scripts/QoEOxRruQXYrZrv3.js +++ /dev/null @@ -1,17 +0,0 @@ -let filters = [ - { - property : "type", - value : "skill" - }, - { - property : "name", - value : /Melee/gm, - regex: true - } -] - -let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 2, "Choose 2 Skills to add +20") -items = items.map(i => i.toObject()) -items.forEach(i => i.system.advances.value = 20) - -this.actor.createEmbeddedDocuments("Item", items); \ No newline at end of file diff --git a/reference_scripts/QqkE7rlqhkeRohFD.js b/reference_scripts/QqkE7rlqhkeRohFD.js deleted file mode 100644 index 896b9a2..0000000 --- a/reference_scripts/QqkE7rlqhkeRohFD.js +++ /dev/null @@ -1 +0,0 @@ -return !(["cast", "channelling"].includes(args.type) && this.actor.hasCondition("fatigued")) \ No newline at end of file diff --git a/reference_scripts/QqybHxNCzPEzG1Qh.js b/reference_scripts/QqybHxNCzPEzG1Qh.js deleted file mode 100644 index 05952e9..0000000 --- a/reference_scripts/QqybHxNCzPEzG1Qh.js +++ /dev/null @@ -1 +0,0 @@ -return args.fields.dualWielding || args.options.dualWieldOffhand \ No newline at end of file diff --git a/reference_scripts/QwHoqu2oO8QO8Mad.js b/reference_scripts/QwHoqu2oO8QO8Mad.js deleted file mode 100644 index a5972f6..0000000 --- a/reference_scripts/QwHoqu2oO8QO8Mad.js +++ /dev/null @@ -1,3 +0,0 @@ -let content = `${this.effect.name}: All targets engaged with ${this.actor.prototypeToken.name} take [[/r 1d10]] Damage, modified by TB and AP.` - -this.script.scriptMessage(content) \ No newline at end of file diff --git a/reference_scripts/R32U01LBjBrK1pns.js b/reference_scripts/R32U01LBjBrK1pns.js deleted file mode 100644 index 4816313..0000000 --- a/reference_scripts/R32U01LBjBrK1pns.js +++ /dev/null @@ -1,33 +0,0 @@ - const templateMap = { - 'P2e7Yx98bK3u110a' : "", - 'iuMp3KLaMT2WCmie' : "Xp4r2KUhqfjak8zq", - 'RBuYcT5tppwcmnC5' : "wYN19h3WVF1yOVq2", - 'vcGpNwNbhvfzVveQ' : "ac5ClOuaYtzOYyWp", - 'jmhKZy0w9TzkEK9c' : "IS3LTdTuay6uRHUq", - '9Byj6k7SmdTYis2V' : "LjMlx99gBGeRJUQu", - 'laJwc2l9tzJPgaaJ' : "x5wpMprsObuqMCYg", - } - let template = (await game.wfrp4e.tables.rollTable("hireling-templates", {hideDSN: true})).object; - let physicalQuirk = (await game.wfrp4e.tables.rollTable("physical-quirks", {hideDSN: true})).text; - let workEthic = (await game.wfrp4e.tables.rollTable("work-ethic", {hideDSN: true})).text; - let personalityQuirk = (await game.wfrp4e.tables.rollTable("personality-quirks", {hideDSN: true})).text; - - - let templateItem = await game.wfrp4e.utility.findItemId(templateMap[template._id]); - - let bio = - ` -Template: ${template.text}
-Phsyical Quirk: ${physicalQuirk}
-Work Ethic: ${workEthic}
-Personality Quirk: ${personalityQuirk}
- ` - - this.script.scriptMessage(bio, {whisper : ChatMessage.getWhisperRecipients("GM")}) - - await this.actor.update({"system.details.gmnotes.value" : bio}) - - if (templateItem) - { - this.actor.createEmbeddedDocuments("Item", [templateItem.toObject()]) - } \ No newline at end of file diff --git a/reference_scripts/R5dOZWFxE2n6tooX.js b/reference_scripts/R5dOZWFxE2n6tooX.js deleted file mode 100644 index d6c0f61..0000000 --- a/reference_scripts/R5dOZWFxE2n6tooX.js +++ /dev/null @@ -1 +0,0 @@ -return this.item.system.usesLocation(args.weapon) \ No newline at end of file diff --git a/reference_scripts/R6SnyF3y4Vsq6oga.js b/reference_scripts/R6SnyF3y4Vsq6oga.js deleted file mode 100644 index 9cb3f07..0000000 --- a/reference_scripts/R6SnyF3y4Vsq6oga.js +++ /dev/null @@ -1,8 +0,0 @@ -let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); - -// If channelling corresponding lore -if (args.type == "channelling" && args.spell.system.lore.value == lore) - args.prefillModifiers.slBonus += 1 -// If channelling or casting different lore -else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") - args.prefillModifiers.slBonus -= 1 \ No newline at end of file diff --git a/reference_scripts/R8FBHZaaARA3z9pB.js b/reference_scripts/R8FBHZaaARA3z9pB.js deleted file mode 100644 index 29b9079..0000000 --- a/reference_scripts/R8FBHZaaARA3z9pB.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'hard'; -const target = 40; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/R8ecKGRzOr4ThvVa.js b/reference_scripts/R8ecKGRzOr4ThvVa.js deleted file mode 100644 index 875dec8..0000000 --- a/reference_scripts/R8ecKGRzOr4ThvVa.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Maintenance Crew Test'; -const difficulty = 'hard'; -const target = 80; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/R95pDZMHnD9iHAl8.js b/reference_scripts/R95pDZMHnD9iHAl8.js deleted file mode 100644 index 903d7c3..0000000 --- a/reference_scripts/R95pDZMHnD9iHAl8.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(this.item.system.tests.value); \ No newline at end of file diff --git a/reference_scripts/RDtJXji3hgcKnEBk.js b/reference_scripts/RDtJXji3hgcKnEBk.js deleted file mode 100644 index 84cd8d9..0000000 --- a/reference_scripts/RDtJXji3hgcKnEBk.js +++ /dev/null @@ -1,33 +0,0 @@ -let as = (await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS")).toObject(); -let hv = (await fromUuid("Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR")).toObject(); -let ms = (await fromUuid("Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5")).toObject(); -let ss = (await fromUuid("Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2")).toObject(); - -as.name += " (Sight)"; - -let roll = (await new Roll("1d10").roll()); -roll.toMessage(this.script.getChatData()) -let items = [] - -if (roll.total <= 2) -{ - items = items.concat([as]); -} -else if (roll.total <= 4) -{ - items = items.concat([hv]); -} -else if (roll.total <= 6) -{ - items = items.concat([ms]); -} -else if (roll.total <= 8) -{ - items = items.concat([ss]); -} -else if (roll.total <= 10) -{ - items = items.concat([as, hv, ms, ss]); -} - -this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/RHyBLYT5oHf7EPnG.js b/reference_scripts/RHyBLYT5oHf7EPnG.js deleted file mode 100644 index 0eeaadd..0000000 --- a/reference_scripts/RHyBLYT5oHf7EPnG.js +++ /dev/null @@ -1,21 +0,0 @@ -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"); \ No newline at end of file diff --git a/reference_scripts/RI8crJxeD8JLDwMh.js b/reference_scripts/RI8crJxeD8JLDwMh.js deleted file mode 100644 index 0a98874..0000000 --- a/reference_scripts/RI8crJxeD8JLDwMh.js +++ /dev/null @@ -1 +0,0 @@ -return args.weapon?.system?.weaponGroup?.value != "fencing" \ No newline at end of file diff --git a/reference_scripts/RJpglw5eVRM1f9t0.js b/reference_scripts/RJpglw5eVRM1f9t0.js deleted file mode 100644 index ab32d24..0000000 --- a/reference_scripts/RJpglw5eVRM1f9t0.js +++ /dev/null @@ -1 +0,0 @@ -args.wounds *= 5 \ No newline at end of file diff --git a/reference_scripts/RKIFGN583PQnqHGk.js b/reference_scripts/RKIFGN583PQnqHGk.js deleted file mode 100644 index c0633f0..0000000 --- a/reference_scripts/RKIFGN583PQnqHGk.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) -{ - args.actor.addCondition("bleeding", 2) - this.script.scriptMessage("Gained 2 Bleeding Conditions") -} \ No newline at end of file diff --git a/reference_scripts/RNHrSTfMLXm5sXkC.js b/reference_scripts/RNHrSTfMLXm5sXkC.js deleted file mode 100644 index c5b8e70..0000000 --- a/reference_scripts/RNHrSTfMLXm5sXkC.js +++ /dev/null @@ -1 +0,0 @@ -return ["ws", "bs", "s", "ag"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/RNr9CwyvLhlnwD2h.js b/reference_scripts/RNr9CwyvLhlnwD2h.js deleted file mode 100644 index 2dbcde4..0000000 --- a/reference_scripts/RNr9CwyvLhlnwD2h.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Sail")); \ No newline at end of file diff --git a/reference_scripts/ROXCqAFSTLouJniL.js b/reference_scripts/ROXCqAFSTLouJniL.js deleted file mode 100644 index dcc969a..0000000 --- a/reference_scripts/ROXCqAFSTLouJniL.js +++ /dev/null @@ -1,7 +0,0 @@ -if (args.test.spell.name == "Warp Lightning") -{ - if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis) - { - this.script.scriptMessage(`${this.item.name} Overloads!`) - } -} \ No newline at end of file diff --git a/reference_scripts/RPqgRUkiLY5thVbC.js b/reference_scripts/RPqgRUkiLY5thVbC.js deleted file mode 100644 index cc3928e..0000000 --- a/reference_scripts/RPqgRUkiLY5thVbC.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Strength'; -const difficulty = 'average'; -const target = 10; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/RSsGiDFibuqg3sHr.js b/reference_scripts/RSsGiDFibuqg3sHr.js deleted file mode 100644 index 9132550..0000000 --- a/reference_scripts/RSsGiDFibuqg3sHr.js +++ /dev/null @@ -1,15 +0,0 @@ -let diseaseIndex = game.packs -.filter(i => i.metadata.type == "Item") -.reduce((acc, pack) => acc.concat(pack.index.contents), []) -.filter(i => i.type == "disease") -.map(i => { - i.id = i._id - return i -}) - -let choice = await ItemDialog.create(diseaseIndex , 1, "Choose a Disease") - -if (choice[0]) -{ - await this.item.updateSource({"system.specification.value" : choice[0].name}) -} \ No newline at end of file diff --git a/reference_scripts/RZlMkxJz5apn0mUj.js b/reference_scripts/RZlMkxJz5apn0mUj.js deleted file mode 100644 index 74fe1bc..0000000 --- a/reference_scripts/RZlMkxJz5apn0mUj.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/RlhOAKfN0ghrrooR.js b/reference_scripts/RlhOAKfN0ghrrooR.js deleted file mode 100644 index b0e5aae..0000000 --- a/reference_scripts/RlhOAKfN0ghrrooR.js +++ /dev/null @@ -1,7 +0,0 @@ -let holed = this.actor.appliedEffects.filter(e => e.name.includes("Holed")); - -for (let effect of holed) { - await effect.update({name: effect.name.replace(/\d+/, rating => parseInt(rating) * 2)}); -} - -this.script.scriptNotification(`Holed Ratings of ${this.actor.name} have been doubled.`); \ No newline at end of file diff --git a/reference_scripts/Rnpw6UQdJifLeuna.js b/reference_scripts/Rnpw6UQdJifLeuna.js deleted file mode 100644 index b9fc369..0000000 --- a/reference_scripts/Rnpw6UQdJifLeuna.js +++ /dev/null @@ -1 +0,0 @@ -this.effect.updateSource({"flags.wfrp4e.applicationData.type" : "crew"}) \ No newline at end of file diff --git a/reference_scripts/RprZWlnopSqZt7KZ.js b/reference_scripts/RprZWlnopSqZt7KZ.js deleted file mode 100644 index 523491c..0000000 --- a/reference_scripts/RprZWlnopSqZt7KZ.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/RqWnhnwFxaHubgiA.js b/reference_scripts/RqWnhnwFxaHubgiA.js deleted file mode 100644 index a9b12cd..0000000 --- a/reference_scripts/RqWnhnwFxaHubgiA.js +++ /dev/null @@ -1,3 +0,0 @@ -await args.actor.addCondition("blinded"); -await args.actor.addCondition("deafened"); -await args.actor.addCondition("stunned"); \ No newline at end of file diff --git a/reference_scripts/RrchOMpEdIvceJxl.js b/reference_scripts/RrchOMpEdIvceJxl.js deleted file mode 100644 index 300050b..0000000 --- a/reference_scripts/RrchOMpEdIvceJxl.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == "Stealth (Rural)" \ No newline at end of file diff --git a/reference_scripts/RsWXCcYHONf3ANlD.js b/reference_scripts/RsWXCcYHONf3ANlD.js deleted file mode 100644 index 8924600..0000000 --- a/reference_scripts/RsWXCcYHONf3ANlD.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("stunned", 1); diff --git a/reference_scripts/RuW1PWUFxIbbSlIm.js b/reference_scripts/RuW1PWUFxIbbSlIm.js deleted file mode 100644 index c333e53..0000000 --- a/reference_scripts/RuW1PWUFxIbbSlIm.js +++ /dev/null @@ -1 +0,0 @@ -return !["t", "wp", "ag", "i", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/RvipIYj9H7n4UDMe.js b/reference_scripts/RvipIYj9H7n4UDMe.js deleted file mode 100644 index 4ae90e5..0000000 --- a/reference_scripts/RvipIYj9H7n4UDMe.js +++ /dev/null @@ -1,84 +0,0 @@ - let characteristics = { - "ws" : -10, - "bs" : -10, - "s" : -5, - "t" : -5, - "i" : -10, - "ag" : -10, - "dex" : -10, - "int" : 0, - "wp" : 0, - "fel" : 0 - } - let skills = [] - let skillAdvancements = [] - let talents = [] - let trappings = [] - let items = [] - - let updateObj = this.actor.toObject(); - - for (let ch in characteristics) - { - updateObj.system.characteristics[ch].modifier += characteristics[ch]; - } - - for (let index = 0; index < skills.length; index++) - { - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } - } - - for (let talent of talents) - { - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } - } - - for (let trapping of trappings) - { - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } - } - - - await this.actor.update(updateObj) - this.actor.createEmbeddedDocuments("Item", items); - - function equip(item) - { - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true - } \ No newline at end of file diff --git a/reference_scripts/RwMw848y13Jq2L4f.js b/reference_scripts/RwMw848y13Jq2L4f.js deleted file mode 100644 index d6186a0..0000000 --- a/reference_scripts/RwMw848y13Jq2L4f.js +++ /dev/null @@ -1,23 +0,0 @@ -let test = await this.actor.setupSkill("Endurance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); -if (test.failed) -{ - await this.actor.addCondition("blinded"); -} - -let msg = `` -let armour = args.actor.itemTypes.armour.filter(i => i.system.isMetal && i.system.isEquipped); -for(let item of armour) -{ - for(let key in item.system.AP) - { - let AP = item.system.AP[key] - let damage = Math.floor(AP / 2); - await item.system.damageItem(damage, [key]); - } - msg += `${item.name} AP reduced by half
` -} -if (msg) -{ - this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}}); -} \ No newline at end of file diff --git a/reference_scripts/S1QihXuvdEVzeRtB.js b/reference_scripts/S1QihXuvdEVzeRtB.js deleted file mode 100644 index 0194c09..0000000 --- a/reference_scripts/S1QihXuvdEVzeRtB.js +++ /dev/null @@ -1,40 +0,0 @@ -let dice = await new Roll("1d10").roll() -let roll = dice.total -let talent -let message -let modifier = 0 - -if (roll <= 3) -{ - item = await fromUuid("Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X") -} - -else if (roll <= 6) -{ - item = await fromUuid("Compendium.wfrp4e-core.items.OEjUvJKi0xmBwbS2") - modifier = -3 -} - -else if (roll <= 9) -{ - item = await fromUuid("Compendium.wfrp4e-core.items.mdPGZsn2396dEpOf") - modifier = -3 -} - -else if (roll = 10) -{ - item = await fromUuid("Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB") - modifier = -5 -} - -message = `${roll} Rolled, gain ${item.name}, ${modifier} Strength` -dice.toMessage(this.script.getChatData()) - -let changes = duplicate(this.effect.changes) -changes[0].value = modifier - -this.effect.updateSource({changes}) - -await this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) - -this.script.scriptNotification(message) \ No newline at end of file diff --git a/reference_scripts/S3DCTw4yJ85eSaKp.js b/reference_scripts/S3DCTw4yJ85eSaKp.js deleted file mode 100644 index 666ee45..0000000 --- a/reference_scripts/S3DCTw4yJ85eSaKp.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.setupCharacteristic("s", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(test => test.roll()) \ No newline at end of file diff --git a/reference_scripts/S3Dev4hleOYqDNe9.js b/reference_scripts/S3Dev4hleOYqDNe9.js deleted file mode 100644 index 82a4f59..0000000 --- a/reference_scripts/S3Dev4hleOYqDNe9.js +++ /dev/null @@ -1,16 +0,0 @@ -if (args.test.options.healWounds) { - if (args.test.succeeded) - { - let wounds = this.actor.characteristics.int.bonus + Number(args.test.result.SL) - if (args.test.options.fieldDressing && args.test.result.reversed) - { - wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL)) - } - args.test.result.woundsHealed = wounds - args.test.result.other.push(`${this.actor.name} healed ${wounds} wounds of the patient.`) - } - else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) - { - args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`) - } -} \ No newline at end of file diff --git a/reference_scripts/S4793DLFhjMxpM8x.js b/reference_scripts/S4793DLFhjMxpM8x.js deleted file mode 100644 index 4f2f739..0000000 --- a/reference_scripts/S4793DLFhjMxpM8x.js +++ /dev/null @@ -1 +0,0 @@ -return !["ws", "bs"].includes(args.characteristic) && !args.item?.system.attackType && !args.options.dodge \ No newline at end of file diff --git a/reference_scripts/S6tUyFJvGMV19mvP.js b/reference_scripts/S6tUyFJvGMV19mvP.js deleted file mode 100644 index 867c8d8..0000000 --- a/reference_scripts/S6tUyFJvGMV19mvP.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(2, {source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/S95QqpX1cZyIVCPy.js b/reference_scripts/S95QqpX1cZyIVCPy.js deleted file mode 100644 index 3011ed7..0000000 --- a/reference_scripts/S95QqpX1cZyIVCPy.js +++ /dev/null @@ -1,5 +0,0 @@ -if (parseInt(this.item.system.specification.value) > 0) -{ - this.actor.system.status.ward.value = parseInt(this.item.system.specification.value); -} - diff --git a/reference_scripts/SGr50Hq1AHIEzIFN.js b/reference_scripts/SGr50Hq1AHIEzIFN.js deleted file mode 100644 index 324b7a2..0000000 --- a/reference_scripts/SGr50Hq1AHIEzIFN.js +++ /dev/null @@ -1,6 +0,0 @@ -let choice = await ItemDialog.create(ItemDialog.objectToArray({ - int : game.wfrp4e.config.characteristics.int, - fel : game.wfrp4e.config.characteristics.fel -}, this.effect.img), 1, "Choose Characteristic"); - -this.effect.updateSource({"flags.wfrp4e.characteristic" : choice[0].id}) \ No newline at end of file diff --git a/reference_scripts/SLy1Fs3oXcHgFgjK.js b/reference_scripts/SLy1Fs3oXcHgFgjK.js deleted file mode 100644 index 4add629..0000000 --- a/reference_scripts/SLy1Fs3oXcHgFgjK.js +++ /dev/null @@ -1,5 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") -let data = item.toObject(); -let value = getProperty(this.effect.sourceTest, "result.overcast.usage.other.current") || 1 -data.system.specification.value = value -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/SO4Aa9argKbuO9rQ.js b/reference_scripts/SO4Aa9argKbuO9rQ.js deleted file mode 100644 index 2af913b..0000000 --- a/reference_scripts/SO4Aa9argKbuO9rQ.js +++ /dev/null @@ -1 +0,0 @@ -args.prefillModifiers.modifier -= 20 \ No newline at end of file diff --git a/reference_scripts/SPOkFWZWziZk5b7A.js b/reference_scripts/SPOkFWZWziZk5b7A.js deleted file mode 100644 index d26b8cb..0000000 --- a/reference_scripts/SPOkFWZWziZk5b7A.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system?.attackType != "melee" \ No newline at end of file diff --git a/reference_scripts/SRmfstEs278bP9Pz.js b/reference_scripts/SRmfstEs278bP9Pz.js deleted file mode 100644 index 4831d32..0000000 --- a/reference_scripts/SRmfstEs278bP9Pz.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/SSqGxyN9hw0HDmED.js b/reference_scripts/SSqGxyN9hw0HDmED.js deleted file mode 100644 index ea4faf2..0000000 --- a/reference_scripts/SSqGxyN9hw0HDmED.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/SWIJjM2RCmzfr64u.js b/reference_scripts/SWIJjM2RCmzfr64u.js deleted file mode 100644 index 4f762e1..0000000 --- a/reference_scripts/SWIJjM2RCmzfr64u.js +++ /dev/null @@ -1,6 +0,0 @@ -if (args.test.result.hitloc.result == "head" && args.test.result.critical) -{ - args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40 - - args.test.result.critical += ` (+${args.test.result.critModifier})` -} diff --git a/reference_scripts/SefcrhXsdYGFcCW6.js b/reference_scripts/SefcrhXsdYGFcCW6.js deleted file mode 100644 index 13bf563..0000000 --- a/reference_scripts/SefcrhXsdYGFcCW6.js +++ /dev/null @@ -1,3 +0,0 @@ -args.actor.system.details.move.value -= 3; -args.actor.system.details.man -= 2; -args.actor.system.status.carries.max *= 2; \ No newline at end of file diff --git a/reference_scripts/SrCHfOJFZwDickqa.js b/reference_scripts/SrCHfOJFZwDickqa.js deleted file mode 100644 index 28558bc..0000000 --- a/reference_scripts/SrCHfOJFZwDickqa.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "average"}}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone") -} \ No newline at end of file diff --git a/reference_scripts/Ssn21dxoMQiqD1y4.js b/reference_scripts/Ssn21dxoMQiqD1y4.js deleted file mode 100644 index 6767d5a..0000000 --- a/reference_scripts/Ssn21dxoMQiqD1y4.js +++ /dev/null @@ -1 +0,0 @@ -return args.type == "cast" && args.item.lore.value == "fire" \ No newline at end of file diff --git a/reference_scripts/StAderQaQQsxb6Rv.js b/reference_scripts/StAderQaQQsxb6Rv.js deleted file mode 100644 index d361e9a..0000000 --- a/reference_scripts/StAderQaQQsxb6Rv.js +++ /dev/null @@ -1,10 +0,0 @@ -let target = await game.wfrp4e.tables.rollTable("fixations") -if (target) -{ - this.script.scriptNotification(target.result); - let hatred = this.actor.items.find(i => i.getFlag("wfrp4e", "fromEffect") == this.effect.id) - if (hatred) - { - hatred.update({"system.specification.value" : target.result}) - } -} \ No newline at end of file diff --git a/reference_scripts/SvFKt9hMcFQjeILA.js b/reference_scripts/SvFKt9hMcFQjeILA.js deleted file mode 100644 index 52d528c..0000000 --- a/reference_scripts/SvFKt9hMcFQjeILA.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("entangled", this.effect.sourceTest.result.overcast.usage.other.current) \ No newline at end of file diff --git a/reference_scripts/T3RfSt3VMEat3iDD.js b/reference_scripts/T3RfSt3VMEat3iDD.js deleted file mode 100644 index 747d789..0000000 --- a/reference_scripts/T3RfSt3VMEat3iDD.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Perception"); \ No newline at end of file diff --git a/reference_scripts/T5fiTzhXEQAv9Drf.js b/reference_scripts/T5fiTzhXEQAv9Drf.js deleted file mode 100644 index 536b32a..0000000 --- a/reference_scripts/T5fiTzhXEQAv9Drf.js +++ /dev/null @@ -1,20 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.rlDZZTj5PXjuRXa2") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key; -await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - -let location = this.item.system.location.key; - -if (location) -{ - let dropped = this.item.system.weaponsAtLocation; - - if (dropped.length) - { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) - for(let weapon of dropped) - { - await weapon.system.toggleEquip(); - } - } -} \ No newline at end of file diff --git a/reference_scripts/T74FEjfFrh3f6MKv.js b/reference_scripts/T74FEjfFrh3f6MKv.js deleted file mode 100644 index 1a4f658..0000000 --- a/reference_scripts/T74FEjfFrh3f6MKv.js +++ /dev/null @@ -1 +0,0 @@ -args.wpb = args.sb; \ No newline at end of file diff --git a/reference_scripts/TAw9vXnfyIAl5DGs.js b/reference_scripts/TAw9vXnfyIAl5DGs.js deleted file mode 100644 index c6062cd..0000000 --- a/reference_scripts/TAw9vXnfyIAl5DGs.js +++ /dev/null @@ -1,11 +0,0 @@ -if (this.item.system.quantity.value) -{ - game.wfrp4e.utility.postCorruptionTest("minor", this.script.getChatData()); - this.item.system.reduceQuantity(); - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - actor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/TBpNFRL5uehs0fze.js b/reference_scripts/TBpNFRL5uehs0fze.js deleted file mode 100644 index be5a2fb..0000000 --- a/reference_scripts/TBpNFRL5uehs0fze.js +++ /dev/null @@ -1,10 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.system.reduceQuantity(); - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - actor.applyEffect({effectData : [this.item.effects.contents[0]]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/TEiNj5FgkoD3YbhS.js b/reference_scripts/TEiNj5FgkoD3YbhS.js deleted file mode 100644 index bcac25e..0000000 --- a/reference_scripts/TEiNj5FgkoD3YbhS.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.hasCondition("bleeding")?.delete() \ No newline at end of file diff --git a/reference_scripts/TGN070HeJLl3gSMY.js b/reference_scripts/TGN070HeJLl3gSMY.js deleted file mode 100644 index 876f760..0000000 --- a/reference_scripts/TGN070HeJLl3gSMY.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Goes Prone" }}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone"); -} \ No newline at end of file diff --git a/reference_scripts/TNWmIkuubqBn38he.js b/reference_scripts/TNWmIkuubqBn38he.js deleted file mode 100644 index 8f318aa..0000000 --- a/reference_scripts/TNWmIkuubqBn38he.js +++ /dev/null @@ -1 +0,0 @@ -this.effect.deleteCreatedItems(); \ No newline at end of file diff --git a/reference_scripts/TOyQLrugFGzwc5nY.js b/reference_scripts/TOyQLrugFGzwc5nY.js deleted file mode 100644 index 1e8b373..0000000 --- a/reference_scripts/TOyQLrugFGzwc5nY.js +++ /dev/null @@ -1 +0,0 @@ -return !(args.skill?.name.includes(game.i18n.localize("NAME.Melee")) || args.item?.isMelee || args.options.corruption); \ No newline at end of file diff --git a/reference_scripts/TQRL4mZhZohXg1Au.js b/reference_scripts/TQRL4mZhZohXg1Au.js deleted file mode 100644 index 2288bc8..0000000 --- a/reference_scripts/TQRL4mZhZohXg1Au.js +++ /dev/null @@ -1,2 +0,0 @@ -let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -test.roll(); \ No newline at end of file diff --git a/reference_scripts/TU2xjbJ0zFtytF3J.js b/reference_scripts/TU2xjbJ0zFtytF3J.js deleted file mode 100644 index 9325462..0000000 --- a/reference_scripts/TU2xjbJ0zFtytF3J.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.CharmAnimal"); \ No newline at end of file diff --git a/reference_scripts/TY0xSQ00XXyEr49r.js b/reference_scripts/TY0xSQ00XXyEr49r.js deleted file mode 100644 index 7b1ab7b..0000000 --- a/reference_scripts/TY0xSQ00XXyEr49r.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += 1; \ No newline at end of file diff --git a/reference_scripts/TcqumwUFAL6V0cty.js b/reference_scripts/TcqumwUFAL6V0cty.js deleted file mode 100644 index e7a337e..0000000 --- a/reference_scripts/TcqumwUFAL6V0cty.js +++ /dev/null @@ -1,11 +0,0 @@ -if (this.item.getFlag("wfrp4e", "failedCool")) -{ - this.item.system.AP = { - "head": 0, - "lArm": 0, - "rArm": 0, - "lLeg": 0, - "rLeg": 0, - "body": 0 - } -} \ No newline at end of file diff --git a/reference_scripts/TdjlJro0RRVSh8g8.js b/reference_scripts/TdjlJro0RRVSh8g8.js deleted file mode 100644 index a893cc5..0000000 --- a/reference_scripts/TdjlJro0RRVSh8g8.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Gamble") && args.skill?.name != game.i18n.localize("NAME.SleightOfHand"); \ No newline at end of file diff --git a/reference_scripts/TmaS8o33825QUMrx.js b/reference_scripts/TmaS8o33825QUMrx.js deleted file mode 100644 index 599ff1b..0000000 --- a/reference_scripts/TmaS8o33825QUMrx.js +++ /dev/null @@ -1,3 +0,0 @@ -let stomp = game.wfrp4e.config.systemItems.stomp; -let test = await this.actor.setupTrait(stomp) -await test.roll(); \ No newline at end of file diff --git a/reference_scripts/TnFobCxG4pxlYmKr.js b/reference_scripts/TnFobCxG4pxlYmKr.js deleted file mode 100644 index 75668c8..0000000 --- a/reference_scripts/TnFobCxG4pxlYmKr.js +++ /dev/null @@ -1,16 +0,0 @@ -let gorCharacteristics = { - "ws": 45, - "bs": 30, - "s": 35, - "t": 45, - "i": 30, - "ag": 35, - "dex": 25, - "int": 25, - "wp": 30, - "fel": 25 -} -for (let char in this.actor.characteristics) { - if (this.actor.characteristics[char].initial < gorCharacteristics[char]) - this.actor.characteristics[char].initial = gorCharacteristics[char] -} \ No newline at end of file diff --git a/reference_scripts/ToKlHDAjJOsC51ag.js b/reference_scripts/ToKlHDAjJOsC51ag.js deleted file mode 100644 index 2ee3319..0000000 --- a/reference_scripts/ToKlHDAjJOsC51ag.js +++ /dev/null @@ -1,11 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}); -await test.roll(); -if (test.failed) -{ - args.actor.addCondition("unconscious") -} \ No newline at end of file diff --git a/reference_scripts/TpZItJ5Ugbazaobd.js b/reference_scripts/TpZItJ5Ugbazaobd.js deleted file mode 100644 index 414537b..0000000 --- a/reference_scripts/TpZItJ5Ugbazaobd.js +++ /dev/null @@ -1,15 +0,0 @@ -let locations = []; - -while (locations.length < 2) -{ - let loc = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN : true}) - if (!locations.includes(loc.result)) - { - locations.push(loc.result); - } -} - -locationText = locations.map(i => game.wfrp4e.config.locations[i]).join(", ") - -this.item.updateSource({name : this.item.name += ` (${locationText})`, "flags.wfrp4e.locations" : locations}) -this.effect.updateSource({"flags.wfrp4e.locations" : locations}) \ No newline at end of file diff --git a/reference_scripts/Tq45Nd8J3eTvHT41.js b/reference_scripts/Tq45Nd8J3eTvHT41.js deleted file mode 100644 index 88ba249..0000000 --- a/reference_scripts/Tq45Nd8J3eTvHT41.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Perception") && args.skill?.name != game.i18n.localize("NAME.SetTrap"); \ No newline at end of file diff --git a/reference_scripts/TrIYdcG3jDER4WgY.js b/reference_scripts/TrIYdcG3jDER4WgY.js deleted file mode 100644 index 5965a8c..0000000 --- a/reference_scripts/TrIYdcG3jDER4WgY.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.xsGbDFqK2qh7lsIj") -let data = item.toObject(); -data.system.specification.value = "Minor" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/TwgdEucxcHloc4cX.js b/reference_scripts/TwgdEucxcHloc4cX.js deleted file mode 100644 index 325d158..0000000 --- a/reference_scripts/TwgdEucxcHloc4cX.js +++ /dev/null @@ -1,135 +0,0 @@ -let choice1 = [ - { - type : "armour", - name : "Mail Chausses" - }, - { - type : "armour", - name : "Mail Coat" - }, - { - type : "armour", - name : "Mail Coif" - }, -] -let choice2 = [ - { - type : "armour", - name : "Mail Chausses" - }, - { - type : "armour", - name : "Mail Coat" - }, - { - type : "armour", - name : "Mail Coif" - }, - { - type : "armour", - name : "Leather Leggings" - }, - { - type : "armour", - name : "Leather Skullcap" - }, - { - type : "armour", - name : "Leather Jack" - }, -] -let choice3 = [ - { - type : "armour", - name : "Plate Breastplate" - }, - { - type : "armour", - name : "Plate Bracers" - }, - { - type : "armour", - name : "Plate Helm" - }, - { - type : "armour", - name : "Plate Leggings" - }, -] - -let choice = await new Promise((resolve, reject) => { - new Dialog({ - title : "Choice", - content : - `- Select your choice -
-Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'challenging'; -const target = 10; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/Um6xMMiUftLXJxEt.js b/reference_scripts/Um6xMMiUftLXJxEt.js deleted file mode 100644 index 5365edb..0000000 --- a/reference_scripts/Um6xMMiUftLXJxEt.js +++ /dev/null @@ -1 +0,0 @@ -return ["fel", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/UnqnWi0dZYLf5fTT.js b/reference_scripts/UnqnWi0dZYLf5fTT.js deleted file mode 100644 index e5dd8a6..0000000 --- a/reference_scripts/UnqnWi0dZYLf5fTT.js +++ /dev/null @@ -1,133 +0,0 @@ -let choice1 = [ - { - type : "armour", - name : "Mail Chausses" - }, - { - type : "armour", - name : "Mail Coat" - }, - { - type : "armour", - name : "Mail Coif" - }, -] -let choice2 = [ - { - type : "armour", - name : "Mail Chausses" - }, - { - type : "armour", - name : "Mail Coat" - }, - { - type : "armour", - name : "Mail Coif" - }, - { - type : "armour", - name : "Leather Leggings" - }, - { - type : "armour", - name : "Leather Skullcap" - }, - { - type : "armour", - name : "Leather Jack" - }, -] -let choice3 = [ - { - type : "armour", - name : "Plate Breastplate" - }, - { - type : "armour", - name : "Plate Bracers" - }, - { - type : "armour", - name : "Plate Helm" - }, - { - type : "armour", - name : "Plate Leggings" - }, -] - -let choice = await Dialog.wait({ - title : "Choice", - content : - `- Select your choice -
-Finished replacing ${this.item.name} with a makeshift one.
`; -const test = 'Maintenance Crew Test'; -const difficulty = 'hard'; -const target = 80; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/VKpKq4RSbI1KkUQK.js b/reference_scripts/VKpKq4RSbI1KkUQK.js deleted file mode 100644 index fe2cb4a..0000000 --- a/reference_scripts/VKpKq4RSbI1KkUQK.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.flags.useless[this.effect.getFlag("wfrp4e", "location")] = true; \ No newline at end of file diff --git a/reference_scripts/VLdF2HPnCrNIgp7a.js b/reference_scripts/VLdF2HPnCrNIgp7a.js deleted file mode 100644 index a04183d..0000000 --- a/reference_scripts/VLdF2HPnCrNIgp7a.js +++ /dev/null @@ -1,13 +0,0 @@ -let items = []; - -let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject(); -etiquette.name += " (Followers of Khorne)"; - -items.push(etiquette); - -let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject(); - animosity.system.specification.value = "Followers of Slaanesh"; - -items.push(animosity); - -await this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id}); diff --git a/reference_scripts/VNOKTzCrFbZ6PJUj.js b/reference_scripts/VNOKTzCrFbZ6PJUj.js deleted file mode 100644 index ab82da5..0000000 --- a/reference_scripts/VNOKTzCrFbZ6PJUj.js +++ /dev/null @@ -1 +0,0 @@ -return !["Charm Animal", "Endurance", "Outdoor Survival"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/VQaC6ynouW5EQCbC.js b/reference_scripts/VQaC6ynouW5EQCbC.js deleted file mode 100644 index 011cb84..0000000 --- a/reference_scripts/VQaC6ynouW5EQCbC.js +++ /dev/null @@ -1,13 +0,0 @@ -let roll = await new Roll("1d10").roll(); - -await roll.toMessage(this.script.getChatData()); - -this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})); - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}); -await test.roll(); - -if (test.succeeded) -{ - return false; -} \ No newline at end of file diff --git a/reference_scripts/VTS4RzbmReI87K9a.js b/reference_scripts/VTS4RzbmReI87K9a.js deleted file mode 100644 index 7281d15..0000000 --- a/reference_scripts/VTS4RzbmReI87K9a.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus = Math.floor(this.item.system.total.value * 0.1); \ No newline at end of file diff --git a/reference_scripts/Vb7rgl8T4VRswbnZ.js b/reference_scripts/Vb7rgl8T4VRswbnZ.js deleted file mode 100644 index d728bad..0000000 --- a/reference_scripts/Vb7rgl8T4VRswbnZ.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(parseInt(this.item.system.specification.value) || 0, {source: this.effect, damage : this.item.getFlag("wfrp4e", "APdamage")}) \ No newline at end of file diff --git a/reference_scripts/VbL0TgaBAmYjrezZ.js b/reference_scripts/VbL0TgaBAmYjrezZ.js deleted file mode 100644 index eb99900..0000000 --- a/reference_scripts/VbL0TgaBAmYjrezZ.js +++ /dev/null @@ -1,2 +0,0 @@ -const talents = await Promise.all(["Hardy"].map(game.wfrp4e.utility.findTalent)) -this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Vkuu70BZV4DPYO2Q.js b/reference_scripts/Vkuu70BZV4DPYO2Q.js deleted file mode 100644 index daabdec..0000000 --- a/reference_scripts/Vkuu70BZV4DPYO2Q.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/VlFUDaKUYoBYKYn0.js b/reference_scripts/VlFUDaKUYoBYKYn0.js deleted file mode 100644 index 9c3af2a..0000000 --- a/reference_scripts/VlFUDaKUYoBYKYn0.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: "1 Corruption Point Gained"}}) -await test.roll(); -if (test.failed && this.actor.type == "character") -{ - this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) - this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/reference_scripts/VlHuDIAvPr8JM1P5.js b/reference_scripts/VlHuDIAvPr8JM1P5.js deleted file mode 100644 index 3f2a904..0000000 --- a/reference_scripts/VlHuDIAvPr8JM1P5.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Row"); \ No newline at end of file diff --git a/reference_scripts/Vns6WrafVq8NjX7t.js b/reference_scripts/Vns6WrafVq8NjX7t.js deleted file mode 100644 index 3b16346..0000000 --- a/reference_scripts/Vns6WrafVq8NjX7t.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Heal") \ No newline at end of file diff --git a/reference_scripts/VqTrKPtxv9hpn0Hr.js b/reference_scripts/VqTrKPtxv9hpn0Hr.js deleted file mode 100644 index f63598a..0000000 --- a/reference_scripts/VqTrKPtxv9hpn0Hr.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != "Language (Magick)" \ No newline at end of file diff --git a/reference_scripts/VuE1mhrB6X6MYTzg.js b/reference_scripts/VuE1mhrB6X6MYTzg.js deleted file mode 100644 index eb176b0..0000000 --- a/reference_scripts/VuE1mhrB6X6MYTzg.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic == "fel" \ No newline at end of file diff --git a/reference_scripts/VurA2XNqC0d9U49C.js b/reference_scripts/VurA2XNqC0d9U49C.js deleted file mode 100644 index 9853d7f..0000000 --- a/reference_scripts/VurA2XNqC0d9U49C.js +++ /dev/null @@ -1,8 +0,0 @@ -this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => -{ - await test.roll() - if (test.failed) - { - this.actor.addCondition("fatigued") - } -}) \ No newline at end of file diff --git a/reference_scripts/VzO0ZDcTWvaBn4vm.js b/reference_scripts/VzO0ZDcTWvaBn4vm.js deleted file mode 100644 index ab2caf1..0000000 --- a/reference_scripts/VzO0ZDcTWvaBn4vm.js +++ /dev/null @@ -1,13 +0,0 @@ -if (args.test.preData.skillName?.includes(game.i18n.localize("NAME.Language")) || args.test instanceof CastTest) -{ - if (parseInt(args.test.result.SL) > 0 || args.test.succeeded) - { - if (parseInt(args.test.result.SL) > 0) - { - args.test.result.SL = "-0"; - args.test.result.description = game.i18n.localize("ROLL.MarginalFailure"); - } - args.test.result.outcome = "failure" - args.test.result.other.push(`${this.effect.name}: Maximum -0 SL`) - } -} \ No newline at end of file diff --git a/reference_scripts/VzgTGb5QXKoyPNh3.js b/reference_scripts/VzgTGb5QXKoyPNh3.js deleted file mode 100644 index 0d934ee..0000000 --- a/reference_scripts/VzgTGb5QXKoyPNh3.js +++ /dev/null @@ -1,14 +0,0 @@ -if (args.attackerTest.weapon && args.defenderTest.weapon) -{ - let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value] - let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value] - - if (attackerReach == defenderReach) - defenderReach = defenderReach < 7 ? defenderReach + 1 : defenderReach - - attackerReach = game.wfrp4e.utility.findKey(attackerReach, game.wfrp4e.config.reachNum) - defenderReach = game.wfrp4e.utility.findKey(defenderReach, game.wfrp4e.config.reachNum) - - args.attackerTest.weapon.reach.value = attackerReach - args.defenderTest.weapon.reach.value = defenderReach -} \ No newline at end of file diff --git a/reference_scripts/W9nyUNQStMr1pUHJ.js b/reference_scripts/W9nyUNQStMr1pUHJ.js deleted file mode 100644 index 8a0c850..0000000 --- a/reference_scripts/W9nyUNQStMr1pUHJ.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key) -{ - args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Added Bleeding") -} \ No newline at end of file diff --git a/reference_scripts/WB6sIpLEPC8YPX67.js b/reference_scripts/WB6sIpLEPC8YPX67.js deleted file mode 100644 index 48584b2..0000000 --- a/reference_scripts/WB6sIpLEPC8YPX67.js +++ /dev/null @@ -1,6 +0,0 @@ -if (args.options.dodge) -{ - args.abort = true; - this.script.scriptNotification("Cannot Dodge!") -} -return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/WJkwIrdj4NceOYe8.js b/reference_scripts/WJkwIrdj4NceOYe8.js deleted file mode 100644 index 47fd0a7..0000000 --- a/reference_scripts/WJkwIrdj4NceOYe8.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic !== 'fel'; \ No newline at end of file diff --git a/reference_scripts/WKXyVHQwQCNTfSKv.js b/reference_scripts/WKXyVHQwQCNTfSKv.js deleted file mode 100644 index 6ef2a63..0000000 --- a/reference_scripts/WKXyVHQwQCNTfSKv.js +++ /dev/null @@ -1,4 +0,0 @@ -if ((args.item.type == "weapon" || args.item.system.attackType) && !args.item.isMagical ) -{ - args.item.system.qualities.value.push({name : "magical"}) -} \ No newline at end of file diff --git a/reference_scripts/WO5n7Vbx8AgoVrwC.js b/reference_scripts/WO5n7Vbx8AgoVrwC.js deleted file mode 100644 index 18d9585..0000000 --- a/reference_scripts/WO5n7Vbx8AgoVrwC.js +++ /dev/null @@ -1,84 +0,0 @@ - let characteristics = { - "ws" : 0, - "bs" : 0, - "s" : 0, - "t" : 0, - "i" : 10, - "ag" : 0, - "dex" : 0, - "int" : 10, - "wp" : 5, - "fel" : 5 - } - let skills = ["Intuition", "Lore (Local)", "Perception"] - let skillAdvancements = [10, 10, 10] - let talents = [] - let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Hand Weapon"] - let items = [] - - let updateObj = this.actor.toObject(); - - for (let ch in characteristics) - { - updateObj.system.characteristics[ch].modifier += characteristics[ch]; - } - - for (let index = 0; index < skills.length; index++) - { - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } - } - - for (let talent of talents) - { - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } - } - - for (let trapping of trappings) - { - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } - } - - - await this.actor.update(updateObj) - this.actor.createEmbeddedDocuments("Item", items); - - function equip(item) - { - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true - } \ No newline at end of file diff --git a/reference_scripts/WPQbVpD1uwSLAXq1.js b/reference_scripts/WPQbVpD1uwSLAXq1.js deleted file mode 100644 index 3a7653d..0000000 --- a/reference_scripts/WPQbVpD1uwSLAXq1.js +++ /dev/null @@ -1,4 +0,0 @@ -if (this.actor.system.status.wounds.value == 0) -{ - this.actor.addCondition("dead"); -} \ No newline at end of file diff --git a/reference_scripts/WR0Kqn8CF5iwToak.js b/reference_scripts/WR0Kqn8CF5iwToak.js deleted file mode 100644 index 60fd32e..0000000 --- a/reference_scripts/WR0Kqn8CF5iwToak.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Tailor)'; -const difficulty = 'difficult'; -const target = 40; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/WRe1eGmGVGejPcS8.js b/reference_scripts/WRe1eGmGVGejPcS8.js deleted file mode 100644 index d47ed86..0000000 --- a/reference_scripts/WRe1eGmGVGejPcS8.js +++ /dev/null @@ -1,2 +0,0 @@ -let wind = this.effect.name.split(" ")[2] -return args.type == "cast" && game.wfrp4e.config.magicWind[args.item.system.lore.value] == wind; \ No newline at end of file diff --git a/reference_scripts/WTRYAEzwxRuGENyI.js b/reference_scripts/WTRYAEzwxRuGENyI.js deleted file mode 100644 index 6614176..0000000 --- a/reference_scripts/WTRYAEzwxRuGENyI.js +++ /dev/null @@ -1,18 +0,0 @@ - // Every living creature within 10 yards, other than the wielder of the hammer, - // must make a Challenging (+0) Endurance Test - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { - skipTargets: true, appendTitle : " - " + this.effect.name, - fields: {difficulty: "challenging"} - }) - - await test.roll(); - if (test.failed) - { - // or gain a Deafened Condition - this.actor.addCondition("deafened"); - // and suffer 1d10 Wounds which bypass armour but not Toughness Bonus. - let damage = (await new Roll("1d10").roll()); - await damage.toMessage(this.script.getChatData()); - this.script.scriptMessage(await this.actor.applyBasicDamage(damage.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) - } \ No newline at end of file diff --git a/reference_scripts/WY3DajPRGcMNt158.js b/reference_scripts/WY3DajPRGcMNt158.js deleted file mode 100644 index 37fa26b..0000000 --- a/reference_scripts/WY3DajPRGcMNt158.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF") -this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/WeTlTniskT3Ej6vg.js b/reference_scripts/WeTlTniskT3Ej6vg.js deleted file mode 100644 index 5ae3d41..0000000 --- a/reference_scripts/WeTlTniskT3Ej6vg.js +++ /dev/null @@ -1 +0,0 @@ -args.modifiers.other.push({label : this.effect.name, value : 2}) \ No newline at end of file diff --git a/reference_scripts/WiYtNU2Y5BJfIpeM.js b/reference_scripts/WiYtNU2Y5BJfIpeM.js deleted file mode 100644 index 837c65a..0000000 --- a/reference_scripts/WiYtNU2Y5BJfIpeM.js +++ /dev/null @@ -1,15 +0,0 @@ -let location = this.item.system.location.key; - -if (location) -{ - let dropped = this.item.system.weaponsAtLocation; - - if (dropped.length) - { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) - for(let weapon of dropped) - { - await weapon.system.toggleEquip(); - } - } -} \ No newline at end of file diff --git a/reference_scripts/WnWA0e0bgqBsZp2L.js b/reference_scripts/WnWA0e0bgqBsZp2L.js deleted file mode 100644 index 3231f2e..0000000 --- a/reference_scripts/WnWA0e0bgqBsZp2L.js +++ /dev/null @@ -1 +0,0 @@ -this.item.update({"system.twohanded.value" : !this.item.system.twohanded.value}) \ No newline at end of file diff --git a/reference_scripts/Wo4wQKUxSItAhRzZ.js b/reference_scripts/Wo4wQKUxSItAhRzZ.js deleted file mode 100644 index 0923471..0000000 --- a/reference_scripts/Wo4wQKUxSItAhRzZ.js +++ /dev/null @@ -1,8 +0,0 @@ -let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); - -// If channelling corresponding lore -if (args.type == "channelling" && args.spell.system.lore.value == lore) - args.prefillModifiers.slBonus += 3 -// If channelling or casting different lore -else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") - args.prefillModifiers.slBonus -= 1 \ No newline at end of file diff --git a/reference_scripts/WwxXgsNxlccmqTze.js b/reference_scripts/WwxXgsNxlccmqTze.js deleted file mode 100644 index c381b33..0000000 --- a/reference_scripts/WwxXgsNxlccmqTze.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("dead") \ No newline at end of file diff --git a/reference_scripts/WzMmwjZbhyCbHxyZ.js b/reference_scripts/WzMmwjZbhyCbHxyZ.js deleted file mode 100644 index 9642316..0000000 --- a/reference_scripts/WzMmwjZbhyCbHxyZ.js +++ /dev/null @@ -1,2 +0,0 @@ -this.actor.status.encumbrance.state += 2 -this.actor.status.encumbrance.pct = 100; \ No newline at end of file diff --git a/reference_scripts/X08401eOhKJrhNf1.js b/reference_scripts/X08401eOhKJrhNf1.js deleted file mode 100644 index cb65e67..0000000 --- a/reference_scripts/X08401eOhKJrhNf1.js +++ /dev/null @@ -1,9 +0,0 @@ -const grim = this.actor.items.find(i => i.type === "trait" && i.name.includes("Grim")); - -if (args.options?.deltaAdv > 0 && this.actor.hasCondition("engaged") && grim.specification.value !== 4) { - grim.update({"system.specification.value": 4}); -} - -if (!this.actor.hasCondition("engaged") && grim.specification.value !== 2) { - grim.update({"system.specification.value": 2}); -} \ No newline at end of file diff --git a/reference_scripts/X3bLbOfcJAftOMa7.js b/reference_scripts/X3bLbOfcJAftOMa7.js deleted file mode 100644 index 18e79ab..0000000 --- a/reference_scripts/X3bLbOfcJAftOMa7.js +++ /dev/null @@ -1 +0,0 @@ -return ["ws", "bs", "ag"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/X3vpmNUj9SL2CDnF.js b/reference_scripts/X3vpmNUj9SL2CDnF.js deleted file mode 100644 index 329c5ee..0000000 --- a/reference_scripts/X3vpmNUj9SL2CDnF.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = args.actor.items.find(i => i.name.includes("Flying Jib")); -item.name += ` (Disabled by ${this.item.name})`; \ No newline at end of file diff --git a/reference_scripts/X7ikFOGKYzTMr4d1.js b/reference_scripts/X7ikFOGKYzTMr4d1.js deleted file mode 100644 index 729311c..0000000 --- a/reference_scripts/X7ikFOGKYzTMr4d1.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.difficulty = "difficult" \ No newline at end of file diff --git a/reference_scripts/XCAfy460IotarQek.js b/reference_scripts/XCAfy460IotarQek.js deleted file mode 100644 index 92b4e92..0000000 --- a/reference_scripts/XCAfy460IotarQek.js +++ /dev/null @@ -1 +0,0 @@ -return false; \ No newline at end of file diff --git a/reference_scripts/XClTZOjuhcxWLF51.js b/reference_scripts/XClTZOjuhcxWLF51.js deleted file mode 100644 index 9765515..0000000 --- a/reference_scripts/XClTZOjuhcxWLF51.js +++ /dev/null @@ -1,13 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "difficult"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -if (test.failed) -{ - this.actor.addCondition("stunned") -} - - -let item = await fromUuid("Compendium.wfrp4e-core.items.4lj1ik958mbgAlaF") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/XO9m2AvFRAAeEuty.js b/reference_scripts/XO9m2AvFRAAeEuty.js deleted file mode 100644 index 67412d0..0000000 --- a/reference_scripts/XO9m2AvFRAAeEuty.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.test.options.fieldDressing && args.test.result.reversed) -{ - args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL)) - args.test.result.other.push(`${this.effect.name}: SL limited to 1`) -} \ No newline at end of file diff --git a/reference_scripts/XPxAKqPpPYE4E6B5.js b/reference_scripts/XPxAKqPpPYE4E6B5.js deleted file mode 100644 index e8a65fe..0000000 --- a/reference_scripts/XPxAKqPpPYE4E6B5.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier -= 10 * this.effect.conditionValue \ No newline at end of file diff --git a/reference_scripts/XRrGBbplNLZpXnCH.js b/reference_scripts/XRrGBbplNLZpXnCH.js deleted file mode 100644 index 4e877c0..0000000 --- a/reference_scripts/XRrGBbplNLZpXnCH.js +++ /dev/null @@ -1,53 +0,0 @@ -let item; -let items = [] -item = await fromUuid("Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv") -{ - let data = item.toObject(); - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj") -{ - let data = item.toObject(); - data.system.specification.value = 2 - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj") -{ - let data = item.toObject(); - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.a8MC97PLzl10WocT") -{ - let data = item.toObject(); - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") -{ - let data = item.toObject(); - data.system.specification.value = 1; - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") -{ - let data = item.toObject(); - data.system.specification.value = 1; - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp") -{ - let data = item.toObject(); - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.mDgEMOoJpi8DkRYb") -{ - let data = item.toObject(); - items.push(data) -} -item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") -{ - let data = item.toObject(); - data.system.specification.value = 2; - items.push(data) -} - -this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id}) diff --git a/reference_scripts/XXnzUdsIYQ9Wjyu0.js b/reference_scripts/XXnzUdsIYQ9Wjyu0.js deleted file mode 100644 index 04f2e20..0000000 --- a/reference_scripts/XXnzUdsIYQ9Wjyu0.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system.attackType != "ranged" || args.flags.howlingWarpGale || this.actor.sameSideAs(this.effect.sourceActor) \ No newline at end of file diff --git a/reference_scripts/XYaYeiVkc5GKYTjC.js b/reference_scripts/XYaYeiVkc5GKYTjC.js deleted file mode 100644 index 8fe5ef9..0000000 --- a/reference_scripts/XYaYeiVkc5GKYTjC.js +++ /dev/null @@ -1 +0,0 @@ -return args.spell?.system.lore.value != "fire" \ No newline at end of file diff --git a/reference_scripts/XcvDYNZgJ2rpAdDV.js b/reference_scripts/XcvDYNZgJ2rpAdDV.js deleted file mode 100644 index ba3519f..0000000 --- a/reference_scripts/XcvDYNZgJ2rpAdDV.js +++ /dev/null @@ -1,7 +0,0 @@ - - let fatigued = this.actor.hasCondition("fatigued") - if (!fatigued) - { - this.actor.addCondition("fatigued") - ui.notifications.notify("Fatigued added to " + this.actor.name + " which cannot be removed until the Malaise symptom is gone.") - } \ No newline at end of file diff --git a/reference_scripts/Xe8ijqWU3bbtq7ZY.js b/reference_scripts/Xe8ijqWU3bbtq7ZY.js deleted file mode 100644 index f232698..0000000 --- a/reference_scripts/Xe8ijqWU3bbtq7ZY.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.defenderTest.actor.Species.toLowerCase().includes("skaven")) -{ - args.addImpact = true; - args.opposedTest.result.other.push("Impact against Skaven") -} \ No newline at end of file diff --git a/reference_scripts/Xf4FcZ4ZLdWmOXBa.js b/reference_scripts/Xf4FcZ4ZLdWmOXBa.js deleted file mode 100644 index 9aec486..0000000 --- a/reference_scripts/Xf4FcZ4ZLdWmOXBa.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Perception") && !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/XfRvVBTVIuAm8RaZ.js b/reference_scripts/XfRvVBTVIuAm8RaZ.js deleted file mode 100644 index d338357..0000000 --- a/reference_scripts/XfRvVBTVIuAm8RaZ.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != game.i18n.localize("NAME.CharmAnimal") \ No newline at end of file diff --git a/reference_scripts/Xg4qHLsyXGuUZfT8.js b/reference_scripts/Xg4qHLsyXGuUZfT8.js deleted file mode 100644 index e83b38b..0000000 --- a/reference_scripts/Xg4qHLsyXGuUZfT8.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.hasCondition("ablaze")?.delete(); \ No newline at end of file diff --git a/reference_scripts/Xk9XPklxxTvFlwpI.js b/reference_scripts/Xk9XPklxxTvFlwpI.js deleted file mode 100644 index 2c3a1c6..0000000 --- a/reference_scripts/Xk9XPklxxTvFlwpI.js +++ /dev/null @@ -1 +0,0 @@ -args.options.useOnesArgumentative = true; \ No newline at end of file diff --git a/reference_scripts/XthZ3GCC3WhsEI2g.js b/reference_scripts/XthZ3GCC3WhsEI2g.js deleted file mode 100644 index af499f4..0000000 --- a/reference_scripts/XthZ3GCC3WhsEI2g.js +++ /dev/null @@ -1,11 +0,0 @@ -args.update({light : { - "dim": 10, - "bright": 5, - "alpha": 0.5, - "animation": { - "speed": 4, - "intensity": 4, - "type": "flame", - }, - "color": "#ac9e6c", -}}); \ No newline at end of file diff --git a/reference_scripts/Xu5cED1MhT4ba7da.js b/reference_scripts/Xu5cED1MhT4ba7da.js deleted file mode 100644 index a33a76d..0000000 --- a/reference_scripts/Xu5cED1MhT4ba7da.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier += 10 diff --git a/reference_scripts/XuFxKPYheYF4WMmQ.js b/reference_scripts/XuFxKPYheYF4WMmQ.js deleted file mode 100644 index ed63e68..0000000 --- a/reference_scripts/XuFxKPYheYF4WMmQ.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Cool"); \ No newline at end of file diff --git a/reference_scripts/Y6ppJBerpM3TtSic.js b/reference_scripts/Y6ppJBerpM3TtSic.js deleted file mode 100644 index 807715e..0000000 --- a/reference_scripts/Y6ppJBerpM3TtSic.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.g4Q6AtzZuo5iIvD4"); -this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/Y7McxsHFeGhwQx0J.js b/reference_scripts/Y7McxsHFeGhwQx0J.js deleted file mode 100644 index f2deebb..0000000 --- a/reference_scripts/Y7McxsHFeGhwQx0J.js +++ /dev/null @@ -1,11 +0,0 @@ -this.actor.createEmbeddedDocuments("Item", [expandObject({ - name : "Ghostly Flame", - type : "weapon", - img : this.effect.img, - system : { - "weaponGroup.value" : "throwing", - "damage.value" : "SB + WPB", - "qualities.value" : [{name : "magical"}], - "equipped" : true - } -})], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Y8J66v8VTKUASGuK.js b/reference_scripts/Y8J66v8VTKUASGuK.js deleted file mode 100644 index 956a94a..0000000 --- a/reference_scripts/Y8J66v8VTKUASGuK.js +++ /dev/null @@ -1,16 +0,0 @@ -if (!this.actor.effects.find(e => e.isCondition)) -{ - return this.script.scriptNotification("No Conditions on this Actor") -} - -let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choose a Condition") - -if (choice[0]) -{ - await this.actor.removeCondition(choice[0].conditionId) -} - -if (this.actor.effects.find(e => e.isCondition)) -{ - return false; // Delete the effect if there are still conditions, otherwise, effect remains and provides the bonus -} \ No newline at end of file diff --git a/reference_scripts/YDqpKJVy8ijEKdLX.js b/reference_scripts/YDqpKJVy8ijEKdLX.js deleted file mode 100644 index 3cc93cf..0000000 --- a/reference_scripts/YDqpKJVy8ijEKdLX.js +++ /dev/null @@ -1 +0,0 @@ -return !(this.actor.attacker && (args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"))) \ No newline at end of file diff --git a/reference_scripts/YEBw2CzHYxsTpTy5.js b/reference_scripts/YEBw2CzHYxsTpTy5.js deleted file mode 100644 index 8b438ad..0000000 --- a/reference_scripts/YEBw2CzHYxsTpTy5.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/reference_scripts/YFSgWRXel0bWE3EE.js b/reference_scripts/YFSgWRXel0bWE3EE.js deleted file mode 100644 index 459f8b2..0000000 --- a/reference_scripts/YFSgWRXel0bWE3EE.js +++ /dev/null @@ -1 +0,0 @@ -return ["ag", "ws", "bs"].includes(args.characteristic) || args.skill?.name == game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/reference_scripts/YHEIkBKWXKNPqglh.js b/reference_scripts/YHEIkBKWXKNPqglh.js deleted file mode 100644 index ee2ebfb..0000000 --- a/reference_scripts/YHEIkBKWXKNPqglh.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.result.castOutcome == "success") -{ - game.wfrp4e.utility.postCorruptionTest("moderate", this.script.getChatData()) -} diff --git a/reference_scripts/YMaxpXnml01bLGpO.js b/reference_scripts/YMaxpXnml01bLGpO.js deleted file mode 100644 index e1e5841..0000000 --- a/reference_scripts/YMaxpXnml01bLGpO.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/reference_scripts/YOKoZFlBEpFavfOS.js b/reference_scripts/YOKoZFlBEpFavfOS.js deleted file mode 100644 index b690956..0000000 --- a/reference_scripts/YOKoZFlBEpFavfOS.js +++ /dev/null @@ -1 +0,0 @@ -return args.type == "channelling" \ No newline at end of file diff --git a/reference_scripts/YQ2LnLxp0xgy3meI.js b/reference_scripts/YQ2LnLxp0xgy3meI.js deleted file mode 100644 index 8fe36d5..0000000 --- a/reference_scripts/YQ2LnLxp0xgy3meI.js +++ /dev/null @@ -1,3 +0,0 @@ -if (args.test.preData.options?.corruption && args.test.failed) { - args.test?.result?.other.push("Gain additional +1 Corruption from " + this.effect.name) -} \ No newline at end of file diff --git a/reference_scripts/YRUTliBzAQvncGNX.js b/reference_scripts/YRUTliBzAQvncGNX.js deleted file mode 100644 index c29c046..0000000 --- a/reference_scripts/YRUTliBzAQvncGNX.js +++ /dev/null @@ -1,2 +0,0 @@ -this.actor.addCondition("fatigued"); -this.script.scriptNotification("Added Fatigued") \ No newline at end of file diff --git a/reference_scripts/YaKnYEbmmZZtByJc.js b/reference_scripts/YaKnYEbmmZZtByJc.js deleted file mode 100644 index 65dd7e3..0000000 --- a/reference_scripts/YaKnYEbmmZZtByJc.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.attackerTest.options.ballockKnife) -{ - args.weaponProperties.impale = true; - args.extraMessages.push(`${this.item.name}: Impale Added`) -} \ No newline at end of file diff --git a/reference_scripts/Yf2MmOzazzMdmoPU.js b/reference_scripts/Yf2MmOzazzMdmoPU.js deleted file mode 100644 index 19b3449..0000000 --- a/reference_scripts/Yf2MmOzazzMdmoPU.js +++ /dev/null @@ -1,12 +0,0 @@ -let armour = await fromUuid("Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj") -let armourData = armour.toObject() -armourData.system.specification.value = 1 - -let fury = await fromUuid("Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp"); -let furyData = fury.toObject(); - -let horns = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") -let hornsData = horns.toObject() -hornsData.system.specification.value = 6 - -this.actor.createEmbeddedDocuments("Item", [armourData, furyData, hornsData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/YhhiWEQbox3WZA3Q.js b/reference_scripts/YhhiWEQbox3WZA3Q.js deleted file mode 100644 index 4b25255..0000000 --- a/reference_scripts/YhhiWEQbox3WZA3Q.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Heal") && game.combat?.active \ No newline at end of file diff --git a/reference_scripts/YjAIsFlxKTJvYs60.js b/reference_scripts/YjAIsFlxKTJvYs60.js deleted file mode 100644 index aae8c55..0000000 --- a/reference_scripts/YjAIsFlxKTJvYs60.js +++ /dev/null @@ -1 +0,0 @@ -this.item.system.reduceQuantity(); \ No newline at end of file diff --git a/reference_scripts/YjJcRdytVRm88qLn.js b/reference_scripts/YjJcRdytVRm88qLn.js deleted file mode 100644 index e34b448..0000000 --- a/reference_scripts/YjJcRdytVRm88qLn.js +++ /dev/null @@ -1 +0,0 @@ -args.options.additionalDamage = 1 \ No newline at end of file diff --git a/reference_scripts/YsS2RZsl2ZsqjhWV.js b/reference_scripts/YsS2RZsl2ZsqjhWV.js deleted file mode 100644 index 247e5e0..0000000 --- a/reference_scripts/YsS2RZsl2ZsqjhWV.js +++ /dev/null @@ -1 +0,0 @@ -return !args.fields.charging \ No newline at end of file diff --git a/reference_scripts/YwLEw4BiKq4EMy57.js b/reference_scripts/YwLEw4BiKq4EMy57.js deleted file mode 100644 index 277a43a..0000000 --- a/reference_scripts/YwLEw4BiKq4EMy57.js +++ /dev/null @@ -1,19 +0,0 @@ -let i_gain = (await new Roll("2d10").roll()).total -let fel_gain = 0 -if (args.actor.characteristics.fel.value <= 0) -{ - fel_gain += (await new Roll("2d10").roll()).total -} - -let msg = `${this.actor.prototypeToken.name} gains ${i_gain} Intelligence` - -if (fel_gain) - msg += ` and ${fel_gain} Fellowship` - - -let newInt = i_gain + args.actor.characteristics.int.modifier -let newFel = fel_gain + args.actor.characteristics.fel.modifier - -args.actor.update({"system.characteristics.int.modifier" : newInt, "system.characteristics.fel.modifier" : newFel}) - -this.script.scriptMessage(msg) \ No newline at end of file diff --git a/reference_scripts/YyKU2rIRmFSCqSlW.js b/reference_scripts/YyKU2rIRmFSCqSlW.js deleted file mode 100644 index dc0a984..0000000 --- a/reference_scripts/YyKU2rIRmFSCqSlW.js +++ /dev/null @@ -1,6 +0,0 @@ -let newEffect = this.effect.sourceItem.effects?.contents[1] - -if (newEffect) -{ - this.actor.createEmbeddedDocuments("ActiveEffect", [newEffect.convertToApplied()]); -} \ No newline at end of file diff --git a/reference_scripts/YySjPfSAPdMAfjsh.js b/reference_scripts/YySjPfSAPdMAfjsh.js deleted file mode 100644 index f6d648c..0000000 --- a/reference_scripts/YySjPfSAPdMAfjsh.js +++ /dev/null @@ -1,11 +0,0 @@ -let talents = ["Berserk Charge", "Combat Aware", "Combat Reflexes", "Furious Assault", "Implacable", "Magic Resistance", "Resistance (Magic)", "Resolute", "Strike Mighty Blow", "Warrior Born"]; -let currentCareer = this.actor.system.currentCareer; - -if (!currentCareer) return; - -for (let talent of talents) { - if (currentCareer.system.talents.includes(talent)) - continue; - currentCareer.system.talents.push(talent); -} - diff --git a/reference_scripts/Z1zriXibT0mAmdhb.js b/reference_scripts/Z1zriXibT0mAmdhb.js deleted file mode 100644 index a583e99..0000000 --- a/reference_scripts/Z1zriXibT0mAmdhb.js +++ /dev/null @@ -1,6 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") -item = item.toObject() -item.name = this.effect.name -item.system.specification.value = this.actor.characteristics.s.bonus -item.system.description.value = "" -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Z30zYayPryXOjT5N.js b/reference_scripts/Z30zYayPryXOjT5N.js deleted file mode 100644 index 4cb014e..0000000 --- a/reference_scripts/Z30zYayPryXOjT5N.js +++ /dev/null @@ -1 +0,0 @@ -args.item.system.damage.value = "SB + 6"; \ No newline at end of file diff --git a/reference_scripts/Z41L3MwOpJdAjVaj.js b/reference_scripts/Z41L3MwOpJdAjVaj.js deleted file mode 100644 index e772071..0000000 --- a/reference_scripts/Z41L3MwOpJdAjVaj.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.actorsystem.details.move.sail.value > 0) - args.actor.system.details.move.sail.value -= 2; diff --git a/reference_scripts/Z4WrrlVGpPY4iUbG.js b/reference_scripts/Z4WrrlVGpPY4iUbG.js deleted file mode 100644 index fcc4289..0000000 --- a/reference_scripts/Z4WrrlVGpPY4iUbG.js +++ /dev/null @@ -1 +0,0 @@ -await this.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/Z52yZDm6lP6fOP3O.js b/reference_scripts/Z52yZDm6lP6fOP3O.js deleted file mode 100644 index 07e9c66..0000000 --- a/reference_scripts/Z52yZDm6lP6fOP3O.js +++ /dev/null @@ -1,6 +0,0 @@ -let ablaze = this.actor.hasCondition("ablaze") -if (ablaze) -{ - this.script.scriptNotification("Immune to Ablaze"); - ablaze.delete() -} \ No newline at end of file diff --git a/reference_scripts/Z6OmmC0irJzxSnMH.js b/reference_scripts/Z6OmmC0irJzxSnMH.js deleted file mode 100644 index 83bc8f3..0000000 --- a/reference_scripts/Z6OmmC0irJzxSnMH.js +++ /dev/null @@ -1,59 +0,0 @@ -let chatData = { whisper: ChatMessage.getWhisperRecipients("GM") } -let message = "" - -let wounds = duplicate(this.actor.status.wounds) -let regenRoll = await new Roll("1d10").roll(); -let regen = regenRoll.total; - -if (wounds.value >= wounds.max) - return - -if (wounds.value > 0) -{ - wounds.value += regen - if (wounds.value > wounds.max) - { - wounds.value = wounds.max - } - message += `${this.actor.name} regains ${regen} Wounds.` - - if (regen == 10) - { - message += `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpentry)'; -const difficulty = 'easy'; -const target = 10; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/ZCkYe5XMVY1RWMXG.js b/reference_scripts/ZCkYe5XMVY1RWMXG.js deleted file mode 100644 index 34cd3e9..0000000 --- a/reference_scripts/ZCkYe5XMVY1RWMXG.js +++ /dev/null @@ -1 +0,0 @@ -args.options.wallcrawler = true; \ No newline at end of file diff --git a/reference_scripts/ZCrfdLPOxiNDCDSg.js b/reference_scripts/ZCrfdLPOxiNDCDSg.js deleted file mode 100644 index dfcbf82..0000000 --- a/reference_scripts/ZCrfdLPOxiNDCDSg.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.effects.get(this.effect.id).delete(); // can't use this.effect because it thinks it's parent is the item, but it actually is the actor \ No newline at end of file diff --git a/reference_scripts/ZCuOjLAeENKN1Q4L.js b/reference_scripts/ZCuOjLAeENKN1Q4L.js deleted file mode 100644 index 88928db..0000000 --- a/reference_scripts/ZCuOjLAeENKN1Q4L.js +++ /dev/null @@ -1,15 +0,0 @@ -let halve; -if (args.opposedTest.attackerTest.item?.type != "spell") -{ - halve = await Dialog.confirm({title : this.effect.name, content : "Halve Damage? (Halves Damage from all fire)"}) -} -else -{ - halve = args.opposedTest.attackerTest.item?.system.lore?.value == "fire"; -} - -if (halve) -{ - args.totalWoundLoss /= 2; - args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"}) -} \ No newline at end of file diff --git a/reference_scripts/ZEXhYJqqxF6QAixX.js b/reference_scripts/ZEXhYJqqxF6QAixX.js deleted file mode 100644 index 9070cbc..0000000 --- a/reference_scripts/ZEXhYJqqxF6QAixX.js +++ /dev/null @@ -1 +0,0 @@ -return args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear"); \ No newline at end of file diff --git a/reference_scripts/ZEdDcBka21rnMuz5.js b/reference_scripts/ZEdDcBka21rnMuz5.js deleted file mode 100644 index 0b33c5e..0000000 --- a/reference_scripts/ZEdDcBka21rnMuz5.js +++ /dev/null @@ -1,19 +0,0 @@ -let initiativeSetting = game.settings.get("wfrp4e", "initiativeRule") - -switch (initiativeSetting) { - case "default": - args.initiative += "+10" - break; - - case "sl": - args.initiative += "+1" - break; - - case "d10Init": - args.initiative += "+10" - break; - - case "d10InitAgi": - args.initiative += "+1" - break; -} \ No newline at end of file diff --git a/reference_scripts/ZGlJnrIemqul24j7.js b/reference_scripts/ZGlJnrIemqul24j7.js deleted file mode 100644 index 4054270..0000000 --- a/reference_scripts/ZGlJnrIemqul24j7.js +++ /dev/null @@ -1,8 +0,0 @@ -let infected = await fromUuid("Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW") -let bite = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") -let biteData = bite.toObject(); -let infectedData = infected.toObject(); - -biteData.system.specification.value = 4 - this.actor.characteristics.s.bonus - -this.actor.createEmbeddedDocuments("Item", [biteData, infectedData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ZI2YnAAGoLpmVDIL.js b/reference_scripts/ZI2YnAAGoLpmVDIL.js deleted file mode 100644 index 9f19b3e..0000000 --- a/reference_scripts/ZI2YnAAGoLpmVDIL.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0") -let data = item.toObject(); -data.system.specification.value = "Religion" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ZJy2rvpKmUHXGrAi.js b/reference_scripts/ZJy2rvpKmUHXGrAi.js deleted file mode 100644 index c8deacc..0000000 --- a/reference_scripts/ZJy2rvpKmUHXGrAi.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.details.move.run *= 1.5 \ No newline at end of file diff --git a/reference_scripts/ZLspFT2I3ZdWWr2H.js b/reference_scripts/ZLspFT2I3ZdWWr2H.js deleted file mode 100644 index a3fa949..0000000 --- a/reference_scripts/ZLspFT2I3ZdWWr2H.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Leadership"); \ No newline at end of file diff --git a/reference_scripts/ZMwJad6v4G13SgjR.js b/reference_scripts/ZMwJad6v4G13SgjR.js deleted file mode 100644 index 09abcb6..0000000 --- a/reference_scripts/ZMwJad6v4G13SgjR.js +++ /dev/null @@ -1 +0,0 @@ -return args.type == "cast" || args.type == "channelling" \ No newline at end of file diff --git a/reference_scripts/ZNW3ubbKIYXAyE48.js b/reference_scripts/ZNW3ubbKIYXAyE48.js deleted file mode 100644 index 8669753..0000000 --- a/reference_scripts/ZNW3ubbKIYXAyE48.js +++ /dev/null @@ -1,29 +0,0 @@ -let wounds = this.actor.itemTypes.disease.filter(i => i.name == "Festering Wound" && i.system.duration.active); -let selected; -if (wounds.length == 0) -{ - return this.script.scriptNotification("No Festering Wounds!"); -} -else if (wounds.length == 1) -{ - selected = wounds[0]; -} -else if (wounds.length >= 2) -{ - selected = (await ItemDialog.create(wounds, 1))[0]; -} - -if (selected) -{ - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}}) - await test.roll(); - if (test.succeeded) - { - let SL = parseInt(test.result.SL); - if (SL >= 0) - { - selected.update({"system.duration.value" : selected.system.duration.value - SL}) - this.script.scriptMessage(`${selected.name} duration reduced by ${SL}!`) - } - } -} \ No newline at end of file diff --git a/reference_scripts/ZNu4B0OdjkM9lmtu.js b/reference_scripts/ZNu4B0OdjkM9lmtu.js deleted file mode 100644 index 2177c29..0000000 --- a/reference_scripts/ZNu4B0OdjkM9lmtu.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") -let data = item.toObject(); -data.name = data.name += " (Vision)" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ZOgtDW3mkTfeyc5M.js b/reference_scripts/ZOgtDW3mkTfeyc5M.js deleted file mode 100644 index 5e590a8..0000000 --- a/reference_scripts/ZOgtDW3mkTfeyc5M.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.1; \ No newline at end of file diff --git a/reference_scripts/ZRoG7GiMDQWso6gN.js b/reference_scripts/ZRoG7GiMDQWso6gN.js deleted file mode 100644 index 3dbc1f6..0000000 --- a/reference_scripts/ZRoG7GiMDQWso6gN.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpentry)'; -const difficulty = 'difficult'; -const target = 30; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/ZTE8LdRblyG4yYoE.js b/reference_scripts/ZTE8LdRblyG4yYoE.js deleted file mode 100644 index 16fcab5..0000000 --- a/reference_scripts/ZTE8LdRblyG4yYoE.js +++ /dev/null @@ -1,8 +0,0 @@ -if (args.test.result.castOutcome == "success") -{ - // Wait till after chat card is posted - game.wfrp4e.utility.sleep(500).then(() => { - game.wfrp4e.utility.postTerror(1, this.effect.name) - game.wfrp4e.utility.postTerror(2, this.effect.name) - }) -} \ No newline at end of file diff --git a/reference_scripts/ZYsMgB4BwXBJcpYf.js b/reference_scripts/ZYsMgB4BwXBJcpYf.js deleted file mode 100644 index e935d19..0000000 --- a/reference_scripts/ZYsMgB4BwXBJcpYf.js +++ /dev/null @@ -1,3 +0,0 @@ -// The wearer of the cloak causes Fear 2 -// in Wolves, Lions, Goats, and Chimeras. -game.wfrp4e.utility.postFear(2, this.effect.name) diff --git a/reference_scripts/ZbuW8y7t9Y8oUFWq.js b/reference_scripts/ZbuW8y7t9Y8oUFWq.js deleted file mode 100644 index 16270cc..0000000 --- a/reference_scripts/ZbuW8y7t9Y8oUFWq.js +++ /dev/null @@ -1 +0,0 @@ -return !((args.type == "weapon" && (args.item.system.weaponGroup.value == "blackpowder" || args.item.system.weaponGroup.value == "engineering")) || (args.type == "cast" && args.item.system.lore.value == "fire")) \ No newline at end of file diff --git a/reference_scripts/ZdHvGvSJBsIuPphF.js b/reference_scripts/ZdHvGvSJBsIuPphF.js deleted file mode 100644 index b20bae0..0000000 --- a/reference_scripts/ZdHvGvSJBsIuPphF.js +++ /dev/null @@ -1 +0,0 @@ -return !args.fields.dualWielding && !args.options.dualWieldOffhand \ No newline at end of file diff --git a/reference_scripts/Ze9E2zR1GFGWGMVH.js b/reference_scripts/Ze9E2zR1GFGWGMVH.js deleted file mode 100644 index 1cc8e6f..0000000 --- a/reference_scripts/Ze9E2zR1GFGWGMVH.js +++ /dev/null @@ -1 +0,0 @@ -return ["Pick Lock", "Sleight of Hand", "Channelling (Ulgu)"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/ZhuitY1KOU1Xe7cP.js b/reference_scripts/ZhuitY1KOU1Xe7cP.js deleted file mode 100644 index 70a94b6..0000000 --- a/reference_scripts/ZhuitY1KOU1Xe7cP.js +++ /dev/null @@ -1 +0,0 @@ -return !args.weapon?.system.properties.qualities.pummel \ No newline at end of file diff --git a/reference_scripts/ZqTW093qENOwGONP.js b/reference_scripts/ZqTW093qENOwGONP.js deleted file mode 100644 index 9757bed..0000000 --- a/reference_scripts/ZqTW093qENOwGONP.js +++ /dev/null @@ -1,10 +0,0 @@ -let msg = "" - -let SL = parseInt(this.effect.sourceTest.result.SL); - -for(let i = 0; i < SL; i++) -{ - msg += `${await this.actor.applyBasicDamage(3, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})}
` -} - -this.script.scriptMessage(msg); \ No newline at end of file diff --git a/reference_scripts/ZrePyV2spv3v65Tg.js b/reference_scripts/ZrePyV2spv3v65Tg.js deleted file mode 100644 index e7da169..0000000 --- a/reference_scripts/ZrePyV2spv3v65Tg.js +++ /dev/null @@ -1 +0,0 @@ -return args.type != "weapon" && !this.actor.statuses.has("infighting") \ No newline at end of file diff --git a/reference_scripts/ZsQR3AVKi0v5U593.js b/reference_scripts/ZsQR3AVKi0v5U593.js deleted file mode 100644 index 9ecf140..0000000 --- a/reference_scripts/ZsQR3AVKi0v5U593.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("ablaze", 2) \ No newline at end of file diff --git a/reference_scripts/ZuoIVv3nmlGhhdx0.js b/reference_scripts/ZuoIVv3nmlGhhdx0.js deleted file mode 100644 index 3c729c7..0000000 --- a/reference_scripts/ZuoIVv3nmlGhhdx0.js +++ /dev/null @@ -1,4 +0,0 @@ -let rating = parseInt(this.effect.name.match(/\d+/)?.[0]) || 1; -let holed = this.actor.flags.holed || {holed: 0}; -holed.holed += rating; -this.actor.flags.holed = holed; diff --git a/reference_scripts/ZvbBM4gTJHPdU8jU.js b/reference_scripts/ZvbBM4gTJHPdU8jU.js deleted file mode 100644 index b8ce00a..0000000 --- a/reference_scripts/ZvbBM4gTJHPdU8jU.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) -await test.roll(); -return test.failed \ No newline at end of file diff --git a/reference_scripts/Zxh4RAENoaAQAaNg.js b/reference_scripts/Zxh4RAENoaAQAaNg.js deleted file mode 100644 index a16ea6f..0000000 --- a/reference_scripts/Zxh4RAENoaAQAaNg.js +++ /dev/null @@ -1 +0,0 @@ -return !this.actor.flags.useless.rEye || !this.actor.flags.useless.lEye || ["wp", "t", "s"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/ZxtOdwsM2Sqj9Zam.js b/reference_scripts/ZxtOdwsM2Sqj9Zam.js deleted file mode 100644 index e58661f..0000000 --- a/reference_scripts/ZxtOdwsM2Sqj9Zam.js +++ /dev/null @@ -1,5 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") -let data = item.toObject(); -data.system.specification.value = 0 -data.name = this.effect.name; -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/a02tlRCXpaoaDjSN.js b/reference_scripts/a02tlRCXpaoaDjSN.js deleted file mode 100644 index 4334891..0000000 --- a/reference_scripts/a02tlRCXpaoaDjSN.js +++ /dev/null @@ -1,16 +0,0 @@ -let careers = await warhammer.utility.findAllItems("career", "", true); -careers.forEach(c => { - if (!c.id) - { - c.id = c._id; - } -}); -let choice = await ItemDialog.create(careers, 1, "Choose Double Life Career"); -if (choice[0]) -{ - let career = await fromUuid(choice[0].uuid); - let data = career.toObject(); - setProperty(data, "flags.wfrp4e.doubleLife", true); - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - this.effect.updateSource({name : this.effect.name + ` (${data.name})`}) -} diff --git a/reference_scripts/a0YU3whUm16wGBNu.js b/reference_scripts/a0YU3whUm16wGBNu.js deleted file mode 100644 index ed24c51..0000000 --- a/reference_scripts/a0YU3whUm16wGBNu.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}}) -await test.roll(); - -if (test.failed) -{ - this.actor.addCondition("fatigued"); -} \ No newline at end of file diff --git a/reference_scripts/a4Aza4a9v8JMU8dC.js b/reference_scripts/a4Aza4a9v8JMU8dC.js deleted file mode 100644 index 7ec136f..0000000 --- a/reference_scripts/a4Aza4a9v8JMU8dC.js +++ /dev/null @@ -1,2 +0,0 @@ -const talents = await Promise.all(["Frenzy", "Magic Resistance"].map(game.wfrp4e.utility.findTalent)) -this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/a6gacHsvgwtsIFSQ.js b/reference_scripts/a6gacHsvgwtsIFSQ.js deleted file mode 100644 index 735565f..0000000 --- a/reference_scripts/a6gacHsvgwtsIFSQ.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.test.item && args.test.item.name == game.i18n.localize("NAME.Research")) - args.test.preData.canReverse = true \ No newline at end of file diff --git a/reference_scripts/a7pEvCycVnFBXGAQ.js b/reference_scripts/a7pEvCycVnFBXGAQ.js deleted file mode 100644 index 604c31c..0000000 --- a/reference_scripts/a7pEvCycVnFBXGAQ.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : " - Stunned", fields : {difficulty : "easy"}}) -await test.roll(); - -if (!test.succeeded) -{ - this.actor.addCondition("stunned"); -} \ No newline at end of file diff --git a/reference_scripts/a8RabrnJ08O07rDX.js b/reference_scripts/a8RabrnJ08O07rDX.js deleted file mode 100644 index 5ac0cfe..0000000 --- a/reference_scripts/a8RabrnJ08O07rDX.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - // I'm assuming the endurance test specified is for the end-round check - await args.actor.addCondition("poisoned", 2); -} \ No newline at end of file diff --git a/reference_scripts/a8i0sA1RBnD8nHZt.js b/reference_scripts/a8i0sA1RBnD8nHZt.js deleted file mode 100644 index b78fb2c..0000000 --- a/reference_scripts/a8i0sA1RBnD8nHZt.js +++ /dev/null @@ -1,42 +0,0 @@ -let caster = this.effect.sourceActor -let targetedItem = this.actor.items.get(this.effect.flags.wfrp4e.itemTargets[0]) - -let qualities = foundry.utils.deepClone(game.wfrp4e.config.itemQualities); -let flaws = foundry.utils.deepClone(game.wfrp4e.config.itemFlaws); - -if (targetedItem.type == "weapon") -{ - mergeObject(qualities, game.wfrp4e.config.weaponQualities) - mergeObject(flaws, game.wfrp4e.config.weaponFlaws) -} -else if (targetedItem.type == "armour") -{ - mergeObject(qualities, game.wfrp4e.config.armorQualities) - mergeObject(flaws, game.wfrp4e.config.armorFlaws) -} - -for(let q in qualities) -{ - // If the weapon already has a flaw, don't put it in the dialog - if (targetedItem.system.properties.qualities[q]) - { - delete qualities[q] - } -} -for(let f in flaws) -{ - // If a weapon doesn't have a flaw, don't put it in the dialog - if (!targetedItem.system.properties.flaws[f]) - { - delete flaws[f] - } -} - -let added = await ItemDialog.create(ItemDialog.objectToArray(qualities), "unlimited", "Choose Qualities to add"); -let removed = [] -if (!foundry.utils.isEmpty(flaws)) -{ - removed = await ItemDialog.create(ItemDialog.objectToArray(flaws), "unlimited", "Choose Flaws to remove"); -} - -this.effect.updateSource({"flags.wfrp4e.propertiesChanged" : {added : added.map(i => i.id), removed : removed.map(i => i.id)}}) diff --git a/reference_scripts/aAvJrAKLzXhS9qN6.js b/reference_scripts/aAvJrAKLzXhS9qN6.js deleted file mode 100644 index 645c806..0000000 --- a/reference_scripts/aAvJrAKLzXhS9qN6.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name == game.i18n.localize("NAME.Climb") \ No newline at end of file diff --git a/reference_scripts/aCVtaW8ag1WibcAr.js b/reference_scripts/aCVtaW8ag1WibcAr.js deleted file mode 100644 index bf9b92d..0000000 --- a/reference_scripts/aCVtaW8ag1WibcAr.js +++ /dev/null @@ -1,2 +0,0 @@ -args.attacker.modifyWounds(1) -this.script.scriptMessage(`${args.attacker.prototypeToken.name} recovers 1 Wound.`) \ No newline at end of file diff --git a/reference_scripts/aIYUsBIDKWJ3CEtj.js b/reference_scripts/aIYUsBIDKWJ3CEtj.js deleted file mode 100644 index 9779863..0000000 --- a/reference_scripts/aIYUsBIDKWJ3CEtj.js +++ /dev/null @@ -1 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true})); \ No newline at end of file diff --git a/reference_scripts/aMHGjWyn6BXCI4pw.js b/reference_scripts/aMHGjWyn6BXCI4pw.js deleted file mode 100644 index 0f73350..0000000 --- a/reference_scripts/aMHGjWyn6BXCI4pw.js +++ /dev/null @@ -1,2 +0,0 @@ -let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.hXcfygzujgyMN1uI"); -this.actor.createEmbeddedDocuments("Item", [frenzy], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/abLWYtNTu1UVDQAs.js b/reference_scripts/abLWYtNTu1UVDQAs.js deleted file mode 100644 index 547de25..0000000 --- a/reference_scripts/abLWYtNTu1UVDQAs.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm' -{ - this.scriptMessage(`Gains a @Condition[Blinded] condition as their ${this.item.name} was hit`); - this.actor.addCondition("blinded"); -} \ No newline at end of file diff --git a/reference_scripts/abVIvJBzuskNzCQv.js b/reference_scripts/abVIvJBzuskNzCQv.js deleted file mode 100644 index 2fd5bf8..0000000 --- a/reference_scripts/abVIvJBzuskNzCQv.js +++ /dev/null @@ -1,8 +0,0 @@ -let amount = this.effect.sourceTest.result.overcast.usage.other.current; - -let sss = await fromUuid("Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz"); -let strider = await fromUuid("Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC"); - -let items = Array(amount).fill(sss).concat(Array(amount).fill(strider)) - -this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/afdmOvPGMpEdZvCb.js b/reference_scripts/afdmOvPGMpEdZvCb.js deleted file mode 100644 index 20d9df6..0000000 --- a/reference_scripts/afdmOvPGMpEdZvCb.js +++ /dev/null @@ -1 +0,0 @@ -return (args.skill?.name == game.i18n.localize("NAME.Perception") || args.characteristic == "fel") \ No newline at end of file diff --git a/reference_scripts/agsm3NI1NDtHRG4y.js b/reference_scripts/agsm3NI1NDtHRG4y.js deleted file mode 100644 index 3391c51..0000000 --- a/reference_scripts/agsm3NI1NDtHRG4y.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.getActiveTokens().forEach(t => t.document.update({texture : this.actor.prototypeToken.texture}, {animate : false})); \ No newline at end of file diff --git a/reference_scripts/ahbA7o5G9dzMFl76.js b/reference_scripts/ahbA7o5G9dzMFl76.js deleted file mode 100644 index 0937f98..0000000 --- a/reference_scripts/ahbA7o5G9dzMFl76.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR") -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/alJgj25l3239h2SW.js b/reference_scripts/alJgj25l3239h2SW.js deleted file mode 100644 index edd4d2f..0000000 --- a/reference_scripts/alJgj25l3239h2SW.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.hTgrGkWnmIR4xhVe") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/araS9qYWOAVrV8F7.js b/reference_scripts/araS9qYWOAVrV8F7.js deleted file mode 100644 index 7415a12..0000000 --- a/reference_scripts/araS9qYWOAVrV8F7.js +++ /dev/null @@ -1,2 +0,0 @@ -args.actor.system.details.man -= 3; -args.actor.system.details.move.value -= 2; \ No newline at end of file diff --git a/reference_scripts/ayIbw2Vw2t9xg33P.js b/reference_scripts/ayIbw2Vw2t9xg33P.js deleted file mode 100644 index 0af0e36..0000000 --- a/reference_scripts/ayIbw2Vw2t9xg33P.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX") -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/b1zMefdoZYtzCm7i.js b/reference_scripts/b1zMefdoZYtzCm7i.js deleted file mode 100644 index d165c01..0000000 --- a/reference_scripts/b1zMefdoZYtzCm7i.js +++ /dev/null @@ -1 +0,0 @@ -return ["roll", "none"].includes(args.fields.hitLocation) || args.item?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/b2Kb4IuD22RhKhR0.js b/reference_scripts/b2Kb4IuD22RhKhR0.js deleted file mode 100644 index fcbecf9..0000000 --- a/reference_scripts/b2Kb4IuD22RhKhR0.js +++ /dev/null @@ -1,10 +0,0 @@ -let actor = Array.from(game.user.targets)[0]?.actor; - -if (actor) -{ - actor.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[0].uuid}) -} -else -{ - this.script.scriptNotification("No target!", "error") -} \ No newline at end of file diff --git a/reference_scripts/b2WaqRna5CFXmbDG.js b/reference_scripts/b2WaqRna5CFXmbDG.js deleted file mode 100644 index 8f874fd..0000000 --- a/reference_scripts/b2WaqRna5CFXmbDG.js +++ /dev/null @@ -1 +0,0 @@ -args.options.stag = true; \ No newline at end of file diff --git a/reference_scripts/b5DfAWtpV1x2R8If.js b/reference_scripts/b5DfAWtpV1x2R8If.js deleted file mode 100644 index c9f120e..0000000 --- a/reference_scripts/b5DfAWtpV1x2R8If.js +++ /dev/null @@ -1 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true})) \ No newline at end of file diff --git a/reference_scripts/b5prg1FLjCAvBjLy.js b/reference_scripts/b5prg1FLjCAvBjLy.js deleted file mode 100644 index 705112f..0000000 --- a/reference_scripts/b5prg1FLjCAvBjLy.js +++ /dev/null @@ -1,13 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.zyocWSzEZEC826NS") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data]) - - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - await this.actor.addCondition("prone") - await this.actor.addCondition("stunned") -} \ No newline at end of file diff --git a/reference_scripts/b8G4cjfn3RG2tEYX.js b/reference_scripts/b8G4cjfn3RG2tEYX.js deleted file mode 100644 index 692d5e5..0000000 --- a/reference_scripts/b8G4cjfn3RG2tEYX.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("ablaze", 3); \ No newline at end of file diff --git a/reference_scripts/bBdXzBmxgFFBwMMS.js b/reference_scripts/bBdXzBmxgFFBwMMS.js deleted file mode 100644 index b0eea24..0000000 --- a/reference_scripts/bBdXzBmxgFFBwMMS.js +++ /dev/null @@ -1,9 +0,0 @@ -if(args.opposedTest.attackerTest.item?.isRanged && args.applyAP && !args.sureShot) -{ - if (args.modifiers.ap.value) - { - args.sureShot = true; - args.modifiers.ap.details.push(`${this.effect.name} (Ignore ${this.item.Advances})`) - args.modifiers.ap.ignored += this.item.Advances; - } -} \ No newline at end of file diff --git a/reference_scripts/bEVlJOOA1kLlzpWx.js b/reference_scripts/bEVlJOOA1kLlzpWx.js deleted file mode 100644 index 4a07c15..0000000 --- a/reference_scripts/bEVlJOOA1kLlzpWx.js +++ /dev/null @@ -1,86 +0,0 @@ -let characteristics = { - "ws" : 10, - "bs" : 0, - "s" : 5, - "t" : 15, - "i" : 20, - "ag" : 15, - "dex" : 20, - "int" : 35, - "wp" : 30, - "fel" : 10 -} -let skills = ["Channelling", "Cool", "Dodge", "Entertain (Storytelling)", "Intuition", "Language (Magick)", "Leadership", "Lore (Magic)", "Lore (Theology)", "Perception"] -let skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30] -let talents = ["Aethyric Attunement", "Arcane Magic", "Instinctive Diction", "Instinctive Diction", "Luck", "Magical Sense", "Menacing", "Petty Magic", "Second Sight", "Sixth Sense"] -let trappings = ["Hand Weapon", "Quarterstaff", "Ritual Dress incorporating many ingredients and fetishes"] -let items = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - items.push({name : trapping, type : "trapping", "system.trappingType.value" : "clothingAccessories"}) - //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - -function equip(item) -{ - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true -} \ No newline at end of file diff --git a/reference_scripts/bL98Sr1TRLMPEdlk.js b/reference_scripts/bL98Sr1TRLMPEdlk.js deleted file mode 100644 index 7f837ba..0000000 --- a/reference_scripts/bL98Sr1TRLMPEdlk.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.failed) -{ - this.actor.addCondition("fatigued"); -} \ No newline at end of file diff --git a/reference_scripts/bLkt8VpTTPoTxW0W.js b/reference_scripts/bLkt8VpTTPoTxW0W.js deleted file mode 100644 index 73567e8..0000000 --- a/reference_scripts/bLkt8VpTTPoTxW0W.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) -{ - args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Added Bleeding") -} diff --git a/reference_scripts/bMEFHPCei2evnZZw.js b/reference_scripts/bMEFHPCei2evnZZw.js deleted file mode 100644 index 7eb94d5..0000000 --- a/reference_scripts/bMEFHPCei2evnZZw.js +++ /dev/null @@ -1,14 +0,0 @@ -// Victims that take at least 1 Wound from a Fell Dagger -// immediately take a Poisoned Condition -// resisted with a Difficult (-10) Endurance Test. - -// TODO: Add Venom strength to message - -if (args.totalWoundLoss > 0) -{ - args.actor.addCondition("poisoned") - this.script.scriptMessage(` - ${this.effect.name}:- Add Option? -
-${this.actor.prototypeToken.name} has gained 2 @Condition[Poisoned] Conditions.
-Any being with the Bestial Creature Trait that bites them and takes damage will not bite them again during a hostile encounter, though the creature may still attack them in other ways.
`, - { - whisper: ChatMessage.getWhisperRecipients("GM"), - blind: true - }) -} - // If they succeed, for a number of rounds equal to 3+ their SL, they have the Corrosive Blood Creature Trait. -else if (test.succeeded) -{ - // Don't attempt to add Corrosive Blood if actor already has it - const hasCorrosiveBlood = this.actor.has("Corrosive Blood") - if (hasCorrosiveBlood !== undefined) return - - let item = await fromUuid("Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW") - let data = item.toObject() - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) - - const duration = 3 + parseInt(test.result.SL) - this.script.scriptMessage(`${this.actor.prototypeToken.name} gains the Corrosive Blood Trait for ${duration} rounds.
`, - { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) -} \ No newline at end of file diff --git a/reference_scripts/g0SzfsLyW7aD2F19.js b/reference_scripts/g0SzfsLyW7aD2F19.js deleted file mode 100644 index e0ff529..0000000 --- a/reference_scripts/g0SzfsLyW7aD2F19.js +++ /dev/null @@ -1,22 +0,0 @@ -if (this.item.system.tests.value.includes("(Social Group)")) -{ - let tests = this.item.system.tests.value - let name = this.item.name - - // If name already specifies, make sure tests value reflects that - if (name.includes("(")) - { - let group = name.split("(")[1].split(")")[0] - tests = `${tests.split("(")[0].trim()} (${group})` - } - else if (!name.includes("(")) - { - let value = await ValueDialog.create("Enter Etiquette Group", this.effect.name); - if (value) - { - name = this.item.name + ` (${value})`; - tests = this.item.system.tests.value.replace("Social Group", value); - } - } - this.item.updateSource({name, "system.tests.value" : tests}) -} \ No newline at end of file diff --git a/reference_scripts/g1L8OYO9nCOhdKGL.js b/reference_scripts/g1L8OYO9nCOhdKGL.js deleted file mode 100644 index 94085c1..0000000 --- a/reference_scripts/g1L8OYO9nCOhdKGL.js +++ /dev/null @@ -1,16 +0,0 @@ -// Everything within Fellowship Bonus yards -// of the target point is splashed with mystic poison, -// suffering 1d10 + SL damage which ignores Armour Points - -let damage = (await new Roll(`1d10 + ${parseInt(this.effect.sourceTest.result.SL)}`).roll()) - -await damage.toMessage(this.script.getChatData()) - -this.script.scriptMessage(await args.actor.applyBasicDamage( - damage.total, - {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true} -)) - -// ... and gains the Poisoned Condition - -this.actor.addCondition("poisoned") \ No newline at end of file diff --git a/reference_scripts/g4t56A09yrpZaJQ2.js b/reference_scripts/g4t56A09yrpZaJQ2.js deleted file mode 100644 index 9d8a90b..0000000 --- a/reference_scripts/g4t56A09yrpZaJQ2.js +++ /dev/null @@ -1,23 +0,0 @@ - let amberTalons = foundry.utils.deepClone(game.wfrp4e.config.systemItems.unarmed); - amberTalons.name = "Amber Talons"; - amberTalons.img = this.effect.img; - amberTalons.system.damage.value = "SB + WPB" - amberTalons.system.equipped = true; - amberTalons.system.qualities.value.push({name : "magical"}) - amberTalons.effects.push({ - label : "Amber Talons", - transfer: false, - icon : "modules/wfrp4e-core/icons/spells/amber-talons.png" , - flags : { - wfrp4e : { - applicationData : { - documentType : "Item" - }, - scriptData : [{ - trigger : "applyDamage", - script : "if (args.totalWoundLoss >= 1)\n{ \n args.actor.addCondition(\"bleeding\")\n}" - }] - } - } - }) - this.actor.createEmbeddedDocuments("Item", [amberTalons], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/gFUXBbTskQBKjxqm.js b/reference_scripts/gFUXBbTskQBKjxqm.js deleted file mode 100644 index e8f675a..0000000 --- a/reference_scripts/gFUXBbTskQBKjxqm.js +++ /dev/null @@ -1,8 +0,0 @@ -if (this.actor.hasCondition("entangled")) -{ - this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}}).then(async test => { - await test.roll(); - if (test.failed) - this.actor.addCondition("fatigued") - }) -} \ No newline at end of file diff --git a/reference_scripts/gKIPujyuFSn0No9v.js b/reference_scripts/gKIPujyuFSn0No9v.js deleted file mode 100644 index 9359298..0000000 --- a/reference_scripts/gKIPujyuFSn0No9v.js +++ /dev/null @@ -1,5 +0,0 @@ -for(let e of this.item.effects.contents) -{ - e.update({disabled: false}) -} -this.script.scriptNotification("Reset Powers") \ No newline at end of file diff --git a/reference_scripts/gKPL3t4vlZAsvtGr.js b/reference_scripts/gKPL3t4vlZAsvtGr.js deleted file mode 100644 index c2422ee..0000000 --- a/reference_scripts/gKPL3t4vlZAsvtGr.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == "Stealth (Underground)" \ No newline at end of file diff --git a/reference_scripts/gL0ftUnK5TNXBRRt.js b/reference_scripts/gL0ftUnK5TNXBRRt.js deleted file mode 100644 index ccd81ab..0000000 --- a/reference_scripts/gL0ftUnK5TNXBRRt.js +++ /dev/null @@ -1 +0,0 @@ -return this.effect.sourceActor.uuid == args.actor.uuid \ No newline at end of file diff --git a/reference_scripts/gMIenSmLklAkB2Zm.js b/reference_scripts/gMIenSmLklAkB2Zm.js deleted file mode 100644 index 118f64a..0000000 --- a/reference_scripts/gMIenSmLklAkB2Zm.js +++ /dev/null @@ -1,8 +0,0 @@ -if (isNaN(parseInt(this.item.system.specification.value))) -{ - let value = await ValueDialog.create("Enter Venom Strength", this.effect.name, "", Object.values(game.wfrp4e.config.difficultyNames)); - if (value) - { - this.item.updateSource({"system.specification.value" : value}); - } -} \ No newline at end of file diff --git a/reference_scripts/gOm8utR3HLQBT5hA.js b/reference_scripts/gOm8utR3HLQBT5hA.js deleted file mode 100644 index d8929cd..0000000 --- a/reference_scripts/gOm8utR3HLQBT5hA.js +++ /dev/null @@ -1,6 +0,0 @@ -let {value} = this.effect.getFlag("wfrp4e-soc", "m4result") || {}; - -if (value === 0) - args.actor.system.status.mood.value = 0; -else if (value !== undefined) - args.actor.system.status.mood.value += value; \ No newline at end of file diff --git a/reference_scripts/gPQrszvIgGlW9yM4.js b/reference_scripts/gPQrszvIgGlW9yM4.js deleted file mode 100644 index 61a3f69..0000000 --- a/reference_scripts/gPQrszvIgGlW9yM4.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.test.characteristicKey == "wp") - args.test.preData.canReverse = true \ No newline at end of file diff --git a/reference_scripts/gVpFUka7qfGiEC1v.js b/reference_scripts/gVpFUka7qfGiEC1v.js deleted file mode 100644 index 0306f05..0000000 --- a/reference_scripts/gVpFUka7qfGiEC1v.js +++ /dev/null @@ -1 +0,0 @@ - this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : "#FFD700"}})); diff --git a/reference_scripts/ga6bQzPuoIiQQrKg.js b/reference_scripts/ga6bQzPuoIiQQrKg.js deleted file mode 100644 index 2d3c447..0000000 --- a/reference_scripts/ga6bQzPuoIiQQrKg.js +++ /dev/null @@ -1,11 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - - let test = await args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) - await test.roll() - if (test.failed) - { - args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus - args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus}) - } -} \ No newline at end of file diff --git a/reference_scripts/gbhxWXboV9CytWNU.js b/reference_scripts/gbhxWXboV9CytWNU.js deleted file mode 100644 index e186282..0000000 --- a/reference_scripts/gbhxWXboV9CytWNU.js +++ /dev/null @@ -1 +0,0 @@ -await this.actor.addCondition("blinded", 2) \ No newline at end of file diff --git a/reference_scripts/gh2KS1prBKcsSK6M.js b/reference_scripts/gh2KS1prBKcsSK6M.js deleted file mode 100644 index 9db9338..0000000 --- a/reference_scripts/gh2KS1prBKcsSK6M.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.opposedTest.attackerTest.result.critical) - args.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/gnVpxOeBZpNF4HIF.js b/reference_scripts/gnVpxOeBZpNF4HIF.js deleted file mode 100644 index ea6a793..0000000 --- a/reference_scripts/gnVpxOeBZpNF4HIF.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.result.roll.toString().includes("9") || args.test.result.roll.toString().includes("8")) -{ - args.test.result.fumble = game.i18n.localize("Fumble") -} \ No newline at end of file diff --git a/reference_scripts/goz8yTlMozlsz3uY.js b/reference_scripts/goz8yTlMozlsz3uY.js deleted file mode 100644 index b886e2e..0000000 --- a/reference_scripts/goz8yTlMozlsz3uY.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Strength'; -const difficulty = 'easy'; -const target = 10; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/gpPaCe6yER79l4u8.js b/reference_scripts/gpPaCe6yER79l4u8.js deleted file mode 100644 index 124a438..0000000 --- a/reference_scripts/gpPaCe6yER79l4u8.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR") -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/gpuBg3y9rocJL7yT.js b/reference_scripts/gpuBg3y9rocJL7yT.js deleted file mode 100644 index 908e09d..0000000 --- a/reference_scripts/gpuBg3y9rocJL7yT.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(1, {locations: ["head"], source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/gqZLfIr6svrtdwdC.js b/reference_scripts/gqZLfIr6svrtdwdC.js deleted file mode 100644 index 191bf9e..0000000 --- a/reference_scripts/gqZLfIr6svrtdwdC.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.SleightOfHand") && args.skill?.name != game.i18n.localize("NAME.MeleeBrawling") && args.weapon?.system?.weaponGroup?.value != "brawling" \ No newline at end of file diff --git a/reference_scripts/groEX1wJ9l00PkDF.js b/reference_scripts/groEX1wJ9l00PkDF.js deleted file mode 100644 index ebf8cbe..0000000 --- a/reference_scripts/groEX1wJ9l00PkDF.js +++ /dev/null @@ -1,75 +0,0 @@ -let turns = this.effect.getFlag("wfrp4e", "turns"); -if (turns <= 0) return; -turns--; - -const speaker = ChatMessage.getSpeaker({actor: this.actor}); -const targetId = this.effect.getFlag("wfrp4e", "target"); -const target = canvas.scene.tokens.get(targetId); - -if (turns > 0) { - this.effect.setFlag("wfrp4e", "turns", turns); - - return this.script.scriptMessage(`${speaker.alias} continues wrapping itself around ${target.name}. It will be able to start crushin in ${turns} turns.
`); -} - -if (this.actor.items.find(i => i.type === "extendedTest" && i.name === this.effect.name)) { - this.script.scriptMessage(`${speaker.alias} can resume crushing ${target.name} with the Extended Test.
`); - - return; -} - -const extendedTestData = { - name: this.effect.name, - type: "extendedTest", - img: this.effect.img, - system: { - SL: { - current: 0, - target: target.actor.system.status.wounds.value - }, - test: { - value: 'Strength' - }, - completion: { - value: "remove" - }, - difficulty: { - value: "challenging" - } - } -}; - -const extendedTests = await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); -const extendedTest = extendedTests[0]; - -this.script.scriptMessage(`${speaker.alias} finished wrapping itself around ${target.name}. It can now begin crushing via the @UUID[${extendedTest.uuid}] Extended Test.
`); - -let effect = { - name: extendedTest.name, - icon: extendedTest.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: extendedTest.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.effects.find(e => e.id === id); - const speaker = ChatMessage.getSpeaker({actor: this.actor}); - const targetId = effect.getFlag("wfrp4e", "target"); - const target = canvas.scene.tokens.get(targetId); - this.script.scriptMessage(\`${speaker.alias} crushed the ${target.name}. Boat shatters, reduced to a mass of flotsam.
\`); - await effect.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } -} - -await extendedTests[0].createEmbeddedDocuments("ActiveEffect", [effect]); \ No newline at end of file diff --git a/reference_scripts/gsCnd3mf1vXFU2ei.js b/reference_scripts/gsCnd3mf1vXFU2ei.js deleted file mode 100644 index e3c7fe1..0000000 --- a/reference_scripts/gsCnd3mf1vXFU2ei.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.system.status.ward.value = 4; \ No newline at end of file diff --git a/reference_scripts/gu72JaTs9GrSiVTd.js b/reference_scripts/gu72JaTs9GrSiVTd.js deleted file mode 100644 index 8d0ad0f..0000000 --- a/reference_scripts/gu72JaTs9GrSiVTd.js +++ /dev/null @@ -1 +0,0 @@ -return !(args.skill?.name == game.i18n.localize("NAME.Haggle") || args.skill?.name == game.i18n.localize("NAME.Gossip")) \ No newline at end of file diff --git a/reference_scripts/gxuBeGHwjZ7WfPeu.js b/reference_scripts/gxuBeGHwjZ7WfPeu.js deleted file mode 100644 index 027009f..0000000 --- a/reference_scripts/gxuBeGHwjZ7WfPeu.js +++ /dev/null @@ -1,2 +0,0 @@ -let specification = Number(this.item.specification.value) || 1; -args.fields.slBonus -= specification; \ No newline at end of file diff --git a/reference_scripts/h0DfPwUUOBjyAHMZ.js b/reference_scripts/h0DfPwUUOBjyAHMZ.js deleted file mode 100644 index 124ecc4..0000000 --- a/reference_scripts/h0DfPwUUOBjyAHMZ.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Perception"); \ No newline at end of file diff --git a/reference_scripts/h1XKoMuVnS0bagRO.js b/reference_scripts/h1XKoMuVnS0bagRO.js deleted file mode 100644 index 6b18992..0000000 --- a/reference_scripts/h1XKoMuVnS0bagRO.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != game.i18n.localize("NAME.Endurance"); \ No newline at end of file diff --git a/reference_scripts/h766UvswLCsxcMow.js b/reference_scripts/h766UvswLCsxcMow.js deleted file mode 100644 index cc4d0c0..0000000 --- a/reference_scripts/h766UvswLCsxcMow.js +++ /dev/null @@ -1,133 +0,0 @@ -let characteristics = { - "ws" : 5, - "bs" : 0, - "s" : -15, - "t" : 0, - "i" : 20, - "ag" : 0, - "dex" : 0, - "int" : 5, - "wp" : 10, - "fel" : 10 -} -let skills = ["Charm", "Intimidate", "Melee (Basic)"] -let skillAdvancements = [7, 60, 7] -let talents = ["Menacing", "Shadow"] -let traits = ["Distracting"] -let trappings = [] -let items = []; -let spells = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm -for (let trait of traits) -{ - let traitMatches = trait.matchAll(traitRegex).next().value - let traitName = traitMatches[1] - let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization - let traitSpec = traitMatches[3] - - let traitItem; - try { - traitItem = await WFRP_Utility.findItem(traitName, "trait") - } - catch { } - if (!traitItem) { - ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) - } - traitItem = traitItem.toObject() - - if (Number.isNumeric(traitVal)) - { - traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; - traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() - } - else - traitItem.system.specification.value = traitSpec - - items.push(traitItem) - -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -for (let spell of spells) -{ - let spellItem = await game.wfrp4e.utility.findItem(spell) - if (spellItem) - { - spellItem = spellItem.toObject() - - items.push(spellItem); - } - else - { - ui.notifications.warn(`Could not find ${spell}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - - -function equip(item) -{ - if (item.type == "armour") - item.worn = true - else if (item.type == "weapon") - item.equipped = true - else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") - item.worn = true -} \ No newline at end of file diff --git a/reference_scripts/hA8PzeiCsHqqlUZm.js b/reference_scripts/hA8PzeiCsHqqlUZm.js deleted file mode 100644 index c8e212a..0000000 --- a/reference_scripts/hA8PzeiCsHqqlUZm.js +++ /dev/null @@ -1,2 +0,0 @@ -this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["nausea"]]) -this.script.scriptMessage(`Gains @Condition[Nausea] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")}) \ No newline at end of file diff --git a/reference_scripts/hCzxUyO6mjLNIpaM.js b/reference_scripts/hCzxUyO6mjLNIpaM.js deleted file mode 100644 index 1555cce..0000000 --- a/reference_scripts/hCzxUyO6mjLNIpaM.js +++ /dev/null @@ -1,7 +0,0 @@ -let woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value) - -woundsGained = Math.floor(woundsGained / 2) - -args.attacker.update({ "system.status.wounds.value": args.attacker.status.wounds.value + woundsGained }) - -this.script.scriptMessage(`Gains ${woundsGained} Wounds`) \ No newline at end of file diff --git a/reference_scripts/hDC6lroDEPVBituR.js b/reference_scripts/hDC6lroDEPVBituR.js deleted file mode 100644 index 02f66dc..0000000 --- a/reference_scripts/hDC6lroDEPVBituR.js +++ /dev/null @@ -1,12 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -if (test.failed) -{ - this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) - this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) - if (test.result.roll % 11 == 0 || test.result.roll == 100) - { - this.script.scriptMessage(`Fumble: immediately gain 1 @Table[mutatemental]{Mental Mutation}, and may not take a Short-term Ambition for the next [[1d10]] weeks.`, {whisper : ChatMessage.getWhisperRecipients("GM")}) - } -} \ No newline at end of file diff --git a/reference_scripts/hK0YMJfYbpbJZizO.js b/reference_scripts/hK0YMJfYbpbJZizO.js deleted file mode 100644 index 45b97af..0000000 --- a/reference_scripts/hK0YMJfYbpbJZizO.js +++ /dev/null @@ -1,12 +0,0 @@ -this.actor.getActiveTokens().forEach(t => t.document.update({light : { - "dim": 0, - "bright": 0, - "angle": 360, - "alpha": 0.5, - "animation": { - "speed": 0, - "intensity": 0, - "type": "none", - }, - "color": "", - }})); \ No newline at end of file diff --git a/reference_scripts/hObTbWi4ZdwXimIW.js b/reference_scripts/hObTbWi4ZdwXimIW.js deleted file mode 100644 index 59c8d0c..0000000 --- a/reference_scripts/hObTbWi4ZdwXimIW.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "spell") -{ - args.item.system.cn.value = Math.floor(args.item.system.cn.value / 2); -} \ No newline at end of file diff --git a/reference_scripts/hOgha3ir8K9TVphO.js b/reference_scripts/hOgha3ir8K9TVphO.js deleted file mode 100644 index c573099..0000000 --- a/reference_scripts/hOgha3ir8K9TVphO.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic !== "fel"; \ No newline at end of file diff --git a/reference_scripts/hR1qD2kpFHF8JT8h.js b/reference_scripts/hR1qD2kpFHF8JT8h.js deleted file mode 100644 index 1ee0b50..0000000 --- a/reference_scripts/hR1qD2kpFHF8JT8h.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == "Language (Magick)" \ No newline at end of file diff --git a/reference_scripts/hSImyYjL0CENTvXf.js b/reference_scripts/hSImyYjL0CENTvXf.js deleted file mode 100644 index 3000ac8..0000000 --- a/reference_scripts/hSImyYjL0CENTvXf.js +++ /dev/null @@ -1,23 +0,0 @@ -let test = await this.actor.setupSkill("Endurance", {fields : {difficulty : "difficult", appendTitle : ` - ${this.effect.name}`}}); -await test.roll(); -if (test.failed) -{ - await this.actor.addCondition("blinded"); -} - -let msg = `` -let armour = args.actor.itemTypes.armour.filter(i => i.system.isMetal && i.system.isEquipped); -for(let item of armour) -{ - for(let key in item.system.AP) - { - let AP = item.system.AP[key] - let damage = Math.floor(AP / 2); - await item.system.damageItem(damage, [key]); - } - msg += `${item.name} AP reduced by half
` -} -if (msg) -{ - this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}}); -} \ No newline at end of file diff --git a/reference_scripts/hSlEY2oh8quVmdXR.js b/reference_scripts/hSlEY2oh8quVmdXR.js deleted file mode 100644 index f535336..0000000 --- a/reference_scripts/hSlEY2oh8quVmdXR.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") -let data = item.toObject(); -data.system.specification.value = 2 -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/hWWvkPbgIN3lxz1u.js b/reference_scripts/hWWvkPbgIN3lxz1u.js deleted file mode 100644 index f135bff..0000000 --- a/reference_scripts/hWWvkPbgIN3lxz1u.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system?.attackType !== "melee"; \ No newline at end of file diff --git a/reference_scripts/hYNWp75ggWSTht55.js b/reference_scripts/hYNWp75ggWSTht55.js deleted file mode 100644 index c867124..0000000 --- a/reference_scripts/hYNWp75ggWSTht55.js +++ /dev/null @@ -1,7 +0,0 @@ -if (args.test.result.hitloc.value != "head" && args.test.result.critical) -{ - game.wfrp4e.utility.sleep(200).then(() => { - this.script.scriptMessage("Can roll on the @Table[crithead]{Head Critical Hits} instead of the normal hit location") - - }) -} \ No newline at end of file diff --git a/reference_scripts/hZAax4emLahEEqcZ.js b/reference_scripts/hZAax4emLahEEqcZ.js deleted file mode 100644 index 4cf471f..0000000 --- a/reference_scripts/hZAax4emLahEEqcZ.js +++ /dev/null @@ -1,5 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") -let data = item.toObject(); -data.system.specification.value = 7 - this.actor.characteristics.s.bonus -data.name = item.name.replace("(Feature)", "(Tusks)") -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/hfO4INH3EeETDTFt.js b/reference_scripts/hfO4INH3EeETDTFt.js deleted file mode 100644 index 5bb82c4..0000000 --- a/reference_scripts/hfO4INH3EeETDTFt.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(1, {locations: this.effect.flags.wfrp4e.locations, source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/hhCs5VBKx50S5IsY.js b/reference_scripts/hhCs5VBKx50S5IsY.js deleted file mode 100644 index d3aa69e..0000000 --- a/reference_scripts/hhCs5VBKx50S5IsY.js +++ /dev/null @@ -1 +0,0 @@ -return !args.options.mutate \ No newline at end of file diff --git a/reference_scripts/hhv7PrRdlf9sfC82.js b/reference_scripts/hhv7PrRdlf9sfC82.js deleted file mode 100644 index 1941c02..0000000 --- a/reference_scripts/hhv7PrRdlf9sfC82.js +++ /dev/null @@ -1,84 +0,0 @@ -let characteristics = { - "ws" : 5, - "bs" : 0, - "s" : 5, - "t" : 5, - "i" : 10, - "ag" : 0, - "dex" : 0, - "int" : 0, - "wp" : 0, - "fel" : 0 - } - let skills = ["Cool", "Dodge"] - let skillAdvancements = [10, 10] - let talents = ["Combat Reflexes"] - let trappings = ["Leather Jack", "Leather Skullcap", "Leather Leggings", "Shield"] - let items = [] - - let updateObj = this.actor.toObject(); - - for (let ch in characteristics) - { - updateObj.system.characteristics[ch].modifier += characteristics[ch]; - } - - for (let index = 0; index < skills.length; index++) - { - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } - } - - for (let talent of talents) - { - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } - } - - for (let trapping of trappings) - { - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } - } - - - await this.actor.update(updateObj) - this.actor.createEmbeddedDocuments("Item", items); - - function equip(item) - { - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true - } \ No newline at end of file diff --git a/reference_scripts/hj7tI212neKIu9dh.js b/reference_scripts/hj7tI212neKIu9dh.js deleted file mode 100644 index c400384..0000000 --- a/reference_scripts/hj7tI212neKIu9dh.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.system.status.ward.value = 7; \ No newline at end of file diff --git a/reference_scripts/hlHKeFWrOA8CsLr9.js b/reference_scripts/hlHKeFWrOA8CsLr9.js deleted file mode 100644 index 25e12e8..0000000 --- a/reference_scripts/hlHKeFWrOA8CsLr9.js +++ /dev/null @@ -1,2 +0,0 @@ -args.data.canReverse = true; -args.options.pilot = true; \ No newline at end of file diff --git a/reference_scripts/hluehsCuBZYc1Ejt.js b/reference_scripts/hluehsCuBZYc1Ejt.js deleted file mode 100644 index 73d83dc..0000000 --- a/reference_scripts/hluehsCuBZYc1Ejt.js +++ /dev/null @@ -1 +0,0 @@ -return args.characterisic != "fel" \ No newline at end of file diff --git a/reference_scripts/hmk8zV1LTElHUI8A.js b/reference_scripts/hmk8zV1LTElHUI8A.js deleted file mode 100644 index 00780d6..0000000 --- a/reference_scripts/hmk8zV1LTElHUI8A.js +++ /dev/null @@ -1,8 +0,0 @@ -let msg = `${this.actor.prototypeToken.name} loses 1 Wound.- Select your choice -
-${this.actor.prototypeToken.name} has lost all alcohol related penalties and gains the Fatigued Condition for ${duration} hours.
`, -{ - whisper: ChatMessage.getWhisperRecipients("GM"), - blind: true -}) \ No newline at end of file diff --git a/reference_scripts/inPxRSx0CDj1nwAm.js b/reference_scripts/inPxRSx0CDj1nwAm.js deleted file mode 100644 index 6fda683..0000000 --- a/reference_scripts/inPxRSx0CDj1nwAm.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.result.fumble && !this.actor.itemTypes.talent.find(i => i.name == "Arcane Magic (Fire)")) -{ - this.actor.addCondition("ablaze"); -} \ No newline at end of file diff --git a/reference_scripts/ioeTj5mx8jlA5EX5.js b/reference_scripts/ioeTj5mx8jlA5EX5.js deleted file mode 100644 index 9605807..0000000 --- a/reference_scripts/ioeTj5mx8jlA5EX5.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("stunned") \ No newline at end of file diff --git a/reference_scripts/ipkkRffJh61WE7zR.js b/reference_scripts/ipkkRffJh61WE7zR.js deleted file mode 100644 index fe706ac..0000000 --- a/reference_scripts/ipkkRffJh61WE7zR.js +++ /dev/null @@ -1,5 +0,0 @@ -if (!args.flags.amputatedFootOrLeg) -{ - args.flags.amputatedFootOrLeg= true; - args.fields.modifier -= 20; -} \ No newline at end of file diff --git a/reference_scripts/iqUvV1Vu81M3WyZ4.js b/reference_scripts/iqUvV1Vu81M3WyZ4.js deleted file mode 100644 index 3688a7d..0000000 --- a/reference_scripts/iqUvV1Vu81M3WyZ4.js +++ /dev/null @@ -1,4 +0,0 @@ -let SL = Number(this.effect.sourceTest.result.SL); -for (let i=0; i${speaker.alias} is Immersed within a Sea Elemental and suffers from @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}
They may attempt to escape by freeing themselves from the @Condition[Entangled} Condition as if they were @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.wmA76Q2zJJ9HrkvA#grappling]{Grappled} by the Sea Elemental, making an Opposed Strength Test against its Strength of 59.
`); \ No newline at end of file diff --git a/reference_scripts/jYJRO5XPyG7y6fih.js b/reference_scripts/jYJRO5XPyG7y6fih.js deleted file mode 100644 index 6473155..0000000 --- a/reference_scripts/jYJRO5XPyG7y6fih.js +++ /dev/null @@ -1,3 +0,0 @@ -await this.actor.addCondition("blinded") -await this.actor.addCondition("deafened") -await this.actor.addCondition("fatigued") \ No newline at end of file diff --git a/reference_scripts/jbZPLb4wuqJpHLUx.js b/reference_scripts/jbZPLb4wuqJpHLUx.js deleted file mode 100644 index 0aa879a..0000000 --- a/reference_scripts/jbZPLb4wuqJpHLUx.js +++ /dev/null @@ -1 +0,0 @@ -this.item.system.flaws.value.push({name : "dangerous"}) \ No newline at end of file diff --git a/reference_scripts/jdS2u1tQPYeO55WI.js b/reference_scripts/jdS2u1tQPYeO55WI.js deleted file mode 100644 index a274d28..0000000 --- a/reference_scripts/jdS2u1tQPYeO55WI.js +++ /dev/null @@ -1,61 +0,0 @@ -let type = this.item.getFlag("wfrp4e", "breath"); - -if (type == "cold") -{ - let stunned = Math.max(1, Math.trunc(args.totalWoundLoss / 5)) - await args.actor.addCondition("stunned", stunned); -} - -if (type == "corrosion") -{ - let damageItems = await Dialog.confirm({title : this.item.name, content : `Damage all Items carried?
`}) - if (damageItems) - { - let msg = `` - let weapons = args.actor.itemTypes.weapon.filter(i => i.isEquipped); - let armour = args.actor.itemTypes.armour.filter(i => i.isEquipped); - let trappings = args.actor.itemTypes.trapping.filter(i => i.isEquipped); - for(let item of weapons) - { - if (item.system.properties.qualities.shield) - { - await item.system.damageItem(1, "shield"); - } - else - { - await item.system.damageItem(1); - } - msg += `${item.name} damage by 1
` - } - for(let item of armour) - { - await item.system.damageItem(1); - msg += `${item.name} damage by 1
` - } - for(let item of trappings) - { - await item.system.damageItem(1); - msg += `${item.name} damage by 1
` - } - if (msg) - { - this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}}); - } - } -} - -if (type == "fire") -{ - await args.actor.addCondition("ablaze"); -} - -if (type == "electricity") -{ - await args.actor.addCondition("stunned"); -} - -if (type == "poison") -{ - await args.actor.addCondition("poisoned"); -} - diff --git a/reference_scripts/jfk5VDKMTIf4ee0v.js b/reference_scripts/jfk5VDKMTIf4ee0v.js deleted file mode 100644 index bf86bc6..0000000 --- a/reference_scripts/jfk5VDKMTIf4ee0v.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.totalWoundLoss > 0) - args.actor.addCondition("poisoned") \ No newline at end of file diff --git a/reference_scripts/jgO1Kf60Ctt6R0qO.js b/reference_scripts/jgO1Kf60Ctt6R0qO.js deleted file mode 100644 index 5fb4283..0000000 --- a/reference_scripts/jgO1Kf60Ctt6R0qO.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != game.i18n.localize("NAME.Leadership") \ No newline at end of file diff --git a/reference_scripts/jmxlpyLrIuoxQtvU.js b/reference_scripts/jmxlpyLrIuoxQtvU.js deleted file mode 100644 index 097d4e0..0000000 --- a/reference_scripts/jmxlpyLrIuoxQtvU.js +++ /dev/null @@ -1 +0,0 @@ - this.actor.getActiveTokens().forEach(t => t.document.update({texture : {scaleX : 2, scaleY: 2, src: "modules/wfrp4e-core/tokens/popout/gor.webp"}})); diff --git a/reference_scripts/jpcU8FFWSlQ3gD0L.js b/reference_scripts/jpcU8FFWSlQ3gD0L.js deleted file mode 100644 index dfb5b37..0000000 --- a/reference_scripts/jpcU8FFWSlQ3gD0L.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name?.includes(game.i18n.localize("NAME.Trade")) \ No newline at end of file diff --git a/reference_scripts/jrvj7bRyMBB9LixP.js b/reference_scripts/jrvj7bRyMBB9LixP.js deleted file mode 100644 index 8c8d940..0000000 --- a/reference_scripts/jrvj7bRyMBB9LixP.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.addCondition("fatigued", 3) \ No newline at end of file diff --git a/reference_scripts/jsgLEVYvMieyYT6L.js b/reference_scripts/jsgLEVYvMieyYT6L.js deleted file mode 100644 index bfcf625..0000000 --- a/reference_scripts/jsgLEVYvMieyYT6L.js +++ /dev/null @@ -1,18 +0,0 @@ -let tokenImg = ""; // Put path to token image here, inbetween the quotation marks -if (tokenImg) -{ - if (this.effect.getFlag("wfrp4e", "transformed")) - { - await this.effect.setFlag("wfrp4e", "transformed", false); - this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}})); - } - else - { - await this.effect.setFlag("wfrp4e", "transformed", true); - this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: tokenImg}})); - } -} -else -{ - this.script.scriptNotification("No Token Image path configured. The image path should be set in the first line of this script.", "error"); -} \ No newline at end of file diff --git a/reference_scripts/k0AkkBLtE8oZhBwn.js b/reference_scripts/k0AkkBLtE8oZhBwn.js deleted file mode 100644 index fcd0fbe..0000000 --- a/reference_scripts/k0AkkBLtE8oZhBwn.js +++ /dev/null @@ -1,6 +0,0 @@ -if (isNaN(parseInt(this.item.system.specification.value))) { - let value = await ValueDialog.create("Armoured Value", "Enter the Armoured value"); - if (value) { - this.item.updateSource({"system.specification.value" : value}); - } -} \ No newline at end of file diff --git a/reference_scripts/k3FqFgsF6a3TkxAD.js b/reference_scripts/k3FqFgsF6a3TkxAD.js deleted file mode 100644 index b78e571..0000000 --- a/reference_scripts/k3FqFgsF6a3TkxAD.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -test.roll(); -return true; \ No newline at end of file diff --git a/reference_scripts/k8TC0yzp4xfOXD2n.js b/reference_scripts/k8TC0yzp4xfOXD2n.js deleted file mode 100644 index 26e00ae..0000000 --- a/reference_scripts/k8TC0yzp4xfOXD2n.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); - await test.roll(); - if (test.failed) - { - args.actor.addCondition("stunned"); - } - args.actor.hasCondition("bleeding")?.delete() -} \ No newline at end of file diff --git a/reference_scripts/k9SvH4Lm3ZuI8S1N.js b/reference_scripts/k9SvH4Lm3ZuI8S1N.js deleted file mode 100644 index 8315c45..0000000 --- a/reference_scripts/k9SvH4Lm3ZuI8S1N.js +++ /dev/null @@ -1 +0,0 @@ -return !["wp", "ag", "i", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/kBXVEnSWzaQZLkJH.js b/reference_scripts/kBXVEnSWzaQZLkJH.js deleted file mode 100644 index f8484c9..0000000 --- a/reference_scripts/kBXVEnSWzaQZLkJH.js +++ /dev/null @@ -1,5 +0,0 @@ -if(args.test.result.critical) -{ - args.test.result.damage +=1 - args.test.result.additionalDamage += 1 -} \ No newline at end of file diff --git a/reference_scripts/kIM4Fs1lFVV7TSnj.js b/reference_scripts/kIM4Fs1lFVV7TSnj.js deleted file mode 100644 index 176adc4..0000000 --- a/reference_scripts/kIM4Fs1lFVV7TSnj.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.modifyAdvantage(1); \ No newline at end of file diff --git a/reference_scripts/kMSdRskYDI2J1gnp.js b/reference_scripts/kMSdRskYDI2J1gnp.js deleted file mode 100644 index c06e3bc..0000000 --- a/reference_scripts/kMSdRskYDI2J1gnp.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone"); -} - \ No newline at end of file diff --git a/reference_scripts/kWynO1lQzjiSs8RK.js b/reference_scripts/kWynO1lQzjiSs8RK.js deleted file mode 100644 index 0b3b7e8..0000000 --- a/reference_scripts/kWynO1lQzjiSs8RK.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/reference_scripts/kYiDBPRKIokFkr4Z.js b/reference_scripts/kYiDBPRKIokFkr4Z.js deleted file mode 100644 index 10222a8..0000000 --- a/reference_scripts/kYiDBPRKIokFkr4Z.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "skill" && args.item.name == "Ranged (Bow)") -{ - args.item.system.modifier.value += 20; -} \ No newline at end of file diff --git a/reference_scripts/kYmscP2HuXjDovBD.js b/reference_scripts/kYmscP2HuXjDovBD.js deleted file mode 100644 index 2e53be1..0000000 --- a/reference_scripts/kYmscP2HuXjDovBD.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) diff --git a/reference_scripts/kbXDGAmWWD4CZJHB.js b/reference_scripts/kbXDGAmWWD4CZJHB.js deleted file mode 100644 index 46569c0..0000000 --- a/reference_scripts/kbXDGAmWWD4CZJHB.js +++ /dev/null @@ -1,5 +0,0 @@ -const sin = this.effect.sourceActor.system.status.sin.value; -const roll = new Roll(`2d10 - ${sin}`); -await roll.evaluate(); -await roll.toMessage({flavor: `${this.effect.name}`}); -this.actor.system.status.mood.addEntry(`${this.effect.name} (${this.effect.sourceActor.name})`, roll.total); \ No newline at end of file diff --git a/reference_scripts/kiJ6AiaYVUjt6aV6.js b/reference_scripts/kiJ6AiaYVUjt6aV6.js deleted file mode 100644 index 2998e2c..0000000 --- a/reference_scripts/kiJ6AiaYVUjt6aV6.js +++ /dev/null @@ -1,7 +0,0 @@ -teeth = await fromUuid("Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1") -teeth = teeth.toObject(); - -let roll = await new Roll("1d10").roll(); -roll.toMessage(this.script.getChatData({flavor : "Teeth Lost"})) -teeth.system.location.value = `${roll.total} ${teeth.system.location.value}` -this.actor.createEmbeddedDocuments("Item", [teeth]) \ No newline at end of file diff --git a/reference_scripts/kkC5EhqA05U6U0gU.js b/reference_scripts/kkC5EhqA05U6U0gU.js deleted file mode 100644 index 4116109..0000000 --- a/reference_scripts/kkC5EhqA05U6U0gU.js +++ /dev/null @@ -1,17 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -// Kind of insane but whatever -let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result - -if (opposedResult?.winner == "attacker") -{ - if (opposedResult.differenceSL < 6) - { - this.actor.addCondition("fatigued", Math.floor(opposedResult.differenceSL / 2)) - } - else if (opposedResult.differenceSL >= 6) - { - this.actor.addCondition("broken"); - } -} \ No newline at end of file diff --git a/reference_scripts/kmsGLWGxCY8Z8jVG.js b/reference_scripts/kmsGLWGxCY8Z8jVG.js deleted file mode 100644 index 3077f61..0000000 --- a/reference_scripts/kmsGLWGxCY8Z8jVG.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Intuition"); \ No newline at end of file diff --git a/reference_scripts/kvaN100w0nBUlLbj.js b/reference_scripts/kvaN100w0nBUlLbj.js deleted file mode 100644 index cc524fa..0000000 --- a/reference_scripts/kvaN100w0nBUlLbj.js +++ /dev/null @@ -1,6 +0,0 @@ -let poisoned = this.actor.hasCondition("poisoned") -if (poisoned) -{ - this.script.scriptMessage("Immune to Poisoned") - poisoned.delete() -} \ No newline at end of file diff --git a/reference_scripts/kvnZz8yqdTZbErkr.js b/reference_scripts/kvnZz8yqdTZbErkr.js deleted file mode 100644 index e35746a..0000000 --- a/reference_scripts/kvnZz8yqdTZbErkr.js +++ /dev/null @@ -1,3 +0,0 @@ -args.actor.system.details.move.value -= 2; -args.actor.system.details.man -= 1; -args.actor.system.status.carries.max *= 1.5; \ No newline at end of file diff --git a/reference_scripts/l8qFKSnMpy4P7XQR.js b/reference_scripts/l8qFKSnMpy4P7XQR.js deleted file mode 100644 index 523491c..0000000 --- a/reference_scripts/l8qFKSnMpy4P7XQR.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/lCOdnKz8XpnkDs6Q.js b/reference_scripts/lCOdnKz8XpnkDs6Q.js deleted file mode 100644 index 51d5386..0000000 --- a/reference_scripts/lCOdnKz8XpnkDs6Q.js +++ /dev/null @@ -1,2 +0,0 @@ -let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); \ No newline at end of file diff --git a/reference_scripts/lFO6XdfUODmFArqx.js b/reference_scripts/lFO6XdfUODmFArqx.js deleted file mode 100644 index 083ec87..0000000 --- a/reference_scripts/lFO6XdfUODmFArqx.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("bleeding") \ No newline at end of file diff --git a/reference_scripts/lII4KMRblqwFBlsV.js b/reference_scripts/lII4KMRblqwFBlsV.js deleted file mode 100644 index 49bd3a7..0000000 --- a/reference_scripts/lII4KMRblqwFBlsV.js +++ /dev/null @@ -1,133 +0,0 @@ -let characteristics = { - "ws" : 10, - "bs" : 0, - "s" : 0, - "t" : 0, - "i" : 10, - "ag" : 0, - "dex" : 0, - "int" : 20, - "wp" : 10, - "fel" : 15 -} -let skills = ["Channelling", "Charm", "Perform (Dancing)"] -let skillAdvancements = [0, 6, 3] -let talents = ["Attractive", "Distract", "Mimic"] -let traits = ["Distracting", "Flight (6)", "Spellcaster (Petty)"] -let trappings = [] -let items = []; -let spells = ["Marsh Lights", "Sleep"]; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm -for (let trait of traits) -{ - let traitMatches = trait.matchAll(traitRegex).next().value - let traitName = traitMatches[1] - let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization - let traitSpec = traitMatches[3] - - let traitItem; - try { - traitItem = await WFRP_Utility.findItem(traitName, "trait") - } - catch { } - if (!traitItem) { - ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) - } - traitItem = traitItem.toObject() - - if (Number.isNumeric(traitVal)) - { - traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; - traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() - } - else - traitItem.system.specification.value = traitSpec - - items.push(traitItem) - -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -for (let spell of spells) -{ - let spellItem = await game.wfrp4e.utility.findItem(spell) - if (spellItem) - { - spellItem = spellItem.toObject() - - items.push(spellItem); - } - else - { - ui.notifications.warn(`Could not find ${spell}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - - -function equip(item) -{ - if (item.type == "armour") - item.worn = true - else if (item.type == "weapon") - item.equipped = true - else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") - item.worn = true -} \ No newline at end of file diff --git a/reference_scripts/lOIHiAIDtj91kllN.js b/reference_scripts/lOIHiAIDtj91kllN.js deleted file mode 100644 index 35b81b2..0000000 --- a/reference_scripts/lOIHiAIDtj91kllN.js +++ /dev/null @@ -1,6 +0,0 @@ -const chanties = await WFRP_Utility.findAll('wfrp4e-soc.chanty'); -let choice = await ItemDialog.create(chanties, 1, "Choose Chanty"); -if (choice.length) { - console.log(choice); - this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id}); -} \ No newline at end of file diff --git a/reference_scripts/lOzkngzye4RmvALp.js b/reference_scripts/lOzkngzye4RmvALp.js deleted file mode 100644 index 4f261d3..0000000 --- a/reference_scripts/lOzkngzye4RmvALp.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT") -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}); -this.script.scriptNotification("Added " + item.name) \ No newline at end of file diff --git a/reference_scripts/lPudo1grrVp05i7a.js b/reference_scripts/lPudo1grrVp05i7a.js deleted file mode 100644 index b96114f..0000000 --- a/reference_scripts/lPudo1grrVp05i7a.js +++ /dev/null @@ -1,11 +0,0 @@ -let loc = Math.floor(CONFIG.Dice.randomUniform() * 2) == 0 ? "head" : "body" -let damage = this.actor.system.characteristics.s.bonus + 6 - - this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => { - await test.roll(); - if(test.failed) - { - await this.actor.addCondition("stunned") - this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) - } - }) \ No newline at end of file diff --git a/reference_scripts/lQJ68n3y1xDyNicE.js b/reference_scripts/lQJ68n3y1xDyNicE.js deleted file mode 100644 index 0d61d6e..0000000 --- a/reference_scripts/lQJ68n3y1xDyNicE.js +++ /dev/null @@ -1 +0,0 @@ -return !args.options.sizeModifier && args.item?.system?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/lSOAZ4FG44bT4jh1.js b/reference_scripts/lSOAZ4FG44bT4jh1.js deleted file mode 100644 index fd544d6..0000000 --- a/reference_scripts/lSOAZ4FG44bT4jh1.js +++ /dev/null @@ -1,7 +0,0 @@ -let infected = await fromUuid("Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW") -let fear = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") - -let infectedData = infected.toObject(); -let fearData = fear.toObject(); -fearData.system.specification.value = 2; -this.actor.createEmbeddedDocuments("Item", [fearData, infectedData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/lU4s3UTtBkU38djI.js b/reference_scripts/lU4s3UTtBkU38djI.js deleted file mode 100644 index ba1cf91..0000000 --- a/reference_scripts/lU4s3UTtBkU38djI.js +++ /dev/null @@ -1,4 +0,0 @@ -this.actor.addCondition("entangled") -let msg = `${this.actor.prototypeToken.name} loses 1 Wound and gains 1 Entangled Condition.` -this.script.scriptMessage(msg) -this.actor.modifyWounds(-1) \ No newline at end of file diff --git a/reference_scripts/lYYkGzqNshiYc7WI.js b/reference_scripts/lYYkGzqNshiYc7WI.js deleted file mode 100644 index d17b4c6..0000000 --- a/reference_scripts/lYYkGzqNshiYc7WI.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("poisoned") -} \ No newline at end of file diff --git a/reference_scripts/lZuavewrJzOehrJQ.js b/reference_scripts/lZuavewrJzOehrJQ.js deleted file mode 100644 index 64118c4..0000000 --- a/reference_scripts/lZuavewrJzOehrJQ.js +++ /dev/null @@ -1,14 +0,0 @@ -let test = await this.actor.setupSkill('Endurance', { - appendTitle: ` – ${this.effect.name}`, - skipTargets: true, - fields: {difficulty: 'easy'}, - characteristic: 't', - context: {failure: "Mast shattered!"} -}); -await test.roll(); - -if (test.failed) { - let crit = await fromUuid("Item.d4bCnR1zINTNF9VC"); - await this.actor.createEmbeddedDocuments("Item", [crit]); - this.effect.update({disabled: true}); -} \ No newline at end of file diff --git a/reference_scripts/laptAldsT0Fm1rDt.js b/reference_scripts/laptAldsT0Fm1rDt.js deleted file mode 100644 index 861ea5e..0000000 --- a/reference_scripts/laptAldsT0Fm1rDt.js +++ /dev/null @@ -1,6 +0,0 @@ -let blunt = await Dialog.confirm({label : "test", content :`Apply blunt damage reduction? (-3)
`}) - -if (blunt) -{ - args.modifiers.other.push({label : this.effect.name, details : "Blunt Damage Reduction", value : -3}) -} \ No newline at end of file diff --git a/reference_scripts/lhemR8EP5tGNKout.js b/reference_scripts/lhemR8EP5tGNKout.js deleted file mode 100644 index a9d9356..0000000 --- a/reference_scripts/lhemR8EP5tGNKout.js +++ /dev/null @@ -1,14 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : "Suffer Creeping Irrationality"}}) -await test.roll(); -if (test.failed) -{ - msg = `@UUID[${this.effect.sourceItem.uuid}]{Creeping Irratitonality} Roll: ${Math.ceil(CONFIG.Dice.randomUniform() * 10)}
` - if (test.result.roll % 11 == 0 || test.result.roll == 100) - { - msg += `${this.actor.prototypeToken.name} also gained 1 Corruption Point. If mutating, this results in a @Table[mutatemental]{Mental Corruption}
` - let newCorruption = Number(this.actor.status.corruption.value) + 1 - this.actor.update({"system.status.corruption.value" : newCorruption}) - } - - this.script.scriptMessage(msg); -} diff --git a/reference_scripts/ljGX2w8hCTyLAjRp.js b/reference_scripts/ljGX2w8hCTyLAjRp.js deleted file mode 100644 index 2371ff4..0000000 --- a/reference_scripts/ljGX2w8hCTyLAjRp.js +++ /dev/null @@ -1,2 +0,0 @@ -let specification = Number(this.item.specification.value) || 1; -args.actor.system.details.price.gc -= Math.floor(args.actor.system.details.price.gc * 0.1 * specification); \ No newline at end of file diff --git a/reference_scripts/ljpM7muMyxGD04EX.js b/reference_scripts/ljpM7muMyxGD04EX.js deleted file mode 100644 index 50ba967..0000000 --- a/reference_scripts/ljpM7muMyxGD04EX.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/lol5J6h0pErzM71s.js b/reference_scripts/lol5J6h0pErzM71s.js deleted file mode 100644 index cc986ba..0000000 --- a/reference_scripts/lol5J6h0pErzM71s.js +++ /dev/null @@ -1 +0,0 @@ -return args.weapon?.system.properties.flaws.crewed \ No newline at end of file diff --git a/reference_scripts/lvjcddwRiN9iGruy.js b/reference_scripts/lvjcddwRiN9iGruy.js deleted file mode 100644 index 1f4ca7b..0000000 --- a/reference_scripts/lvjcddwRiN9iGruy.js +++ /dev/null @@ -1,38 +0,0 @@ -let test = await this.actor.setupCharacteristic("t", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty: "challenging" } }) -await test.roll(); - -if (test.failed) -{ - let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10) - let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10) - let bs = Math.ceil(CONFIG.Dice.randomUniform() * 10) - let s = Math.ceil(CONFIG.Dice.randomUniform() * 10) - let t = Math.ceil(CONFIG.Dice.randomUniform() * 10) - let ag = Math.ceil(CONFIG.Dice.randomUniform() * 10) - let dex = Math.ceil(CONFIG.Dice.randomUniform() * 10) - - let currentAge = parseInt(this.actor.system.details.age.value) - - let inline = `@ROLL` - let msg = - `${this.actor.prototypeToken.name} ages by ${inline.replace("@ROLL", ageAdded).replace("@TT", "2d10")} and loses
-${inline.replace("@ROLL", ws).replace("@TT", "1d10")} Weapon Skill
-${inline.replace("@ROLL", bs).replace("@TT", "1d10")} Ballistic Skill
-${inline.replace("@ROLL", s).replace("@TT", "1d10")} Strength
-${inline.replace("@ROLL", t).replace("@TT", "1d10")} Toughness
-${inline.replace("@ROLL", ag).replace("@TT", "1d10")} Agility
-${inline.replace("@ROLL", dex).replace("@TT", "1d10")} Dexterity
- ` - this.script.scriptMessage(msg); - - let characteristics = duplicate(this.actor.system.characteristics) - - characteristics.ws.initial -= ws - characteristics.bs.initial -= bs - characteristics.s.initial -= s - characteristics.t.initial -= t - characteristics.ag.initial -= ag - characteristics.dex.initial -= dex - - this.actor.update({ "system.characteristics": characteristics, "data.details.age.value": ageAdded + currentAge }) -} \ No newline at end of file diff --git a/reference_scripts/lwVhn4bSXJ3eoT9q.js b/reference_scripts/lwVhn4bSXJ3eoT9q.js deleted file mode 100644 index 3a19740..0000000 --- a/reference_scripts/lwVhn4bSXJ3eoT9q.js +++ /dev/null @@ -1,8 +0,0 @@ -if (this.item.system.weaponGroup.value == "basic") -{ - let slash = this.item.system.qualities.value.find(i => i.name == "slash") - if (slash) - { - slash.value = "2A" - } -} \ No newline at end of file diff --git a/reference_scripts/m3qEVO5fseV6KHXa.js b/reference_scripts/m3qEVO5fseV6KHXa.js deleted file mode 100644 index ebc6391..0000000 --- a/reference_scripts/m3qEVO5fseV6KHXa.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl") -let data = item.toObject(); -data.system.location.key = this.item.system.location.key -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/m58MpMZBblpq5LJu.js b/reference_scripts/m58MpMZBblpq5LJu.js deleted file mode 100644 index 6f85774..0000000 --- a/reference_scripts/m58MpMZBblpq5LJu.js +++ /dev/null @@ -1,2 +0,0 @@ -args.prefillModifiers.slBonus++; -args.prefillModifiers.successBonus++; diff --git a/reference_scripts/m8qBlbH7ROoqa22o.js b/reference_scripts/m8qBlbH7ROoqa22o.js deleted file mode 100644 index 17577b3..0000000 --- a/reference_scripts/m8qBlbH7ROoqa22o.js +++ /dev/null @@ -1 +0,0 @@ -return args.options.reload \ No newline at end of file diff --git a/reference_scripts/mBcLf11upaHS8AQq.js b/reference_scripts/mBcLf11upaHS8AQq.js deleted file mode 100644 index 4234181..0000000 --- a/reference_scripts/mBcLf11upaHS8AQq.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.status.addArmour(1, {source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/mGHKBkDp4omSaBlD.js b/reference_scripts/mGHKBkDp4omSaBlD.js deleted file mode 100644 index 36c1d60..0000000 --- a/reference_scripts/mGHKBkDp4omSaBlD.js +++ /dev/null @@ -1,12 +0,0 @@ -this.actor.getActiveTokens().forEach(t => t.document.update({light : { - "dim": 20, - "bright": 10, - "angle": 360, - "alpha": 0.4, - "animation": { - "speed": 3, - "intensity": 3, - "type": "torch", - }, - "color": "#ffcc66", - }})); \ No newline at end of file diff --git a/reference_scripts/mJ9eMPub4epJSf00.js b/reference_scripts/mJ9eMPub4epJSf00.js deleted file mode 100644 index 4144fbb..0000000 --- a/reference_scripts/mJ9eMPub4epJSf00.js +++ /dev/null @@ -1 +0,0 @@ -return args.weapon?.system.qualities.value.find(i => i.name == "shield") && this.actor.attacker \ No newline at end of file diff --git a/reference_scripts/mPxmCsXYirAIT913.js b/reference_scripts/mPxmCsXYirAIT913.js deleted file mode 100644 index 84284a1..0000000 --- a/reference_scripts/mPxmCsXYirAIT913.js +++ /dev/null @@ -1,3 +0,0 @@ -let key = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.characteristics, this.effect.img), 1, "Choose Characteristic"); - -this.effect.updateSource({changes : [{key : `system.characteristics.${key[0].id}.modifier`, mode : 2, value : 10}]}) \ No newline at end of file diff --git a/reference_scripts/mRvLsSVxNyt8LVZb.js b/reference_scripts/mRvLsSVxNyt8LVZb.js deleted file mode 100644 index f68402d..0000000 --- a/reference_scripts/mRvLsSVxNyt8LVZb.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.GRRN3XAKIpEVCY7z") -let data = item.toObject(); -data.name += " (To Be Determined)" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/mT7PDcjF3cJTDbjR.js b/reference_scripts/mT7PDcjF3cJTDbjR.js deleted file mode 100644 index 6995528..0000000 --- a/reference_scripts/mT7PDcjF3cJTDbjR.js +++ /dev/null @@ -1,2 +0,0 @@ -args.actor.system.details.move.value -= 1; -args.actor.system.status.carries.max *= 1.25; \ No newline at end of file diff --git a/reference_scripts/mTnmPcjWmvScIBWY.js b/reference_scripts/mTnmPcjWmvScIBWY.js deleted file mode 100644 index 14c7aaf..0000000 --- a/reference_scripts/mTnmPcjWmvScIBWY.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes("Channelling") || args.type == "channelling" \ No newline at end of file diff --git a/reference_scripts/mV4Tmc0yfpL09KV7.js b/reference_scripts/mV4Tmc0yfpL09KV7.js deleted file mode 100644 index 3b9f40b..0000000 --- a/reference_scripts/mV4Tmc0yfpL09KV7.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("entangled") \ No newline at end of file diff --git a/reference_scripts/mXvtf3qhJjshpopX.js b/reference_scripts/mXvtf3qhJjshpopX.js deleted file mode 100644 index 53e2cdb..0000000 --- a/reference_scripts/mXvtf3qhJjshpopX.js +++ /dev/null @@ -1 +0,0 @@ -return ["weapon", "cast", "channelling"].includes(args.type) \ No newline at end of file diff --git a/reference_scripts/mYL4i1vNlMl4vFYy.js b/reference_scripts/mYL4i1vNlMl4vFYy.js deleted file mode 100644 index a5211a8..0000000 --- a/reference_scripts/mYL4i1vNlMl4vFYy.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Perception") && args.skill?.name != game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/reference_scripts/ma0sWhebqwdRHWvY.js b/reference_scripts/ma0sWhebqwdRHWvY.js deleted file mode 100644 index c1779e5..0000000 --- a/reference_scripts/ma0sWhebqwdRHWvY.js +++ /dev/null @@ -1,5 +0,0 @@ -if (!args.flags.trained) -{ - args.flags.trained = true; - args.fields.modifier += 10; -} \ No newline at end of file diff --git a/reference_scripts/maKr58mvvyKxFyC3.js b/reference_scripts/maKr58mvvyKxFyC3.js deleted file mode 100644 index f941ab6..0000000 --- a/reference_scripts/maKr58mvvyKxFyC3.js +++ /dev/null @@ -1,2 +0,0 @@ -if (args.item.type == "prayer" && (args.item.damage.value || args.item.damage.dice)) - args.item.damage.value += "+1" \ No newline at end of file diff --git a/reference_scripts/masOBNgSi5HYkf3m.js b/reference_scripts/masOBNgSi5HYkf3m.js deleted file mode 100644 index ed60b79..0000000 --- a/reference_scripts/masOBNgSi5HYkf3m.js +++ /dev/null @@ -1 +0,0 @@ -return args.type != "cast" && args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/mgLGN1XPzPE4dReN.js b/reference_scripts/mgLGN1XPzPE4dReN.js deleted file mode 100644 index 0433903..0000000 --- a/reference_scripts/mgLGN1XPzPE4dReN.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus--; \ No newline at end of file diff --git a/reference_scripts/mlulnXQo8XU8vKLD.js b/reference_scripts/mlulnXQo8XU8vKLD.js deleted file mode 100644 index 95f2044..0000000 --- a/reference_scripts/mlulnXQo8XU8vKLD.js +++ /dev/null @@ -1,8 +0,0 @@ -if (isNaN(parseInt(this.item.system.specification.value))) -{ - let value = await ValueDialog.create("Enter Grim value", this.effect.name); - if (value) - { - this.item.updateSource({"system.specification.value" : value}); - } -} \ No newline at end of file diff --git a/reference_scripts/mr8qm5Bg6k1idZ6Q.js b/reference_scripts/mr8qm5Bg6k1idZ6Q.js deleted file mode 100644 index c28b926..0000000 --- a/reference_scripts/mr8qm5Bg6k1idZ6Q.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name == "Play (Lute)" \ No newline at end of file diff --git a/reference_scripts/mziJBUYcsrhkdcCJ.js b/reference_scripts/mziJBUYcsrhkdcCJ.js deleted file mode 100644 index 0308dbf..0000000 --- a/reference_scripts/mziJBUYcsrhkdcCJ.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone") -} \ No newline at end of file diff --git a/reference_scripts/n5RJqJL9fdRIxkuN.js b/reference_scripts/n5RJqJL9fdRIxkuN.js deleted file mode 100644 index 5fa0e06..0000000 --- a/reference_scripts/n5RJqJL9fdRIxkuN.js +++ /dev/null @@ -1,12 +0,0 @@ -if (this.actor.system.status.advantage.value > 0) -{ - await this.actor.modifyAdvantage(-1); - this.script.scriptNotification("Advantage Subtracted") -} -else -{ - return this.script.scriptNotification("Not enough Advantage!", "error") -} - -let test = await this.actor.setupTrait(this.item) -await test.roll(); \ No newline at end of file diff --git a/reference_scripts/nCWAflBj7Si2BI1Q.js b/reference_scripts/nCWAflBj7Si2BI1Q.js deleted file mode 100644 index af67a69..0000000 --- a/reference_scripts/nCWAflBj7Si2BI1Q.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.item.type == "spell" && args.item.system.lore.value != "petty") -{ - args.item.cn.value = Math.max(4, args.item.cn.value * 2) -} \ No newline at end of file diff --git a/reference_scripts/nD2QVg3DrPK3foMf.js b/reference_scripts/nD2QVg3DrPK3foMf.js deleted file mode 100644 index 0101c82..0000000 --- a/reference_scripts/nD2QVg3DrPK3foMf.js +++ /dev/null @@ -1,7 +0,0 @@ -args.actor.setupSkill("Dodge", { fields: { difficulty: "average" } }).then(async test => { - await test.roll(); - if (test.failed) { - await args.actor.addCondition("bleeding") - await args.actor.addCondition("entangled") - } - }) \ No newline at end of file diff --git a/reference_scripts/nEaF3jbCiVYD8jia.js b/reference_scripts/nEaF3jbCiVYD8jia.js deleted file mode 100644 index c39fb2f..0000000 --- a/reference_scripts/nEaF3jbCiVYD8jia.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.Charm") && !args.skill?.name.includes(game.i18n.localize("NAME.Lore")); \ No newline at end of file diff --git a/reference_scripts/nGTxNWBUBgTr87wU.js b/reference_scripts/nGTxNWBUBgTr87wU.js deleted file mode 100644 index c078cd8..0000000 --- a/reference_scripts/nGTxNWBUBgTr87wU.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") -{ - this.script.scriptMessage(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, speaker : {alias : this.item.name}, {blind: true, whisper : ChatMessage.getWhisperRecipients("GM")}) -} - \ No newline at end of file diff --git a/reference_scripts/nHJdlqbOP0ECgywb.js b/reference_scripts/nHJdlqbOP0ECgywb.js deleted file mode 100644 index 6bf5cf6..0000000 --- a/reference_scripts/nHJdlqbOP0ECgywb.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.CnydL8p3PVAuF98w") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/nIOeK0BrtdZeZW8X.js b/reference_scripts/nIOeK0BrtdZeZW8X.js deleted file mode 100644 index 8e85711..0000000 --- a/reference_scripts/nIOeK0BrtdZeZW8X.js +++ /dev/null @@ -1,17 +0,0 @@ -console.log("SKILL", this) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "challenging"}, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -let rollD10 = await new Roll("1d10").roll() -rollD10.toMessage(this.script.getChatData()) - - -if (test.succeeded) -{ - //... -} -else if (test.failed) -{ - //... -} diff --git a/reference_scripts/nSXzktHyNjGUXjaw.js b/reference_scripts/nSXzktHyNjGUXjaw.js deleted file mode 100644 index 33216f3..0000000 --- a/reference_scripts/nSXzktHyNjGUXjaw.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.system.isRanged \ No newline at end of file diff --git a/reference_scripts/nYtAjSArsNbrU2ob.js b/reference_scripts/nYtAjSArsNbrU2ob.js deleted file mode 100644 index f092926..0000000 --- a/reference_scripts/nYtAjSArsNbrU2ob.js +++ /dev/null @@ -1,8 +0,0 @@ -if (["ag", "i", "int"].includes(args.characteristic)) -{ - args.fields.modifier -= 10; -} -else if (["wp"].includes(args.characteristic)) -{ - args.fields.modifier += 10; -} \ No newline at end of file diff --git a/reference_scripts/naF5EWr1CBkYRZTK.js b/reference_scripts/naF5EWr1CBkYRZTK.js deleted file mode 100644 index ecdafaa..0000000 --- a/reference_scripts/naF5EWr1CBkYRZTK.js +++ /dev/null @@ -1,26 +0,0 @@ -if (args.opposedTest?.attackerTest?.item?.system?.isRanged) -{ - let choice = await Dialog.wait({ - title: this.effect.name, - content: `Abort damage with ${this.effect.name}?`, - buttons: { - yes: { - label: "Yes", - callback: () => { - return true; - } - }, - no: { - label: "No", - callback: () => { - return false; - } - } - } - }) - - if (choice) - { - args.abort = `${this.effect.name}: Damage cancelled` - } -} \ No newline at end of file diff --git a/reference_scripts/ncIjDE6TFx88IQA1.js b/reference_scripts/ncIjDE6TFx88IQA1.js deleted file mode 100644 index 223a1a3..0000000 --- a/reference_scripts/ncIjDE6TFx88IQA1.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name == game.i18n.localize("NAME.Athletics"); \ No newline at end of file diff --git a/reference_scripts/neaaVy6D6tfcst5P.js b/reference_scripts/neaaVy6D6tfcst5P.js deleted file mode 100644 index 123137f..0000000 --- a/reference_scripts/neaaVy6D6tfcst5P.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus += this.actor.characteristics.i.bonus; diff --git a/reference_scripts/ngMm7SgtVqVovFJG.js b/reference_scripts/ngMm7SgtVqVovFJG.js deleted file mode 100644 index 8d5af65..0000000 --- a/reference_scripts/ngMm7SgtVqVovFJG.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.result.critical && args.test.result.critical != "Total Power") -{ - args.test.result.other.push(` Bonecrusher Critical (+20) (only if Critical Cast selected)`) -} \ No newline at end of file diff --git a/reference_scripts/njPP9wDAsdh4WHIj.js b/reference_scripts/njPP9wDAsdh4WHIj.js deleted file mode 100644 index be455e6..0000000 --- a/reference_scripts/njPP9wDAsdh4WHIj.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.totalWoundLoss > 0 && ["trait", "weapon"].includes(args.opposedTest.attackerTest.item?.type)) -{ - this.script.scriptMessage(`Infected: ${args.actor.name} must pass an Easy (+40) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/reference_scripts/nkSmu7v9WiAaK4vq.js b/reference_scripts/nkSmu7v9WiAaK4vq.js deleted file mode 100644 index 0043a12..0000000 --- a/reference_scripts/nkSmu7v9WiAaK4vq.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `
Finished repairing ${this.item.name}.
`; -const test = 'Trade (Tailor)'; -const difficulty = 'easy'; -const target = 20; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/nkbTnaeBpthyhw4J.js b/reference_scripts/nkbTnaeBpthyhw4J.js deleted file mode 100644 index da73508..0000000 --- a/reference_scripts/nkbTnaeBpthyhw4J.js +++ /dev/null @@ -1,6 +0,0 @@ -let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current -let current = this.actor.status.fortune.value - -this.actor.update({"system.status.fortune.value" : fortunePoints + current}) - -this.script.scriptMessage(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`) \ No newline at end of file diff --git a/reference_scripts/nkdKBJ8ItqWiRAWL.js b/reference_scripts/nkdKBJ8ItqWiRAWL.js deleted file mode 100644 index da8ed4c..0000000 --- a/reference_scripts/nkdKBJ8ItqWiRAWL.js +++ /dev/null @@ -1,21 +0,0 @@ -// Apply changes when the mask is worn - -if (args.equipped) { - this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) - this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpentry)'; -const difficulty = 'challenging'; -const target = 20; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/qAEZgtu5CrfUkxhx.js b/reference_scripts/qAEZgtu5CrfUkxhx.js deleted file mode 100644 index c5c12b1..0000000 --- a/reference_scripts/qAEZgtu5CrfUkxhx.js +++ /dev/null @@ -1,16 +0,0 @@ -if (args.test.options.staunchBleeding) -{ - if (args.test.succeeded) - { - let staunch = Number(args.test.result.SL) + 1 - if (args.test.options.fieldDressing && args.test.result.reversed) - { - staunch = Math.min(1, Number(args.test.result.SL)) + 1 - } - args.test.result.other.push(`${this.actor.name} removed ${staunch} Bleeding conditions from the patient.`) - } - else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) - { - args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`) - } -} \ No newline at end of file diff --git a/reference_scripts/qK4q4o6cQhcGzFX3.js b/reference_scripts/qK4q4o6cQhcGzFX3.js deleted file mode 100644 index e7c6e3b..0000000 --- a/reference_scripts/qK4q4o6cQhcGzFX3.js +++ /dev/null @@ -1,7 +0,0 @@ -let fear = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") -let leader = await fromUuid("Compendium.wfrp4e-core.items.Item.vCgEAetBMngR53aT") -let fearData = fear.toObject(); -let leaderData = leader.toObject(); -fearData.system.specification.value = this.effect.sourceTest.result.overcast.usage.other.current; -talents = new Array(1 + this.effect.sourceTest.result.overcast.available).fill(leaderData); // Assume any unused overcast is for war leader -this.actor.createEmbeddedDocuments("Item", [fearData].concat(talents), {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/qSwCYMMiIHmSV1X5.js b/reference_scripts/qSwCYMMiIHmSV1X5.js deleted file mode 100644 index 1379278..0000000 --- a/reference_scripts/qSwCYMMiIHmSV1X5.js +++ /dev/null @@ -1,13 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.system.reduceQuantity(); - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - let effectData = this.item.effects.contents[0].convertToApplied(); - effectData.flags.wfrp4e.sourceItem = this.item.uuid - effectData.duration.seconds = 10800 - actor.applyEffect({effectData : [effectData]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/qT0WBPxLMMO9gvCd.js b/reference_scripts/qT0WBPxLMMO9gvCd.js deleted file mode 100644 index fd89c3b..0000000 --- a/reference_scripts/qT0WBPxLMMO9gvCd.js +++ /dev/null @@ -1,4 +0,0 @@ -if (!this.actor.has("Night Vision") && !this.actor.has("Night Vision", "talent") && !this.actor.hasCondition("blinded")) -{ - this.actor.addCondition("blinded", 1, {"flags.wfrp4e.nightshroud" : true}) -} \ No newline at end of file diff --git a/reference_scripts/qTcK1TSjLTi0jNQK.js b/reference_scripts/qTcK1TSjLTi0jNQK.js deleted file mode 100644 index b894a45..0000000 --- a/reference_scripts/qTcK1TSjLTi0jNQK.js +++ /dev/null @@ -1,8 +0,0 @@ -let AP = args.actor.status.armour; - -AP["head"].value += 1; -AP["rArm"].value += 1; -AP["lArm"].value += 1; -AP["body"].value += 1; -AP["lLeg"].value += 1; -AP["rLeg"].value += 1; \ No newline at end of file diff --git a/reference_scripts/qUwnVlWpsmDom3RK.js b/reference_scripts/qUwnVlWpsmDom3RK.js deleted file mode 100644 index e82109e..0000000 --- a/reference_scripts/qUwnVlWpsmDom3RK.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier -= 5; \ No newline at end of file diff --git a/reference_scripts/qZschZU0nee0kJlk.js b/reference_scripts/qZschZU0nee0kJlk.js deleted file mode 100644 index 0064f3f..0000000 --- a/reference_scripts/qZschZU0nee0kJlk.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier -= 30; \ No newline at end of file diff --git a/reference_scripts/qaVde0sTuMBRi2nl.js b/reference_scripts/qaVde0sTuMBRi2nl.js deleted file mode 100644 index 2bd32fd..0000000 --- a/reference_scripts/qaVde0sTuMBRi2nl.js +++ /dev/null @@ -1 +0,0 @@ -return ["NAME.Evaluate", "NAME.Gamble"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/qcyl98GYD55BkJsD.js b/reference_scripts/qcyl98GYD55BkJsD.js deleted file mode 100644 index 510b62f..0000000 --- a/reference_scripts/qcyl98GYD55BkJsD.js +++ /dev/null @@ -1,2 +0,0 @@ -this.actor.status.encumbrance.state = 0; -this.actor.status.encumbrance.pct = 0; \ No newline at end of file diff --git a/reference_scripts/qijgjcOBCDmhglRX.js b/reference_scripts/qijgjcOBCDmhglRX.js deleted file mode 100644 index 49dfaeb..0000000 --- a/reference_scripts/qijgjcOBCDmhglRX.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.SleightOfHand"); \ No newline at end of file diff --git a/reference_scripts/qjli5evn8UA9uTeZ.js b/reference_scripts/qjli5evn8UA9uTeZ.js deleted file mode 100644 index 4f6fabe..0000000 --- a/reference_scripts/qjli5evn8UA9uTeZ.js +++ /dev/null @@ -1 +0,0 @@ -return args.actor.uuid == this.effect.sourceActor.uuid; \ No newline at end of file diff --git a/reference_scripts/qmOt7h17hGAKqQe0.js b/reference_scripts/qmOt7h17hGAKqQe0.js deleted file mode 100644 index cd2dd07..0000000 --- a/reference_scripts/qmOt7h17hGAKqQe0.js +++ /dev/null @@ -1,24 +0,0 @@ - -let choice = await Dialog.wait({ - title: this.effect.name, - content: `${this.effect.name}: Is this a ranged or magical attack that orignates outside the Dome?
`, - buttons: { - yes: { - label: "Yes", - callback: () => { - return true; - } - }, - no: { - label: "No", - callback: () => { - return false; - } - } - } -}) - -if (choice) -{ - args.ward = 6; -} \ No newline at end of file diff --git a/reference_scripts/qnJu82zgnfOsnqZV.js b/reference_scripts/qnJu82zgnfOsnqZV.js deleted file mode 100644 index 5677b9a..0000000 --- a/reference_scripts/qnJu82zgnfOsnqZV.js +++ /dev/null @@ -1,12 +0,0 @@ -let closed = !this.item.getFlag("wfrp4e-soc", "gunport") || false; - -await this.item.setFlag("wfrp4e-soc", "gunport", closed); -let scriptData = this.effect.flags.wfrp4e.scriptData; - -if (closed) { - scriptData[0].label = "Open"; -} else { - scriptData[0].label = "Close"; -} - -await this.effect.update({"flags.wfrp4e.scriptData": scriptData}); \ No newline at end of file diff --git a/reference_scripts/qu194dVXm9Vx1TGk.js b/reference_scripts/qu194dVXm9Vx1TGk.js deleted file mode 100644 index c99393f..0000000 --- a/reference_scripts/qu194dVXm9Vx1TGk.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) -{ - -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) - -if (ones > SL) - args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) - args.test.result.other.push(`${this.effect.name}: Used unit dice as SL`) -} \ No newline at end of file diff --git a/reference_scripts/quPcuKsq2fcild4a.js b/reference_scripts/quPcuKsq2fcild4a.js deleted file mode 100644 index 3ebda0b..0000000 --- a/reference_scripts/quPcuKsq2fcild4a.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "easy"}, context: {failure : `${this.effect.name}: Vomit!`} }) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone") -} \ No newline at end of file diff --git a/reference_scripts/qxzhPtysAjPWspKf.js b/reference_scripts/qxzhPtysAjPWspKf.js deleted file mode 100644 index 934561e..0000000 --- a/reference_scripts/qxzhPtysAjPWspKf.js +++ /dev/null @@ -1,4 +0,0 @@ -if (this.actor.has("Undead") || this.actor.has("Daemonic")) -{ - this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); -} \ No newline at end of file diff --git a/reference_scripts/qzGPJflVW7c2Ciim.js b/reference_scripts/qzGPJflVW7c2Ciim.js deleted file mode 100644 index cb29090..0000000 --- a/reference_scripts/qzGPJflVW7c2Ciim.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Cool"); \ No newline at end of file diff --git a/reference_scripts/r6hi5vMdLhTaaPfb.js b/reference_scripts/r6hi5vMdLhTaaPfb.js deleted file mode 100644 index c37780d..0000000 --- a/reference_scripts/r6hi5vMdLhTaaPfb.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.details.move.value += this.effect.sourceTest.result.overcast.usage.other.current \ No newline at end of file diff --git a/reference_scripts/rBAoyhzeU3Q8MVSk.js b/reference_scripts/rBAoyhzeU3Q8MVSk.js deleted file mode 100644 index 3dd08db..0000000 --- a/reference_scripts/rBAoyhzeU3Q8MVSk.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'difficult'; -const target = 50; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/rCh3ltUrUMovd2Kc.js b/reference_scripts/rCh3ltUrUMovd2Kc.js deleted file mode 100644 index 4b1b1b1..0000000 --- a/reference_scripts/rCh3ltUrUMovd2Kc.js +++ /dev/null @@ -1,5 +0,0 @@ -if (this.actor.hasCondition("surprised")) -{ - this.script.scriptNotification("Cannot be surprised"); - this.actor.removeCondition("surprised"); -} \ No newline at end of file diff --git a/reference_scripts/rF0Z3hTUUnSxL3Mq.js b/reference_scripts/rF0Z3hTUUnSxL3Mq.js deleted file mode 100644 index 93d9ab0..0000000 --- a/reference_scripts/rF0Z3hTUUnSxL3Mq.js +++ /dev/null @@ -1,37 +0,0 @@ -let armour = (await fromUuid("Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj")).toObject() -let bite = (await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv")).toObject() -let fear = (await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn")).toObject() -let nightVision = (await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm")).toObject() -let tracker = (await fromUuid("Compendium.wfrp4e-core.items.ClOlztW6hH8rslbp")).toObject() -let weapon = (await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")).toObject() - -armour.name = "Armour (Hide)" -armour.system.specification.value = 2 -bite.system.specification.value = 3 -fear.system.specification.value = 2 -weapon.system.specification.value = 4 -let items = [armour, bite, fear, nightVision, tracker, weapon] - - -let belligerent = (await fromUuid("Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj")).toObject()//{Belligerent} -let bestial = (await fromUuid("Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP")).toObject()//{Bestial} -let big = (await fromUuid("Compendium.wfrp4e-core.items.a8MC97PLzl10WocT")).toObject()//{Big} -let blessed = (await fromUuid("Compendium.wfrp4e-core.items.5muSFXd6oc760uVj")).toObject()//{Blessed (Ulric)} -let champion = (await fromUuid("Compendium.wfrp4e-core.items.4mF5Sp3t09kZhBYc")).toObject()//{Champion} -let die = (await fromUuid("Compendium.wfrp4e-core.items.UsJ2uIOOtHA7JqD5")).toObject()//{Die Hard} -let fast = (await fromUuid("Compendium.wfrp4e-core.items.9MjH4xyVrd3Inzak")).toObject()//{Fast} -let frenzy = (await fromUuid("Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q")).toObject()//{Frenzy} -let immunity = (await fromUuid("Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz")).toObject()//{Immunity to Psychology} -let regenerate = (await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR")).toObject()//{Regenerate} -let size = (await fromUuid("Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q")).toObject()//{Size (Large)} - -blessed.system.specification.value = "Ulric" -size.system.specification.value = "Large" - -let optional = [belligerent, bestial, big, blessed, champion, die, fast, frenzy, immunity, regenerate, size]; - -let chosen = await ItemDialog.create(optional, "unlimited", "Choose Optional Traits"); - -items = items.concat(chosen || []) -this.script.scriptNotification(`Adding ${items.map(i => i.name).join(", ")}`); -this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id}) diff --git a/reference_scripts/rIISfbCShejmJNKw.js b/reference_scripts/rIISfbCShejmJNKw.js deleted file mode 100644 index d2d5e54..0000000 --- a/reference_scripts/rIISfbCShejmJNKw.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.oRx92ByVNEBN6YkK") -let data = item.toObject() -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/rLMaVNEGdZ6xj5Au.js b/reference_scripts/rLMaVNEGdZ6xj5Au.js deleted file mode 100644 index bf2dfbe..0000000 --- a/reference_scripts/rLMaVNEGdZ6xj5Au.js +++ /dev/null @@ -1 +0,0 @@ -return !["i", "int", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/rRfff55c7elyvbCb.js b/reference_scripts/rRfff55c7elyvbCb.js deleted file mode 100644 index 9756192..0000000 --- a/reference_scripts/rRfff55c7elyvbCb.js +++ /dev/null @@ -1 +0,0 @@ -return this.actor.flags.useless[this.item.system.location.key] && args.weapon?.system.usesHands.includes(this.item.system.location.key[0] + "Arm") \ No newline at end of file diff --git a/reference_scripts/rUGSx06BuBvX9kgf.js b/reference_scripts/rUGSx06BuBvX9kgf.js deleted file mode 100644 index 8c3a76f..0000000 --- a/reference_scripts/rUGSx06BuBvX9kgf.js +++ /dev/null @@ -1,9 +0,0 @@ -if (args.test.result.charging) -{ - args.test.result.damage += 1 - args.test.result.additionalDamage += 1 - if (!args.test.result.resolute) { - args.test.result.breakdown.damage.other.push({label : this.effect.name, value : this.item.Advances}); - args.test.result.resolute = true // Prevent duplicate messages - } -} diff --git a/reference_scripts/rVRDoxiWILo7d8FF.js b/reference_scripts/rVRDoxiWILo7d8FF.js deleted file mode 100644 index a75ce6f..0000000 --- a/reference_scripts/rVRDoxiWILo7d8FF.js +++ /dev/null @@ -1,4 +0,0 @@ -let specification = Number(this.item.specification.value) || 1; -args.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification); -args.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification); -args.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.2 * specification; \ No newline at end of file diff --git a/reference_scripts/rVpPNILEzWL9lj6b.js b/reference_scripts/rVpPNILEzWL9lj6b.js deleted file mode 100644 index 6007696..0000000 --- a/reference_scripts/rVpPNILEzWL9lj6b.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.kJNAY1YRaCy9IgmT") -let terrorTraitItem = item.toObject() -terrorTraitItem.system.specification.value = Number(this.effect.item.system.specification.value) -this.actor.createEmbeddedDocuments("Item", [terrorTraitItem]); \ No newline at end of file diff --git a/reference_scripts/rX8FTinyTMj9WJri.js b/reference_scripts/rX8FTinyTMj9WJri.js deleted file mode 100644 index d0c393f..0000000 --- a/reference_scripts/rX8FTinyTMj9WJri.js +++ /dev/null @@ -1,37 +0,0 @@ -if (!this.actor.flags.holed) return; -if (this.actor.flags.holed.applied === true) return; -if (this.actor.hasCondition("dead")) return; - -const currentHoled = this.actor.flags.holed.holed || 0; - -const openGunPorts = this.actor.itemTypes.vehicleMod.reduce((acc, m) => { - if (!m.name.toLowerCase().includes("gun port")) - return acc; - - let closed = m.getFlag("wfrp4e-soc", "gunport"); - if (!closed) acc++; - - return acc; -}, 0); - -const totalHoled = currentHoled + openGunPorts; -const toughness = this.actor.system.characteristics.t.value; -this.actor.flags.holed.total = totalHoled; - -if (totalHoled >= toughness) { - const speaker = ChatMessage.getSpeaker({actor: this.actor}); - this.script.scriptMessage(` -${speaker.alias} sank due to having Holed (${totalHoled}) rating equal to, or exceeding its Toughness (${toughness })
-
- Holed due to Critical Damage: ${currentHoled}
- Holed due to opened Gun Ports: ${openGunPorts}
-
By imbibing this potion, ${this.actor.prototypeToken.name} has becomes subject to Frenzy. This Frenzy lasts [[1d10]] Rounds, and may not be ended sooner.
`, - {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) \ No newline at end of file diff --git a/reference_scripts/sYlGRLApZ3Ub24ea.js b/reference_scripts/sYlGRLApZ3Ub24ea.js deleted file mode 100644 index ee66235..0000000 --- a/reference_scripts/sYlGRLApZ3Ub24ea.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.system.status.addArmour(3, {source: this.effect.name, magical: true}) \ No newline at end of file diff --git a/reference_scripts/sZwLitzwKBTaFca3.js b/reference_scripts/sZwLitzwKBTaFca3.js deleted file mode 100644 index 4d00d6e..0000000 --- a/reference_scripts/sZwLitzwKBTaFca3.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN") -let data = item.toObject(); -data.name = data.name.replace("Target", "Greenskins, Undead, Chaos") -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/sagKJM6oDFlw4ED2.js b/reference_scripts/sagKJM6oDFlw4ED2.js deleted file mode 100644 index 4392e3b..0000000 --- a/reference_scripts/sagKJM6oDFlw4ED2.js +++ /dev/null @@ -1,3 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); -return test.failed; \ No newline at end of file diff --git a/reference_scripts/sbK1a7txpSoXFzyB.js b/reference_scripts/sbK1a7txpSoXFzyB.js deleted file mode 100644 index 079b4dc..0000000 --- a/reference_scripts/sbK1a7txpSoXFzyB.js +++ /dev/null @@ -1,10 +0,0 @@ -if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) -{ - -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) - -if (ones > SL) - args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) - args.test.result.other.push(`${this.effect.name}: Used unit dice as SL`) -} \ No newline at end of file diff --git a/reference_scripts/scfm5iWWBxWI6QaK.js b/reference_scripts/scfm5iWWBxWI6QaK.js deleted file mode 100644 index 117c336..0000000 --- a/reference_scripts/scfm5iWWBxWI6QaK.js +++ /dev/null @@ -1,6 +0,0 @@ -let darkvision = await fromUuid("Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc") -let fear = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") -let acutesense = await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS") -fear = fear.toObject(); -fear.system.specification.value = 1; -this.actor.createEmbeddedDocuments("Item", [darkvision, fear, acutesense], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/sgS9rblPkQB36C8S.js b/reference_scripts/sgS9rblPkQB36C8S.js deleted file mode 100644 index 49348b1..0000000 --- a/reference_scripts/sgS9rblPkQB36C8S.js +++ /dev/null @@ -1,29 +0,0 @@ -if (this.item.name.includes("(")) -{ - let trade = this.item.parenthesesText; - if (trade?.toLowerCase() != "any") - return this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("any one", trade)}) -} - -let index = game.packs -.filter(i => i.metadata.type == "Item") -.reduce((acc, pack) => acc.concat(pack.index.contents), []) -.filter(i => i.type == "skill" && i.name.includes(game.i18n.localize("NAME.Trade"))) -.map(i => { - i.id = i._id - return i -}) - -let choice = await ItemDialog.create(index, 1, "Choose a Trade Skill") -let text; -if (!choice[0]) -{ - let custom = await ValueDialog.create("Enter Custom Trade Skill", "Custom Trade"); - text = custom || "" -} -else -{ - text = game.wfrp4e.utility.extractParenthesesText(choice[0].name) -} - -await this.item.updateSource({name : this.item.name.replace("(Any)", "").replace("(any)", "").trim() + ` (${text})`, "system.tests.value" : this.item.system.tests.value.replace("any one", text)}); \ No newline at end of file diff --git a/reference_scripts/shkBUtUuMPDKvFm7.js b/reference_scripts/shkBUtUuMPDKvFm7.js deleted file mode 100644 index 641a6b6..0000000 --- a/reference_scripts/shkBUtUuMPDKvFm7.js +++ /dev/null @@ -1,10 +0,0 @@ -let test = await this.actor.setupSkill("Dodge", {fields : {difficulty : "average"}}) -let caster = this.effect.sourceActor - -let fallen = this.effect.sourceTest.result.SL + caster.characteristics.wp.bonus -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone") - this.script.scriptMessage(`${this.actor.prototypeToken.name} falls ${fallen} yards`) -} \ No newline at end of file diff --git a/reference_scripts/skVq3eDEYKFF2iZp.js b/reference_scripts/skVq3eDEYKFF2iZp.js deleted file mode 100644 index 312dc79..0000000 --- a/reference_scripts/skVq3eDEYKFF2iZp.js +++ /dev/null @@ -1,2 +0,0 @@ -// I'm assuming the endurance test specified is for the end-round check -await this.actor.addCondition("poisoned", 4); diff --git a/reference_scripts/sm9d5lk6cM0OuUkf.js b/reference_scripts/sm9d5lk6cM0OuUkf.js deleted file mode 100644 index 97c8f33..0000000 --- a/reference_scripts/sm9d5lk6cM0OuUkf.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.applyFear(Math.min(4, this.effect.sourceTest.result.overcast.usage.other.current)) \ No newline at end of file diff --git a/reference_scripts/sx7Ikn8WW00gBFb4.js b/reference_scripts/sx7Ikn8WW00gBFb4.js deleted file mode 100644 index d413850..0000000 --- a/reference_scripts/sx7Ikn8WW00gBFb4.js +++ /dev/null @@ -1,32 +0,0 @@ -let location = (Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "r" : "l") + "Arm" - -if (location == "lArm") -{ - this.script.scriptNotification("Rolled Left") -} -else if (location == "rArm") -{ - this.script.scriptNotification("Rolled Right") -} - -this.effect.updateSource({"flags.wfrp4e.location" : location}); - -if (location) -{ - let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location)); - - if (dropped.length) - { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) - for(let weapon of dropped) - { - await weapon.system.toggleEquip(); - } - } -} - -let roll = await new Roll("1d10").roll() - -roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); - -this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/syBgPp7rOymCZejX.js b/reference_scripts/syBgPp7rOymCZejX.js deleted file mode 100644 index 3007947..0000000 --- a/reference_scripts/syBgPp7rOymCZejX.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("stunned") -} \ No newline at end of file diff --git a/reference_scripts/syqqBkyP5tGqZ78t.js b/reference_scripts/syqqBkyP5tGqZ78t.js deleted file mode 100644 index 265c5fd..0000000 --- a/reference_scripts/syqqBkyP5tGqZ78t.js +++ /dev/null @@ -1,8 +0,0 @@ -this.actor.has("Immunity to Psychology")?.delete(); - -let roll = await new Roll("1d10").roll(); - -roll.toMessage(this.script.getChatData()); - -this.script.scriptNotification(`Removed Immunity to Psychology, Adding ${roll.total} Broken Conditions`) -this.actor.addCondition("broken", roll.total, {"flags.wfrp4e.blasted-mind" : true}) \ No newline at end of file diff --git a/reference_scripts/t48hkacYdOpzWvK9.js b/reference_scripts/t48hkacYdOpzWvK9.js deleted file mode 100644 index 6e8c53a..0000000 --- a/reference_scripts/t48hkacYdOpzWvK9.js +++ /dev/null @@ -1 +0,0 @@ -args.options.beatBlade = true; \ No newline at end of file diff --git a/reference_scripts/t56mnblo1kv3gM1M.js b/reference_scripts/t56mnblo1kv3gM1M.js deleted file mode 100644 index ce5fba9..0000000 --- a/reference_scripts/t56mnblo1kv3gM1M.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"); \ No newline at end of file diff --git a/reference_scripts/t8LYOuN5peEdWeXP.js b/reference_scripts/t8LYOuN5peEdWeXP.js deleted file mode 100644 index 4aeed96..0000000 --- a/reference_scripts/t8LYOuN5peEdWeXP.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/tCIT1a12Gt6k2ohA.js b/reference_scripts/tCIT1a12Gt6k2ohA.js deleted file mode 100644 index e054b71..0000000 --- a/reference_scripts/tCIT1a12Gt6k2ohA.js +++ /dev/null @@ -1,21 +0,0 @@ -let resistance -if (this.item.name.includes("(")) -{ - resistance = this.item.parenthesesText -} -else -{ - resistance = await ValueDialog.create("Enter Resistance", "Resistance") - - if (resistance) - { - this.item.updateSource({name : this.item.name + ` (${resistance})`}) - this.effect.updateSource({name : this.effect.name + ` (${resistance})`}) - } -} -this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("the associated Threat", resistance)}) - -if (resistance && !this.effect.name.includes("(")) -{ - this.effect.updateSource({name : this.effect.name += ` (${resistance})`}) -} \ No newline at end of file diff --git a/reference_scripts/tDrs0aNIYmZPsOoS.js b/reference_scripts/tDrs0aNIYmZPsOoS.js deleted file mode 100644 index 51bdf06..0000000 --- a/reference_scripts/tDrs0aNIYmZPsOoS.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("prone") -} diff --git a/reference_scripts/tFAKRRRfTjQfdQz3.js b/reference_scripts/tFAKRRRfTjQfdQz3.js deleted file mode 100644 index 566dcbb..0000000 --- a/reference_scripts/tFAKRRRfTjQfdQz3.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.getActiveTokens().forEach(t => t.document.update({"texture.tint" : ""})); \ No newline at end of file diff --git a/reference_scripts/tG1qGqzBLmAR3WHm.js b/reference_scripts/tG1qGqzBLmAR3WHm.js deleted file mode 100644 index 64fa199..0000000 --- a/reference_scripts/tG1qGqzBLmAR3WHm.js +++ /dev/null @@ -1,15 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); -if (test.failed) -{ - let add = 0 - - if (test.result.roll % 11 == 0 || test.result.roll == 100) - { - add = 1 // can't use isFumble if no hit location - } - - await this.actor.addCondition("stunned", Math.max(1, Math.abs(test.result.SL)) + add) - await this.actor.addCondition("blinded", Math.max(1, Math.abs(test.result.SL))) - -} \ No newline at end of file diff --git a/reference_scripts/tGVEV6TLl310mFLP.js b/reference_scripts/tGVEV6TLl310mFLP.js deleted file mode 100644 index 686b84a..0000000 --- a/reference_scripts/tGVEV6TLl310mFLP.js +++ /dev/null @@ -1,7 +0,0 @@ -let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical -if (args.applyAP && nonmagical) -{ - let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical - args.modifiers.ap.ignored += nonmagical - args.modifiers.ap.details.push("" + this.effect.name + ": Ignore Non-Magical AP (" + nonmagical + ")"); -} \ No newline at end of file diff --git a/reference_scripts/tKBq1nGZo8t6vvQ6.js b/reference_scripts/tKBq1nGZo8t6vvQ6.js deleted file mode 100644 index acbf367..0000000 --- a/reference_scripts/tKBq1nGZo8t6vvQ6.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.5hH73j2NgPdsLCZN"); -this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/tNTO1LVN7JqHf4YN.js b/reference_scripts/tNTO1LVN7JqHf4YN.js deleted file mode 100644 index f35b126..0000000 --- a/reference_scripts/tNTO1LVN7JqHf4YN.js +++ /dev/null @@ -1,8 +0,0 @@ -if (args.test.characteristicKey == "wp") -{ - if (args.test.failed) - { - this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["malaise"]]) - this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")}) - } -} \ No newline at end of file diff --git a/reference_scripts/tUwP7TjrOOOnaCYJ.js b/reference_scripts/tUwP7TjrOOOnaCYJ.js deleted file mode 100644 index c502cf0..0000000 --- a/reference_scripts/tUwP7TjrOOOnaCYJ.js +++ /dev/null @@ -1,10 +0,0 @@ -let fatigued = this.actor.hasCondition("fatigued") -if (fatigued) -{ - this.script.scriptNotification(`Cleared ${fatigued.conditionValue} Fatigued Conditions`) - fatigued.delete(); -} -else -{ - this.script.scriptNotification(`No Fatigued Conditions`) -} \ No newline at end of file diff --git a/reference_scripts/tcZug8ehU6lyYBd9.js b/reference_scripts/tcZug8ehU6lyYBd9.js deleted file mode 100644 index 3ac13c4..0000000 --- a/reference_scripts/tcZug8ehU6lyYBd9.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != "Ranged (Blackpowder)" \ No newline at end of file diff --git a/reference_scripts/tdICiJ26rJrDbxT6.js b/reference_scripts/tdICiJ26rJrDbxT6.js deleted file mode 100644 index 233b805..0000000 --- a/reference_scripts/tdICiJ26rJrDbxT6.js +++ /dev/null @@ -1 +0,0 @@ -return args.characteristic != "i" \ No newline at end of file diff --git a/reference_scripts/tn6SwmjAuNzqE6dx.js b/reference_scripts/tn6SwmjAuNzqE6dx.js deleted file mode 100644 index a7bacb4..0000000 --- a/reference_scripts/tn6SwmjAuNzqE6dx.js +++ /dev/null @@ -1,14 +0,0 @@ -let damage = 0 -let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); -await test.roll(); - -if (test.succeeded) -{ - damage = 10; -} -else if (test.failed) -{ - damage = 20; -} - -this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc : "roll", hideDSN: true, suppressMsg : true})) \ No newline at end of file diff --git a/reference_scripts/tnE8LF6E3svIlLca.js b/reference_scripts/tnE8LF6E3svIlLca.js deleted file mode 100644 index 4058efe..0000000 --- a/reference_scripts/tnE8LF6E3svIlLca.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.Research"); \ No newline at end of file diff --git a/reference_scripts/tnilBagajWM8UGQt.js b/reference_scripts/tnilBagajWM8UGQt.js deleted file mode 100644 index 1b8e882..0000000 --- a/reference_scripts/tnilBagajWM8UGQt.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != game.i18n.localize("NAME.ConsumeAlcohol") \ No newline at end of file diff --git a/reference_scripts/toSrgcvWq9b5eN0K.js b/reference_scripts/toSrgcvWq9b5eN0K.js deleted file mode 100644 index f3fabed..0000000 --- a/reference_scripts/toSrgcvWq9b5eN0K.js +++ /dev/null @@ -1,4 +0,0 @@ -let location = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN: true}) - -this.item.updateSource({name : `${this.item.name} (${location.description})`}) -this.script.scriptMessage(`Location: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file diff --git a/reference_scripts/tolkNN5P7oOC8GKZ.js b/reference_scripts/tolkNN5P7oOC8GKZ.js deleted file mode 100644 index e030d9d..0000000 --- a/reference_scripts/tolkNN5P7oOC8GKZ.js +++ /dev/null @@ -1,11 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}}) -await test.roll(); - -if (test.failed) -{ - let sourceActor = this.effect.sourceActor; - if (sourceActor) - { - this.script.scriptMessage(await this.actor.applyBasicDamage(sourceActor.system.characteristics.wp.bonus, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL})) - } -} \ No newline at end of file diff --git a/reference_scripts/tuIsytv3jl2yAIb2.js b/reference_scripts/tuIsytv3jl2yAIb2.js deleted file mode 100644 index cf810e0..0000000 --- a/reference_scripts/tuIsytv3jl2yAIb2.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name !== game.i18n.localize("NAME.Charm") && args.skill?.name !== game.i18n.localize("NAME.Intimidate") && args.skill?.name !== game.i18n.localize("NAME.Leadership") \ No newline at end of file diff --git a/reference_scripts/u3olS2p7Ls1JXfAH.js b/reference_scripts/u3olS2p7Ls1JXfAH.js deleted file mode 100644 index 5ee90b2..0000000 --- a/reference_scripts/u3olS2p7Ls1JXfAH.js +++ /dev/null @@ -1 +0,0 @@ -this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("mutatephys", {}, "Tzeentch")); \ No newline at end of file diff --git a/reference_scripts/u5dNZ0s3lWfL8KFb.js b/reference_scripts/u5dNZ0s3lWfL8KFb.js deleted file mode 100644 index 3d18bb7..0000000 --- a/reference_scripts/u5dNZ0s3lWfL8KFb.js +++ /dev/null @@ -1 +0,0 @@ -return args.fields.charging \ No newline at end of file diff --git a/reference_scripts/u6CYMSZADrfXd48Q.js b/reference_scripts/u6CYMSZADrfXd48Q.js deleted file mode 100644 index ad9447a..0000000 --- a/reference_scripts/u6CYMSZADrfXd48Q.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier += 20; \ No newline at end of file diff --git a/reference_scripts/uACa6u4JLNMRgFlr.js b/reference_scripts/uACa6u4JLNMRgFlr.js deleted file mode 100644 index b4b0244..0000000 --- a/reference_scripts/uACa6u4JLNMRgFlr.js +++ /dev/null @@ -1,2 +0,0 @@ -const talents = await Promise.all(["Furious Assault", "Sea Legs"].map(game.wfrp4e.utility.findTalent)) -this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/uAy4w7y8Uu9POF8C.js b/reference_scripts/uAy4w7y8Uu9POF8C.js deleted file mode 100644 index c07db00..0000000 --- a/reference_scripts/uAy4w7y8Uu9POF8C.js +++ /dev/null @@ -1 +0,0 @@ -args.item.system.qualities.value.push({name : "impact"}) \ No newline at end of file diff --git a/reference_scripts/uLBDnWC3S0lRitbj.js b/reference_scripts/uLBDnWC3S0lRitbj.js deleted file mode 100644 index e858a83..0000000 --- a/reference_scripts/uLBDnWC3S0lRitbj.js +++ /dev/null @@ -1,22 +0,0 @@ -let test = await this.actor.setupCharacteristic("int", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result - -if (opposedResult?.winner == "attacker") -{ - if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100)) - { - this.actor.addCondition("unconscious") - await this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) - this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) - } - else - { - await this.actor.addCondition("stunned", 1 + opposedResult.differenceSL); - } -} -else -{ - return false; -} \ No newline at end of file diff --git a/reference_scripts/uNYstk3eXmWamhzs.js b/reference_scripts/uNYstk3eXmWamhzs.js deleted file mode 100644 index 4a76cd7..0000000 --- a/reference_scripts/uNYstk3eXmWamhzs.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("blinded") \ No newline at end of file diff --git a/reference_scripts/uOHAsKlkFuIaAmjb.js b/reference_scripts/uOHAsKlkFuIaAmjb.js deleted file mode 100644 index 85f570c..0000000 --- a/reference_scripts/uOHAsKlkFuIaAmjb.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.modifyWounds(1) \ No newline at end of file diff --git a/reference_scripts/uSwkYENTOcnfRrqA.js b/reference_scripts/uSwkYENTOcnfRrqA.js deleted file mode 100644 index 05d9ada..0000000 --- a/reference_scripts/uSwkYENTOcnfRrqA.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Melee")) && args.weapon?.system?.attackType != "melee" \ No newline at end of file diff --git a/reference_scripts/ucF4aiJ1gpDB333G.js b/reference_scripts/ucF4aiJ1gpDB333G.js deleted file mode 100644 index 7d00add..0000000 --- a/reference_scripts/ucF4aiJ1gpDB333G.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.test.options.catfall && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target) && !args.test.result.catfall) -{ - args.test.result.other.push(`${this.effect.name}: Fall distance damage reduced by ${Number(args.test.result.SL) + 1} yards`) - args.test.result.catfall = true; // Prevent duplicate messages -} \ No newline at end of file diff --git a/reference_scripts/ugL5IBB6R2yWyMWd.js b/reference_scripts/ugL5IBB6R2yWyMWd.js deleted file mode 100644 index 1616e69..0000000 --- a/reference_scripts/ugL5IBB6R2yWyMWd.js +++ /dev/null @@ -1,23 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let apply = await Dialog.confirm({title : this.effect.name, content : `Appy ${this.effect.name} Damage? Attacker must have used bare hands or a melee weapon made of metal.`}) - if (apply) - { - - let damage = 5 + this.actor.characteristics.wp.bonus; - - let loc = args.opposedTest.attackerTest.weapon?.system.usesHands[0] || "rArm"; - - let APatLoc = args.opposedTest.attacker.system.status.armour[loc]; - - let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0) - - let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location; - - damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus) - - let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}); - msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})` - this.script.scriptMessage(msg) - } -} \ No newline at end of file diff --git a/reference_scripts/uhCq5NwjQ2a2idPn.js b/reference_scripts/uhCq5NwjQ2a2idPn.js deleted file mode 100644 index c8158a4..0000000 --- a/reference_scripts/uhCq5NwjQ2a2idPn.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `
Finished repairing ${this.item.name}.
`; -const test = 'Trade (Tailor)'; -const difficulty = 'easy'; -const target = 30; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/upfK6GM33qZCZjll.js b/reference_scripts/upfK6GM33qZCZjll.js deleted file mode 100644 index 91935c0..0000000 --- a/reference_scripts/upfK6GM33qZCZjll.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != "Play (Lute)" \ No newline at end of file diff --git a/reference_scripts/uwdQvZtzy2HVeEzx.js b/reference_scripts/uwdQvZtzy2HVeEzx.js deleted file mode 100644 index 685fa84..0000000 --- a/reference_scripts/uwdQvZtzy2HVeEzx.js +++ /dev/null @@ -1,14 +0,0 @@ -if (args.totalWoundLoss > 0) -{ - let roll = await new Roll("1d10").roll(); - roll.toMessage(this.script.getChatData()); - args.modifiers.other.push({label : this.effect.name, value : roll.total}) - - args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => { - await test.roll(); - if (test.failed) - { - this.script.scriptMessage("" + args.actor.name + " takes a @Table[critbody]{Critical Hit} to the torse", {whisper: ChatMessage.getWhisperRecipients("GM")}) - } - }) -} diff --git a/reference_scripts/ux3jaLpAUhZ5YqA6.js b/reference_scripts/ux3jaLpAUhZ5YqA6.js deleted file mode 100644 index 66cae1b..0000000 --- a/reference_scripts/ux3jaLpAUhZ5YqA6.js +++ /dev/null @@ -1 +0,0 @@ -return args.item?.name != game.i18n.localize("NAME.Leadership") && args.item?.name != game.i18n.localize("NAME.Cool") \ No newline at end of file diff --git a/reference_scripts/v00nVCRKqqRvY28t.js b/reference_scripts/v00nVCRKqqRvY28t.js deleted file mode 100644 index 7d632a2..0000000 --- a/reference_scripts/v00nVCRKqqRvY28t.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("stunned", 3) -} diff --git a/reference_scripts/v18mmwUmuKiVfwzQ.js b/reference_scripts/v18mmwUmuKiVfwzQ.js deleted file mode 100644 index 518055f..0000000 --- a/reference_scripts/v18mmwUmuKiVfwzQ.js +++ /dev/null @@ -1,6 +0,0 @@ -let test = await this.actor.setupTest(game.i18n.localize("NAME.Endurance"), {appendTitle : ` - ${this.effect.name}`, skipTargets: true}); -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("stunned"); -} \ No newline at end of file diff --git a/reference_scripts/v4CCxVaVGf9i8U7X.js b/reference_scripts/v4CCxVaVGf9i8U7X.js deleted file mode 100644 index abab0d3..0000000 --- a/reference_scripts/v4CCxVaVGf9i8U7X.js +++ /dev/null @@ -1,24 +0,0 @@ -let cured = await Dialog.wait({ - title : this.effect.name, - content : "Enter the number of diseases/poisons cured
", - buttons : { - confirm : { - label : "Confirm", - callback : (dlg) => { - let input = dlg.find("input"); - value = parseInt(input[0].value); - return value; - } - } - } -}) - - -let damage = 0; - -let rolls = new Array(cured).fill("").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`) - -let test = new Roll(`${rolls.join(" + ")}`); -await test.roll(); -test.toMessage({speaker : {alias : this.actor.name}, flavor : this.effect.name}); -this.script.scriptMessage(await this.actor.applyBasicDamage(test.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true })) \ No newline at end of file diff --git a/reference_scripts/v4ITTsSY9EvCbhZP.js b/reference_scripts/v4ITTsSY9EvCbhZP.js deleted file mode 100644 index b42194c..0000000 --- a/reference_scripts/v4ITTsSY9EvCbhZP.js +++ /dev/null @@ -1,2 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS") -this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/v5xrDWcrTNFJkyQB.js b/reference_scripts/v5xrDWcrTNFJkyQB.js deleted file mode 100644 index da60300..0000000 --- a/reference_scripts/v5xrDWcrTNFJkyQB.js +++ /dev/null @@ -1,90 +0,0 @@ -let choice1 = [ - { - type : "skill", - name : "Ranged (Bow)", - diff : { - system : { - advances : { - value : 10 - } - } - } - }, - { - type : "weapon", - name : "Longbow", - }, - { - type : "ammunition", - name : "Arrow", - } -] -let choice2 = [ -] - -let choice = await Dialog.wait({ - title : "Option", - content : - `- Add Option? -
-Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'challenging'; -const target = 20; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/w4zubIHP0XgMXsFe.js b/reference_scripts/w4zubIHP0XgMXsFe.js deleted file mode 100644 index 5a69e19..0000000 --- a/reference_scripts/w4zubIHP0XgMXsFe.js +++ /dev/null @@ -1 +0,0 @@ -return !args.options.terror && !args.extendedTest?.getFlag("wfrp4e", "fear"); \ No newline at end of file diff --git a/reference_scripts/w7K0lbxQKJ2tsc6f.js b/reference_scripts/w7K0lbxQKJ2tsc6f.js deleted file mode 100644 index 3ef9266..0000000 --- a/reference_scripts/w7K0lbxQKJ2tsc6f.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A") -let data = item.toObject(); -data.system.specification.value = 60 -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/wAETU6aTRr9d4oCU.js b/reference_scripts/wAETU6aTRr9d4oCU.js deleted file mode 100644 index b018850..0000000 --- a/reference_scripts/wAETU6aTRr9d4oCU.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.slBonus++; \ No newline at end of file diff --git a/reference_scripts/wAntJhgb8Og5vJXh.js b/reference_scripts/wAntJhgb8Og5vJXh.js deleted file mode 100644 index c788e80..0000000 --- a/reference_scripts/wAntJhgb8Og5vJXh.js +++ /dev/null @@ -1 +0,0 @@ -args.options.staunchBleeding = true; \ No newline at end of file diff --git a/reference_scripts/wRxgpGmlUpe7nwzJ.js b/reference_scripts/wRxgpGmlUpe7nwzJ.js deleted file mode 100644 index 45b97af..0000000 --- a/reference_scripts/wRxgpGmlUpe7nwzJ.js +++ /dev/null @@ -1,12 +0,0 @@ -this.actor.getActiveTokens().forEach(t => t.document.update({light : { - "dim": 0, - "bright": 0, - "angle": 360, - "alpha": 0.5, - "animation": { - "speed": 0, - "intensity": 0, - "type": "none", - }, - "color": "", - }})); \ No newline at end of file diff --git a/reference_scripts/wS6OIR3QN4mOUHn0.js b/reference_scripts/wS6OIR3QN4mOUHn0.js deleted file mode 100644 index 4b370e5..0000000 --- a/reference_scripts/wS6OIR3QN4mOUHn0.js +++ /dev/null @@ -1,12 +0,0 @@ -if (args.totalWoundLoss > args.actor.characteristics.t.bonus) -{ - args.actor.setupSkill(game.i18n.localize("NAME.Endurance")).then(async test => { - await test.roll() - if (test.failed) { - let disease = await fromUuid("Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ") - disease = disease.toObject() - disease.system.duration.active = true - args.actor.createEmbeddedDocuments("Item", [disease]) - } - }) -} \ No newline at end of file diff --git a/reference_scripts/wUlYLBT59Efys5aS.js b/reference_scripts/wUlYLBT59Efys5aS.js deleted file mode 100644 index ce937bf..0000000 --- a/reference_scripts/wUlYLBT59Efys5aS.js +++ /dev/null @@ -1 +0,0 @@ -args.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/wbM7tpw4TxvadcWm.js b/reference_scripts/wbM7tpw4TxvadcWm.js deleted file mode 100644 index 88dec95..0000000 --- a/reference_scripts/wbM7tpw4TxvadcWm.js +++ /dev/null @@ -1,19 +0,0 @@ -let items = this.effect.itemTargets; -let msg = ""; -for(let item of items) -{ - if (item.system.properties.qualities.durable) - { - await item.update({"system.qualities.value" : []}); - msg += `${item.name} loses all Qualities
` - } - else - { - msg += `${item.name} crumbles into dust!
` - await item.update({name : item.name + " (Dust)"}) - } -} -if(msg) -{ - this.script.scriptMessage(msg); -} \ No newline at end of file diff --git a/reference_scripts/whUSkaR1yem21bXp.js b/reference_scripts/whUSkaR1yem21bXp.js deleted file mode 100644 index c2c2f1b..0000000 --- a/reference_scripts/whUSkaR1yem21bXp.js +++ /dev/null @@ -1,133 +0,0 @@ -let characteristics = { - "ws" : 10, - "bs" : 5, - "s" : 0, - "t" : 5, - "i" : 10, - "ag" : 0, - "dex" : 6, - "int" : -5, - "wp" : 0, - "fel" : 10 -} -let skills = ["Melee (Basic)", "Track"] -let skillAdvancements = [8, 7] -let talents = ["Berserk Charge", "Careful Strike", "Strike to Injure"] -let traits = ["Flight (8)", "Fury", "Swarm", "Tracker"] -let trappings = [] -let items = []; -let spells = []; - -let updateObj = this.actor.toObject(); - -for (let ch in characteristics) -{ - updateObj.system.characteristics[ch].modifier += characteristics[ch]; -} - -for (let index = 0; index < skills.length; index++) -{ - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } -} - -for (let talent of talents) -{ - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } -} - -const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm -for (let trait of traits) -{ - let traitMatches = trait.matchAll(traitRegex).next().value - let traitName = traitMatches[1] - let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization - let traitSpec = traitMatches[3] - - let traitItem; - try { - traitItem = await WFRP_Utility.findItem(traitName, "trait") - } - catch { } - if (!traitItem) { - ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) - } - traitItem = traitItem.toObject() - - if (Number.isNumeric(traitVal)) - { - traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; - traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() - } - else - traitItem.system.specification.value = traitSpec - - items.push(traitItem) - -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -for (let spell of spells) -{ - let spellItem = await game.wfrp4e.utility.findItem(spell) - if (spellItem) - { - spellItem = spellItem.toObject() - - items.push(spellItem); - } - else - { - ui.notifications.warn(`Could not find ${spell}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name += " " + this.effect.name - -await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); - - -function equip(item) -{ - if (item.type == "armour") - item.worn = true - else if (item.type == "weapon") - item.equipped = true - else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") - item.worn = true -} \ No newline at end of file diff --git a/reference_scripts/wsqNM4NHnwaAAQym.js b/reference_scripts/wsqNM4NHnwaAAQym.js deleted file mode 100644 index a07f054..0000000 --- a/reference_scripts/wsqNM4NHnwaAAQym.js +++ /dev/null @@ -1,11 +0,0 @@ - args.applyAP = false; - - this.script.scriptNotification("This test only applies to criminals, otherwise close the dialog."); - this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => - { - await test.roll(); - if (test.failed) - { - args.actor.addCondition("unconscious"); - } - }); \ No newline at end of file diff --git a/reference_scripts/wyTCozh9qGTx6yK0.js b/reference_scripts/wyTCozh9qGTx6yK0.js deleted file mode 100644 index c2afa63..0000000 --- a/reference_scripts/wyTCozh9qGTx6yK0.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear")) -{ - args.abort = true; - this.script.scriptNotification("Does not need to make Fear or Terror tests"); -} \ No newline at end of file diff --git a/reference_scripts/wzkxiKjxVEeNS1di.js b/reference_scripts/wzkxiKjxVEeNS1di.js deleted file mode 100644 index 7625d68..0000000 --- a/reference_scripts/wzkxiKjxVEeNS1di.js +++ /dev/null @@ -1,11 +0,0 @@ -let roll = await new Roll("1d10").roll(); -this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true})) - -await this.actor.addCondition("deafened", 3) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty: "average" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: "Gain a Broken Condition", success : "Avoided Broken Condition"}}) -await test.roll(); -if (test.failed) -{ - this.actor.addCondition("broken") -} \ No newline at end of file diff --git a/reference_scripts/x2RLUUNB7BiIDYCP.js b/reference_scripts/x2RLUUNB7BiIDYCP.js deleted file mode 100644 index 0ab5fe7..0000000 --- a/reference_scripts/x2RLUUNB7BiIDYCP.js +++ /dev/null @@ -1,16 +0,0 @@ - - let difficulty = "" - if (this.effect.name.includes("Moderate")) - difficulty = "easy" - else if (this.effect.name.includes("Severe")) - difficulty = "average" - else - difficulty = "veasy" - - let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {context : {failure : this.actor.name + " dies from Blight"}, fields: {difficulty}, skipTargets: true, appendTitle : " - Blight"}) - await test.roll(); - if (test.failed) - { - this.actor.addCondition("dead"); - } - \ No newline at end of file diff --git a/reference_scripts/x76tKw4L8dX00ikE.js b/reference_scripts/x76tKw4L8dX00ikE.js deleted file mode 100644 index c98eddb..0000000 --- a/reference_scripts/x76tKw4L8dX00ikE.js +++ /dev/null @@ -1,5 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3") -let data = item.toObject(); -setProperty(data, "flags.wfrp4e.breath", "fire") -data.system.specification.value = 5 -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/x8XK2fzzXCnSwfjt.js b/reference_scripts/x8XK2fzzXCnSwfjt.js deleted file mode 100644 index d42e514..0000000 --- a/reference_scripts/x8XK2fzzXCnSwfjt.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics")) -await test.roll(); - -if (test.succeeded) -{ - this.actor.removeCondition("prone"); -} \ No newline at end of file diff --git a/reference_scripts/x9G6Du5EWV6byf4C.js b/reference_scripts/x9G6Du5EWV6byf4C.js deleted file mode 100644 index 79042f3..0000000 --- a/reference_scripts/x9G6Du5EWV6byf4C.js +++ /dev/null @@ -1,8 +0,0 @@ -if (parseInt(this.effect.sourceTest.result.SL) >= 3) -{ - this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 2) -} -else -{ - this.actor.modifyWounds(this.actor.system.characteristics.t.bonus) -} \ No newline at end of file diff --git a/reference_scripts/x9iKFYYc4Ocy8PTS.js b/reference_scripts/x9iKFYYc4Ocy8PTS.js deleted file mode 100644 index 9f078b6..0000000 --- a/reference_scripts/x9iKFYYc4Ocy8PTS.js +++ /dev/null @@ -1,30 +0,0 @@ -let item = this.effect.getCreatedItems()?.[0]; -ChatMessage.create({content : "Grace is beyond style", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) - -let choice = await ItemDialog.create(ItemDialog.objectToArray({ - "nobles" : "Nobles", - "guilders" : "Guilders", - "servants" : "Servants" -}), 1, "Choose Group") - -let name = choice[0]?.name - -if (!name) -{ - return; -} - -if (item) -{ - item.update({ - name : item.name.split("(")[0] + ` (${name})`, - "system.tests.value" : item.system.tests.value.split("(")[0] + ` (${name}` - }) -} -else -{ - item = await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP"); - let data = item.toObject(); - data.name += ` (${name})` - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) -} \ No newline at end of file diff --git a/reference_scripts/xBpLQa7yBPczDMY8.js b/reference_scripts/xBpLQa7yBPczDMY8.js deleted file mode 100644 index dd7547f..0000000 --- a/reference_scripts/xBpLQa7yBPczDMY8.js +++ /dev/null @@ -1,7 +0,0 @@ - let scythe = (await fromUuid("Compendium.wfrp4e-core.items.CXg7XOFJwu4LZ9LM")).toObject(); - scythe.name = "Scythe of Shyish"; - scythe.system.damage.value = "WPB + 3" - scythe.system.equipped = true; - scythe.img = this.effect.icon; - scythe.system.qualities.value.push({name : "magical"}) - this.actor.createEmbeddedDocuments("Item", [scythe], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/xIRU2SaqLeWmqGDI.js b/reference_scripts/xIRU2SaqLeWmqGDI.js deleted file mode 100644 index 01cabd4..0000000 --- a/reference_scripts/xIRU2SaqLeWmqGDI.js +++ /dev/null @@ -1,4 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv") -let data = item.toObject(); -data.name += " (Disease)" -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/xL4S0H1RP8hhXW7c.js b/reference_scripts/xL4S0H1RP8hhXW7c.js deleted file mode 100644 index 7aa1d03..0000000 --- a/reference_scripts/xL4S0H1RP8hhXW7c.js +++ /dev/null @@ -1,3 +0,0 @@ -let item = await fromUuid("Compendium.wfrp4e-core.items.xneBqGOs1QS7kfUr") -let data = item.toObject(); -this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/xLKAuD6yzwjAL6tJ.js b/reference_scripts/xLKAuD6yzwjAL6tJ.js deleted file mode 100644 index 15ad6a7..0000000 --- a/reference_scripts/xLKAuD6yzwjAL6tJ.js +++ /dev/null @@ -1 +0,0 @@ -return !args.weapon || args.weapon?.system.properties?.qualities.shield || !this.item.system.usesLocation(args.weapon) \ No newline at end of file diff --git a/reference_scripts/xMhhVol8Is3DJ3gb.js b/reference_scripts/xMhhVol8Is3DJ3gb.js deleted file mode 100644 index bd75d66..0000000 --- a/reference_scripts/xMhhVol8Is3DJ3gb.js +++ /dev/null @@ -1,5 +0,0 @@ -if (this.effect.sourceTest.succeeded) -{ - let blinded = 1 + this.effect.sourceTest.result.overcast.usage.other.count - this.actor.addCondition("blinded", blinded) -} \ No newline at end of file diff --git a/reference_scripts/xPDMpOvC1ZBVxrNg.js b/reference_scripts/xPDMpOvC1ZBVxrNg.js deleted file mode 100644 index 40f6360..0000000 --- a/reference_scripts/xPDMpOvC1ZBVxrNg.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier += 10; \ No newline at end of file diff --git a/reference_scripts/xPwa3NftkpMBc2AO.js b/reference_scripts/xPwa3NftkpMBc2AO.js deleted file mode 100644 index 0b6eef8..0000000 --- a/reference_scripts/xPwa3NftkpMBc2AO.js +++ /dev/null @@ -1 +0,0 @@ -return !["ws", "s", "ag"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/xQ3xR2Wf0wHFa76H.js b/reference_scripts/xQ3xR2Wf0wHFa76H.js deleted file mode 100644 index 99df4ab..0000000 --- a/reference_scripts/xQ3xR2Wf0wHFa76H.js +++ /dev/null @@ -1 +0,0 @@ -return ["ws", "bs", "fel", "dex"].includes(args.characteristic) || args.weapon \ No newline at end of file diff --git a/reference_scripts/xQnoRTHotZKrwPrx.js b/reference_scripts/xQnoRTHotZKrwPrx.js deleted file mode 100644 index 036d4f5..0000000 --- a/reference_scripts/xQnoRTHotZKrwPrx.js +++ /dev/null @@ -1 +0,0 @@ -return args.type == "cast" && args.item?.system.lore?.value == "shadow" \ No newline at end of file diff --git a/reference_scripts/xRTmMwNfdirjsi8X.js b/reference_scripts/xRTmMwNfdirjsi8X.js deleted file mode 100644 index 4a8886f..0000000 --- a/reference_scripts/xRTmMwNfdirjsi8X.js +++ /dev/null @@ -1,3 +0,0 @@ -this.actor.addCondition("ablaze"); - -this.actor.applyBasicDamage(this.effect.sourceTest.result.damage) \ No newline at end of file diff --git a/reference_scripts/xRd6oA1QWLVpfoBm.js b/reference_scripts/xRd6oA1QWLVpfoBm.js deleted file mode 100644 index db785fb..0000000 --- a/reference_scripts/xRd6oA1QWLVpfoBm.js +++ /dev/null @@ -1,6 +0,0 @@ -if (!this.actor.has("Night Vision")) -{ - let item = await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm"); - let data = item.toObject(); - this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) -} \ No newline at end of file diff --git a/reference_scripts/xS2su09zcza9du09.js b/reference_scripts/xS2su09zcza9du09.js deleted file mode 100644 index 592e0c2..0000000 --- a/reference_scripts/xS2su09zcza9du09.js +++ /dev/null @@ -1,8 +0,0 @@ -if (["Minor", "Moderate", "Major"].includes(this.item.system.specification.value)) -{ - return -} - -let choice = await ItemDialog.create(ItemDialog.objectToArray({minor : "Minor", moderate : "Moderate", major : "Major"}, this.item.img), 1, "Choose Corruption Severity"); - -this.item.updateSource({"system.specification.value" : choice[0]?.name || ""}) \ No newline at end of file diff --git a/reference_scripts/xUpKYT7BZCSmAfUy.js b/reference_scripts/xUpKYT7BZCSmAfUy.js deleted file mode 100644 index 6e013b0..0000000 --- a/reference_scripts/xUpKYT7BZCSmAfUy.js +++ /dev/null @@ -1,10 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.system.reduceQuantity(); - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - actor.applyEffect({effectData : [this.item.effects.contents[0].convertToApplied()]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/xVYVegD692CCv8Yl.js b/reference_scripts/xVYVegD692CCv8Yl.js deleted file mode 100644 index 91e8707..0000000 --- a/reference_scripts/xVYVegD692CCv8Yl.js +++ /dev/null @@ -1,12 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -let newFortune = Math.max(0, this.actor.status.fortune.value - 1) -this.actor.update({ "system.status.fortune.value": newFortune }); - -if (test.failed) -{ - let char = this.effect.sourceActor.characteristics; - let duration = Math.floor((char.wp.initial + char.wp.advances)/10) ; - this.script.scriptMessage("Fatethief has been applied for " + duration + " days"); -} \ No newline at end of file diff --git a/reference_scripts/xWPgIZOQLba5nZ23.js b/reference_scripts/xWPgIZOQLba5nZ23.js deleted file mode 100644 index 0023126..0000000 --- a/reference_scripts/xWPgIZOQLba5nZ23.js +++ /dev/null @@ -1,14 +0,0 @@ -let nbFatigue = 1 + Number(this.effect.sourceTest.result.SL); -this.actor.addCondition("fatigued", nbFatigue); - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`}) -await test.roll(); - -if (test.succeeded) -{ - this.script.scriptNotification(this.actor.name + "resisted !") -} -else if (test.failed) -{ - this.actor.addCondition("unconscious", 1); -} \ No newline at end of file diff --git a/reference_scripts/xYTkj8jhSVOSoLbC.js b/reference_scripts/xYTkj8jhSVOSoLbC.js deleted file mode 100644 index f319a92..0000000 --- a/reference_scripts/xYTkj8jhSVOSoLbC.js +++ /dev/null @@ -1 +0,0 @@ -this.actor.flags.useless[this.item.system.location.key[0] + "Arm"] = true; \ No newline at end of file diff --git a/reference_scripts/xcy5GOUSZ0meIejZ.js b/reference_scripts/xcy5GOUSZ0meIejZ.js deleted file mode 100644 index 9d4ae4a..0000000 --- a/reference_scripts/xcy5GOUSZ0meIejZ.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.test.isFumble) -{ - args.test.result.other.push("@Table[warp-grinder-fumble]") -} \ No newline at end of file diff --git a/reference_scripts/xgdhf0wlNP2cHIQx.js b/reference_scripts/xgdhf0wlNP2cHIQx.js deleted file mode 100644 index af39144..0000000 --- a/reference_scripts/xgdhf0wlNP2cHIQx.js +++ /dev/null @@ -1 +0,0 @@ -await this.actor.addCondition("entangled", this.effect.sourceTest.result.overcast.usage.other.current) \ No newline at end of file diff --git a/reference_scripts/xgplXZMs459X7XXM.js b/reference_scripts/xgplXZMs459X7XXM.js deleted file mode 100644 index af8f73d..0000000 --- a/reference_scripts/xgplXZMs459X7XXM.js +++ /dev/null @@ -1,21 +0,0 @@ -// Apply changes when the mask is worn - -if (args.equipped) { - this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) - this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.${await this.actor.applyBasicDamage(8, {loc : "roll", suppressMsg: true, hideDSN: true})}
` -msg += `${await this.actor.applyBasicDamage(8, {loc : "roll", suppressMsg: true, hideDSN: true})}
` -msg += `${await this.actor.applyBasicDamage(8, {loc : "roll", suppressMsg: true, hideDSN: true})}
` - -this.script.scriptMessage(msg); \ No newline at end of file diff --git a/reference_scripts/ynoHNXXCGRS6fTqF.js b/reference_scripts/ynoHNXXCGRS6fTqF.js deleted file mode 100644 index 9c5e860..0000000 --- a/reference_scripts/ynoHNXXCGRS6fTqF.js +++ /dev/null @@ -1,26 +0,0 @@ -let msg = "" - -let i_gain = (await new Roll("1d10").roll()).total - -if (args.actor.characteristics.i.value <= 0) -{ - i_gain += (await new Roll("2d10").roll()).total -} - -msg = `${this.actor.prototypeToken.name} gains ${i_gain} Initiative` - -let newValue = i_gain + args.actor.characteristics.i.modifier - -this.actor.update({"system.characteristics.i.modifier" : newValue}) - - -let hitloc = await game.wfrp4e.tables.rollTable("hitloc") - -let value = hitloc.result -let desc = hitloc.description - -this.effect.updateSource({"flags.wfrp4e.location" : value}) - -msg += ` as eyes push out of their ${desc}` - -this.script.scriptMessage(msg) \ No newline at end of file diff --git a/reference_scripts/yzN7ZNlgCiSVJqsU.js b/reference_scripts/yzN7ZNlgCiSVJqsU.js deleted file mode 100644 index ac583fa..0000000 --- a/reference_scripts/yzN7ZNlgCiSVJqsU.js +++ /dev/null @@ -1,7 +0,0 @@ -let sourceItem = this.effect.sourceItem; - -if (sourceItem) -{ - this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[1].uuid]}) - this.script.scriptNotification("Applied after effects"); -} \ No newline at end of file diff --git a/reference_scripts/z14Tb2YKCjiE5ZTU.js b/reference_scripts/z14Tb2YKCjiE5ZTU.js deleted file mode 100644 index 927f0b6..0000000 --- a/reference_scripts/z14Tb2YKCjiE5ZTU.js +++ /dev/null @@ -1,12 +0,0 @@ -this.actor.getActiveTokens().forEach(t => t.document.update({light : { - "dim": 30, - "bright": 20, - "angle": 90, - "alpha": 0.6, - "animation": { - "speed": 3, - "intensity": 3, - "type": "torch", - }, - "color": "#ffcc66", - }})); \ No newline at end of file diff --git a/reference_scripts/z5HfNUrHy5MS3K7a.js b/reference_scripts/z5HfNUrHy5MS3K7a.js deleted file mode 100644 index e635110..0000000 --- a/reference_scripts/z5HfNUrHy5MS3K7a.js +++ /dev/null @@ -1,7 +0,0 @@ -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: "1 Corruption Point Gained"}}) -await test.roll(); -if (test.failed && this.actor.type == "character") -{ - this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) - this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) -} \ No newline at end of file diff --git a/reference_scripts/z926Cl2vxUfyLY0V.js b/reference_scripts/z926Cl2vxUfyLY0V.js deleted file mode 100644 index accff96..0000000 --- a/reference_scripts/z926Cl2vxUfyLY0V.js +++ /dev/null @@ -1,4 +0,0 @@ -if (!["rArm", "lArm"].includes(this.effect.getFlag("wfrp4e", "location"))) - return true - -return ["fel", "wp", "int", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/z9NEbIUBsKMaTuCz.js b/reference_scripts/z9NEbIUBsKMaTuCz.js deleted file mode 100644 index 144e2e4..0000000 --- a/reference_scripts/z9NEbIUBsKMaTuCz.js +++ /dev/null @@ -1,4 +0,0 @@ -if (args.opposedTest.result.hitloc && args.opposedTest.result.hitloc.value == "head") -{ - args.actor.addCondition("entangled") -} \ No newline at end of file diff --git a/reference_scripts/zA6TDttpwMSMl7D8.js b/reference_scripts/zA6TDttpwMSMl7D8.js deleted file mode 100644 index 898b642..0000000 --- a/reference_scripts/zA6TDttpwMSMl7D8.js +++ /dev/null @@ -1,14 +0,0 @@ -// An imbiber must take a Consume Alcohol Test. -this.actor.setupSkill(game.i18n.localize("NAME.ConsumeAlcohol"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { - await test.roll() - // If they succeed, - // as a result of whatever potential futures they glimpse, - // they can spend a Fortune Point within the next hour to reverse the dice of any failed Test. - if (test.succeeded) { - this.script.scriptMessage(`As a result of whatever potential futures they glimpse, ${this.actor.prototypeToken.name} can spend a Fortune Point within the next hour to reverse the dice of any failed Test.`, - { - whisper: ChatMessage.getWhisperRecipients("GM"), - blind: true - }) - } -}) \ No newline at end of file diff --git a/reference_scripts/zBHTIBU8OlYj1YIO.js b/reference_scripts/zBHTIBU8OlYj1YIO.js deleted file mode 100644 index 36139f8..0000000 --- a/reference_scripts/zBHTIBU8OlYj1YIO.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier += this.effect.sourceActor?.system.characteristics.wp.value; \ No newline at end of file diff --git a/reference_scripts/zFYCaGR0wbFWjl4T.js b/reference_scripts/zFYCaGR0wbFWjl4T.js deleted file mode 100644 index fbb0202..0000000 --- a/reference_scripts/zFYCaGR0wbFWjl4T.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name != game.i18n.localize("NAME.OutdoorSurvival"); \ No newline at end of file diff --git a/reference_scripts/zK38Rl5t9zbFi4Se.js b/reference_scripts/zK38Rl5t9zbFi4Se.js deleted file mode 100644 index 029af27..0000000 --- a/reference_scripts/zK38Rl5t9zbFi4Se.js +++ /dev/null @@ -1,5 +0,0 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) -{ - args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Added Bleeding") -} \ No newline at end of file diff --git a/reference_scripts/zL7ECmBBMAqf5Esn.js b/reference_scripts/zL7ECmBBMAqf5Esn.js deleted file mode 100644 index b205bb2..0000000 --- a/reference_scripts/zL7ECmBBMAqf5Esn.js +++ /dev/null @@ -1,30 +0,0 @@ -let hasMagazine = await Dialog.confirm({content: "Does the vessel have a magazine or any other kind of store for blackpowder?
"}); - -if (!hasMagazine) return; - -let roll = new Roll("d10"); -await roll.evaluate(); -// await roll.toMessage(); -let anchor = roll.toAnchor(); - -let crits = []; - -for (let i = 0; i < roll.total; i++) { - let result = await WFRP_Tables.rollTable('crithull'); - let collection = game.packs.get(result.object.documentCollection) - - if (collection) - await collection.getDocuments() - - if (!collection) - collection = game.items; - - let item = collection.get(result.object.documentId) - if (item) - crits.push(item); -} - -const items = await this.actor.createEmbeddedDocuments("Item", crits); -const speaker = ChatMessage.getSpeaker({actor: this.actor}); -const uuids = items.map(i => `@UUID[${i.uuid}]`); -this.script.scriptMessage(`${this.item.name} caused an additional ${anchor.outerHTML} Critical Hits to the Hull!
Finished repairing ${this.item.name}.
`; -const test = 'Sail'; -const difficulty = 'challenging'; -const target = 40; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/zY4ZjY7uyKIKMYmX.js b/reference_scripts/zY4ZjY7uyKIKMYmX.js deleted file mode 100644 index 10f3700..0000000 --- a/reference_scripts/zY4ZjY7uyKIKMYmX.js +++ /dev/null @@ -1,8 +0,0 @@ -this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("fleshy-curse")) - -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) -await test.roll(); -if (test.succeeded) -{ - this.effect.delete() -} \ No newline at end of file diff --git a/reference_scripts/zadppy7FEbXvgUON.js b/reference_scripts/zadppy7FEbXvgUON.js deleted file mode 100644 index 8b87ec9..0000000 --- a/reference_scripts/zadppy7FEbXvgUON.js +++ /dev/null @@ -1,84 +0,0 @@ - let characteristics = { - "ws" : 5, - "bs" : 0, - "s" : 0, - "t" : 0, - "i" : 0, - "ag" : 10, - "dex" : 10, - "int" : 0, - "wp" : 0, - "fel" : 5 - } - let skills = ["Perception", "Sleight of Hand", "Stealth (Urban)"] - let skillAdvancements = [10, 10, 10] - let talents = ["Criminal", "Etiquette (Criminals)"] - let trappings = ["Rope, 10 yards", "Lockpick", "Mask"] - let items = [] - - let updateObj = this.actor.toObject(); - - for (let ch in characteristics) - { - updateObj.system.characteristics[ch].modifier += characteristics[ch]; - } - - for (let index = 0; index < skills.length; index++) - { - let skill = skills[index] - let skillItem; - skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") - if (skillItem) - skillItem.system.advances.value += skillAdvancements[index] - else - { - skillItem = await game.wfrp4e.utility.findSkill(skill) - skillItem = skillItem.toObject(); - skillItem.system.advances.value = skillAdvancements[index]; - items.push(skillItem); - } - } - - for (let talent of talents) - { - let talentItem = await game.wfrp4e.utility.findTalent(talent) - if (talentItem) - { - items.push(talentItem.toObject()); - } - else - { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) - } - } - - for (let trapping of trappings) - { - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) - { - trappingItem = trappingItem.toObject() - - equip(trappingItem) - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } - } - - - await this.actor.update(updateObj) - this.actor.createEmbeddedDocuments("Item", items); - - function equip(item) - { - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true - } \ No newline at end of file diff --git a/reference_scripts/zdGAvfL7zJ7wpYxG.js b/reference_scripts/zdGAvfL7zJ7wpYxG.js deleted file mode 100644 index 8865d25..0000000 --- a/reference_scripts/zdGAvfL7zJ7wpYxG.js +++ /dev/null @@ -1,53 +0,0 @@ -const repaired_message = `Finished repairing ${this.item.name}.
`; -const test = 'Trade (Carpenter)'; -const difficulty = 'easy'; -const target = 40; - -const extendedTestData = { - name: this.item.name, - type: "extendedTest", - img: this.item.img, - system: { - SL: { - current: 0, - target: target - }, - test: { - value: test - }, - completion: { - value: "remove" - }, - difficulty: { - value: difficulty - } - }, - effects: [ - { - name: `Repair the ${this.item.name}`, - icon: this.item.img, - flags: { - wfrp4e: { - applicationData: { - type: "document", - documentType: "Item" - }, - scriptData: [ - { - label: this.item.name, - script: ` - let id = this.item.flags.wfrp4e.fromEffect; - let effect = this.actor.appliedEffects.find(e => e.id === id); - this.script.scriptMessage("${repaired_message}"); - await effect.item.delete(); - `, - trigger: "deleteEffect" - } - ] - } - } - } - ] -}; - -await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id}); diff --git a/reference_scripts/zi8Z3NlwVj3IfgAW.js b/reference_scripts/zi8Z3NlwVj3IfgAW.js deleted file mode 100644 index 70c5434..0000000 --- a/reference_scripts/zi8Z3NlwVj3IfgAW.js +++ /dev/null @@ -1,10 +0,0 @@ -if (this.item.system.quantity.value) -{ - this.item.system.reduceQuantity(); - let actor = Array.from(game.user.targets)[0]?.actor || this.actor; - actor.applyEffect({effectData : [this.item.effects.contents[3].convertToApplied()]}) -} -else -{ - this.script.scriptNotification("None left!", "error") -} \ No newline at end of file diff --git a/reference_scripts/ziG9H5Kdb7xC3dFE.js b/reference_scripts/ziG9H5Kdb7xC3dFE.js deleted file mode 100644 index 3d360af..0000000 --- a/reference_scripts/ziG9H5Kdb7xC3dFE.js +++ /dev/null @@ -1 +0,0 @@ -return !args.skill?.name.includes(game.i18n.localize("NAME.Art")); \ No newline at end of file diff --git a/reference_scripts/zk44dFEGkylB7kW6.js b/reference_scripts/zk44dFEGkylB7kW6.js deleted file mode 100644 index f1d1ccd..0000000 --- a/reference_scripts/zk44dFEGkylB7kW6.js +++ /dev/null @@ -1,9 +0,0 @@ - let modifier; let target = args.data.targets[0] - if (target.actor.details.size.value == "tiny") - modifier = 30 - if (target.actor.details.size.value == "ltl") - modifier = 20 - if (target.actor.details.size.value == "sml") - modifier = 10 - - args.fields.modifier += (modifier || 0); // Offset size modifier \ No newline at end of file diff --git a/reference_scripts/zkc1gIPLj0VoAONT.js b/reference_scripts/zkc1gIPLj0VoAONT.js deleted file mode 100644 index 1a86fae..0000000 --- a/reference_scripts/zkc1gIPLj0VoAONT.js +++ /dev/null @@ -1,8 +0,0 @@ -let AP = args.actor.status.armour; - -AP["head"].value += 2; -AP["rArm"].value += 2; -AP["lArm"].value += 2; -AP["body"].value += 2; -AP["lLeg"].value += 2; -AP["rLeg"].value += 2; \ No newline at end of file diff --git a/reference_scripts/zphxI8VSWbNQCMBy.js b/reference_scripts/zphxI8VSWbNQCMBy.js deleted file mode 100644 index 1034c1b..0000000 --- a/reference_scripts/zphxI8VSWbNQCMBy.js +++ /dev/null @@ -1 +0,0 @@ -args.size = "lrg" \ No newline at end of file diff --git a/reference_scripts/zqShIJnrRReGgP94.js b/reference_scripts/zqShIJnrRReGgP94.js deleted file mode 100644 index bddd877..0000000 --- a/reference_scripts/zqShIJnrRReGgP94.js +++ /dev/null @@ -1,15 +0,0 @@ -let {added, removed} = this.effect.getFlag("wfrp4e", "propertiesChanged"); - -for(let property of (added || [])) -{ - let hasValue = game.wfrp4e.config.propertyHasValue[property]; - if (!args.item.system.qualities.value.find(i => i.name == property)) - { - args.item.system.qualities.value.push({name : property, value : (hasValue ? 2 : null)}) - } -} - -for(let property of (removed || [])) -{ - args.item.system.flaws.value = args.item.system.flaws.value.filter(i => i.name != property) -} \ No newline at end of file diff --git a/reference_scripts/zsiV6XEHlCNGLLPl.js b/reference_scripts/zsiV6XEHlCNGLLPl.js deleted file mode 100644 index 8911fdc..0000000 --- a/reference_scripts/zsiV6XEHlCNGLLPl.js +++ /dev/null @@ -1 +0,0 @@ -return args.skill?.name == game.i18n.localize("NAME.SetTrap"); \ No newline at end of file diff --git a/reference_scripts/zsoTVkHe4nHY1M52.js b/reference_scripts/zsoTVkHe4nHY1M52.js deleted file mode 100644 index c227411..0000000 --- a/reference_scripts/zsoTVkHe4nHY1M52.js +++ /dev/null @@ -1 +0,0 @@ -this.script.scriptMessage(await this.actor.applyBasicDamage(10 + parseInt(this.effect.sourceTest.result.SL), {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})) \ No newline at end of file diff --git a/reference_scripts/ztIkD5Zt6ko9D4Ca.js b/reference_scripts/ztIkD5Zt6ko9D4Ca.js deleted file mode 100644 index 22d98fa..0000000 --- a/reference_scripts/ztIkD5Zt6ko9D4Ca.js +++ /dev/null @@ -1 +0,0 @@ -args.fields.modifier -= 10 \ No newline at end of file diff --git a/reference_scripts/zzk2uRSFjFHB5kjw.js b/reference_scripts/zzk2uRSFjFHB5kjw.js deleted file mode 100644 index df8f9a1..0000000 --- a/reference_scripts/zzk2uRSFjFHB5kjw.js +++ /dev/null @@ -1,9 +0,0 @@ - - let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) - if (args.test.isFumble && roll == 1 && !args.test.result.misfire) - { - args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)" - args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) - } - else if (args.test.isFumble && roll != 1) - args.test.result.other.push("Misfire Roll: " + roll) \ No newline at end of file