Compare commits

...

9 Commits

20 changed files with 1038 additions and 2288 deletions

View File

@@ -1,6 +1,17 @@
# Changelog
Date format : day/month/year
## 1.9.5 - 11/01/2023 - Adding Modifiers
- Characters can now have bonus endurance/composure/focus/vigilance from conditions (thx to Perkuns).
## 1.9.4 - 31/12/2022 - Last bugfixes of the Year !
- Fix prepared settings bugs (trackers icons sometimes disappears).
- GM Toolbox : Left clic do only actors with an active player as owner.
- Compendiums : Added Celestial Realms missing Titles : `Bond with a spirit` and `Moon cultist`.
## 1.9.3 - 29/09/2022 - Combat Tracker
- Fix for L5R combat tracker bar who have disappeared.
## 1.9.2 - 09/09/2022 - Advancements Again
- Fix for advancements ownership (items in items).

View File

@@ -1,7 +1,7 @@
// Requires
const gulp = require("gulp");
const prefix = require("gulp-autoprefixer");
const sass = require("gulp-sass");
const sass = require("gulp-sass")(require('sass'));
const browserSync = require("browser-sync");
/* ----------------------------------------- */

3165
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,22 +20,16 @@
"homepage": "https://gitlab.com/teaml5r/l5r5e#readme",
"devDependencies": {
"babel-eslint": "^10.1.0",
"browser-sync": "^2.23.7",
"eslint": "^7.15.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"browser-sync": "^2.27.10",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-sass": "^4.1.0",
"husky": "^4.3.0",
"gulp-autoprefixer": "^8.0.0",
"gulp-sass": "^5.1.0",
"lint-staged": "^10.5.1",
"node-sass": "^4.14.1",
"prettier": "^2.1.2"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
"sass": "^1.56.1",
"prettier": "^2.7.1"
},
"lint-staged": {
"*.js": "eslint --cache --fix",

View File

@@ -274,6 +274,18 @@
"name": "Yōkai Hunter (WIP)",
"description": "<h2>Cursus</h2><table><tr><td>Compétences Savantes</td><td>Grp. de comp.</td></tr><tr><td>Compétences Martiales</td><td>Grp. de comp.</td></tr><tr><td>Commandement</td><td>Compétence</td></tr><tr><td>Courtoisie</td><td>Compétence</td></tr><tr><td>Survie</td><td>Compétence</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kiho.L5RCoreKih000030\" data-pack=\"l5r5e.core-techniques-kiho\" data-id=\"L5RCoreKih000030\">(kiho) Blistering Retribution (WIP)</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000070\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000070\">(kata) Swallows Dart Style (WIP)</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000071\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000071\">(kata) Tigers Lunge Style (WIP)</a> (prereq)</td><td>Technique</td></tr></table>",
"book_reference": "Décret de la nature"
},
{
"id": "Bond with a spirit",
"name": "Bond with a spirit (WIP)",
"description": "<h2>Cursus</h2><table><tr><td>Compétences Savantes</td><td>Grp. de comp.</td></tr><tr><td>Esthétique</td><td>Compétence</td></tr><tr><td>Jeux</td><td>Compétence</td></tr><tr><td>Méditation</td><td>Compétence</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Invocations (Eléments de l'esprit) de rang 1</a> (prereq)</td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000002\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000002\">(ritual) Communier avec les esprits</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000022\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000022\">(ritual) Blessing of Fertile Fields (WIP)</a> (prereq)</td><td>Technique</td></tr></table>",
"book_reference": "Les Royaumes Célestes"
},
{
"id": "Moon cultist",
"name": "Moon cultist (WIP)",
"description": "<h2>Cursus</h2><table><tr><td>Compétences Savantes</td><td>Grp. de comp.</td></tr><tr><td>Composition</td><td>Compétence</td></tr><tr><td>Courtoisie</td><td>Compétence</td></tr><tr><td>Forme</td><td>Compétence</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Invocations de lEau de rang 1-2</a></td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-invocations.L5RCoreInv000052\" data-pack=\"l5r5e.core-techniques-invocations\" data-id=\"L5RCoreInv000052\">(invocation) Mains des marées</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000010\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000010\">(ritual) Whispers to the Moon (Moon Cultist) (WIP)</a> (prereq)</td><td>Technique</td></tr></table>",
"book_reference": "Les Royaumes Célestes"
}
]
}

View File

@@ -374,7 +374,7 @@
"mass_battle": "Mass Battle",
"prepared_true": "Prepared",
"prepared_false": "Surprised",
"prepared_null": "Defined in the character sheet (default)",
"prepared_actor": "Defined in the character sheet (default)",
"already_set": "Your initiative has already been determined"
}
},

View File

@@ -374,7 +374,7 @@
"mass_battle": "Batalla a gran escala",
"prepared_true": "Preparado",
"prepared_false": "Sorprendido",
"prepared_null": "Definido en la hoja de personaje (por defecto)",
"prepared_actor": "Definido en la hoja de personaje (por defecto)",
"already_set": "Tu iniciativa ya ha sido establecida."
}
},

