RnK : Reroll add a extra step in RnK dialog

GmBx: Changed new BTs to "Sleep" & "Scene end" actions (more used)
This commit is contained in:
Vlyan
2021-02-03 20:01:57 +01:00
parent 7969c5f526
commit b59fde880d
5 changed files with 34 additions and 23 deletions

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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,

View File

@@ -2,7 +2,7 @@
<p class="gm-tools-container">
<a class="difficulty_hidden" title="{{localize 'l5r5e.gm_toolbox.difficulty_hidden'}}"><i class="fa fa-eye{{#if data.difficultyHidden}}-slash{{/if}}"></i></a>
<strong class="difficulty" title="{{localize 'l5r5e.gm_toolbox.difficulty'}}">{{data.difficulty}}</strong>
<a class="gm_actor_updates clear_conflict" data-type="clear_conflict" title="{{localize 'l5r5e.gm_toolbox.clear_conflict'}}"><i class="fa fa-bed"></i></a>
<a class="gm_actor_updates starting_void_point" data-type="starting_void_point" title="{{localize 'l5r5e.gm_toolbox.starting_void_point'}}"><i class="fas fa-star-half-alt"></i></a>
<a class="gm_actor_updates sleep" data-type="sleep" title="{{localize 'l5r5e.gm_toolbox.sleep'}}"><i class="fa fa-bed"></i></a>
<a class="gm_actor_updates scene_end" data-type="scene_end" title="{{localize 'l5r5e.gm_toolbox.scene_end'}}"><i class="fas fa-star-half-alt"></i></a>
</p>
</form>