foundryvtt-wh4-lang-fr-fr/scripts/R6SnyF3y4Vsq6oga.js

10 lines
448 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
2024-05-16 17:57:51 +02:00
// If channelling corresponding lore
if (args.type == "channelling" && spellLore == lore)
2024-05-16 17:57:51 +02:00
args.prefillModifiers.slBonus += 1
// If channelling or casting different lore
else if (spellLore != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1