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))}); + }; + }); + });