forked from public/foundryvtt-wh4-lang-fr-fr
Add all systems effects scripts + translations
This commit is contained in:
25
reference_scripts/GcIQtshex11AMmh2.js
Normal file
25
reference_scripts/GcIQtshex11AMmh2.js
Normal file
@ -0,0 +1,25 @@
|
||||
if (this.item.system.isEquipped)
|
||||
{
|
||||
let removeRepeater = false
|
||||
if(!this.item.system.offhand.value) // main
|
||||
{
|
||||
let offhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && i.system.offhand.value)
|
||||
if (offhandUsed)
|
||||
{
|
||||
removeRepeater = true;
|
||||
}
|
||||
}
|
||||
else // offhand
|
||||
{
|
||||
let mainhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && !i.system.offhand.value)
|
||||
if (mainhandUsed)
|
||||
{
|
||||
removeRepeater = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (removeRepeater)
|
||||
{
|
||||
this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != "repeater")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user