2024-05-16 17:57:51 +02:00
|
|
|
let i_gain = (await new Roll("2d10").roll()).total
|
|
|
|
let fel_gain = 0
|
|
|
|
if (args.actor.characteristics.fel.value <= 0)
|
|
|
|
{
|
|
|
|
fel_gain += (await new Roll("2d10").roll()).total
|
|
|
|
}
|
|
|
|
|
2024-05-17 12:46:44 +02:00
|
|
|
let msg = `<b>${this.actor.prototypeToken.name}</b> gagne ${i_gain} en Intelligence`
|
2024-05-16 17:57:51 +02:00
|
|
|
|
|
|
|
if (fel_gain)
|
2024-05-17 12:46:44 +02:00
|
|
|
msg += ` et ${fel_gain} en Sociabilité`
|
2024-05-16 17:57:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
let newInt = i_gain + args.actor.characteristics.int.modifier
|
|
|
|
let newFel = fel_gain + args.actor.characteristics.fel.modifier
|
|
|
|
|
|
|
|
args.actor.update({"system.characteristics.int.modifier" : newInt, "system.characteristics.fel.modifier" : newFel})
|
|
|
|
|
|
|
|
this.script.scriptMessage(msg)
|