Sync to v7.2.0

This commit is contained in:
2024-06-06 22:07:28 +02:00
parent e46d68b315
commit 2c5ff15830
180 changed files with 2323 additions and 0 deletions

View File

@ -0,0 +1,32 @@
const sin = this.effect.sourceActor.system.status.sin.value;
const result = await WFRP_Tables.rollTable("manann-mood-made-meaningless", sin);
let match = result.text.match(/b>([^<]+)/i);
let key = match[1];
let roll = new Roll("5d10");
let value = undefined;
await this.script.scriptMessage(result.text, {flavor: result.title});
switch (key) {
case 'Stromfels Triumphant!':
value = 0;
break;
case 'Stromfels Ascends!':
await roll.evaluate();
if (this.actor.system.status.mood.value > 0)
value = -roll.total;
else if (this.actor.system.status.mood.value < 0)
value = roll.total;
break;
case 'No effect.':
break;
case 'Manann Provoked!':
await roll.evaluate();
value = -roll.total;
break;
}
if (roll._evaluated)
await roll.toMessage();
await this.effect.setFlag("wfrp4e-soc", "m4result", {result: key, value});