View File

@@ -374,7 +374,7 @@
"mass_battle": "Bataille rangée",
"prepared_true": "Prêt(e)",
"prepared_false": "Surpris(e)",
"prepared_null": "Défini par la fiche de personnage (défaut)",
"prepared_actor": "Défini par la fiche de personnage (défaut)",
"already_set": "Votre initiative a déjà été tirée"
}
},

View File

@@ -374,7 +374,7 @@
"mass_battle": "Battaglia Campale",
"prepared_true": "Preparato",
"prepared_false": "Sorpreso",
"prepared_null": "Definito nella scheda del personaggio (default)",
"prepared_actor": "Definito nella scheda del personaggio (default)",
"already_set": "La tua Iniziativa è già stata determinata."
}
},

View File

@@ -43,3 +43,5 @@
{"_id":"L5RCoreTit000043","name":"Forester","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"24","description":"<h2>Curriculum</h2><table><tr><td>Social Skills</td><td>Skill Group</td></tr><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Courtesy</td><td>Skill</td></tr><tr><td>Sentiment</td><td>Skill</td></tr><tr><td>Survival</td><td>Skill</td></tr><tr><td>Theology</td><td>Skill</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Rank 1-2 Earth & Water Invocations</a> (prereq)</td><td>Tech. Grp.</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-shuji\">(shuji) Rank 1-3 Shūji</a> (prereq)</td><td>Tech. Grp.</td></tr></table>","book_reference":"Writ of the Wild p.142"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
{"_id":"L5RCoreTit000044","name":"Temple Abbot","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"36","description":"<h2>Curriculum</h2><table><tr><td>Social Skills</td><td>Skill Group</td></tr><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Culture</td><td>Skill</td></tr><tr><td>Meditation</td><td>Skill</td></tr><tr><td>Theology</td><td>Skill</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000004\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000004\">(ritual) Cleansing Rite</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kiho.L5RCoreKih000025\" data-pack=\"l5r5e.core-techniques-kiho\" data-id=\"L5RCoreKih000025\">(kiho) Rejuvenating Breath</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-shuji.L5RCoreShu000011\" data-pack=\"l5r5e.core-techniques-shuji\" data-id=\"L5RCoreShu000011\">(shuji) Touchstone of Courage</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Writ of the Wild p.143"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
{"_id":"L5RCoreTit000045","name":"Yōkai Hunter","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"36","description":"<h2>Curriculum</h2><table><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Martial Skills</td><td>Skill Group</td></tr><tr><td>Command</td><td>Skill</td></tr><tr><td>Courtesy</td><td>Skill</td></tr><tr><td>Survival</td><td>Skill</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kiho.L5RCoreKih000030\" data-pack=\"l5r5e.core-techniques-kiho\" data-id=\"L5RCoreKih000030\">(kiho) Blistering Retribution</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000070\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000070\">(kata) Swallows Dart Style</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000071\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000071\">(kata) Tigers Lunge Style</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Writ of the Wild p.143"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
{"_id":"L5RCoreTit000046","name":"Bond with a spirit","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"25","description":"<h2>Curriculum</h2><table><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Aesthetics</td><td>Skill</td></tr><tr><td>Games</td><td>Skill</td></tr><tr><td>Meditation</td><td>Skill</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Rank 1 Spirit's Elements Invocations</a> (prereq)</td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000002\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000002\">(ritual) Commune with the Spirits</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000022\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000022\">(ritual) Blessing of Fertile Fields</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Celestial Realms p.140"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
{"_id":"L5RCoreTit000047","name":"Moon cultist","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"30","description":"<h2>Curriculum</h2><table><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Composition</td><td>Skill</td></tr><tr><td>Courtesy</td><td>Skill</td></tr><tr><td>Fitness</td><td>Skill</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Rank 1-2 Water Invocations</a></td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-invocations.L5RCoreInv000052\" data-pack=\"l5r5e.core-techniques-invocations\" data-id=\"L5RCoreInv000052\">(invocation) Hands of the Tides</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000010\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000010\">(ritual) Whispers to the Moon (Moon Cultist)</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Celestial Realms p.140"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}

View File

@@ -162,6 +162,13 @@ export class ActorL5r5e extends Actor {
system.composure = (Number(system.rings.earth) + Number(system.rings.water)) * 2;
system.focus = Number(system.rings.air) + Number(system.rings.fire);
system.vigilance = Math.ceil((Number(system.rings.air) + Number(system.rings.water)) / 2);
// Modifiers from conditions
const modifiers = system.modifiers?.character;
system.endurance = system.endurance + (Number(modifiers?.endurance) || 0);
system.composure = system.composure + (Number(modifiers?.composure) || 0);
system.focus = system.focus + (Number(modifiers?.focus) || 0);
system.vigilance = system.vigilance + (Number(modifiers?.vigilance) || 0);
}
/**
@@ -278,6 +285,14 @@ export class ActorL5r5e extends Actor {
return this.type === "army";
}
/**
* Return true if this actor have an active player as owner
* @returns {boolean}
*/
get hasPlayerOwnerActive() {
return game.users.find((u) => !!u.active && u.character?.id === this.id);
}
/**
* Return true if this actor can do a initiative roll
* @returns {boolean}
@@ -329,7 +344,7 @@ export class ActorL5r5e extends Actor {
// Prepared is a boolean or if null we get the info in the actor
let isPrepared = this.isCharacter ? cfg.character : cfg[this.system.type];
if (isPrepared === "null") {
if (isPrepared === "actor") {
isPrepared = this.system.prepared ? "true" : "false";
}

View File

@@ -1,31 +1,27 @@
export const L5R5E = {};
L5R5E.paths = {
export const L5R5E = {
paths: {
assets: `systems/l5r5e/assets/`,
templates: `systems/l5r5e/templates/`,
};
L5R5E.money = [50, 10];
L5R5E.stances = ["earth", "air", "water", "fire", "void"];
L5R5E.roles = ["artisan", "bushi", "courtier", "monk", "sage", "shinobi", "shugenja"];
L5R5E.xp = {
},
money: [50, 10],
stances: ["earth", "air", "water", "fire", "void"],
roles: ["artisan", "bushi", "courtier", "monk", "sage", "shinobi", "shugenja"],
xp: {
costPerRank: [0, 20, 24, 32, 44, 60],
bondCostPerRank: [0, 3, 4, 6, 8, 10],
ringCostMultiplier: 3,
skillCostMultiplier: 2,
techniqueCost: 3,
};
L5R5E.regex = {
},
regex: {
techniqueDifficulty: /^@([TS]):([^|]+?)(?:\|(min|max)(?:\(([^)]+?)\))?)?$/,
};
L5R5E.initiativeSkills = {
},
initiativeSkills: {
intrigue: "sentiment",
duel: "meditation",
skirmish: "tactics",
mass_battle: "command",
},
};
// *** Techniques ***

View File

@@ -91,7 +91,7 @@ export class GmMonitor extends FormApplication {
actors = game.actors.filter((e) => ids.includes(e.id));
} else {
// If empty add pc with owner
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwner);
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwnerActive);
this._saveActorsIds();
}

View File

@@ -202,7 +202,7 @@ export class GmToolbox extends FormApplication {
}
// Manage left/right button
if (!isAll && (!actor.isCharacter || !actor.hasPlayerOwner)) {
if (!isAll && (!actor.isCharacter || !actor.hasPlayerOwnerActive)) {
continue;
}

View File

@@ -175,7 +175,7 @@ export default class HooksL5r5e {
if (elmt.length > 0) {
elmt.replaceWith(tpl);
} else {
html.find("#combat-round").append(tpl);
html.find(".combat-tracker-header").append(tpl);
}
// Buttons Listeners
@@ -198,9 +198,9 @@ export default class HooksL5r5e {
}
const rev = event.which === 3;
const nextValue = {
false: rev ? "true" : "null",
true: rev ? "null" : "false",
null: rev ? "false" : "true",
false: rev ? "true" : "actor",
true: rev ? "actor" : "false",
actor: rev ? "false" : "true",
};
game.settings.set("l5r5e", `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]]);
});

View File

@@ -85,7 +85,7 @@ export const RegisterSettings = function () {
scope: "world",
config: false,
type: String,
default: "null",
default: "actor",
onChange: () => {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
ui.combat.render(true);
@@ -96,7 +96,7 @@ export const RegisterSettings = function () {
scope: "world",
config: false,
type: String,
default: "null",
default: "actor",
onChange: () => {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
ui.combat.render(true);
@@ -107,7 +107,7 @@ export const RegisterSettings = function () {
scope: "world",
config: false,
type: String,
default: "null",
default: "actor",
onChange: () => {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
ui.combat.render(true);

File diff suppressed because one or more lines are too long

View File

@@ -323,7 +323,7 @@ sup {
&-false:before {
content: "\f070";
}
&-null:before {
&-actor:before {
content: "\f2a8";
}
}

View File

@@ -602,8 +602,9 @@ button {
}
// Combat
#combat {
#combat-round {
#combat,
#combat-popout {
.combat-tracker-header {
.encounters {
h3 {
font-size: 0.85rem;

View File

@@ -7,11 +7,11 @@
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.2/raw/l5r5e.zip?job=build",
"version": "1.9.2",
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.5/raw/l5r5e.zip?job=build",
"version": "1.9.5",
"compatibility": {
"minimum": 10,
"verified": "10.284"
"verified": "10.291"
},
"manifestPlusVersion": "1.2.0",
"socket": true,