untested intangibility

This commit is contained in:
2023-09-08 10:48:16 -05:00
parent ecd614db33
commit c577a8ec0f
2 changed files with 31 additions and 1 deletions
+31
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
}