diff --git a/Todo and utils.txt b/Todo and utils.txt index 7e0f387..25b8de0 100644 --- a/Todo and utils.txt +++ b/Todo and utils.txt @@ -77,21 +77,9 @@ on("change:skill_SKILLNAME_activation change:general_skilllevel_SKILLNAME", func - - - - - - - - - - - - - - - - - - +// shield3 +on("change:item_shield3_activation change:general_item_shield3", function() { + getAttrs(["item_shield3_activation", "general_item_shield3"], function(values) { + setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3}); + }); +}); diff --git a/change.js b/change.js new file mode 100644 index 0000000..93046e5 --- /dev/null +++ b/change.js @@ -0,0 +1,36 @@ +on("chat:message", function(msg) { + //This allows players to enter !sr to roll a number of d6 dice with a target of 4. + if(msg.type == "api" && msg.content.indexOf("!change ") !== -1) { + var sndr=msg.who; + var raw_msg = msg.content.replace("!change ", ""); + + //Marking the log, note that if logit is disabled, nothing will be shown + logit("Following results will track the session of "+msg.who); + logit("The command input was : "+raw_msg); + + var cmd=message.split(" "); + if (cmd.length<2){ + return null; + }; + var cmd_name=cmd[0]; + var cmd_val=cmd[1]; + var auth=[" attr_Life_Points", + "attr_Endurance_Points", + "attr_general_item_weapon1", + "attr_general_item_weapon2", + "attr_general_item_weapon3", + "attr_base_damage_dices", + "attr_exal_damage_dices"] + for (var i = 0; i < auth.length; i++) { + if (auth[i].indexOf(cmd_name)!==-1){ + var attribObj = findObjs({ type: 'attribute', characterid: character.id, name: auth[i] })[0]; + if (attribObj){attribObj.set('current', cmd_val);}; + } + } + }; +}; + +function logit(txt){ + //Due to the restriction of console.log() + log(txt); +}; diff --git a/crit.js b/crit.js index a74210e..2d3b96b 100644 --- a/crit.js +++ b/crit.js @@ -283,7 +283,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ if (d_vars.nb_2add!=0){dices+=" + ("+d_vars.nb_2add;}; if (d_vars.on_hit_c+d_vars.attribute!=0){ dices+=" + "+(d_vars.on_hit_c+d_vars.attribute); - if (m_crit>1) dices+="x"+m_crit; + if (m_crit>1) dices+=" [x"+m_crit+"]"; }; if (d_vars.nb_2add!=0){dices+=")";}; if (d_vars.nb_2sub!=0){dices+=" - "+d_vars.nb_2sub;}; diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 5a0a848..143682e 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -1,92 +1,119 @@ @@ -308,11 +335,11 @@ - + Compétences magiques @@ -347,12 +374,12 @@ Initiative - Attaque de base + Attaque de base d10+ - - + + + ForAgi - + @@ -468,9 +495,9 @@ - Parade - d10+ - + + Parade + d10+ + + ForAgiVolPsy @@ -480,6 +507,24 @@ ChnAgi + + + + + + + + + + + + + + + + + + diff --git a/style.css b/style.css index 704bd89..9e39338 100644 --- a/style.css +++ b/style.css @@ -97,11 +97,8 @@ input.sheet-skill_name{ -moz-appearance: none; width:400px; } - - -div.sheet-skill_hidden{ +input.sheet-skill_hidden{ visibility: hidden; - display: none; } div.sheet-tab-content{ border-top-color: #000;