Version 2.0.0 #35
@ -658,20 +658,15 @@ class SmiteEffect extends TargetedPowerEffect {
|
|||||||
const raise = (this.buttons === 'raise')
|
const raise = (this.buttons === 'raise')
|
||||||
const greater = !!this.inputs[this.inputIndex]
|
const greater = !!this.inputs[this.inputIndex]
|
||||||
const changeValue = (greater ? (raise ? '+6' : '+4') : (raise ? '+4' : '+2'))
|
const changeValue = (greater ? (raise ? '+6' : '+4') : (raise ? '+4' : '+2'))
|
||||||
|
const changeKey = 'system.stats.globalMods.damage'
|
||||||
for (const token of this.targets) {
|
for (const token of this.targets) {
|
||||||
const weaponName = this.inputs[this.tokenWeapons[token.id]]
|
const weaponName = this.inputs[this.tokenWeapons[token.id]]
|
||||||
const weaponId = token.actor.items.getName(weaponName)?.id
|
const effectName = `Smite (${weaponName})`
|
||||||
const changeKey = `@Weapon{${weaponName}}[system.actions.dmgMod]`
|
|
||||||
if (!weaponId) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
const effectName = `${this.buttons === 'raise' ? 'major' : 'minor'} Smite${greater ? ' (greater)' : ''} (${weaponName})`
|
|
||||||
const changes = [
|
const changes = [
|
||||||
{ key: changeKey, mode, value: changeValue, priority: 0 }
|
{ key: changeKey, mode, value: changeValue, priority: 0 }
|
||||||
]
|
]
|
||||||
this.baseEffect.changes = changes
|
this.baseEffect.changes = changes
|
||||||
this.baseEffect.name = effectName
|
this.baseEffect.name = effectName
|
||||||
console.log(token, weaponName, weaponId, effectName, changeKey)
|
|
||||||
await shim.applyActiveEffects(token, [this.baseEffect].concat(this.effectDocs))
|
await shim.applyActiveEffects(token, [this.baseEffect].concat(this.effectDocs))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user