Compare commits
	
		
			5 Commits
		
	
	
		
			foundryvtt
			...
			foundryvtt
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 563c63d0a7 | |||
| 429715a416 | |||
| a679da4674 | |||
| a64ff7dd55 | |||
| f916c14848 | 
| @@ -29,13 +29,13 @@ const _patch_eis = () => { | ||||
|                 args.actor.setupSkill("Résistance", {context : {failure: "1 Point de Corruption reçu", success : "1 Point de Chance gagné"}}).then(setupData => { | ||||
|                     args.actor.basicTest(setupData).then(test =>  | ||||
|                      { | ||||
|                          if (test.result.result == "success" && args.actor.data.type == "character") | ||||
|                          if (test.result.result == "success" && args.actor.type == "character") | ||||
|                          { | ||||
|                              args.actor.update({"data.status.fortune.value" : args.actor.data.data.status.fortune.value + 1}) | ||||
|                              args.actor.update({"system.status.fortune.value" : args.actor.system.status.fortune.value + 1}) | ||||
|                          } | ||||
|                          else if (test.result.result == "failure" && args.actor.data.type == "character") | ||||
|                          else if (test.result.result == "failure" && args.actor.type == "character") | ||||
|                          { | ||||
|                           args.actor.update({"data.status.corruption.value" : args.actor.data.data.status.corruption.value + 1}) | ||||
|                           args.actor.update({"system.status.corruption.value" : args.actor.system.status.corruption.value + 1}) | ||||
|                          } | ||||
|                      }) | ||||
|                   })` | ||||
| @@ -272,31 +272,31 @@ const __add_actors_translation = () => { | ||||
|   const lang = game.settings.get('core', 'language'); | ||||
|   if (lang == "fr") { | ||||
|     let pack_array = []; | ||||
|     for (let metadata of game.data.packs) { | ||||
|     for (let metadata of game.packs) { | ||||
|       if (!game.babele.isTranslated(metadata) && metadata.documentName === 'Actor') { | ||||
|         //console.log("PACK : ", metadata); | ||||
|         let translations = { | ||||
|           "label": metadata.name, | ||||
|           "mapping": { | ||||
|             "name": "name", | ||||
|             "description": "details.biography.value", | ||||
|             "description": "system.biography.value", | ||||
|             "items": { | ||||
|               "path": "items", | ||||
|               "converter": "bestiary_traits" | ||||
|             }, | ||||
|             "characteristics": { | ||||
|               "path": "data.characteristics", | ||||
|               "path": "system.characteristics", | ||||
|               "converter": "npc_characteristics" | ||||
|             }, | ||||
|             "details": { | ||||
|               "path": "data.details", | ||||
|               "path": "system.details", | ||||
|               "converter": "npc_details" | ||||
|             } | ||||
|           }, | ||||
|           "entries": [ | ||||
|           ] | ||||
|         }; | ||||
|         game.babele.packs.set(collection, new TranslatedCompendium(metadata, translation)); | ||||
|         } | ||||
|         game.babele.packs.set(metadata, new TranslatedCompendium(metadata, translations)); | ||||
|         //newpack = new TranslatedCompendium(pack, translations); | ||||
|         //console.log("Actor compendium has been replaced !!!!", pack.metadata.name); | ||||
|       } | ||||
|   | ||||
| @@ -242,14 +242,22 @@ Hooks.once('init', () => { | ||||
|         return chars; | ||||
|       }, | ||||
|       "bestiary_traits": (beast_traits, translations) => {         | ||||
|          | ||||
|         if ( !beast_traits) { | ||||
|           console.log("No beast traits found here ...") | ||||
|           return beast_traits | ||||
|         } | ||||
|         for (let trait_en of beast_traits) | ||||
|         {  | ||||
|           var special = ""; | ||||
|           var nbt = ""; | ||||
|           var name_en = trait_en.name.trim(); // strip \r in some traits name | ||||
|              | ||||
|           if (trait_en.name.length == 0) { | ||||
|             console.log("Wrong item name found!!!!") | ||||
|             continue | ||||
|           }   | ||||
|           //console.log(">>>>>>>> Parsing", trait_en.name) | ||||
|           if ( trait_en.type == "trait") { | ||||
|             //console.log("Trait translation", compmod, trait_en) | ||||
|             if ( name_en.includes("Tentacles") ) { // Process specific Tentacles case | ||||
|               var re  = /(.d*)x Tentacles/i; | ||||
|               var res = re.exec( name_en ); | ||||
| @@ -264,18 +272,19 @@ Hooks.once('init', () => { | ||||
|             } | ||||
|             var trait_fr = game.babele.translate( compmod+'.traits', { name: name_en }, true ); | ||||
|             //console.log(">>>>> Trait ?", name_en, nbt, trait_fr, trait_fr.name, special); | ||||
|             trait_fr.name = trait_fr.name || trait_en.name | ||||
|             trait_en.name = nbt + trait_fr.name + special; | ||||
|             if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value ) { | ||||
|                 trait_en.data.description.value = trait_fr.data.description.value; | ||||
|             if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value ) { | ||||
|                 trait_en.system.description.value = trait_fr.system.description.value; | ||||
|             } else if ( game.modules.get( 'wfrp4e-eis') ) { // No description in the FR compendium -> test other compendium if presenr | ||||
|                 trait_fr = game.babele.translate( 'wfrp4e-eis.eisitems', { name: name_en }, true); | ||||
|                 trait_en.name = nbt + trait_fr.name + special; | ||||
|                 if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value ) | ||||
|                   trait_en.data.description.value = trait_fr.data.description.value;               | ||||
|                 if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value ) | ||||
|                   trait_en.system.description.value = trait_fr.system.description.value;               | ||||
|               } | ||||
|               if ( trait_en.data && trait_en.data.specification && isNaN(trait_en.data.specification.value) ) { // This is a string, so translate it | ||||
|                 //console.log("Translating : ", trait_en.data.specification.value);             | ||||
|                 trait_en.data.specification.value = game.i18n.localize( trait_en.data.specification.value.trim() );             | ||||
|               if ( trait_en.system && trait_en.system.specification && isNaN(trait_en.system.specification.value) ) { // This is a string, so translate it | ||||
|                 //console.log("Translating : ", trait_en.system.specification.value);             | ||||
|                 trait_en.system.specification.value = game.i18n.localize( trait_en.system.specification.value.trim() );             | ||||
|               } | ||||
|           } else if ( trait_en.type == "skill") { | ||||
|             if ( name_en.includes("(") && name_en.includes(")") ) { // Then process specific skills name with (xxxx) inside | ||||
| @@ -286,22 +295,25 @@ Hooks.once('init', () => { | ||||
|             } | ||||
|             var trait_fr = game.babele.translate( compmod+'.skills', { name: name_en }, true ); | ||||
|             //console.log(">>>>> Skill ?", name_en, special, trait_fr.name, trait_fr); | ||||
|             trait_fr.name = trait_fr.name || name_en | ||||
|             if (trait_fr.name != name_en) { // Translation OK | ||||
|               trait_en.name = trait_fr.name + special; | ||||
|               if ( trait_fr.data ) { | ||||
|                 trait_en.data.description.value = trait_fr.data.description.value; | ||||
|               if ( trait_fr.system ) { | ||||
|                 trait_en.system.description.value = trait_fr.system.description.value; | ||||
|               } | ||||
|             } | ||||
|            | ||||
|           } else if ( trait_en.type == "prayer") { | ||||
|             var trait_fr = game.babele.translate( compmod+'.prayers', { name: name_en }, true); | ||||
|             //console.log(">>>>> Prayer ?", name_en, special, trait_fr.name ); | ||||
|             trait_fr.name = trait_fr.name || trait_en.name | ||||
|             trait_en.name = trait_fr.name + special; | ||||
|             if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value ) | ||||
|               trait_en.data.description.value = trait_fr.data.description.value;                                       | ||||
|             if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value ) | ||||
|               trait_en.system.description.value = trait_fr.system.description.value;                                       | ||||
|            | ||||
|           } else if ( trait_en.type == "spell") { | ||||
|             var trait_fr = game.babele.translate( compmod+'.spells', { name: name_en }, true); | ||||
|             var trait_fr = game.babele.translate( compmod+'.spells', { name: name_en }, true) | ||||
|             trait_fr.name = trait_fr.name || name_en | ||||
|             if ( trait_fr.name == name_en  ) { // If no translation, test eisspells | ||||
|               trait_fr = game.babele.translate( 'wfrp4e-eis.eisspells', { name: name_en }, true);  | ||||
|             } | ||||
| @@ -310,8 +322,8 @@ Hooks.once('init', () => { | ||||
|             } | ||||
|             //console.log(">>>>> Spell ?", name_en, special, trait_fr.name ); | ||||
|             trait_en.name = trait_fr.name + special; | ||||
|             if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value ) | ||||
|               trait_en.data.description.value = trait_fr.data.description.value;                           | ||||
|             if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value ) | ||||
|               trait_en.system.description.value = trait_fr.system.description.value;                           | ||||
|           } else if ( trait_en.type == "talent") { | ||||
|             if ( name_en.includes("(") && name_en.includes(")") ) { // Then process specific skills name with (xxxx) inside | ||||
|               var re  = /(.*) +\((.*)\)/i; | ||||
| @@ -319,32 +331,35 @@ Hooks.once('init', () => { | ||||
|               name_en = res[1].trim(); // Get the root talent name, no parenthesis this time... | ||||
|               special = " (" + game.i18n.localize( res[2].trim() ) + ")"; // And the special keyword | ||||
|             } | ||||
|             var trait_fr = game.babele.translate( compmod+'.talents', { name: name_en }, true ); | ||||
|             var trait_fr = game.babele.translate( compmod+'.talents', { name: name_en }, true ) | ||||
|             trait_fr.name = trait_fr.name || name_en | ||||
|             //console.log(">>>>> Talent ?", trait_fr, name_en, special, trait_fr.name); | ||||
|             if ( trait_fr.name != "Sprinter" && trait_fr.name == name_en) { // If no translation, test ugtalents  | ||||
|               trait_fr = game.babele.translate( 'wfrp4e-unofficial-grimoire.ug-careerstalentstraits', { name: name_en }, true ); | ||||
|             } | ||||
|             if ( trait_fr.name == "Sprinter" || trait_fr.name != name_en)  { // Talent translated! | ||||
|               trait_en.name = trait_fr.name.trim() + special; | ||||
|               if ( trait_fr.data ) { // Why ??? | ||||
|                 trait_en.data.description.value = trait_fr.data.description.value; | ||||
|               trait_en.name = trait_fr.name.trim() + special | ||||
|               if ( trait_fr.system ) { // Why ??? | ||||
|                 trait_en.system.description.value = trait_fr.system.description.value; | ||||
|               } | ||||
|             } | ||||
|           } else if ( trait_en.type == "career") { | ||||
|             var career_fr = game.babele.translate( compmod+'.careers', trait_en, true ); | ||||
|             console.log(">>>>> Career ?", name_en, career_fr.name ); | ||||
|             trait_en.name = career_fr.name; | ||||
|             trait_en.data = duplicate(career_fr.data); | ||||
|             trait_en.name = career_fr.name || trait_en.name | ||||
|             trait_en.system = duplicate(career_fr.system); | ||||
|  | ||||
|           } else if ( trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") { | ||||
|             var trapping_fr = game.babele.translate( compmod+'.trappings',  trait_en, true ); | ||||
|             //console.log(">>>>> Trapping ?", name_en, trapping_fr.name); | ||||
|             trait_en.name = trapping_fr.name; | ||||
|             if ( trapping_fr.data) { | ||||
|               trait_en.data.description  = trapping_fr.data.description; | ||||
|             trait_en.name = trapping_fr.name || trait_en.name | ||||
|             if ( trapping_fr.system) { | ||||
|               trait_en.system.description  = trapping_fr.system.description; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         return beast_traits; | ||||
|         //console.log(">>>>>>>><OUTPUT", beast_traits) | ||||
|         return beast_traits | ||||
|       }, | ||||
|       // To avoid duplicateing class for all careers | ||||
|       "generic_localization": (value) => {  | ||||
|   | ||||
| @@ -2,19 +2,19 @@ | ||||
| 	"label": "Carrières Religieuses", | ||||
| 	"mapping": { | ||||
|     "skills": { | ||||
|       "path": "data.skills", | ||||
|       "path": "system.skills", | ||||
|       "converter": "career_skills" | ||||
|     }, | ||||
|     "talents": { | ||||
|       "path": "data.talents", | ||||
|       "path": "system.talents", | ||||
|       "converter": "career_talents" | ||||
|     }, | ||||
|     "class": { | ||||
|       "path": "data.class.value", | ||||
|       "path": "dasystemta.class.value", | ||||
|       "converter": "generic_localization" | ||||
|     }, | ||||
|     "careergroup": { | ||||
|       "path": "data.careergroup.value", | ||||
|       "path": "system.careergroup.value", | ||||
|       "converter": "career_careergroup" | ||||
|     }, | ||||
|     "trappings": "system.trappings" | ||||
|   | ||||
| @@ -1,13 +1,13 @@ | ||||
| { | ||||
| 	"label": "Objets Religieux", | ||||
|   "mapping": {       | ||||
|     "special":  "data.special.value", | ||||
|     "special":  "system.special.value", | ||||
|     "qualities": { | ||||
|       "path": "data.qualities.value", | ||||
|       "path": "system.qualities.value", | ||||
|       "converter": "trapping_qualities_flaws" | ||||
|     }, | ||||
|     "flaws": { | ||||
|       "path": "data.flaws.value", | ||||
|       "path": "system.flaws.value", | ||||
|       "converter": "trapping_qualities_flaws" | ||||
|     } | ||||
|   },	 | ||||
|   | ||||
| @@ -11,6 +11,16 @@ | ||||
|     } | ||||
|   }, | ||||
|   "entries": [ | ||||
|     { | ||||
|       "description": "<p>Dark and dangerous are the paths of @UUID[JournalEntry.ozE2DMCMK64eE5pD.JournalEntryPage.UqeZNqbpV8uocCUN]{the Reikwald} Forest. Few venture beneath the forest’s boughs lightly and those who do are often of iron will, or complete and total lack of imagination. Imagination is dangerous, for it leads to populating the deep places of the forest with bugaboos and horrors beyond counting. Unfortunately for Kastor, he’s quite an imaginative soul. Erichson quiets his many fears with fervently whispered prayers to Taal and when his nerves start to get the best of him, he seeks courage in a leather flask.</p><p>Despite the many dangers of the forest, both real and imagined, Kastor often prefers it to spending too much time midst other people. In Erichson’s mind, his ‘enemies’ in the forest are quite clear: bandits, Beastmen, and ‘demons’. In town, he faces a far more insidious foe: witches. Witches, as Kastor will readily tell others when drunk, are everywhere. Few witches go about ‘looking’ like witches, though, and that’s the real problem.</p><p>They hide among normal Gods-fearing folk to better work their clandestine evils. Keeping an eye out for witches in town is exhausting, Erichson reckons it is far better to stay in the forest where the enemies are clear. His beliefs have driven him to perfect his craft and he is an absolutely deadly shot.</p><h4>Vigilant Eyes</h4><p>After an event involving the Characters where magic of any kind was used, Erichson becomes convinced that one or more of the Characters is an ally of the ‘hidden witches’ even (especially!) if one of them is an Imperial Wizard. While he may seem to be merely a crazed hunter, his intense speeches on the ‘true perils’ of the world have their adherents, and if the Characters have done anything suspicious, he could very well get others to heed his rantings, especially those of the intolerant Witch Hunter strain.</p><p>Word gets around that Kastor managed to survive in a fight against a terrible Beastman @Compendium[wfrp4e-core.bestiary.cHVOdcEkuatqjYV1]{Bray-Shaman} because the creature’s spells ‘bounced’ right off him. Erichson holds to a great many odd superstitions and bears many strange charms, including small leather sacks holding mixtures of pine resin, rare berries, and herbs, blessed by a priest of Taal. Could one or more of his strange practices actually work and what would it take to convince him to share what he knows with the Characters?</p>", | ||||
|       "name": "Kastor Erichson", | ||||
|       "id": "Kastor Erichson" | ||||
|     }, | ||||
| 		{ | ||||
| 			"id": "Dieter Käsegeier", | ||||
| 			"name": "Dieter Käsegeier", | ||||
| 			"description": "<p>His many customers think of him as a peerless cheesemaker, but Dieter prefers to think of himself as a visionary. His father and his father before him (and so on for at least seven generations) were all involved in the making and selling of cheeses, but not particularly noteworthy ones. Dieter was not content to craft merely ‘adequate’ cheese, and experimented with different methods of preparation and unique ingredients, many of which he acquired himself while on adventurous holidays. His persistent trials and ongoing research eventually lead to great successes.</p><p>Folks who get to know Dieter soon discover that he is not so much a patient cheesemaker as an obsessive one. Dieter talks of barely anything else and every anecdote-filled conversation with him inevitable returns to cheese. He has added many unusual things to his cheeses over the years from hearty spices to various beers and ales. He’s running out of conventional new ingredients to try, so he’s decided to seek further afield, using materials such as ash, ground up insects, animal blood, bark shavings, goblin snot, excrement, and light doses of poison — ‘<em>this cheese tingles</em>!’.</p><h4>Where There’s a Will, There’s a Whey</h4><p>Dieter wants to hire some able sorts to help him retrieve a peculiar, rare breed of mushroom from deep in @UUID[JournalEntry.ozE2DMCMK64eE5pD.JournalEntryPage.UqeZNqbpV8uocCUN]{the Reikwald}, which he’ll pay well for in silver and truly delectable cheese. Unfortunately, his widespread fame brings thugs seeking to murder him and steal his secrets, not to mention the rather aggressive @UUID[Compendium.wfrp4e-core.bestiary.zzdOpKqBC28J66Mn]{Goblin} tribe who consider the mushrooms theirs.</p><p>Various folk have disappeared, or spontaneously mutated, and they all frequented Dieter’s shop. Has the eccentric cheese crafter finally turned to the Old Ones for new inspiration, using powdered wyrdstone in his latest batch, or has a rival set him up?</p>" | ||||
| 		}, | ||||
|     { | ||||
|       "description": "<p>Ces créatures reptiliennes à huit pattes sont solitaires et insaisissables. Considérées comme étant l'une des plus anciennes créatures du Chaos, on les dit emplies de tant de malveillance et de venin que même le sol sur lequel elles marchent est empoisonné. Leur morsure est également venimeuse, mais c'est leur regard pétrifiant qui est le plus à craindre. <br> Rarement rencontrés de nos jours, les basilics sont des ennemis des plus dangereux. Leurs glandes et leurs organes sont très prisés des Magiciens et Alchimistes. Ce qui fait que des chasseurs opportunistes écoutent souvent les rumeurs sur la présence de basilics dans les espaces sauvages du Vorbergland, et bien peu en reviennent.</p>", | ||||
|       "name": "Basilic", | ||||
|   | ||||
| @@ -143,7 +143,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.qn4ZpvTQIX4rcJDl\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.qn4ZpvTQIX4rcJDl\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -175,7 +175,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.diseases.kKccDTGzWzSXCBOb\").then(disease=> {\n args.actor.createEmbeddedEntity(\"OwnedItem\", disease.data)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.diseases.kKccDTGzWzSXCBOb\").then(disease=> {\n args.actor.createEmbeddedDocuments(\"Item\", disease.toObject())\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -557,7 +557,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll({async: false}).total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> a perdu ${teeth} dents`, speaker : {alias: this.effect.label}})\ninjury.location.value = `${teeth} ${injury.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll({async: false}).total\n ChatMessage.create({content : `<b>${this.actor.prototypeToken.name}</b> a perdu ${teeth} dents`, speaker : {alias: this.effect.label}})\ninjury.location.value = `${teeth} ${injury.location.value}`\n args.actor.createEmbeddedDocuments(\"Item\", injury.toObject())\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -608,7 +608,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.EaqlLRQigwnsEAXX\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.EaqlLRQigwnsEAXX\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()] )\n} )" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -640,7 +640,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "if (args.actor.isOwner)\n{\n   args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"difficult\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"stunned\")\n        })\n     })\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.4lj1ik958mbgAlaF\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\n}" | ||||
|                         "script": "if (args.actor.isOwner)\n{\n   args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"difficult\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"stunned\")\n        })\n     })\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.4lj1ik958mbgAlaF\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -729,7 +729,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.nF5z1OEhpi4t6a6S\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.nF5z1OEhpi4t6a6S\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject() ] )\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -848,7 +848,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid('Compendium.wfrp4e-core.injuries.EaqlLRQigwnsEAXX').then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid('Compendium.wfrp4e-core.injuries.EaqlLRQigwnsEAXX').then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()] )\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -1004,7 +1004,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.QluSTTTq3viHJJUh\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.QluSTTTq3viHJJUh\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -1054,7 +1054,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.2A7SW9eXsm7MvLsk\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.2A7SW9eXsm7MvLsk\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -1246,7 +1246,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.weczkAMPlTjX7lqU\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.SpPRZZRHxly7uo2G\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.weczkAMPlTjX7lqU\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.roObject()])\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.SpPRZZRHxly7uo2G\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -1321,7 +1321,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "endCombat", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "if (this.actor.isOwner)\n    this.actor.setupSkill(\"Résistance\").then(setupData => {\n      this.actor.basicTest(setupData).then(test => {\n        if (test.result.outcome == \"failure\") {\n          fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n            this.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n            this.actor.deleteEmbeddedEntity(\"ActiveEffect\", this.effect._id)\n          })\n        }\n      })\n    })" | ||||
|                         "script": "if (this.actor.isOwner)\n    this.actor.setupSkill(\"Résistance\").then(setupData => {\n      this.actor.basicTest(setupData).then(test => {\n        if (test.result.outcome == \"failure\") {\n          fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n            this.actor.createEmbeddedDocuments(\"Item\", [injury..toObject()])\n            this.actor.deleteEmbeddedDocuments(\"ActiveEffect\", this.effect._id)\n          })\n        }\n      })\n    })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -1461,7 +1461,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -1644,7 +1644,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -1772,7 +1772,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.SYjWiKDzMS6CtROJ\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.SYjWiKDzMS6CtROJ\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()] )\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -1804,7 +1804,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.eWPN3CV2Eddwz8aM\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.eWPN3CV2Eddwz8aM\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -1927,7 +1927,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.3S4OYOZLauXctmev\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.7mCcI3q7hgWcmbBU\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.3S4OYOZLauXctmev\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.7mCcI3q7hgWcmbBU\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -2158,7 +2158,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.2iult41Jehz0F1O8\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.2iult41Jehz0F1O8\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -2319,7 +2319,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.QluSTTTq3viHJJUh\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\").then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"prone\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.QluSTTTq3viHJJUh\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\").then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"prone\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -2367,7 +2367,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.diseases.M8XyRs9DN12XsFTQ\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.diseases.M8XyRs9DN12XsFTQ\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
| @@ -2438,7 +2438,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.7mCcI3q7hgWcmbBU\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n    args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"stunned\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.7mCcI3q7hgWcmbBU\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\nif (args.actor.isOwner)\n    args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"stunned\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -2470,7 +2470,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.qn4ZpvTQIX4rcJDl\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.qn4ZpvTQIX4rcJDl\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -2521,7 +2521,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\").then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\").then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -2572,7 +2572,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.nbhn2wX35b7Jrcbg\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.nbhn2wX35b7Jrcbg\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -2640,7 +2640,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll({async: false}).total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> loses ${teeth} teeth`, speaker : {alias: this.effect.label}})\ninjury.location.value = `${teeth} ${injury.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.rkJA1DlK51QuRlJy\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\").then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll({async: false}).total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> loses ${teeth} teeth`, speaker : {alias: this.effect.label}})\ninjury.location.value = `${teeth} ${injury.location.value}`\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.rkJA1DlK51QuRlJy\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\").then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -2696,7 +2696,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.zyocWSzEZEC826NS\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            { \n                   args.actor.addCondition(\"prone\")\n                  args.actor.addCondition(\"stunned\")\n             }\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.zyocWSzEZEC826NS\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            { \n                   args.actor.addCondition(\"prone\")\n                  args.actor.addCondition(\"stunned\")\n             }\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -2764,7 +2764,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.SYjWiKDzMS6CtROJ\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.SYjWiKDzMS6CtROJ\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()] )\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -2954,7 +2954,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.weczkAMPlTjX7lqU\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.weczkAMPlTjX7lqU\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -3025,7 +3025,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.8piWcBKFlQ2J1E3A\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.8piWcBKFlQ2J1E3A\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/head.png", | ||||
| @@ -3182,7 +3182,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "if(args.actor.isOwner) {\n    args.actor.setupSkill(\"Résistance\", { absolute: { difficulty: \"average\" } }).then(setupData => {\n      args.actor.basicTest(setupData).then(test => {\n        if (test.result.outcome == \"failure\") {\n          args.actor.addCondition(\"prone\")\n          fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n               injury.location.value = `${Math.clamped(Math.abs(test.result.outcome.SL) + 1, 1, 5)} ${injury.location.value}`\n              args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n          })\n        }\n      })\n    })\n  }" | ||||
|                         "script": "if(args.actor.isOwner) {\n    args.actor.setupSkill(\"Résistance\", { absolute: { difficulty: \"average\" } }).then(setupData => {\n      args.actor.basicTest(setupData).then(test => {\n        if (test.result.outcome == \"failure\") {\n          args.actor.addCondition(\"prone\")\n          fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n               injury.location.value = `${Math.clamped(Math.abs(test.result.outcome.SL) + 1, 1, 5)} ${injury.location.value}`\n              args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n          })\n        }\n      })\n    })\n  }" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -3272,7 +3272,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.gz2xy41OSVZ8YBgI\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.gz2xy41OSVZ8YBgI\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -3460,7 +3460,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.k00PimCWkff11IA0\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.k00PimCWkff11IA0\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -3492,7 +3492,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.3S4OYOZLauXctmev\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.3S4OYOZLauXctmev\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\nif (args.actor.isOwner)\n   args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", | ||||
| @@ -3582,7 +3582,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.MnMZv7ZXoRqoH9dS\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n    args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.MnMZv7ZXoRqoH9dS\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})\n\n\nif (args.actor.isOwner)\n    args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n       args.actor.basicTest(setupData).then(test => \n        {\n            if (test.result.outcome == \"failure\")\n            args.actor.addCondition(\"unconscious\")\n        })\n     })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -3614,7 +3614,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", | ||||
| @@ -3646,7 +3646,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.7rBhIRo96Mydo0Cv\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.7rBhIRo96Mydo0Cv\").then(injury => {\n args.actor.createEmbeddedDocuments(\"Item\", [injury.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", | ||||
|   | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -2,11 +2,11 @@ | ||||
| 	"label": "Mutations", | ||||
| 	"mapping": { | ||||
|     "modifier": { | ||||
|         "path": "data.modifier.value", | ||||
|         "path": "system.modifier.value", | ||||
|         "converter": "mutations_modifier" | ||||
|     }, | ||||
|     "mutationType": { | ||||
|         "path": "data.mutationType.value", | ||||
|         "path": "system.mutationType.value", | ||||
|         "converter": "generic_localization" | ||||
|     }, | ||||
|     "effects": { | ||||
|   | ||||
| @@ -88,7 +88,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "prePrepareData", | ||||
|                         "script": "args.actor.data.items = args.actor.data.items.filter(i => i.type != \"psychology\")" | ||||
|                         "script": "args.actor.items = args.actor.items.filter(i => i.type != \"psychology\")" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
| @@ -753,7 +753,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.psychologies.5hH73j2NgPdsLCZN\").then(item => {\n    args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.psychologies.5hH73j2NgPdsLCZN\").then(item => {\n    args.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
| @@ -802,7 +802,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.talents.J9MK0AIaTbvd5oF6\").then(item => {\n    args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.talents.J9MK0AIaTbvd5oF6\").then(item => {\n    args.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
| @@ -898,7 +898,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.talents.CV9btQn09S9Fn8Jk\").then(item => {\n    args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.talents.CV9btQn09S9Fn8Jk\").then(item => {\n    args.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
| @@ -989,7 +989,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.talents.g4Q6AtzZuo5iIvD4\").then(item => {\n    args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.talents.g4Q6AtzZuo5iIvD4\").then(item => {\n    args.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
| @@ -1142,7 +1142,7 @@ | ||||
|                     "wfrp4e": { | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "script": "let damage = (await new Roll(\"1d10\")).roll({async: false}).total\n    args.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL})\n\nif (args.actor.has(\"Mort-vivant\") || args.actor.data.has(\"Démoniaque\"))\n{\n  args.actor.addCondition(\"ablaze\")\n}" | ||||
|                         "script": "let damage = (await new Roll(\"1d10\")).roll({async: false}).total\n    args.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL})\n\nif (args.actor.has(\"Mort-vivant\") || args.actor.has(\"Démoniaque\"))\n{\n  args.actor.addCondition(\"ablaze\")\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
| @@ -1235,7 +1235,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.traits.pLW9SVX0TVTYPiPv\").then(item => {\n   item.specification.value = 3\n   this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.traits.AtpAudHA4ybXVlWM\").then(item => {\n    item.specification.value = 4\n   this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})" | ||||
|                         "script": "fromUuid(\"Compendium.wfrp4e-core.traits.pLW9SVX0TVTYPiPv\").then(item => {\n   item.system.specification.value = 3\n   this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n})\n\nfromUuid(\"Compendium.wfrp4e-core.traits.AtpAudHA4ybXVlWM\").then(item => {\n    item.system.specification.value = 4\n   this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/prayers/miracles.png", | ||||
|   | ||||
| @@ -121,7 +121,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -550,7 +550,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -746,7 +746,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -804,7 +804,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1008,7 +1008,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster=> {\n    if (caster&& (args.actor.has(game.i18n.localize(\"NAME.Undead\")) || args.actor.has(game.i18n.localize(\"NAME.Daemonic\"))))\n    {\n         let wp = caster.characteristics.wp.value\n         if (wp > args.actor.characteristics.t.value)\n         {\n             if (args.actor.has(game.i18n.localize(\"NAME.Unstable\")))\n             {\n                args.actor.update({\"data.status.wounds.value\" : 0})\n                args.actor.addCondition(\"dead\")\n             }\n             else\n             {\n                fromUuid(\"Compendium.wfrp4e-core.traits.D0ImWEIMSDgElsnl\").then(item => {\n                    args.actor.createEmbeddedDocuments(\"Item\", [item])\n ChatMessage.create({content : `Ajout d'Instable à ${args.actor.data.token.name}`, speaker : {alias: caster.name}})\n                })\n             }\n         }\n    }\n })" | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster=> {\n    if (caster&& (args.actor.has(game.i18n.localize(\"NAME.Undead\")) || args.actor.has(game.i18n.localize(\"NAME.Daemonic\"))))\n    {\n         let wp = caster.characteristics.wp.value\n         if (wp > args.actor.characteristics.t.value)\n         {\n             if (args.actor.has(game.i18n.localize(\"NAME.Unstable\")))\n             {\n                args.actor.update({\"data.status.wounds.value\" : 0})\n                args.actor.addCondition(\"dead\")\n             }\n             else\n             {\n                fromUuid(\"Compendium.wfrp4e-core.traits.D0ImWEIMSDgElsnl\").then(item => {\n                    args.actor.createEmbeddedDocuments(\"Item\", [item])\n ChatMessage.create({content : `Ajout d'Instable à ${args.actor.prototypeToken.name}`, speaker : {alias: caster.name}})\n                })\n             }\n         }\n    }\n })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/banishment.png", | ||||
| @@ -1113,7 +1113,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1136,7 +1136,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1184,7 +1184,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1213,7 +1213,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1486,7 +1486,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1688,7 +1688,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -1890,7 +1890,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -2100,7 +2100,7 @@ | ||||
|                         "effectApplication": "damage", | ||||
|                         "effectTrigger": "applyDamage", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\nlet applyTB = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\n\nif (applyAP) \n{\n   let AP = args.AP\n\n   args.totalWoundLoss += AP.used\n   let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n   args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nif (applyTB)\n{\n   let TB = args.actor.characteristics.t.bonus\n   args.totalWoundLoss += TB\n   let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"TB\")))\n   args.messageElements[apIndex] = \"0/\" + TB + \" \" + game.i18n.localize(\"TB\")\n}\n\nlet woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value)\n\nwoundsGained = Math.floor(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n   attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({ \"data.status.wounds\": attackerWounds })\n\nChatMessage.create({ content: `<b>${args.attacker.data.token.name}</b> subit ${woundsGained} Points de Blessures` })" | ||||
|                         "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\nlet applyTB = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\n\nif (applyAP) \n{\n   let AP = args.AP\n\n   args.totalWoundLoss += AP.used\n   let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n   args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nif (applyTB)\n{\n   let TB = args.actor.characteristics.t.bonus\n   args.totalWoundLoss += TB\n   let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"TB\")))\n   args.messageElements[apIndex] = \"0/\" + TB + \" \" + game.i18n.localize(\"TB\")\n}\n\nlet woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value)\n\nwoundsGained = Math.floor(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n   attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({ \"data.status.wounds\": attackerWounds })\n\nChatMessage.create({ content: `<b>${args.attacker.prototypeToken.name}</b> subit ${woundsGained} Points de Blessures` })" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/caress-of-laniph.png", | ||||
| @@ -2221,7 +2221,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "preOpposedDefender", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "if ((args.attackerTest.weapon && args.attackerTest.weapon.attackType == \"melee\") || (args.attackerTest.trait && !args.attackerTest.trait.name.includes(\"Ranged\")))\n{\n    let content = `<b>${args.attackerTest.actor.data.token.name}</b> reçoit ${this.actor.characteristics.wp.bonus} Dégats du Bouclier Céruléen si il utilise une arme en métal.`\n    args.opposedTest.result.other.push(content);\n}" | ||||
|                         "script": "if ((args.attackerTest.weapon && args.attackerTest.weapon.attackType == \"melee\") || (args.attackerTest.trait && !args.attackerTest.trait.name.includes(\"Ranged\")))\n{\n    let content = `<b>${args.attackerTest.actor.prototypeToken.name}</b> reçoit ${this.actor.characteristics.wp.bonus} Dégats du Bouclier Céruléen si il utilise une arme en métal.`\n    args.opposedTest.result.other.push(content);\n}" | ||||
|                       } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/cerulean-shield.png", | ||||
| @@ -2267,7 +2267,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -2596,7 +2596,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/blank.png", | ||||
| @@ -2628,7 +2628,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actorprototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -2645,7 +2645,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -2676,7 +2676,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/daemonology.png", | ||||
| @@ -2708,7 +2708,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/death.png", | ||||
| @@ -2756,7 +2756,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/fire.png", | ||||
| @@ -2804,7 +2804,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/heavens.png", | ||||
| @@ -2852,7 +2852,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/life.png", | ||||
| @@ -2900,7 +2900,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/light.png", | ||||
| @@ -2948,7 +2948,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/metal.png", | ||||
| @@ -2996,7 +2996,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/necromancy.png", | ||||
| @@ -3028,7 +3028,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "takeDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.data.token.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|                         "script": "let content = `<b>${this.effect.label}</b>: Toutes les cibles au contact avec <b>${this.actor.prototypeToken.name}</b> encaissent [[/r 1d10]] Dégâts, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/shadow.png", | ||||
| @@ -3287,7 +3287,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -3672,7 +3672,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -4101,7 +4101,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -4328,7 +4328,7 @@ | ||||
|                         "effectApplication": "damage", | ||||
|                         "effectTrigger": "applyDamage", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let wounds = duplicate(args.attacker.status.wounds)\nwounds.value+=1\n\nif (wounds.value > wounds.max)\n   wounds.value = wounds.max\n\nargs.attacker.update({\"data.status.wounds\" : wounds})\n\nChatMessage.create({content: `${args.attacker.data.token.name} récupère 1 blessure.`})" | ||||
|                         "script": "let wounds = duplicate(args.attacker.status.wounds)\nwounds.value+=1\n\nif (wounds.value > wounds.max)\n   wounds.value = wounds.max\n\nargs.attacker.update({\"data.status.wounds\" : wounds})\n\nChatMessage.create({content: `${args.attacker.prototypeToken.name} récupère 1 blessure.`})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/petty.png", | ||||
| @@ -4358,7 +4358,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -4585,7 +4585,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "endRound", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster => {\n    if (caster)\n    {\n        let bonus = caster.characteristics.wp.bonus\n        this.actor.modifyWounds(bonus)\n\n        ChatMessage.create({content: `${this.actor.data.token.name} regagne ${bonus} Points de Blessures (si en contact direct avec la Terre)`, speaker : {alias : this.effect.label}})\n    }\n})" | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster => {\n    if (caster)\n    {\n        let bonus = caster.characteristics.wp.bonus\n        this.actor.modifyWounds(bonus)\n\n        ChatMessage.create({content: `${this.actor.prototypeToken.name} regagne ${bonus} Points de Blessures (si en contact direct avec la Terre)`, speaker : {alias : this.effect.label}})\n    }\n})" | ||||
|                       } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/earthblood.png", | ||||
| @@ -4734,7 +4734,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -5211,7 +5211,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Select a target to apply the effect.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Select a target to apply the effect.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/blank.png", | ||||
| @@ -5236,7 +5236,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                       } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/blank.png", | ||||
| @@ -5268,7 +5268,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -5285,7 +5285,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -5316,7 +5316,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/daemonology.png", | ||||
| @@ -5348,7 +5348,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/death.png", | ||||
| @@ -5396,7 +5396,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/fire.png", | ||||
| @@ -5444,7 +5444,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/heavens.png", | ||||
| @@ -5492,7 +5492,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/life.png", | ||||
| @@ -5540,7 +5540,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/light.png", | ||||
| @@ -5588,7 +5588,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/metal.png", | ||||
| @@ -5636,7 +5636,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/necromancy.png", | ||||
| @@ -5668,7 +5668,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Sélectionnez une cible pour appliquer l'effet.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/shadow.png", | ||||
| @@ -5932,7 +5932,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -6355,7 +6355,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -6603,7 +6603,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster => {\n   if (caster)\n   {\n       let healed= caster.characteristics.wp.bonus + caster.characteristics.int.bonus\n       let wounds = duplicate(args.actor.status.wounds)\n       wounds.value+=healed\n       \n       if (wounds.value > wounds.max)\n          wounds.value = wounds.max\n       \n       args.actor.update({\"data.status.wounds\" : wounds})\n       ChatMessage.create({content: `${this.actor.data.token.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n   }\n})\n\nthis.actor.setupSkill(\"Résistance\", {absolute : {difficulty : \"vhard\"}, context : {success : \"1 Corruption point that was gained within the last hour is removed.\", failure: \"Nothing happens\"}}).then(setupData => {\n   this.actor.basicTest(setupData)\n})" | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster => {\n   if (caster)\n   {\n       let healed= caster.characteristics.wp.bonus + caster.characteristics.int.bonus\n       let wounds = duplicate(args.actor.status.wounds)\n       wounds.value+=healed\n       \n       if (wounds.value > wounds.max)\n          wounds.value = wounds.max\n       \n       args.actor.update({\"data.status.wounds\" : wounds})\n       ChatMessage.create({content: `${this.actor.prototypeToken.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n   }\n})\n\nthis.actor.setupSkill(\"Résistance\", {absolute : {difficulty : \"vhard\"}, context : {success : \"1 Corruption point that was gained within the last hour is removed.\", failure: \"Nothing happens\"}}).then(setupData => {\n   this.actor.basicTest(setupData)\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/healing-light.png", | ||||
| @@ -6677,7 +6677,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -6787,7 +6787,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -7047,7 +7047,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -7249,7 +7249,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -7576,7 +7576,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster => {\n   if (caster)\n   {\n       let healed= caster.characteristics.wp.bonus\n       let wounds = duplicate(args.actor.status.wounds)\n       wounds.value+=healed\n       \n       if (wounds.value > wounds.max)\n          wounds.value = wounds.max\n       \n       args.actor.update({\"data.status.wounds\" : wounds})\n       ChatMessage.create({content: `${this.actor.data.token.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n   }\n})" | ||||
|                         "script": "fromUuid(this.effect.origin).then(caster => {\n   if (caster)\n   {\n       let healed= caster.characteristics.wp.bonus\n       let wounds = duplicate(args.actor.status.wounds)\n       wounds.value+=healed\n       \n       if (wounds.value > wounds.max)\n          wounds.value = wounds.max\n       \n       args.actor.update({\"data.status.wounds\" : wounds})\n       ChatMessage.create({content: `${this.actor.prototypeToken.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n   }\n})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/nostrum.png", | ||||
| @@ -7842,7 +7842,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -8443,7 +8443,7 @@ | ||||
|                         "effectApplication": "damage", | ||||
|                         "effectTrigger": "applyDamage", | ||||
|                         "preventDuplicateEffects": true, | ||||
|                         "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\nif (applyAP) \n{\n   let AP = args.AP\n\n   args.totalWoundLoss += AP.used\n   let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n   args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nlet woundsGained = Math.min(args.actor.status.wounds.value, args.totalWoundLoss)\nwoundsGained = Math.ceil(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n    attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({\"data.status.wounds\" : attackerWounds})\n\nargs.actor.addCondition(\"fatigued\")\n\nChatMessage.create({content: `<b>${args.attacker.data.token.name}</b> récupère ${woundsGained} Points de Blessures`, alias : {speaker : this.effect.label}})" | ||||
|                         "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\nif (applyAP) \n{\n   let AP = args.AP\n\n   args.totalWoundLoss += AP.used\n   let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n   args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nlet woundsGained = Math.min(args.actor.status.wounds.value, args.totalWoundLoss)\nwoundsGained = Math.ceil(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n    attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({\"data.status.wounds\" : attackerWounds})\n\nargs.actor.addCondition(\"fatigued\")\n\nChatMessage.create({content: `<b>${args.attacker.prototypeToken.name}</b> récupère ${woundsGained} Points de Blessures`, alias : {speaker : this.effect.label}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/steal-life.png", | ||||
| @@ -8566,7 +8566,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -8770,7 +8770,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let value = 1\nlet name = this.actor.data.token.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Select a target to apply the effect.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyTerror(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postTerror(value, name)\n}" | ||||
|                         "script": "let value = 1\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM)\n{\nif (!game.user.targets.size)\n      return ui.notifications.warn(\"Select a target to apply the effect.\")\n  game.user.targets.forEach(t => {\n    t.actor.applyTerror(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postTerror(value, name)\n}" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/blank.png", | ||||
| @@ -8794,7 +8794,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -9015,7 +9015,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -9069,7 +9069,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let fortunePoints = {{result.overcast.other.current}}\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `<b>${this.actor.data.token.name}</b> a désormais ${fortunePoints + current} Points de Chance`, speaker : {alias : this.effect.label}})" | ||||
|                         "script": "let fortunePoints = {{result.overcast.other.current}}\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `<b>${this.actor.prototypeToken.name}</b> a désormais ${fortunePoints + current} Points de Chance`, speaker : {alias : this.effect.label}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/the-first-portent-of-amul.png", | ||||
| @@ -9117,7 +9117,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let fortunePoints = {{result.overcast.other.current}}\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `<b>${this.actor.data.token.name}</b> a désormais ${fortunePoints + current} Points de Chance`, speaker : {alias : this.effect.label}})" | ||||
|                         "script": "let fortunePoints = {{result.overcast.other.current}}\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `<b>${this.actor.prototypeToken.name}</b> a désormais ${fortunePoints + current} Points de Chance`, speaker : {alias : this.effect.label}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/the-second-portent-of-amul.png", | ||||
| @@ -9165,7 +9165,7 @@ | ||||
|                         "effectApplication": "apply", | ||||
|                         "effectTrigger": "oneTime", | ||||
|                         "preventDuplicateEffects": false, | ||||
|                         "script": "let current = this.actor.status.fate.value\n\nthis.actor.update({\"data.status.fate.value\" : current + 1})\n\nChatMessage.create({content : `<b>${this.actor.data.token.name}</b> a désormais ${current + 1} Points de Destin!`, speaker : {alias : this.effect.label}})" | ||||
|                         "script": "let current = this.actor.status.fate.value\n\nthis.actor.update({\"data.status.fate.value\" : current + 1})\n\nChatMessage.create({content : `<b>${this.actor.prototypeToken.name}</b> a désormais ${current + 1} Points de Destin!`, speaker : {alias : this.effect.label}})" | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/the-third-portent-of-amul.png", | ||||
| @@ -9344,7 +9344,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
| @@ -9546,7 +9546,7 @@ | ||||
|                         "effectApplication": "actor", | ||||
|                         "effectTrigger": "invoke", | ||||
|                         "lore": true, | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.data.token.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                         "script": "\n                    let value = 1\n                    let name = this.actor.prototypeToken.name\n                    \n                    if (game.user.isGM) {\n                        game.user.targets.forEach(t => {\n                            t.actor.applyFear(value, name)\n                        })\n                        game.user.updateTokenTargets([]);\n                    }\n                    else {\n                        game.wfrp4e.utility.postFear(value, name)\n                    }\n                " | ||||
|                     } | ||||
|                 }, | ||||
|                 "icon": "modules/wfrp4e-core/icons/spells/beasts.png", | ||||
|   | ||||
| @@ -24,7 +24,7 @@ | ||||
|             "wfrp4e": { | ||||
|               "effectApplication": "actor", | ||||
|               "effectTrigger": "prePrepareItems", | ||||
|               "script": "args.actor.data.flags.rangedDamageIncrease += 1" | ||||
|               "script": "args.actor.flags.rangedDamageIncrease += 1" | ||||
|             } | ||||
|           }, | ||||
|           "icon": "modules/wfrp4e-core/icons/talents/accurate-shot.png", | ||||
| @@ -129,7 +129,7 @@ | ||||
|             "wfrp4e": { | ||||
|               "effectApplication": "actor", | ||||
|               "effectTrigger": "prepareData", | ||||
|               "script": "args.actor.data.flags.ambi+= 1" | ||||
|               "script": "args.actor.flags.ambi+= 1" | ||||
|             } | ||||
|           }, | ||||
|           "icon": "modules/wfrp4e-core/icons/talents/ambidextrous.png", | ||||
| @@ -2000,7 +2000,7 @@ | ||||
|               "effectApplication": "actor", | ||||
|               "effectTrigger": "prePrepareItems", | ||||
|               "preventDuplicateEffects": false, | ||||
|               "script": "args.actor.data.flags.meleeDamageIncrease += 1" | ||||
|               "script": "args.actor.flags.meleeDamageIncrease += 1" | ||||
|             } | ||||
|           }, | ||||
|           "icon": "modules/wfrp4e-core/icons/talents/strike-mighty-blow.png", | ||||
|   | ||||
| @@ -256,7 +256,7 @@ | ||||
|               "effectTrigger": "takeDamage", | ||||
|               "preventDuplicateEffects": true, | ||||
|               "effectApplication": "actor", | ||||
|               "script": "let content = `<b>${this.effect.label}<\/b>: Toutes les cibles engagées avec <b>${this.actor.data.token.name}<\/b> subissent [[\/r 1d10]] dégats, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.data.token.name}})" | ||||
|               "script": "let content = `<b>${this.effect.label}<\/b>: Toutes les cibles engagées avec <b>${this.actor.prototypeToken.name}<\/b> subissent [[\/r 1d10]] dégats, modifiés par le BE et les PA.`\n\nChatMessage.create({content, speaker : {alias : this.actor.prototypeToken.name}})" | ||||
|             } | ||||
|           }, | ||||
|           "_id": "mzNcVAruDOTiCGhS", | ||||
| @@ -353,7 +353,7 @@ | ||||
|           "transfer": true, | ||||
|           "flags": { | ||||
|             "wfrp4e": { | ||||
|               "script": "let value = parseInt(this.item.specification.value)\nlet name = this.actor.data.token.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}", | ||||
|               "script": "let value = parseInt(this.item.specification.value)\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n  game.user.targets.forEach(t => {\n    t.actor.applyFear(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postFear(value, name)\n}", | ||||
|               "preventDuplicateEffects": false, | ||||
|               "effectTrigger": "invoke", | ||||
|               "effectApplication": "actor" | ||||
| @@ -798,7 +798,7 @@ | ||||
|           "label": "Attaque caudale", | ||||
|           "flags": { | ||||
|             "wfrp4e": { | ||||
|               "script": "let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]\nlet attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]\n\nif (attackerSize > actorSize)\n{\n   args.actor.addCondition(\"prone\")\n   ChatMessage.create({content: `<b>Attaque caudale<\/b>: ${args.actor.data.token.name} est maintenant @Condition[Prone](A Terre)`, speaker : {alias: args.attacker.data.token.name}})\n}", | ||||
|               "script": "let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]\nlet attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]\n\nif (attackerSize > actorSize)\n{\n   args.actor.addCondition(\"prone\")\n   ChatMessage.create({content: `<b>Attaque caudale<\/b>: ${this.actor.prototypeToken.name} est maintenant @Condition[Prone](A Terre)`, speaker : {alias: args.actor.prototypeToken.name}})\n}", | ||||
|               "effectApplication": "damage", | ||||
|               "effectTrigger": "applyDamage", | ||||
|               "preventDuplicateEffects": true | ||||
| @@ -830,7 +830,7 @@ | ||||
|           "label": "Terreur", | ||||
|           "flags": { | ||||
|             "wfrp4e": { | ||||
|               "script": "let value = parseInt(this.item.specification.value)\nlet name = this.actor.data.token.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n  game.user.targets.forEach(t => {\n    t.actor.applyTerror(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postTerror(value, name)\n}", | ||||
|               "script": "let value = parseInt(this.item.specification.value)\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n  game.user.targets.forEach(t => {\n    t.actor.applyTerror(value, name)\n  })\n  game.user.updateTokenTargets([]);\n}\nelse \n{\n  game.wfrp4e.utility.postTerror(value, name)\n}", | ||||
|               "effectApplication": "actor", | ||||
|               "effectTrigger": "invoke", | ||||
|               "preventDuplicateEffects": false | ||||
| @@ -864,7 +864,7 @@ | ||||
|               "effectTrigger": "applyDamage", | ||||
|               "preventDuplicateEffects": false, | ||||
|               "effectApplication": "damage", | ||||
|               "script": "let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]\nlet attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]\n\nif (attackerSize > actorSize)\n{\n   args.actor.addCondition(\"entangled\")\n   ChatMessage.create({content: `<b>Langue préhensible<\/b>: ${args.actor.data.token.name} is now @Condition[Entangled]`, speaker : {alias: args.attacker.data.token.name}})\n}" | ||||
|               "script": "let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]\nlet attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]\n\nif (attackerSize > actorSize)\n{\n   args.actor.addCondition(\"entangled\")\n   ChatMessage.create({content: `<b>Langue préhensible<\/b>: ${args.actor.prototypeToken.name} is now @Condition[Entangled]`, speaker : {alias: args.actor.prototypeToken.name}})\n}" | ||||
|             } | ||||
|           }, | ||||
|           "transfer": true, | ||||
|   | ||||
| @@ -76,7 +76,7 @@ | ||||
| 						"wfrp4e": { | ||||
| 							"effectTrigger": "oneTime", | ||||
| 							"effectApplication": "apply", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.data.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n          args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n          args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"preventDuplicateEffects": false | ||||
| 						} | ||||
| 					} | ||||
| @@ -103,7 +103,7 @@ | ||||
| 						"wfrp4e": { | ||||
| 							"effectTrigger": "oneTime", | ||||
| 							"effectApplication": "apply", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.data.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n         args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n         args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"preventDuplicateEffects": false | ||||
| 						} | ||||
| 					} | ||||
| @@ -142,7 +142,7 @@ | ||||
| 						"wfrp4e": { | ||||
| 							"effectTrigger": "oneTime", | ||||
| 							"effectApplication": "apply", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", { context: { failure: \"1 Point de Corruption acquis\" } }).then(setupData => {\n    args.actor.basicTest(setupData).then(test => {\n        if (test.result.outcome == \"failure\" && args.actor.data.type == \"character\") {\n            let msg = \"\"\n            args.actor.update({ \"data.status.corruption.value\": parseInt(args.actor.status.corruption.value) + 1 })\n            msg += `<b>${args.actor.data.token.name}</b> gains a Corruption point<br>`\n            if ((test.result.outcome.roll % 11 == 0) || test.result.outcome.roll == 100 || test.result.outcome.roll == 99)\n                msg +=  `<b>${args.actor.data.token.name}</b> reçoit une mutation (@Table[expandedmutatephys]{Physique} ou @Table[expandedmutatemental]{Mentale}) et reçoit @Compendium[wfrp4e-core.talents.hiU7vhBOVpVI8c7C]{Chaos Magic (Tzeentch)}`\n           ChatMessage.create({content : msg, speaker : {alias : this.effect.label}})\n           args.actor.checkCorruption()\n         }\n    })\n})", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", { context: { failure: \"1 Point de Corruption acquis\" } }).then(setupData => {\n    args.actor.basicTest(setupData).then(test => {\n        if (test.result.outcome == \"failure\" && args.actor.type == \"character\") {\n            let msg = \"\"\n            args.actor.update({ \"data.status.corruption.value\": parseInt(args.actor.status.corruption.value) + 1 })\n            msg += `<b>${args.actor.prototypeToken.name}</b> gains a Corruption point<br>`\n            if ((test.result.outcome.roll % 11 == 0) || test.result.outcome.roll == 100 || test.result.outcome.roll == 99)\n                msg +=  `<b>${args.actor.prototypeToken.name}</b> reçoit une mutation (@Table[expandedmutatephys]{Physique} ou @Table[expandedmutatemental]{Mentale}) et reçoit @Compendium[wfrp4e-core.talents.hiU7vhBOVpVI8c7C]{Chaos Magic (Tzeentch)}`\n           ChatMessage.create({content : msg, speaker : {alias : this.effect.label}})\n           args.actor.checkCorruption()\n         }\n    })\n})", | ||||
| 							"preventDuplicateEffects": false | ||||
| 						} | ||||
| 					} | ||||
| @@ -181,7 +181,7 @@ | ||||
| 						"wfrp4e": { | ||||
| 							"effectTrigger": "oneTime", | ||||
| 							"effectApplication": "apply", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.data.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n         args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n         args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"preventDuplicateEffects": false | ||||
| 						} | ||||
| 					} | ||||
| @@ -208,7 +208,7 @@ | ||||
| 						"wfrp4e": { | ||||
| 							"effectTrigger": "oneTime", | ||||
| 							"effectApplication": "apply", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.data.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n         args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"script": "args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Point de Corruption acquis\"}}).then(setupData => {\n    args.actor.basicTest(setupData).then(test => \n     {\n         if (test.result.outcome == \"failure\" && args.actor.type == \"character\")\n         {\n          args.actor.update({\"data.status.corruption.value\" : parseInt(args.actor.status.corruption.value) + 1})\n         args.actor.checkCorruption()\n         }\n     })\n  })", | ||||
| 							"preventDuplicateEffects": false | ||||
| 						} | ||||
| 					} | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|     } | ||||
|   ], | ||||
|   "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", | ||||
|   "version": "6.2.3", | ||||
|   "version": "6.2.8", | ||||
|   "esmodules": [ | ||||
|     "babele-register.js", | ||||
|     "addon-register.js", | ||||
| @@ -136,7 +136,7 @@ | ||||
|     } | ||||
|   ], | ||||
|   "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json", | ||||
|   "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.3.zip", | ||||
|   "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.8.zip", | ||||
|   "id": "wh4-fr-translation", | ||||
|   "compatibility": { | ||||
|     "minimum": "10", | ||||
|   | ||||
| @@ -726,9 +726,9 @@ export class WH4FRPatchConfig { | ||||
|                             if (weaponLength > 3) | ||||
|                             { | ||||
|                                 let improv = duplicate(game.wfrp4e.config.systemItems.improv) | ||||
|                                 improv.data.twohanded.value = args.item.twohanded.value | ||||
|                                 improv.data.offhand.value = args.item.offhand.value | ||||
|                                 args.item.data.update({"data" : improv.data, name : args.item.name + " (Combat au Contact")}) | ||||
|                                 improv.system.twohanded.value = args.item.twohanded.value | ||||
|                                 improv.system.offhand.value = args.item.offhand.value | ||||
|                                 args.item.update({"system" : improv.system, name : args.item.name + " (Combat au Contact")}) | ||||
|                             } | ||||
|                         } | ||||
|                 ` | ||||
| @@ -1161,7 +1161,7 @@ export class WH4FRPatchConfig { | ||||
|                         let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"] | ||||
|                         if (applicableCharacteristics.includes(args.test.result.characteristic)) | ||||
|                             this.actor.addCondition("stunned") | ||||
|                         else if (args.test.result.skill && applicableCharacteristics.includes(args.test.result.skill.data.characteristic.value)) | ||||
|                         else if (args.test.result.skill && applicableCharacteristics.includes(args.test.result.skill.system.characteristic.value)) | ||||
|                             this.actor.addCondition("stunned") | ||||
|                         else if (args.test.result.weapon) | ||||
|                             this.actor.addCondition("stunned") | ||||
| @@ -1210,7 +1210,7 @@ export class WH4FRPatchConfig { | ||||
|                                     { | ||||
|                                         if (test.result.outcome == "failure") | ||||
|                                             fromUuid("Compendium.wfrp4e-core.diseases.kKccDTGzWzSXCBOb").then(disease => { | ||||
|                                                 args.actor.createEmbeddedEntity("OwnedItem", disease.data) | ||||
|                                                 args.actor.createEmbeddedDocuments("Item", [disease.toObject()]) | ||||
|                                             }) | ||||
|                                     }) | ||||
|                                 }) | ||||
|   | ||||
| @@ -134,7 +134,7 @@ async function __findSkill(skillName, value = undefined) { | ||||
|         let spec = XRegExp.replace(skillSplit.specialized, "(", ""); | ||||
|         spec = XRegExp.replace(spec, ")", ""); | ||||
|         let skillSplit2 = XRegExp.exec(dbSkill.name, XRegExp(parseStr, 'gi')); | ||||
|         dbSkill.data.update( { name: skillSplit2.name + '(' + game.i18n.localize( spec.trim() ) + ')' } ); | ||||
|         dbSkill.update( { name: skillSplit2.name + '(' + game.i18n.localize( spec.trim() ) + ')' } ); | ||||
|       } | ||||
|       //game.babele.translate('wfrp4e-core.skills', dbSkill); | ||||
|       return dbSkill; | ||||
| @@ -169,7 +169,7 @@ async function __findTalent(talentName) { | ||||
|       if ( talentSplit.specialized  ) { | ||||
|         let spec = XRegExp.replace(talentSplit.specialized, "(", ""); | ||||
|         spec = XRegExp.replace(spec, ")", ""); | ||||
|         dbTalent.data.update( { name: talentSplit.name + '(' + game.i18n.localize( spec.trim() ) + ')' } ); | ||||
|         dbTalent.update( { name: talentSplit.name + '(' + game.i18n.localize( spec.trim() ) + ')' } ); | ||||
|       } | ||||
|       return dbTalent; | ||||
|     } | ||||
| @@ -285,9 +285,9 @@ export default async function statParserFR(statString, type = "npc") { | ||||
|             if (itemFound && value && value.length > 0) { | ||||
|               if (name.toLowerCase() == 'weapon' || name.toLowerCase() == "bite" || name.toLowerCase() == "tail" || | ||||
|                   name.toLowerCase() == 'arme' || name.toLowerCase() == "morsure" || name.toLowerCase() == "queue") { | ||||
|                 itemFound.data.specification.value = Number(value) - Math.floor( Number(model.characteristics.s.initial) / 10) | ||||
|                 itemFound.system.specification.value = Number(value) - Math.floor( Number(model.characteristics.s.initial) / 10) | ||||
|               } else { | ||||
|                 itemFound.data.specification.value = game.i18n.localize(value) | ||||
|                 itemFound.system.specification.value = game.i18n.localize(value) | ||||
|               } | ||||
|             } | ||||
|             if (!itemFound) | ||||
| @@ -301,7 +301,7 @@ export default async function statParserFR(statString, type = "npc") { | ||||
|             if (itemFound) | ||||
|               itemFound = itemFound.toObject(); | ||||
|             if (itemFound && subres && value) { | ||||
|               itemFound.data.advances.value = Number(value) - Number(model.characteristics[itemFound.data.characteristic.value].initial); | ||||
|               itemFound.system.advances.value = Number(value) - Number(model.characteristics[itemFound.system.characteristic.value].initial); | ||||
|             } | ||||
|             if (!itemFound) | ||||
|               ui.notifications.error("Compétence non trouvée, à ajouter manuellement : " + name, { permanent: true }) | ||||
| @@ -313,7 +313,7 @@ export default async function statParserFR(statString, type = "npc") { | ||||
|             if (itemFound) | ||||
|               itemFound = itemFound.toObject(); | ||||
|             if (itemFound && subres && value) | ||||
|               itemFound.data.advances.value = Number(value); | ||||
|               itemFound.system.advances.value = Number(value); | ||||
|             if (!itemFound) | ||||
|               ui.notifications.error("Talent non trouvé, à ajouter manuellement : " + name, { permanent: true }) | ||||
|           } else if (def.name == 'trapping') { | ||||
| @@ -323,7 +323,7 @@ export default async function statParserFR(statString, type = "npc") { | ||||
|             catch { } | ||||
|             if (!itemFound && name) { | ||||
|               itemFound = new game.entities.ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "trapping", data: game.system.model.Item.trapping }) | ||||
|               itemFound.data.data.trappingType.value = "misc" | ||||
|               itemFound.system.trappingType.value = "misc" | ||||
|             }  | ||||
|             if (itemFound) | ||||
|               itemFound = itemFound.toObject(); | ||||
| @@ -342,13 +342,13 @@ export default async function statParserFR(statString, type = "npc") { | ||||
|       } | ||||
|     } | ||||
|     let moneyItems = await game.wfrp4e.utility.allMoneyItems() || []; | ||||
|     moneyItems = moneyItems.sort((a, b) => (a.data.coinValue.value > b.data.coinValue.value) ? -1 : 1); | ||||
|     moneyItems.forEach(m => m.data.quantity.value = 0) | ||||
|     moneyItems = moneyItems.sort((a, b) => (a.system.coinValue.value > b.system.coinValue.value) ? -1 : 1); | ||||
|     moneyItems.forEach(m => m.system.quantity.value = 0) | ||||
|     globalItemList = globalItemList.concat(moneyItems); | ||||
|     //console.log("My liste :", globalItemList); | ||||
|     let name = pnjName; | ||||
|  | ||||
|     let effects = globalItemList.reduce((total, globItem) => total.concat(globItem.data.effects), []) | ||||
|     let effects = globalItemList.reduce((total, globItem) => total.concat(globItem.effects), []) | ||||
|     effects = effects.filter(e => !!e) | ||||
|     effects = effects.filter(e => e.transfer) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user