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