Jagusti/fvtt-wfrp4e-gmtoolkit

Cap to max Advantage in Increase Advantage macro

Jagusti opened this issue · 0 comments

From JDW via Discord

/* Increases Advantage for the selected token by 0 */
if(Number(actor.data.data.status.advantage.max) > Number(actor.data.data.status.advantage.value))
{
actor.update({"data.status.advantage.value" : Number(actor.data.data.status.advantage.value)+1})
ui.notifications.notify(Advantage increased by 1 to ${actor.data.name}`)
}```