Sync to v7.2.0
This commit is contained in:
23
reference_scripts/hSImyYjL0CENTvXf.js
Normal file
23
reference_scripts/hSImyYjL0CENTvXf.js
Normal file
@ -0,0 +1,23 @@
|
||||
let test = await this.actor.setupSkill("Endurance", {fields : {difficulty : "difficult", appendTitle : ` - ${this.effect.name}`}});
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
await this.actor.addCondition("blinded");
|
||||
}
|
||||
|
||||
let msg = ``
|
||||
let armour = args.actor.itemTypes.armour.filter(i => i.system.isMetal && i.system.isEquipped);
|
||||
for(let item of armour)
|
||||
{
|
||||
for(let key in item.system.AP)
|
||||
{
|
||||
let AP = item.system.AP[key]
|
||||
let damage = Math.floor(AP / 2);
|
||||
await item.system.damageItem(damage, [key]);
|
||||
}
|
||||
msg += `<p><strong>${item.name}</strong> AP reduced by half</p>`
|
||||
}
|
||||
if (msg)
|
||||
{
|
||||
this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}});
|
||||
}
|
Reference in New Issue
Block a user