Version 2.0.0 #35

Merged
mike merged 19 commits from develop into main 2023-10-02 01:51:47 +00:00
Showing only changes of commit 7637977018 - Show all commits

View File

@ -141,6 +141,31 @@ class TargetedPowerEffect extends PowerEffect {
}
}
class ArcaneProtectionEffect extends TargetedPowerEffect {
get name () {
return 'Arcane Protection'
}
get baseDurationRounds () {
return 5
}
async prepMenu () {
this.menuData.inputs.push(
{ type: 'checkbox', label: 'Greater', options: false })
}
async prepResult () {
const greater = !!this.inputs[this.inputIndex]
const raise = this.buttons === 'raise'
const amount = (raise ? -4 : -2) + (greater ? -2 : 0)
const icon = 'icons/magic/defensive/shield-barrier-flaming-pentagon-blue.webp'
const name = `${greater ? 'Greater ' : ''}Arcane Protection (${raise ? 'major, ' : ''}${amount})`
this.effectDocs.push(
shim.createEffectDocument(icon, name, this.durationRounds, []))
}
}
class BlindEffect extends TargetedPowerEffect {
async prepMenu (token, targets) {
this.menuData.inputs.push({
@ -916,6 +941,7 @@ class SummonUndeadEffect extends SummonEffect {
}
const PowerClasses = {
'arcane protection': ArcaneProtectionEffect,
blind: BlindEffect,
'boost/lower trait': BoostLowerTraitEffect,
'boost trait': BoostLowerTraitEffect,