diff --git a/README.md b/README.md index e67ae5b..993780d 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,8 @@ For base game characters, it is sufficient to only provide the ID, similar to wh _Note_: custom images will only be visible after enabling them in the Grimoire menu! - **edition**: the ID of the edition for this character. can be left blank or "custom" - **firstNight** / **otherNight**: the position that this character acts on the first / other nights, compared to all - other characters + other characters
+ _Note_: must be a positive number or zero, with zero being treated as "does not act during the night" - **firstNightReminder** / **otherNightReminder**: reminder text for first / other nights - **reminders**: reminder tokens, should be an empty array `[]` if none - **remindersGlobal**: global reminder tokens that will always be available, no matter if the character is assigned to a player or not diff --git a/src/store/index.js b/src/store/index.js index 4ab2cdd..feb528d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -214,7 +214,7 @@ export default new Vuex.Store({ state.roles.get(role.id) || Object.assign({}, customRole, role) ) - // default empty icons and placeholders + // default empty icons and placeholders, clean up firstNight / otherNight .map(role => { if (rolesJSONbyId.get(role.id)) return role; role.imageAlt = // map team to generic icon @@ -225,6 +225,8 @@ export default new Vuex.Store({ demon: "evil", fabled: "fabled" }[role.team] || "custom"; + role.firstNight = Math.abs(role.firstNight); + role.otherNight = Math.abs(role.otherNight); return role; }) // filter out roles that don't match an existing role and also don't have name/ability/team