untested intangibility

This commit is contained in:
Mike Bloy 2023-09-08 10:48:16 -05:00
parent ecd614db33
commit c577a8ec0f
2 changed files with 31 additions and 1 deletions

1
package-lock.json generated
View File

@ -4,7 +4,6 @@
"requires": true,
"packages": {
"": {
"name": "swade-mb-helpers",
"devDependencies": {
"@league-of-foundry-developers/foundry-vtt-types": "^9.280.0",
"eslint": "^8.48.0",

View File

@ -376,6 +376,36 @@ class EntangleEffect extends TargetedPowerEffect {
}
}
class IntangibilityEffect extends TargetedPowerEffect {
get name () {
return 'Intangility'
}
get durationRounds () {
if (!this.inputs) {
return 5
}
if (this.inputs[this.inputs.length - 1]) { // Duration
return 50
}
return 5 // no duration
}
prepMenu () {
this.menuData.inputs.push({ type: 'checkbox', label: 'Duration', options: false })
this.menuData.buttons = [
{ label: 'Apply', value: 'apply' },
{ label: 'Cancel', value: 'cancel' }
]
}
prepResult () {
const icon = 'icons/magic/control/debuff-energy-hold-levitate-blue-yellow.webp'
const effect = shim.createEffectDocument(icon, this.name, this.durationRounds, [])
this.effectDocs.push(effect)
}
}
const PowerClasses = {
blind: BlindEffect,
'boost/lower trait': BoostLowerTraitEffect,
@ -383,6 +413,7 @@ const PowerClasses = {
confusion: ConfusionEffect,
deflection: DeflectionEffect,
entangle: EntangleEffect,
inangibility: IntangibilityEffect,
'lower trait': BoostLowerTraitEffect
}