Add all systems effects scripts + translations
This commit is contained in:
22
reference_scripts/E1vUepgop09FF5wy.js
Normal file
22
reference_scripts/E1vUepgop09FF5wy.js
Normal file
@ -0,0 +1,22 @@
|
||||
if (this.actor.system.status.advantage.value == 0)
|
||||
{
|
||||
return this.script.scriptNotification("Not enough Advantage!", "error")
|
||||
}
|
||||
|
||||
let hatred = await fromUuid("Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0")
|
||||
let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q");
|
||||
|
||||
if (this.actor.system.status.advantage.value >= 3)
|
||||
{
|
||||
this.script.scriptNotification(`Adding ${frenzy.name}`)
|
||||
this.actor.setAdvantage(0)
|
||||
this.actor.createEmbeddedDocuments("Item", [frenzy])
|
||||
}
|
||||
else if (this.actor.system.status.advantage.value >= 1)
|
||||
{
|
||||
let data = hatred.toObject();
|
||||
data.system.specification.value = "Close Combat opponents"
|
||||
this.script.scriptNotification(`Adding ${hatred.name}`)
|
||||
this.actor.setAdvantage(0)
|
||||
this.actor.createEmbeddedDocuments("Item", [data])
|
||||
}
|
Reference in New Issue
Block a user