26 perception drinking all abilities (#56)

* Innate abilities

+ Added Perception as fixed innate ability
+ Added Drinking as fixed innate ability
+ Set Luckpoints to 0

* Duration Update

+ Added Duration to Effects
+ Added Perception to Eye & Ear Injury

* Fixed like recommended

+ Fixed M5Base
+Fixed M5Character
+ Fixed M5Rolls
+ Fixed Skills HBS
+ Fixed BrawlFw
+ Fixed Effect (not saved already)

* fix minor issues

---------

Co-authored-by: Byroks <byroks@gmail.com>
This commit is contained in:
LeFrique
2023-12-13 18:45:35 +01:00
committed by GitHub
co-authored by Byroks
parent 1e27e135cf
commit fed1175987
83 changed files with 188 additions and 18 deletions
+37 -2
View File
@@ -1,6 +1,7 @@
import { Evaluated } from "@league-of-foundry-developers/foundry-vtt-types/src/foundry/client/dice/roll";
import { M5Character } from "../actors/M5Character";
import { M5EwResult, M5RollData, M5RollResult, M5SkillUnlearned } from "../M5Base";
import { M5EwResult, M5RollData, M5RollResult, M5SkillUnlearned, M5Stats } from "../M5Base";
import { stat } from "fs";
export class M5Roll {
// extends Roll<M5RollData>
@@ -181,7 +182,7 @@ export class M5Roll {
};
rollData.rolls["0"] = {
formula: "1d20 + @c.calc.stats.brawlEw",
formula: "1d20 + @c.calc.stats.brawlFw",
enabled: true,
label: (game as Game).i18n.localize("midgard5.attack"),
result: "",
@@ -205,6 +206,40 @@ export class M5Roll {
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.brawl"));
}
static perception(actor: any) {
const rollData = actor.getRollData() as M5RollData;
rollData.rolls["0"] = {
formula: "1d20 + @c.calc.stats.perception.value + @c.calc.stats.perceptionFW",
enabled: true,
label: (game as Game).i18n.localize("midgard5.perception"),
result: "",
total: 0,
totalStr: "",
dice: {},
css: "",
} as M5RollResult;
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.perception"));
}
static drinking(actor: any) {
const rollData = actor.getRollData() as M5RollData;
rollData.rolls["0"] = {
formula: "1d20 + @c.calc.stats.drinking.value + @c.calc.stats.drinkingFW",
enabled: true,
label: (game as Game).i18n.localize("midgard5.drinking"),
result: "",
total: 0,
totalStr: "",
dice: {},
css: "",
} as M5RollResult;
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.drinking"));
}
static defense(actor: any) {
const rollData = actor.getRollData() as M5RollData;
rollData.i = {