diff --git a/system/lang/en-en.json b/system/lang/en-en.json index 82fd610..0e8aa32 100644 --- a/system/lang/en-en.json +++ b/system/lang/en-en.json @@ -112,10 +112,10 @@ "title": "GM ToolBox", "difficulty_hidden": "Change difficulty visibility", "difficulty": "Change difficulty (right: add, left: subtract, middle: TN 2)", - "clear_conflict": "Clear all conflict on Characters", - "clear_conflict_info": "All conflict on Characters was reset", - "starting_void_point": "Reset void points on Characters (half max value)", - "starting_void_point_info": "All void points on Characters was reset" + "sleep": "Comfortable rest for all characters (Remove Water x2 fatigue)", + "sleep_info": "The characters had a good night's sleep.", + "scene_end": "End of scene (Conflict and Fatigue half reset for all characters)", + "scene_end_info": "The tension of the scene finally drops." }, "max": "Max", "current": "Current", diff --git a/system/lang/es-es.json b/system/lang/es-es.json index abb298a..f59b409 100644 --- a/system/lang/es-es.json +++ b/system/lang/es-es.json @@ -112,10 +112,10 @@ "title": "GM ToolBox", "difficulty_hidden": "Change difficulty visibility", "difficulty": "Change difficulty (right: add, left: subtract, middle: TN 2)", - "clear_conflict": "Clear all conflict on Characters", - "clear_conflict_info": "All conflict on Characters was reset", - "starting_void_point": "Reset void points on Characters (half max value)", - "starting_void_point_info": "All void points on Characters was reset" + "sleep": "Comfortable rest for all characters (Remove Water x2 fatigue)", + "sleep_info": "The characters had a good night's sleep.", + "scene_end": "End of scene (Conflict and Fatigue half reset for all characters)", + "scene_end_info": "The tension of the scene finally drops." }, "max": "Máx", "current": "Actuales", diff --git a/system/lang/fr-fr.json b/system/lang/fr-fr.json index a929fa1..cc9ca58 100644 --- a/system/lang/fr-fr.json +++ b/system/lang/fr-fr.json @@ -112,10 +112,10 @@ "title": "GM ToolBox", "difficulty_hidden": "Modifier la visibilité de la difficulté", "difficulty": "Modifier la difficulté (droite: ajout, gauche: soustraction, milieu: ND 2)", - "clear_conflict": "Enlever tous les points de conflit des personnages", - "clear_conflict_info": "Les personnages sont maintenant plus serins", - "starting_void_point": "Réinitialiser les points du vide à leurs moitié", - "starting_void_point_info": "Tous les points du vide ont été réinitialisés" + "sleep": "Repos confortable pour tous les personnages (Enlève Eau x2 de fatigue)", + "sleep_info": "Les personnages ont passé une bonne nuit de sommeil.", + "scene_end": "Fin de scène (Conflit et Fatigue reset à moitié pour tous les personnages)", + "scene_end_info": "La tension de la scène retombe enfin" }, "max": "Max", "current": "Actuel", diff --git a/system/scripts/dice/gm-tools-dialog.js b/system/scripts/dice/gm-tools-dialog.js index 890b6e3..0059ec1 100644 --- a/system/scripts/dice/gm-tools-dialog.js +++ b/system/scripts/dice/gm-tools-dialog.js @@ -132,7 +132,7 @@ export class GmToolsDialog extends FormApplication { game.settings.set("l5r5e", "initiative.difficulty.value", this.object.difficulty).then(() => this.submit()); }); - // Halve max void points & Clear conflict + // Scene End & Sleep html.find(`.gm_actor_updates`).on("click", (event) => { event.preventDefault(); event.stopPropagation(); @@ -172,20 +172,31 @@ export class GmToolsDialog extends FormApplication { game.actors.entities.forEach((actor) => { switch (type) { - case "starting_void_point": - // Starting void points : Max Void point / 2 rounded up for all actors - actor.data.data.void_points.value = Math.ceil(actor.data.data.void_points.max / 2); + case "sleep": + // Remove 'water x2' fatigue points + actor.data.data.fatigue.value = Math.max( + 0, + actor.data.data.fatigue.value - Math.ceil(actor.data.data.rings.water * 2) + ); break; - case "clear_conflict": - // Clear all actor conflict - actor.data.data.strife.value = 0; + case "scene_end": + // If more than half the value => roundup half conflit & fatigue + actor.data.data.fatigue.value = Math.min( + actor.data.data.fatigue.value, + Math.ceil(actor.data.data.fatigue.max / 2) + ); + actor.data.data.strife.value = Math.min( + actor.data.data.strife.value, + Math.ceil(actor.data.data.strife.max / 2) + ); break; } + actor.update({ data: { - void_points: { - value: actor.data.data.void_points.value, + fatigue: { + value: actor.data.data.fatigue.value, }, strife: { value: actor.data.data.strife.value, diff --git a/system/templates/dice/gm-tools-dialog.html b/system/templates/dice/gm-tools-dialog.html index 4d6fb09..3a21b69 100644 --- a/system/templates/dice/gm-tools-dialog.html +++ b/system/templates/dice/gm-tools-dialog.html @@ -2,7 +2,7 @@