From 99052064875022be6cab3e385fd317e48fad34cd Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 28 Jun 2018 04:59:40 +0200 Subject: [PATCH] Bugsquash & pretty names --- crit.js | 11 +++++----- feuille_sysd10.html | 50 +++++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/crit.js b/crit.js index db4ea3b..bda2659 100644 --- a/crit.js +++ b/crit.js @@ -186,21 +186,22 @@ function show_rolls(who,d_vars){ logit(dice_stats); if (d_vars.player_name!=""){ who=d_vars.player_name; + who_pr=d_vars.player_name.replace(/_/g," "); } switch(d_vars.action){ case "a": - msg+=who+" attaque"; + msg+=who_pr+" attaque"; break; case "e": - msg+=who+" esquive"; + msg+=who_pr+" esquive"; m_esq=2; // It's a hit break; case "d": - msg+=who+" se defend"; + msg+=who_pr+" se defend"; break; default: - msg+=who+" lance "+d_vars.nb_dices+" dés"; + msg+=who_pr+" lance "+d_vars.nb_dices+" dés"; } if (dice_stats.is_crit) {if ((d_vars.nb_dices+d_vars.nb_flat_dices)>(d_vars.attribute/2)){ m_crit=2; // It's a crit @@ -324,7 +325,7 @@ function parse_command(message){ i+=2; break; case "-": - d_vars.nb_2sub=to_number(tab[i+1]); + d_vars.nb_2sub+=to_number(tab[i+1]); i+=2; break; case "P": diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 69a2444..318a90c 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -138,12 +138,18 @@ setAttrs({"Grievious_Wounds_effective":Math.min(Math.floor(Number(values.Life_Points_maximum)/4),Number(values.Grievious_Wounds)+Math.max(0,Math.floor(Number(values.Life_Points_maximum)/4-Number(values.Life_Points))))}); }); }); + // undescored_name + on("change:character_name change:character_race", function() { + getAttrs(["character_name"], function(values) { + setAttrs({"undescored_name":values.character_name.replace(/ /g,"_")}); + }); + });
-
+

@@ -163,9 +169,9 @@

Dégats aggravés

- - - + + +
@@ -397,7 +403,7 @@
- + d10+ + @@ -426,20 +432,20 @@
- - + +
- - + +
- - + + @@ -468,9 +474,9 @@
- + - + d10+ + @@ -600,7 +606,7 @@
- + d10+ - + +
- - + +
- - + + @@ -729,7 +735,7 @@
. - + d10 ∘ +