Files
foundryvtt-wh4-lang-fr-fr/scripts/HiDcm1jhG3sU39ME.js
T
uberwald 38d88c2f19
Validation JSON / validate (push) Successful in 13s
Mise àjour vers 9.6.0
2026-05-18 07:23:40 +02:00

27 lines
690 B
JavaScript

this.actor.addCondition("ablaze");
let colors = {
fire : "#b22222",
heavens : "#87ceeb",
metal : "#ee9b3a",
shadow : "#808080",
life : "#008000",
beasts : "#a52a2a",
light : "#f0ffff",
death : "#800080",
necromancy : "#800080",
daemonology : "#8b0000"
};
let spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0]));
let color;
if (spell)
{
color = colors[spell.system.lore.value[0]];
}
else
{
color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)];
}
this.effect.updateSource({changes: this.effect.changes.concat({key: "token.light.color", type: "override", value: color})});