From f375cdf6c3cbb56739b213274aa2649f78637d38 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 17 Oct 2018 18:11:29 +0200 Subject: [PATCH] Transcendance to dice throws --- feuille_sysd10.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index e6a6044..d98dd5d 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -144,6 +144,16 @@ setAttrs({"undescored_name":values.character_name.replace(/ /g,"_").replace(/'/g,"/")}); }); }); + // dice_with_tanscendance + on("change:tmpdice change:transcendence", function() { + getAttrs(["tmpdice","transcendence"], function(values) { + if(values.transcendence<3){ + setAttrs({"dice":Math.floor(values.tmpdice/Math.pow(2,3-values.transcendence))}); + } else if (values.transcendence>3) { + setAttrs({"dice":Math.floor(values.tmpdice/Math.pow(2,values.transcendence-3))}); + }; + }); + });
@@ -184,7 +194,7 @@ Utilisés -