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:
@@ -112,10 +112,10 @@
|
|||||||
"title": "GM ToolBox",
|
"title": "GM ToolBox",
|
||||||
"difficulty_hidden": "Change difficulty visibility",
|
"difficulty_hidden": "Change difficulty visibility",
|
||||||
"difficulty": "Change difficulty (right: add, left: subtract, middle: TN 2)",
|
"difficulty": "Change difficulty (right: add, left: subtract, middle: TN 2)",
|
||||||
"clear_conflict": "Clear all conflict on Characters",
|
"sleep": "Comfortable rest for all characters (Remove Water x2 fatigue)",
|
||||||
"clear_conflict_info": "All conflict on Characters was reset",
|
"sleep_info": "The characters had a good night's sleep.",
|
||||||
"starting_void_point": "Reset void points on Characters (half max value)",
|
"scene_end": "End of scene (Conflict and Fatigue half reset for all characters)",
|
||||||
"starting_void_point_info": "All void points on Characters was reset"
|
"scene_end_info": "The tension of the scene finally drops."
|
||||||
},
|
},
|
||||||
"max": "Max",
|
"max": "Max",
|
||||||
"current": "Current",
|
"current": "Current",
|
||||||
|
|||||||
@@ -112,10 +112,10 @@
|
|||||||
"title": "GM ToolBox",
|
"title": "GM ToolBox",
|
||||||
"difficulty_hidden": "Change difficulty visibility",
|
"difficulty_hidden": "Change difficulty visibility",
|
||||||
"difficulty": "Change difficulty (right: add, left: subtract, middle: TN 2)",
|
"difficulty": "Change difficulty (right: add, left: subtract, middle: TN 2)",
|
||||||
"clear_conflict": "Clear all conflict on Characters",
|
"sleep": "Comfortable rest for all characters (Remove Water x2 fatigue)",
|
||||||
"clear_conflict_info": "All conflict on Characters was reset",
|
"sleep_info": "The characters had a good night's sleep.",
|
||||||
"starting_void_point": "Reset void points on Characters (half max value)",
|
"scene_end": "End of scene (Conflict and Fatigue half reset for all characters)",
|
||||||
"starting_void_point_info": "All void points on Characters was reset"
|
"scene_end_info": "The tension of the scene finally drops."
|
||||||
},
|
},
|
||||||
"max": "Máx",
|
"max": "Máx",
|
||||||
"current": "Actuales",
|
"current": "Actuales",
|
||||||
|
|||||||
@@ -112,10 +112,10 @@
|
|||||||
"title": "GM ToolBox",
|
"title": "GM ToolBox",
|
||||||
"difficulty_hidden": "Modifier la visibilité de la difficulté",
|
"difficulty_hidden": "Modifier la visibilité de la difficulté",
|
||||||
"difficulty": "Modifier la difficulté (droite: ajout, gauche: soustraction, milieu: ND 2)",
|
"difficulty": "Modifier la difficulté (droite: ajout, gauche: soustraction, milieu: ND 2)",
|
||||||
"clear_conflict": "Enlever tous les points de conflit des personnages",
|
"sleep": "Repos confortable pour tous les personnages (Enlève Eau x2 de fatigue)",
|
||||||
"clear_conflict_info": "Les personnages sont maintenant plus serins",
|
"sleep_info": "Les personnages ont passé une bonne nuit de sommeil.",
|
||||||
"starting_void_point": "Réinitialiser les points du vide à leurs moitié",
|
"scene_end": "Fin de scène (Conflit et Fatigue reset à moitié pour tous les personnages)",
|
||||||
"starting_void_point_info": "Tous les points du vide ont été réinitialisés"
|
"scene_end_info": "La tension de la scène retombe enfin"
|
||||||
},
|
},
|
||||||
"max": "Max",
|
"max": "Max",
|
||||||
"current": "Actuel",
|
"current": "Actuel",
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export class GmToolsDialog extends FormApplication {
|
|||||||
game.settings.set("l5r5e", "initiative.difficulty.value", this.object.difficulty).then(() => this.submit());
|
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) => {
|
html.find(`.gm_actor_updates`).on("click", (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@@ -172,20 +172,31 @@ export class GmToolsDialog extends FormApplication {
|
|||||||
|
|
||||||
game.actors.entities.forEach((actor) => {
|
game.actors.entities.forEach((actor) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "starting_void_point":
|
case "sleep":
|
||||||
// Starting void points : Max Void point / 2 rounded up for all actors
|
// Remove 'water x2' fatigue points
|
||||||
actor.data.data.void_points.value = Math.ceil(actor.data.data.void_points.max / 2);
|
actor.data.data.fatigue.value = Math.max(
|
||||||
|
0,
|
||||||
|
actor.data.data.fatigue.value - Math.ceil(actor.data.data.rings.water * 2)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "clear_conflict":
|
case "scene_end":
|
||||||
// Clear all actor conflict
|
// If more than half the value => roundup half conflit & fatigue
|
||||||
actor.data.data.strife.value = 0;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
actor.update({
|
actor.update({
|
||||||
data: {
|
data: {
|
||||||
void_points: {
|
fatigue: {
|
||||||
value: actor.data.data.void_points.value,
|
value: actor.data.data.fatigue.value,
|
||||||
},
|
},
|
||||||
strife: {
|
strife: {
|
||||||
value: actor.data.data.strife.value,
|
value: actor.data.data.strife.value,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<p class="gm-tools-container">
|
<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>
|
<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>
|
<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 sleep" data-type="sleep" title="{{localize 'l5r5e.gm_toolbox.sleep'}}"><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 scene_end" data-type="scene_end" title="{{localize 'l5r5e.gm_toolbox.scene_end'}}"><i class="fas fa-star-half-alt"></i></a>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user