From e7b3fbb7b3b7c8c797afa4cd2809eff876e96dd5 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 27 Jun 2018 15:09:22 +0200 Subject: [PATCH 01/62] Solved a couple of annoying bugs, still doing Grievious Wounds --- README.md | 2 +- Todo and utils.txt | 3 ++ feuille_sysd10.html | 96 ++++++++++++++++++++++++--------------------- style.css | 3 ++ 4 files changed, 59 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 68862f6..b8f7a46 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## Introduction Vous trouverez ici la feuille de personnage type pour le système D10. Cette feuille a été crée pour fonctionner avec Roll20. -##Macros roll20 +## Macros roll20 Peuvent etre utile a modifier ou récuperer: - ```shieldLife_Points / shieldLife_Points_max``` : Points de Vie - ```shieldEndurance_Points / shieldEndurance_Points_max``` : Points de fatigue diff --git a/Todo and utils.txt b/Todo and utils.txt index 25b8de0..4c1591b 100644 --- a/Todo and utils.txt +++ b/Todo and utils.txt @@ -83,3 +83,6 @@ on("change:item_shield3_activation change:general_item_shield3", function() { setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3}); }); }); + + +max(values.Grievious_Wounds_max,values.Grievious_Wounds_current+min(0,floor(values.Life_Points_max/4-values.Life_Points))) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index efdf933..6420811 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -116,6 +116,13 @@ setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3}); }); }); + + // attr_Grievious_Wounds + on("change:Life_Points change:Life_Points_max change:Grievious_Wounds", function() { + getAttrs(["Life_Points", "Life_Points_max","Grievious_Wounds_current","Grievious_Wounds_max"], function(values) { + setAttrs({"Grievious_Wounds_effective":7}); + }); + });
@@ -126,56 +133,57 @@

-
- - - - - - - - - - - -

Points de compétence :

Utilisés - -
Restants
-

Ressources

-
- + - + - + + + + + +

Points de Vie

Points de Fatigue

Blessures aggravés

+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
-

Caractéristiques

@@ -227,27 +235,27 @@

 

Intelligence - - + + Volonté - - + + Psyché - - + + Chance - - + +
diff --git a/style.css b/style.css index 9e39338..a7f3fcf 100644 --- a/style.css +++ b/style.css @@ -114,6 +114,9 @@ select.sheet-dice_select{ margin-bottom:-1px; } +.sheet-trait{ + width: 30px; +} .sheet-numberbox { width: 50px; } From b5dbea55217245c3b934015e794753254901b23d Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 27 Jun 2018 17:56:29 +0200 Subject: [PATCH 02/62] Grievious Wounds FINALLY finished --- Todo and utils.txt | 3 --- feuille_sysd10.html | 29 +++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Todo and utils.txt b/Todo and utils.txt index 4c1591b..25b8de0 100644 --- a/Todo and utils.txt +++ b/Todo and utils.txt @@ -83,6 +83,3 @@ on("change:item_shield3_activation change:general_item_shield3", function() { setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3}); }); }); - - -max(values.Grievious_Wounds_max,values.Grievious_Wounds_current+min(0,floor(values.Life_Points_max/4-values.Life_Points))) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 6420811..00ac87e 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -116,13 +116,26 @@ setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3}); }); }); - + // Life_Points + on("change:base-Force change:base-Agilite change:general_skilllevel_Endurance_surnaturelle", function() { + getAttrs(["base-Force","base-Agilite","general_skilllevel_Endurance_surnaturelle"], function(values) { + setAttrs({"Life_Points_max":Number(values['base-Force'])+Number(values['base-Agilite'])+Number(values.general_skilllevel_Endurance_surnaturelle)*2+10}); + setAttrs({"Life_Points_maximum":Number(values['base-Force'])+Number(values['base-Agilite'])+Number(values.general_skilllevel_Endurance_surnaturelle)*2+10}); + }); +}); +// Endurance_Points +on("change:base-Force change:base-Agilite change:general_skilllevel_Endurance_surnaturelle", function() { + getAttrs(["base-Force","base-Agilite","general_skilllevel_Endurance_surnaturelle"], function(values) { + setAttrs({"Endurance_Points_maximum":Number(values['base-Force'])*4}); + setAttrs({"Endurance_Points_max":Number(values['base-Force'])*4}); + }); +}); // attr_Grievious_Wounds on("change:Life_Points change:Life_Points_max change:Grievious_Wounds", function() { - getAttrs(["Life_Points", "Life_Points_max","Grievious_Wounds_current","Grievious_Wounds_max"], function(values) { - setAttrs({"Grievious_Wounds_effective":7}); + getAttrs(["Life_Points", "Life_Points_maximum","Grievious_Wounds"], function(values) { + 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))))}); }); - }); +});
@@ -139,18 +152,18 @@

Ressources

Points de Vie

- +

Points de Fatigue

- + -

Blessures aggravés

+

Dégats aggravés

- +
From 31b533bdda79005db1f90172260c532f5e3f2071 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 27 Jun 2018 18:04:33 +0200 Subject: [PATCH 03/62] Ugly shield went inside my readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b8f7a46..b9c1a5e 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ Vous trouverez ici la feuille de personnage type pour le système D10. Cette feu ## Macros roll20 Peuvent etre utile a modifier ou récuperer: - - ```shieldLife_Points / shieldLife_Points_max``` : Points de Vie - - ```shieldEndurance_Points / shieldEndurance_Points_max``` : Points de fatigue - - ```shieldgeneral_item_weapon1``` : La valeur de dégats de l'arme 1 - - ```shieldgeneral_item_weapon1_name``` : Le nom de l'arme 1 - - ```shieldgeneral_effective_weapon1``` : La valeur de dégats de l'arme 1 si elle est activée; 0 sinon - - ```shieldbase_damage_dices``` : La base de dégats offensif (a priori, rien sauf compétence particulière) - - ```shieldexal_damage_dices``` : Le modificateur de dégats (Un bonus de charge, un buff de dégats temporaires) + - ```Life_Points / Life_Points_maximum``` : Points de Vie + - ```Endurance_Points / Endurance_Points_maximum``` : Points de fatigue + - ```general_item_weapon1``` : La valeur de dégats de l'arme 1 + - ```general_item_weapon1_name``` : Le nom de l'arme 1 + - ```general_effective_weapon1``` : La valeur de dégats de l'arme 1 si elle est activée; 0 sinon + - ```base_damage_dices``` : La base de dégats offensif (a priori, rien sauf compétence particulière) + - ```exal_damage_dices``` : Le modificateur de dégats (Un bonus de charge, un buff de dégats temporaires) Exemple (avec chatSetAttr) [chatSetAttr](https://github.com/Roll20/roll20-api-scripts/blob/master/ChatSetAttr/README.md): - ```!setattr --sel --Life_Points|21``` From b26421f25f2ce9a1270af0f005a21b21e41e8613 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 27 Jun 2018 18:22:45 +0200 Subject: [PATCH 04/62] Oubli de base-Volonte --- feuille_sysd10.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 00ac87e..ec0dd2c 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -117,10 +117,10 @@ }); }); // Life_Points - on("change:base-Force change:base-Agilite change:general_skilllevel_Endurance_surnaturelle", function() { - getAttrs(["base-Force","base-Agilite","general_skilllevel_Endurance_surnaturelle"], function(values) { - setAttrs({"Life_Points_max":Number(values['base-Force'])+Number(values['base-Agilite'])+Number(values.general_skilllevel_Endurance_surnaturelle)*2+10}); - setAttrs({"Life_Points_maximum":Number(values['base-Force'])+Number(values['base-Agilite'])+Number(values.general_skilllevel_Endurance_surnaturelle)*2+10}); + on("change:base-Force change:base-Agilite change:base-Volonte change:general_skilllevel_Endurance_surnaturelle", function() { + getAttrs(["base-Force","base-Agilite","base-Volonte","general_skilllevel_Endurance_surnaturelle"], function(values) { + setAttrs({"Life_Points_max":Number(values['base-Force'])+Number(values['base-Volonte'])+Number(values['base-Agilite'])+Number(values.general_skilllevel_Endurance_surnaturelle)*2+10}); + setAttrs({"Life_Points_maximum":Number(values['base-Force'])+Number(values['base-Volonte'])+Number(values['base-Agilite'])+Number(values.general_skilllevel_Endurance_surnaturelle)*2+10}); }); }); // Endurance_Points From 511372b82952317d87ff2ea417d00a53b87164e8 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 27 Jun 2018 21:57:20 +0200 Subject: [PATCH 05/62] Autoidented --- feuille_sysd10.html | 1480 ++++++++++++++++++++++++------------------- 1 file changed, 811 insertions(+), 669 deletions(-) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index ec0dd2c..a91d0bb 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -1,689 +1,831 @@ - - +
-
- -
- -
-
-
-
-

Ressources

- - - - - - - - - - - - - - - - - -

Points de Vie

Points de Fatigue

Dégats aggravés

-
-
- - - -
- - - - - - - - -

Points de compétence :

Utilisés - -
Restants
-
-
-
-
-

Caractéristiques

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+ +
+
-
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
+
+
+

Ressources

+ + + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

Dégats aggravés

+
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
-
-
- - - - -
-
- - - - -
- -

Compétences générales

-
- - - - - -
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
- -
- -

Compétences sociales

-
- - - - - -
+
+ + + + +
+
+ + + + +
+ +

Compétences générales

+
+ + + + + +
+
+ +
+ +

Compétences sociales

+
+ + + + + +
+
+ +
+ +

Compétences Intellectuelles

+
+ + + + + +
+
+ +
-
- -

Compétences Intellectuelles

-
- - - - - -
+ +
+
+ + +
+

Compétences magiques

+
+ + + + + +
+
+ +
-
-
- - -
-
- - -
-

Compétences magiques

-
- - - - - -
+ +
+ + + + + +
+ + + + d10+ + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + + +
+ +
+ + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + +
+
+ + +
+ + d10+ + + + + +
+ + d10+ + + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + +
+
+ + +
. + + d10 ∘ + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + +
+
+
- -
-
- - -
- - - - - -
- - - - d10+ - + - - -
- - - - - -
- - - - - -
- - - - - - - - -
- - - - - -
- -
- - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - - -
-
- - -
- - d10+ - + - - -
- - d10+ - - -
- - - - - -
- - - - - -
- - - - - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - - -
-
- - -
. - - d10 ∘ - + - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - - -
-
- - -
From a9877cb77168c618a79fecead01c81e4fb1026b6 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 28 Jun 2018 00:41:27 +0200 Subject: [PATCH 06/62] Couple cleanup here and there, plus dice template --- Todo and utils.txt | 4 +- feuille_sysd10.html | 67 ++++++++++++---- style.css | 182 +++++++++++++++++++++++++++++--------------- 3 files changed, 178 insertions(+), 75 deletions(-) diff --git a/Todo and utils.txt b/Todo and utils.txt index 25b8de0..6112182 100644 --- a/Todo and utils.txt +++ b/Todo and utils.txt @@ -48,7 +48,7 @@ on("change:skill_SKILLNAME_activation change:general_skilllevel_SKILLNAME", func - + @@ -83,3 +83,5 @@ on("change:item_shield3_activation change:general_item_shield3", function() { setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3}); }); }); + +name roll_name dice_name result threshold diff --git a/feuille_sysd10.html b/feuille_sysd10.html index a91d0bb..d625a68 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -401,7 +401,8 @@

Compétences magiques

d10+ + - +
@@ -410,7 +411,8 @@

Compétences magiques

- + @@ -469,7 +471,8 @@

Compétences magiques

- + @@ -488,7 +491,8 @@

Compétences magiques

- + @@ -507,7 +511,8 @@

Compétences magiques

- + @@ -526,7 +531,8 @@

Compétences magiques

- + @@ -587,7 +593,8 @@

Compétences magiques

d10+ + - + @@ -624,7 +631,8 @@

Compétences magiques

- + @@ -643,7 +651,8 @@

Compétences magiques

- + @@ -662,7 +671,8 @@

Compétences magiques

- + @@ -681,7 +691,8 @@

Compétences magiques

- + @@ -734,7 +745,8 @@

Compétences magiques

- + @@ -753,7 +765,8 @@

Compétences magiques

- + @@ -772,7 +785,8 @@

Compétences magiques

- + @@ -829,3 +843,28 @@

Compétences magiques

+ + + + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{#rollWasFumble() result}} + + {{/rollWasFumble() result}} + {{/^rollWasCrit() result}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}} degrés de réussite{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échecÉchec critique ! {{result}} degrés d'échec
+
diff --git a/style.css b/style.css index a7f3fcf..1907d23 100644 --- a/style.css +++ b/style.css @@ -3,14 +3,14 @@ input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, input.sheet-tab3:checked ~ div.sheet-tab3 { - display: block; + display: block; } input.sheet-secondary_tab1:checked ~ div.sheet-secondary_tab1, input.sheet-secondary_tab2:checked ~ div.sheet-secondary_tab2, input.sheet-secondary_tab3:checked ~ div.sheet-secondary_tab3, input.sheet-secondary_tab4:checked ~ div.sheet-secondary_tab4 { - display:block; + display:block; } input.sheet-secondary_magic_tab1:checked ~ div.sheet-secondary_magic_tab1, input.sheet-secondary_magic_tab2:checked ~ div.sheet-secondary_magic_tab2, @@ -18,105 +18,167 @@ input.sheet-secondary_magic_tab3:checked ~ div.sheet-secondary_magic_tab3, input.sheet-secondary_magic_tab4:checked ~ div.sheet-secondary_magic_tab4, input.sheet-secondary_magic_tab5:checked ~ div.sheet-secondary_magic_tab5 { - display:block; + display:block; } input.sheet-secondary_skills_tab1:checked ~ div.sheet-secondary_skills_tab1, input.sheet-secondary_skills_tab2:checked ~ div.sheet-secondary_skills_tab2, input.sheet-secondary_skills_tab3:checked ~ div.sheet-secondary_skills_tab3 { - display:block; + display:block; } input.sheet-tab{ - -moz-appearance: none; - width:150px; - height: 20px; - top: 5px; - left: 6px; - margin: 5px; - cursor: pointer; - z-index: 1; - content: attr(title); + -moz-appearance: none; + width:150px; + height: 20px; + top: 5px; + left: 6px; + margin: 5px; + cursor: pointer; + z-index: 1; + content: attr(title); } input.sheet-tab::before{ - -moz-appearance: none; - content: attr(title); + -moz-appearance: none; + content: attr(title); - border-radius:.5em; - border:2px solid black; - text-align: center; - display: inline-block; + border-radius:.5em; + border:2px solid black; + text-align: center; + display: inline-block; - background: black; - color:white; - width: 150px; - height: 20px; - font-size: 18px; + background: black; + color:white; + width: 150px; + height: 20px; + font-size: 18px; } input.sheet-tab:checked::before{ - -moz-appearance: none; - background:#CCCCCC; - color:black; - border-radius:.5em; - border:2px solid black; + -moz-appearance: none; + background:#CCCCCC; + color:black; + border-radius:.5em; + border:2px solid black; } input.sheet-small_tab{ - -moz-appearance: none; - width:120px; - height: 20px; - cursor: pointer; - z-index: 1; - margin:5px; + -moz-appearance: none; + width:120px; + height: 20px; + cursor: pointer; + z-index: 1; + margin:5px; } input.sheet-small_tab::before{ - -moz-appearance: none; - content: attr(title); + -moz-appearance: none; + content: attr(title); - border-radius:.5em; - text-align: center; - display: inline-block; - color:white; - background:black; - border:2px solid black; - width: 120px; - height:20px; - font-size: 14px; + border-radius:.5em; + text-align: center; + display: inline-block; + color:white; + background:black; + border:2px solid black; + width: 120px; + height:20px; + font-size: 14px; } input.sheet-small_tab:checked::before{ - -moz-appearance: none; - border:2px solid black; - background:#CCCCCC; - color:black; - border-radius:.5em; + -moz-appearance: none; + border:2px solid black; + background:#CCCCCC; + color:black; + border-radius:.5em; } input.sheet-skill_name{ - -moz-appearance: none; - width:400px; + -moz-appearance: none; + width:400px; } input.sheet-skill_hidden{ visibility: hidden; } div.sheet-tab-content{ - border-top-color: #000; - margin: 2px 0 0 0; + border-top-color: #000; + margin: 2px 0 0 0; } select.sheet-skill_select{ - width:55px; - margin-bottom:-1px; + width:55px; + margin-bottom:-1px; } select.sheet-dice_select{ - width:85px; - margin-bottom:-1px; + width:85px; + margin-bottom:-1px; } .sheet-trait{ width: 30px; } .sheet-numberbox { - width: 50px; + width: 50px; +} + + +.sheet-rolltemplate-d10skillcheck table { + border-radius: 6px; + width:100%; + border: 2px solid #898989; + background-color: #999999; + padding: 2px; + border: 1px solid; + background-color: #ffffff; +} +.sheet-rolltemplate-d10skillcheck th { + color: rgb(42, 42, 42); + padding-left: 5px; + font-size: 1.2em; + text-align: left; + font-family: "Times New Roman", Times, serif; + font-variant: small-caps; + text-transform: capitalize; +} + +.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , +.sheet-rolltemplate-d10skillcheck .sheet-roll-fail { + padding-left: 5px; + margin-bottom: 5px; +} +.sheet-rolltemplate-d10skillcheck .sheet-roll-crit { + padding-left: 5px; + margin-bottom: 5px; + background-color:#b0d6ad; +} +.sheet-rolltemplate-d10skillcheck .sheet-roll-fumble { + padding-left: 5px; + margin-bottom: 5px; + background-color:#d6adad; +} + +.sheet-rolltemplate-d10skillcheck .sheet-roll-attr{ + color: #555555; + font-size: 1em; + font-style: italic; + padding-left: 9px; + padding-top: 0px; + margin-top: -10px; +} +.sheet-rolltemplate-d10skillcheck .inlinerollresult { + background-color: transparent; + border: none; +} +.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit { + color: #3FB315; + border: none; +} + +.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { + color: #B31515; + border: none; +} +.sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll { + color: #4A57ED; + border: none; } From b0c8c5e010a48e8e69b7bb8c688d06cec7d6785c Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 28 Jun 2018 02:00:00 +0200 Subject: [PATCH 07/62] Dice templates --- Todo and utils.txt | 5 + feuille_sysd10.html | 1520 ++++++++++++++++++++++--------------------- style.css | 9 +- 3 files changed, 774 insertions(+), 760 deletions(-) diff --git a/Todo and utils.txt b/Todo and utils.txt index 6112182..f0925b7 100644 --- a/Todo and utils.txt +++ b/Todo and utils.txt @@ -85,3 +85,8 @@ on("change:item_shield3_activation change:general_item_shield3", function() { }); name roll_name dice_name result threshold +/e - Test d.+(\w*).*\[\[(.*)-.*\]\] +&{template:d10skillcheck}{{name=@{character_name}} {{roll_name=$1}} {{dice_name=@{dice}}} {{result=$2}} {{threshold=[[]]}} + +/e .* @{(\w*)}.*\[(.*) -.*\)?\]\] +&{template:d10skillcheck}{{name=@{character_name}}} {{roll_name=@{$1}}} {{dice_name=@{dice}}} {{result=[[$2-d@{dice}cs1cf@{dice}]]}} {{threshold=[[$2]]}} diff --git a/feuille_sysd10.html b/feuille_sysd10.html index d625a68..bf35ae4 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -1,321 +1,454 @@ - - - - - -
-
- -
- -
-
-
-
-

Ressources

- - - - - - - - - - - - - - - - - -

Points de Vie

Points de Fatigue

Dégats aggravés

+ + +
+
+ +
+
-
- - - -
- - - - - - - - -

Points de compétence :

Utilisés - -
Restants
+
+
+
+

Ressources

+ + + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

Dégats aggravés

+
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
-
-
-
-

Caractéristiques

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
-
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
+ + + + +
+
+ + + + +
+ +

Compétences générales

+
+ + + + + +
+
+ +
+ +

Compétences sociales

+
+ + + + + +
+
+ +
+ +

Compétences Intellectuelles

+
+ + + + + +
+
+ +
-
-
- - - - -
-
- - - - -
- -

Compétences générales

-
- - - - - -
+ + +
+
+ + +
+

Compétences magiques

+
+ + + + + +
+
+
+
+ + +
+ + + + + +
+ + + + d10+ + + + + +
-
- -

Compétences sociales

-
- - - - + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + - +
+
-
- -

Compétences Intellectuelles

-
- - - - + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + - +
-
-
- - -
-
- - -
-

Compétences magiques

-
- - - - d10+ + + + + +
+ + d10+ + + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + - +
- -
-
- -
- - - - - -
- - - - d10+ - + - - -
- - - - - - - -
- - - - - -
- - - - - -
- - - - - - - - -
- - - - d10 ∘ + + + + +
+ + + + + + - -
- -
- - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + +
+ + + + + + - -
-
- - -
- - d10+ - + - - -
- - d10+ - - -
- - - - - -
- - - - - -
- - - - - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + +
+ + + + + + - -
-
- - -
. - - d10 ∘ - + - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + +
+ + + + + + - -
+ + + +
+ + +
+ + + + + +
+
+
-
-
- - - - - - {{#rollWasCrit() result}} - - {{/rollWasCrit() result}} - {{#^rollWasCrit() result}} - {{#rollGreater() result 1}} - - {{/rollGreater() result 1}} - {{#rollBetween() result 0 1}} - - {{/rollBetween() result 0 1}} - {{#rollLess() result 0}} - - {{/rollLess() result 0}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}} degrés de réussite{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
+ + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} {{#rollWasFumble() result}} - - {{/rollWasFumble() result}} - {{/^rollWasCrit() result}} - -
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}} degrés d'échec
-
+ Échec critique ! {{result}}x2 degrés d'échec + {{/rollWasFumble() result}} + {{#^rollWasFumble() result}} + {{#rollGreater() result 1}} + {{result}} degrés de réussite + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + {{result}} degré de réussite + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + {{result}} degrés d'échec + {{/rollLess() result 0}} + {{/^rollWasFumble() result}} + {{/^rollWasCrit() result}} + + + diff --git a/style.css b/style.css index 1907d23..7e076ff 100644 --- a/style.css +++ b/style.css @@ -153,7 +153,7 @@ select.sheet-dice_select{ } .sheet-rolltemplate-d10skillcheck .sheet-roll-fumble { padding-left: 5px; - margin-bottom: 5px; + margin-bottom: 8px; background-color:#d6adad; } @@ -165,15 +165,22 @@ select.sheet-dice_select{ padding-top: 0px; margin-top: -10px; } + +.sheet-rolltemplate-d10skillcheck .sheet-inline, .sheet-rolltemplate-d10skillcheck .inlinerollresult { background-color: transparent; border: none; + font-weight: bold; + padding:0px; + font-family: "Times New Roman", Times, serif; } +.sheet-rolltemplate-d10skillcheck .sheet-inline.fullcrit, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit { color: #3FB315; border: none; } +.sheet-rolltemplate-d10skillcheck .sheet-inline.fullfail, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { color: #B31515; border: none; From ed4374379547a6f7a8695ca3ad8511d27cbea56d Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 28 Jun 2018 02:09:50 +0200 Subject: [PATCH 08/62] Aestetic and Qol updates --- feuille_sysd10.html | 18 +++++++++--------- style.css | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index bf35ae4..69a2444 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -488,7 +488,7 @@

Compétences magiques


- + + + - + + + + + + -
+

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

Ressources

Dégats aggravés

- - - + + +
@@ -397,7 +403,7 @@

Compétences magiques

- + d10+ + @@ -426,20 +432,20 @@

Compétences magiques


- - + +
- - + +
- - + + @@ -468,9 +474,9 @@

Compétences magiques

- + - + d10+ + @@ -600,7 +606,7 @@

Compétences magiques


- + d10+ - + +
- - + +
- - + + @@ -729,7 +735,7 @@

Compétences magiques

. - + d10 ∘ + From 65f01194fa93bb6e4a0f2fe276908b12111747d7 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sat, 30 Jun 2018 05:58:04 +0200 Subject: [PATCH 10/62] css overhaul Much needed anyway --- crit.js | 34 ++++++------- feuille_sysd10.html | 2 +- style.css | 121 ++++++++++++++++++++++++++++++++++++++------ 3 files changed, 123 insertions(+), 34 deletions(-) diff --git a/crit.js b/crit.js index bda2659..e99ad69 100644 --- a/crit.js +++ b/crit.js @@ -166,11 +166,11 @@ on("chat:message", function(msg) { function show_rolls(who,d_vars){ //Return a beautiful table showing the results and some information depending on the type of action "e":Dodge "a":Attack "d":Defense - var msg_head="
" - var msg=""; // Coup déchirant - if (d_vars.technique_m!=0) msg_adds+=""; // Technique martiale - if (d_vars.relances!=0) msg_adds+=""; // Technique martiale - if (d_vars.encaissement!=0) msg_adds+=""; // Technique martiale + if (d_vars.coup_d!=0) msg_adds+=""; // Coup déchirant + if (d_vars.technique_m!=0) msg_adds+=""; // Technique martiale + if (d_vars.relances!=0) msg_adds+=""; // Technique martiale + if (d_vars.encaissement!=0) msg_adds+=""; // Technique martiale - if (dice_stats.is_crit==1) msg+=""; + if (dice_stats.is_crit==1) msg+=""; if (dice_stats.is_hit==1){ if (d_vars.seuil!=0){ if (d_vars.action=="a"){ - msg+=""; + msg+=""; } else if (d_vars.action=="d"||d_vars.action=="e"){ // Can't miss a block or a dodge, can be a shitty roll tho } else { - msg+=""; + msg+=""; } } } else { if (d_vars.action=="a"){ - msg+=""; + msg+=""; } else if (d_vars.action=="d"||d_vars.action=="e"){ // Can't miss a block or a dodge } else { - msg+=""; + msg+=""; } } msg+=msg_adds; - sendChat(who,msg_head+msg+msg_foot+msg_relance); + sendChat(who,msg_head+msg+msg_foot+msg_relance+""); //logit(msg_head+msg+msg_foot); } function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ logit(results); - var dices=""; + dices+=""; //logit(dices); return dices; diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 318a90c..222b23a 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -850,7 +850,7 @@

Compétences magiques

-
"; + var msg_head="
" + var msg="
"; var msg_foot="
"; var msg_adds=""; - var msg_relance="Coup déchirant: "+d_vars.coup_d_results.join(" ")+"
Technique martiale: "+d_vars.technique_result+"
Relances: "+d_vars.relances+"
Encaissement: "+d_vars.encaissement_result+"
Coup déchirant: "+d_vars.coup_d_results.join(" ")+"
Technique martiale: "+d_vars.technique_result+"
Relances: "+d_vars.relances+"
Encaissement: "+d_vars.encaissement_result+"
L'action est une réussite critique
L'action est une réussite critique
L'attaque parvient à toucher sa cible
L'attaque parvient à toucher sa cible
L'action est un succes
L'action est un succes
L'attaque ne touche pas sa cible
L'attaque ne touche pas sa cible
L'action est un echec
L'action est un echec
"+name; + var dices="
"+name; var is_below=0,is_acrit=0; var sum=0; var t_hit=d_vars.seuil,t_crit=Math.max(7,d_vars.seuil); //The crit threshold can change if the hit threshold is higher @@ -254,7 +254,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ for (var i=0,len=results.length;it_hit && is_below==1){ @@ -262,7 +262,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ is_below=2; } if (results[i]>t_crit&&is_acrit==0){ - dices+=""; //Start greening everithing + dices+=""; //Start greening everything is_acrit=1; } // Only add to the sum if you pass the threshold @@ -292,7 +292,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ sum=Math.floor(((sum*m_esq+d_vars.on_hit_c+d_vars.attribute))*m_crit)+d_vars.nb_2add-d_vars.nb_2sub; sum+=d_vars.defense_i_0+d_vars.exploiter_p_0+d_vars.charge+d_vars.technique_result+d_vars.encaissement_result; - dices+="
Total: "+sum+"
Total: "+sum+"
+
diff --git a/style.css b/style.css index 42554c7..9e15424 100644 --- a/style.css +++ b/style.css @@ -27,7 +27,6 @@ input.sheet-secondary_skills_tab3:checked ~ div.sheet-secondary_skills_tab3 display:block; } - input.sheet-tab{ -moz-appearance: none; width:150px; @@ -42,12 +41,10 @@ input.sheet-tab{ input.sheet-tab::before{ -moz-appearance: none; content: attr(title); - border-radius:.5em; border:2px solid black; text-align: center; display: inline-block; - background: black; color:white; width: 150px; @@ -73,7 +70,6 @@ input.sheet-small_tab{ input.sheet-small_tab::before{ -moz-appearance: none; content: attr(title); - border-radius:.5em; text-align: center; display: inline-block; @@ -83,7 +79,6 @@ input.sheet-small_tab::before{ width: 120px; height:20px; font-size: 14px; - } input.sheet-small_tab:checked::before{ -moz-appearance: none; @@ -104,7 +99,6 @@ div.sheet-tab-content{ border-top-color: #000; margin: 2px 0 0 0; } - select.sheet-skill_select{ width:55px; margin-bottom:-1px; @@ -113,7 +107,6 @@ select.sheet-dice_select{ width:85px; margin-bottom:-1px; } - .sheet-trait{ width: 30px; } @@ -121,39 +114,50 @@ select.sheet-dice_select{ width: 50px; } - .sheet-rolltemplate-d10skillcheck table { border-radius: 6px; width:100%; - border: 2px solid #898989; - background-color: #999999; + padding:0px; + margin:0px; padding: 2px; border: 1px solid; background-color: #ffffff; + border-width: 1px; + border-style: solid; + border-color: #000; + border-image-source: none; } +.sheet-rolltemplate-d10skillcheck .sheet-roll-title, .sheet-rolltemplate-d10skillcheck th { color: rgb(42, 42, 42); + padding:0px; + margin:0px; padding-left: 5px; font-size: 1.2em; text-align: left; font-family: "Times New Roman", Times, serif; font-variant: small-caps; text-transform: capitalize; + border-width: 0px; } .sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , .sheet-rolltemplate-d10skillcheck .sheet-roll-fail { + padding:0px; + margin:0px; + border-width: 0px; padding-left: 5px; - margin-bottom: 5px; } .sheet-rolltemplate-d10skillcheck .sheet-roll-crit { + padding:0px; + margin:0px; + border-width: 0px; padding-left: 5px; - margin-bottom: 5px; background-color:#b0d6ad; } .sheet-rolltemplate-d10skillcheck .sheet-roll-fumble { padding-left: 5px; - margin-bottom: 8px; + border-width: 0px; background-color:#d6adad; } @@ -163,7 +167,10 @@ select.sheet-dice_select{ font-style: italic; padding-left: 9px; padding-top: 0px; + border-width: 0px; margin-top: -10px; + padding:0px; + margin:0px; } .sheet-rolltemplate-d10skillcheck .sheet-inline, @@ -179,13 +186,95 @@ select.sheet-dice_select{ color: #3FB315; border: none; } - .sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { color: #B31515; - border: none; + border: none; } .sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll { color: #4A57ED; - border: none; + border: none; +} + + + +.sheet-rolltemplate-d10fight-blob{ + border-radius: 6px; + border: 1px solid #898989; + z-index: 1; +} +.sheet-rolltemplate-d10fight table{ + padding:0px; + margin:0px; + text-align: left; + width:100%; + border:none; + cellpadding:3px; + cellspacing:0px; +} +.sheet-rolltemplate-d10fight .sheet-sum{ + padding:0px; + margin:0px; + border:none; + text-align: right; + padding-right:10px; +} +.sheet-rolltemplate-d10fight .sheet-sucess, +.sheet-rolltemplate-d10fight .sheet-line{ + padding:0px; + margin:0px; + padding-left: 3px; + border:none; +} +.sheet-rolltemplate-d10fight .sheet-critical{ + padding:0px; + margin:0px; + border:none; + padding-left: 3px; + border-radius: 4px; + background-color:#b0d6ad; +} +.sheet-rolltemplate-d10fight .sheet-hit{ + padding:0px; + margin:0px; + padding-left: 3px; + border-radius: 4px; + background-color:#b0d6ad; + border:none; +} +.sheet-rolltemplate-d10fight .sheet-miss{ + padding:0px; + margin:0px; + padding-left: 3px; + border:none; + border-radius: 4px; + background-color:#d6adad; +} +.sheet-rolltemplate-d10fight .sheet-name{ + padding:0px; + padding-left: 3px; + margin:0px; + border:none; + border-radius: 4px; + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + background-color: #999999; +} +.sheet-rolltemplate-d10fight .sheet-additional{ + padding:0px; + margin:0px; + border:none; + padding-left:10px; +} +.sheet-rolltemplate-d10fight-grey{ + color: #999999; +} +.sheet-rolltemplate-d10fight-green{ + color: #009900; +} +.sheet-rolltemplate-d10fight a, +.sheet-rolltemplate-d10fight a[href^="!"], +.sheet-rolltemplate-d10fight a[href^="~"]{ + text-align:right; + background-color: #999999; !important } From d82f714d1588b673ccc85ac9d253d6c3b443ccf2 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sun, 1 Jul 2018 01:02:45 +0200 Subject: [PATCH 11/62] Css for init & underscore --- crit.js | 2 +- feuille_sysd10.html | 1556 ++++++++++++++++++++++--------------------- style.css | 31 +- 3 files changed, 807 insertions(+), 782 deletions(-) diff --git a/crit.js b/crit.js index e99ad69..5ae4ae6 100644 --- a/crit.js +++ b/crit.js @@ -240,7 +240,7 @@ function show_rolls(who,d_vars){ } } msg+=msg_adds; - sendChat(who,msg_head+msg+msg_foot+msg_relance+""); + sendChat(who_pr,msg_head+msg+msg_foot+msg_relance+""); //logit(msg_head+msg+msg_foot); } diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 222b23a..537d674 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -1,460 +1,327 @@ - - - - - -
-
- -
- + }); + + +
+
+ +
+ +
+
+
+
+

Ressources

+
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
+ + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

Dégats aggravés

-
-
-
-

Ressources

- - - - - - - - - - - - - - - - - -

Points de Vie

Points de Fatigue

Dégats aggravés

-
-
- - - -
- - - - - - - - -

Points de compétence :

Utilisés - -
Restants
-
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
-
-
-

Caractéristiques

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
-
-
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
-
+
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
-
- - - - -
-
- - - - -
- -

Compétences générales

-
- - - - - -
-
- -
- -

Compétences sociales

-
- - - - - -
-
- -
- -

Compétences Intellectuelles

-
- - - - - -
-
- -
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
- - -
-
- - -
-

Compétences magiques

-
- - - - - -
-
- +
+
+ + + + +
+
+ + + + +
+ +

Compétences générales

+
+ + + + + +
-
- -
- - - - - -
- - - - d10+ - + - - -
- - - - - - - -
- - - - - -
- - - - - -
- - - - - - - - -
- - - - + + + - +
-
- -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + + + - +
- -
- - d10+ - + - - -
- - d10+ - - -
- - - - - -
- - - - - -
- - - - - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + +
+

Compétences magiques

+
+ + + + - +
+ +
+
- -
. - - d10 ∘ - + - - -
- - - - - - + + + +
+ + + + d10+ + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + - - - -
- - - - - - + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + - - - -
- - - - - - d10+ + + + + +
+ + d10+ + + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + - - - -
- - - - - - d10 ∘ + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + - - - -
- - -
- - - - - -
-
- + +
+
- - - - - - {{#rollWasCrit() result}} - - {{/rollWasCrit() result}} - {{#^rollWasCrit() result}} - {{#rollWasFumble() result}} - - {{/rollWasFumble() result}} - {{#^rollWasFumble() result}} - {{#rollGreater() result 1}} - - {{/rollGreater() result 1}} - {{#rollBetween() result 0 1}} - - {{/rollBetween() result 0 1}} - {{#rollLess() result 0}} - - {{/rollLess() result 0}} - {{/^rollWasFumble() result}} - {{/^rollWasCrit() result}} - -
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
-
+
+ + + + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} + {{#rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/rollWasFumble() result}} + {{#^rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/^rollWasFumble() result}} + {{/^rollWasCrit() result}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
+
+ + + + + +
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} + {{#rollWasCrit() result}} + +{{value}} + {{/rollWasCrit() result}} + {{#rollWasFumble() result}} + {{result}}-{{value}} + {{/rollWasFumble() result}} +
+
diff --git a/style.css b/style.css index 9e15424..1b2c4b5 100644 --- a/style.css +++ b/style.css @@ -114,6 +114,7 @@ select.sheet-dice_select{ width: 50px; } +.sheet-rolltemplate-d10init table, .sheet-rolltemplate-d10skillcheck table { border-radius: 6px; width:100%; @@ -127,6 +128,8 @@ select.sheet-dice_select{ border-color: #000; border-image-source: none; } +.sheet-rolltemplate-d10init .sheet-roll-title, +.sheet-rolltemplate-d10init th, .sheet-rolltemplate-d10skillcheck .sheet-roll-title, .sheet-rolltemplate-d10skillcheck th { color: rgb(42, 42, 42); @@ -140,7 +143,18 @@ select.sheet-dice_select{ text-transform: capitalize; border-width: 0px; } - +.sheet-rolltemplate-d10init .sheet-roll-attr, +.sheet-rolltemplate-d10skillcheck .sheet-roll-attr{ + color: #555555; + font-size: 1em; + font-style: italic; + padding:0px; + margin:0px; + padding-left: 9px; + border-width: 0px; + margin-top: -10px; +} +.sheet-rolltemplate-d10init .sheet-roll-sucess, .sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , .sheet-rolltemplate-d10skillcheck .sheet-roll-fail { padding:0px; @@ -160,19 +174,8 @@ select.sheet-dice_select{ border-width: 0px; background-color:#d6adad; } - -.sheet-rolltemplate-d10skillcheck .sheet-roll-attr{ - color: #555555; - font-size: 1em; - font-style: italic; - padding-left: 9px; - padding-top: 0px; - border-width: 0px; - margin-top: -10px; - padding:0px; - margin:0px; -} - +.sheet-rolltemplate-d10init .sheet-inline, +.sheet-rolltemplate-d10init .inlinerollresult, .sheet-rolltemplate-d10skillcheck .sheet-inline, .sheet-rolltemplate-d10skillcheck .inlinerollresult { background-color: transparent; From 5bef1d84bd7721670241b62a3a4bc9a676b10639 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Fri, 6 Jul 2018 23:33:55 +0200 Subject: [PATCH 12/62] added forall and threshold to the sheet --- Skills.txt | 3 +++ crit.js | 17 +++++++++-------- feuille_sysd10.html | 10 +++++++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Skills.txt b/Skills.txt index 0ea2e98..140a7f2 100644 --- a/Skills.txt +++ b/Skills.txt @@ -6,6 +6,7 @@ Perfection P Prescience_ @Reserve Rage_primale @Reserve A_corps_perdu @Reserve +undescored_name : Defence Encaissement @Defence @@ -52,6 +53,8 @@ Special Tir_mortel @Reserve Tir_precis T_1 Tir_precis T_2 +replace L +add_to_add l Tir_implacable i Charge C Charge_Mortelle (Rappel) diff --git a/crit.js b/crit.js index 5ae4ae6..3d8c94e 100644 --- a/crit.js +++ b/crit.js @@ -216,27 +216,28 @@ function show_rolls(who,d_vars){ if (d_vars.fauchage!=0) msg+=add_thoose_dices(d_vars,d_vars.cleave,"Fauchage: ",m_esq,m_crit); if (d_vars.coup_d!=0) msg_adds+="Coup déchirant: "+d_vars.coup_d_results.join(" ")+""; // Coup déchirant if (d_vars.technique_m!=0) msg_adds+="Technique martiale: "+d_vars.technique_result+""; // Technique martiale - if (d_vars.relances!=0) msg_adds+="Relances: "+d_vars.relances+""; // Technique martiale - if (d_vars.encaissement!=0) msg_adds+="Encaissement: "+d_vars.encaissement_result+""; // Technique martiale + if (d_vars.relances!=0) msg_adds+="Relances: "+d_vars.relances+""; // Relances + if (d_vars.encaissement!=0) msg_adds+="Encaissement: "+d_vars.encaissement_result+""; // Encaissement + if (d_vars.add_to_all!=0){msg_adds+=" Modificateur de des: "+d_vars.add_to_all;}; //Dice modifier if (dice_stats.is_crit==1) msg+="L'action est une réussite critique"; if (dice_stats.is_hit==1){ if (d_vars.seuil!=0){ if (d_vars.action=="a"){ - msg+="L'attaque parvient à toucher sa cible"; + msg+="L'attaque parvient à toucher sa cible (seuil "+d_vars.seuil+")"; } else if (d_vars.action=="d"||d_vars.action=="e"){ // Can't miss a block or a dodge, can be a shitty roll tho } else { - msg+="L'action est un succes"; + msg+="L'action est un succes (seuil "+d_vars.seuil+")"; } } } else { if (d_vars.action=="a"){ - msg+="L'attaque ne touche pas sa cible"; + msg+="L'attaque ne touche pas sa cible (seuil "+d_vars.seuil+")"; } else if (d_vars.action=="d"||d_vars.action=="e"){ // Can't miss a block or a dodge } else { - msg+="L'action est un echec"; + msg+="L'action est un echec (seuil "+d_vars.seuil+")"; } } msg+=msg_adds; @@ -267,7 +268,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ } // Only add to the sum if you pass the threshold if (results[i]>t_hit) { - if (d_vars.replace>=0) { + if (d_vars.replace>0) { sum+=d_vars.replace+d_vars.add_to_all; } else { sum+=results[i]+d_vars.add_to_all; @@ -308,7 +309,7 @@ function parse_command(message){ "exploiter_p_2":0,"tir_p_0":0,"tir_p_1":0,"tir_i":0,"charge":0,"charge_i":0,"nb_2add":0,"nb_2sub":0, "relances":0,"seuil":0,"nb_flat_dices":0,"action":"","flat_dices":[],"results":[],"technique_result":0, "cleave":[],"on_hit_c":0,"attribute":0,"encaissement":0,"encaissement_dices":"","encaissement_result":0, - "replace":-1,"add_to_all":0,"max_dices":-1,"player_name":""}; + "replace":0,"add_to_all":0,"max_dices":-1,"player_name":""}; var tab=message.split(" "); var len_args=tab.length; var i; diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 537d674..7a4192a 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -403,7 +403,7 @@

Compétences magiques

- + d10+ + @@ -411,6 +411,8 @@

Compétences magiques

+ > + ∀
@@ -595,7 +597,7 @@

Compétences magiques

- + d10+ + @@ -605,6 +607,8 @@

Compétences magiques

+ > + ∀
d10+ @@ -737,7 +741,7 @@

Compétences magiques

. d10 ∘ - + + - +
From 725d4f8a4b20eeb82a0b80fee4a14e8ea63437a2 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sun, 8 Jul 2018 07:43:49 +0200 Subject: [PATCH 14/62] x2 dodge and init --- crit.js | 17 +++++++++-------- feuille_sysd10.html | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/crit.js b/crit.js index 26b4854..00ab9e8 100644 --- a/crit.js +++ b/crit.js @@ -191,17 +191,17 @@ function show_rolls(who,d_vars){ switch(d_vars.action){ case "a": - msg+=who_pr+" attaque"; - break; + msg+=who_pr+" attaque"; + break; case "e": - msg+=who_pr+" esquive"; - m_esq=2; // It's a hit - break; + msg+=who_pr+" esquive"; + m_esq=2; // It's a hit + break; case "d": - msg+=who_pr+" se defend"; - break; + msg+=who_pr+" se defend"; + break; default: - msg+=who_pr+" 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)){ @@ -283,6 +283,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ is_acrit=2; } + if (m_esq==2) {dices+=" [x2]";}; if (d_vars.nb_2add!=0){dices+=" + ("+d_vars.nb_2add;}; if (d_vars.attribute+d_vars.attribute!=0){ //&&!=0 dices+=" + "+(d_vars.on_hit_c+d_vars.attribute); diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 33a0d36..93366ea 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -401,7 +401,7 @@

Compétences magiques

- + d10+ @@ -893,10 +893,10 @@

Compétences magiques

{{name}} — {{roll_name}} 1d10+{{value}} = {{result}} {{#rollWasCrit() result}} - +{{value}} + +{{base}} {{/rollWasCrit() result}} {{#rollWasFumble() result}} - {{result}}-{{value}} + {{result}}-{{base}} {{/rollWasFumble() result}} From 3830a2ea2cbc17f55ffbfd4e0abbb9d7c2a5aafa Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 8 Aug 2018 22:32:57 +0200 Subject: [PATCH 15/62] QoL Changement de lancers de des, QoL mostly --- feuille_sysd10.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 93366ea..e345569 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -403,8 +403,8 @@

Compétences magiques

- - d10+ + + + d10+ + + +
- - d10+ + + d10 ∘ + + - + + @@ -597,7 +597,7 @@

Compétences magiques

- + + @@ -610,7 +610,7 @@

Compétences magiques

>
- + diff --git a/skill_generator.py b/skill_generator.py index 51f83c9..0a41aeb 100755 --- a/skill_generator.py +++ b/skill_generator.py @@ -20,6 +20,7 @@ command="help" EOL="\n" +tab=" " #Custom parsing ENCAISSEMENT_PARSE="""d_vars.encaissement=to_number(tab[i+1]); d_vars.encaissement_dices="d20"; @@ -78,7 +79,7 @@ def findCat(element,category): list.append(['replace','Des de substitution',1,'int','L',0,-1,"",None]) list.append(['add_to_all','Valeur d\'ajout aux des',1,'int','l',0,0,"",None]) list.append(['max_dices','Nombre de des max',1,'pint','m',0,-1,"",None]) -list.append(['player_name','Nom du joueur',1,'str',':',0,'""',"",None]) +list.append(['player_name','Nom du joueur',1,'str','n',0,'""',"",None]) list.append(['crit_level','Niveau de critique',1,'pint','c',0,0,"",None]) list.append(['nb_dices','Nombre de des',1,'pint','',0,0,"",None]) @@ -262,7 +263,6 @@ def find_code(args): def parser(args): "Generate the argument parser" - tab=" " res=tab+"if (len_args>0){"+EOL res+=tab*2+"d_vars.nb_dices=to_p_number(tab[0]);"+EOL res+=tab+"}"+EOL From 39e7cd98cc7eeaa0ed24b92c362df2d3ceaefa8c Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 11 Oct 2018 21:27:11 +0200 Subject: [PATCH 35/62] Finally added the Transcendance and Crit level --- crit.js | 32 +++++++++++++++++--------------- feuille_sysd10.html | 20 +++++++++++++++----- skill_generator.py | 4 ++-- style.css | 3 ++- 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/crit.js b/crit.js index e2e2ded..ad4a15f 100644 --- a/crit.js +++ b/crit.js @@ -170,7 +170,7 @@ function show_rolls(who,d_vars){ var msg=""; var msg_foot="
"; var msg_adds=""; - var msg_relance="Relancer ce jet"; logit(msg_relance); @@ -200,12 +200,16 @@ function show_rolls(who,d_vars){ default: msg+=who_pr+" lance "+d_vars.nb_dices+" dés"; } + // 1=pas de crit, 2=crit normal + //d_vars.crit_level-=2; 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 full crit + m_crit=d_vars.crit_level; // It's a full crit } else { if (d_vars.nb_dices+d_vars.nb_flat_dices==0){m_crit=1;} // That's not a crit - else {m_crit=1.5;} // Only half a crit + else { + m_crit=Math.min((0.5+d_vars.crit_level/2),d_vars.crit_level); + } // Only half a crit }}; //Add the rolls @@ -217,6 +221,7 @@ function show_rolls(who,d_vars){ if (d_vars.relances!=0) msg_adds+="Relances: "+d_vars.relances+""; // Relances if (d_vars.encaissement!=0) msg_adds+="Encaissement: "+d_vars.encaissement_result+""; // Encaissement if (d_vars.add_to_all!=0){msg_adds+=" Modificateur de des: "+d_vars.add_to_all;}; //Dice modifier + if (d_vars.transcendence!=3){msg_adds+=" Transcendence: "+d_vars.transcendence;}; //Transcendence if (dice_stats.is_crit==1&&m_crit>1) msg+="L'action est une réussite critique"; if (dice_stats.is_hit==1){ @@ -291,7 +296,10 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ // Add everything to the sum sum=Math.floor(((sum*m_esq+d_vars.on_hit_c+d_vars.attribute))*m_crit)+d_vars.nb_2add-d_vars.nb_2sub; sum+=d_vars.defense_i_0+d_vars.exploiter_p_0+d_vars.charge+d_vars.technique_result+d_vars.encaissement_result; - + if(d_vars.transcendence>3){sum=sum*(2**(d_vars.transcendence-3));} + else { + if (d_vars.transcendence<3) { sum=Math.floor(sum/(2**(3-d_vars.transcendence)));} + } dices+=" Total: "+sum+""; //logit(dices); @@ -303,17 +311,7 @@ function parse_command(message){ // Parse a string formated in the following fashion // 4 P 2 I 2 4 E 4 1 T 1 4 + 11 - 22 s 2 d 4 d 5 d 8 d 1 // And add everithing in the related Variables - var d_vars={"perfection":0,"defense_i_0":0,"defense_i_1":0, - "defense_i_2":0,"rempart_p":0,"technique_m":0, - "coup_d":0,"fauchage":0,"exploiter_p_0":0, - "exploiter_p_1":0,"exploiter_p_2":0,"tir_p_0":0, - "tir_p_1":0,"tir_i":0,"charge":0,"charge_i":0, - "nb_2add":0,"nb_2sub":0,"relances":0,"seuil":0, - "action":"","flat_dices":[],"on_hit_c":0,"attribute":0, - "encaissement":0,"replace":-1,"add_to_all":0,"max_dices":-1, - "player_name":"","crit_level":0,"nb_dices":0,"nb_flat_dices":0, - "encaissement_dices":"","results":[],"cleave":[], - "encaissement_result":0,"technique_result":0,"coup_d_results":[]}; + var d_vars={"perfection":0,"defense_i_0":0,"defense_i_1":0,"defense_i_2":0,"rempart_p":0,"technique_m":0,"coup_d":0,"fauchage":0,"exploiter_p_0":0,"exploiter_p_1":0,"exploiter_p_2":0,"tir_p_0":0,"tir_p_1":0,"tir_i":0,"charge":0,"charge_i":0,"nb_2add":0,"nb_2sub":0,"relances":0,"seuil":0,"action":"","flat_dices":[],"on_hit_c":0,"attribute":0,"encaissement":0,"replace":-1,"add_to_all":0,"max_dices":-1,"player_name":"","crit_level":2,"transcendence":3,"nb_dices":0,"nb_flat_dices":0,"encaissement_dices":"","results":[],"cleave":[],"encaissement_result":0,"technique_result":0,"coup_d_results":[]}; var tab=message.split(" "); var len_args=tab.length; var i; @@ -416,6 +414,10 @@ function parse_command(message){ d_vars.crit_level=to_p_number(tab[i+1]); i+=2; break; + case "t": + d_vars.transcendence=to_p_number(tab[i+1]); + i+=2; + break; case "I": switch (tab[i+1]) { case "1": diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 2308b71..e6a6044 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -400,10 +400,11 @@

Compétences magiques

+
- + + @@ -597,7 +598,7 @@

Compétences magiques

- + + @@ -610,7 +611,7 @@

Compétences magiques

>
- + @@ -850,7 +851,16 @@

Compétences magiques

- + +
+ + +
+ + +
+ +
diff --git a/skill_generator.py b/skill_generator.py index 0a41aeb..de6641d 100755 --- a/skill_generator.py +++ b/skill_generator.py @@ -80,7 +80,8 @@ def findCat(element,category): list.append(['add_to_all','Valeur d\'ajout aux des',1,'int','l',0,0,"",None]) list.append(['max_dices','Nombre de des max',1,'pint','m',0,-1,"",None]) list.append(['player_name','Nom du joueur',1,'str','n',0,'""',"",None]) -list.append(['crit_level','Niveau de critique',1,'pint','c',0,0,"",None]) +list.append(['crit_level','Niveau de critique',1,'pint','c',0,2,"",None]) +list.append(['transcendence','Transcendence',1,'pint','t',0,3,"",None]) list.append(['nb_dices','Nombre de des',1,'pint','',0,0,"",None]) list.append(['nb_flat_dices','Nombre de des fixes',1,'pint','',0,0,"",None]) @@ -558,7 +559,6 @@ def export(args): def title(t): return "{} {} {}".format("#"*10,t,"#"*10)+EOL - f.write(title("Relances")) f.write(reroll([])+EOL) f.write(title("Reroll")) diff --git a/style.css b/style.css index 1b2c4b5..79f3e10 100644 --- a/style.css +++ b/style.css @@ -8,7 +8,8 @@ input.sheet-tab3:checked ~ div.sheet-tab3 input.sheet-secondary_tab1:checked ~ div.sheet-secondary_tab1, input.sheet-secondary_tab2:checked ~ div.sheet-secondary_tab2, input.sheet-secondary_tab3:checked ~ div.sheet-secondary_tab3, -input.sheet-secondary_tab4:checked ~ div.sheet-secondary_tab4 +input.sheet-secondary_tab4:checked ~ div.sheet-secondary_tab4, +input.sheet-secondary_tab5:checked ~ div.sheet-secondary_tab5 { display:block; } From f375cdf6c3cbb56739b213274aa2649f78637d38 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 17 Oct 2018 18:11:29 +0200 Subject: [PATCH 36/62] 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 @@

Ressources

Utilisés - From 733972c62ecd3ce1e648958450783e5fcefe1d3f Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 5 Nov 2018 11:37:39 +0100 Subject: [PATCH 37/62] Corrected transcendance; added (crit) --- crit.js | 3 ++- feuille_sysd10.html | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/crit.js b/crit.js index ad4a15f..c03cf15 100644 --- a/crit.js +++ b/crit.js @@ -294,12 +294,13 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){ if (d_vars.nb_2add!=0){dices+=")";}; if (d_vars.nb_2sub!=0){dices+=" - "+d_vars.nb_2sub;}; // Add everything to the sum - sum=Math.floor(((sum*m_esq+d_vars.on_hit_c+d_vars.attribute))*m_crit)+d_vars.nb_2add-d_vars.nb_2sub; + sum=Math.floor(((sum*m_esq+d_vars.on_hit_c+d_vars.attribute))*m_crit)+d_vars.nb_2add sum+=d_vars.defense_i_0+d_vars.exploiter_p_0+d_vars.charge+d_vars.technique_result+d_vars.encaissement_result; if(d_vars.transcendence>3){sum=sum*(2**(d_vars.transcendence-3));} else { if (d_vars.transcendence<3) { sum=Math.floor(sum/(2**(3-d_vars.transcendence)));} } + sum+=-d_vars.nb_2sub; dices+=" Total: "+sum+""; //logit(dices); diff --git a/feuille_sysd10.html b/feuille_sysd10.html index d98dd5d..ee0e4e0 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -151,6 +151,8 @@ 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))}); + }else { + setAttrs({"dice":values.tmpdice}); }; }); }); @@ -414,10 +416,10 @@

Compétences magiques

- + - + - + + + + - + + +
- + - + + - + + + - + + + @@ -611,7 +611,7 @@

Compétences magiques

- + + @@ -624,7 +624,7 @@

Compétences magiques

>
- + @@ -871,6 +871,12 @@

Compétences magiques


+
+ + +
+ +
diff --git a/skill_generator.py b/skill_generator.py index 4e64a2f..3b26d4e 100755 --- a/skill_generator.py +++ b/skill_generator.py @@ -80,8 +80,11 @@ def findCat(element,category): list.append(['add_to_all','Valeur d\'ajout aux des',1,'int','l',0,0,"",None]) list.append(['max_dices','Nombre de des max',1,'pint','m',0,-1,"",None]) list.append(['player_name','Nom du joueur',1,'str','n',0,'""',"",None]) + list.append(['crit_level','Niveau de critique',1,'pint','c',0,2,"",None]) list.append(['transcendence','Transcendence',1,'pint','t',0,3,"",None]) +list.append(['pctreceived','Pourcentage dégats recus',1,'int','v',0,0,"",None]) +list.append(['pctinflicted','Pourcentage dégats infligés',1,'int','f',0,0,"",None]) list.append(['nb_dices','Nombre de des',1,'pint','',0,0,"",None]) list.append(['nb_flat_dices','Nombre de des fixes',1,'pint','',0,0,"",None]) @@ -92,6 +95,9 @@ def findCat(element,category): list.append(['technique_result','Dégats technique martiale',1,'int','',0,0,"",None]) list.append(['coup_d_results','Coup déchirant results',1,'pint','',0,"[]","",None]) + + + class megaListWrapper(): def __init__(self,table=list): self.table=table From ed4498884b63d2d2ae8c3c545d6a2546791841dd Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sun, 19 Jan 2020 08:12:00 +0100 Subject: [PATCH 42/62] Started the generation process --- generator.py | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 generator.py diff --git a/generator.py b/generator.py new file mode 100644 index 0000000..627b3a0 --- /dev/null +++ b/generator.py @@ -0,0 +1,76 @@ +# Generate skills sections and others from a file, on the long run, it should be able to generate the whole sheet + +import argparse, sys, os + +# +# +# + +def gen_tab(name,tabnb,checked=False): + check="" + if checked: + check='checked="checked"' + return ''.format(name=name,nb=tabnb,checked=check) + + +#
+#
+# +# +# + #
+def gen_sectab(name): + pass + + # + #

Compétences Intellectuelles

+ #
+ # + # + # + # + # + #
+ #
+ + def gen_repeating(name): + pass + +# +# +# +# +# +# +# +# +#
+ +def gen_technique(name): + pass + + +if __name__ == '__main__': + def parse(): + pass + From d386201c40d9852048c7d9d3a20cb6a6ebdf24c0 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Tue, 21 Jan 2020 21:43:39 +0100 Subject: [PATCH 43/62] ugly gen --- cyberpnk.txt | 4 +++ generator.py | 70 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 cyberpnk.txt diff --git a/cyberpnk.txt b/cyberpnk.txt new file mode 100644 index 0000000..8b2633f --- /dev/null +++ b/cyberpnk.txt @@ -0,0 +1,4 @@ +@ Section +# Sub section +: Competence 1 +: Competence 2 diff --git a/generator.py b/generator.py index 627b3a0..cb2041d 100644 --- a/generator.py +++ b/generator.py @@ -6,11 +6,16 @@ # # -def gen_tab(name,tabnb,checked=False): - check="" - if checked: - check='checked="checked"' - return ''.format(name=name,nb=tabnb,checked=check) +def printable(name): + return name.replace(" ","").lower() + +def checked(b): + if b==1: + return 'checked="checked"' + return "" + +def gen_tab(name,tab_nb): + return ''.format(name=name,nb=tab_nb,checked=checked(tab_nb)) #
@@ -18,9 +23,15 @@ def gen_tab(name,tabnb,checked=False): # # # - #
-def gen_sectab(name): - pass + +def gen_subtab(name,secname,tab_nb,subtab_nb): + if subtab_nb==1: + intro="""
+
""".format(tab_nb) + else: + intro="" + line="""""".format(name=name,nb=subtab_nb,check=checked(subtab_nb)) + return intro+line # #

Compétences Intellectuelles

@@ -43,8 +54,8 @@ def gen_sectab(name): # #
- def gen_repeating(name): - pass +def gen_repeating(name): + pass # # @@ -66,11 +77,42 @@ def gen_repeating(name): # #
-def gen_technique(name): +#
+def gen_technique(name,tab_name,tab_nb,first_technique): + + if first_technique: + intro="""
""".format(name) + else: + intro="" pass if __name__ == '__main__': - def parse(): - pass - + # filen=sys.argv[1] + filen="cyberpnk.txt" + + def parse(filen): + tab,subtab="","" + tab_nb,subtab_nb=0,0 + first_technique=True + try: + with open(filen) as f: + for line in f.readlines(): + if line[0]=="#": # section + first_technique=True + subtab_content=gen_tab(line[1:],tab_nb) + tab=printable(line[1:]) + print(tab,subtab_content) + tab_nb+=1 + elif line[0]=="@": + # first_technique=True + subtab_content=gen_subtab(line[1:],tab,tab_nb,subtab_nb) + subtab=printable(line[1:]) + print(subtab,subtab_content) + elif line[0]==":": + tech_content=gen_technique(line[1:],tab,tab_nb,first_technique) + # tech=printable() + except FileNotFoundError: + print(filen,"was not found") + + parse(filen) From ee519474394e4ff19d0a2a6d3643e0cff4acd4ce Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 22 Jan 2020 18:35:55 +0100 Subject: [PATCH 44/62] Huge refactor of the generator --- cyberpnk.txt | 17 ++++- generator.py | 211 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 145 insertions(+), 83 deletions(-) diff --git a/cyberpnk.txt b/cyberpnk.txt index 8b2633f..376c058 100644 --- a/cyberpnk.txt +++ b/cyberpnk.txt @@ -1,4 +1,13 @@ -@ Section -# Sub section -: Competence 1 -: Competence 2 +@ Compétences ++ Sub section +- Competence 1 +- Competence 2 +. Repeating 1 ++ Sub section 2 ++ Sub section 3 ++ Sub section 4 +@ Magie ++ Subsection 2 +@ Combat ++ Subsection 2 +- Competence2 diff --git a/generator.py b/generator.py index cb2041d..4a2db07 100644 --- a/generator.py +++ b/generator.py @@ -1,37 +1,121 @@ -# Generate skills sections and others from a file, on the long run, it should be able to generate the whole sheet +#ENCODING UTF-8 -import argparse, sys, os - -# -# -# - -def printable(name): - return name.replace(" ","").lower() - -def checked(b): - if b==1: - return 'checked="checked"' - return "" +# content skills sections and others from a file, on the long run, it should be able to content the whole sheet -def gen_tab(name,tab_nb): - return ''.format(name=name,nb=tab_nb,checked=checked(tab_nb)) +import argparse, sys, os -#
-#
-# -# -# +class Node(object): + """Generic Node.""" + def __init__(self, name,nb): + self.name = name.strip(" ") + self.number=nb + self.children=[] + self.checked="" + self.parent=None + self.pname=name.replace(" ","").lower() + if nb==1: + self.checked='checked="checked"' + + def content(self): + return "" + + def header(self): + return "" + + def css(self): + return "" + + def addchild(self,child): + self.children+=[child] + + # def printable(self,name): + # return + +class Root(Node): + """docstring for Root.""" + def __init__(self): + super(Root,self).__init__("",0) + + def generate(self): + "Return the whole tree, printable" + return self.content() + + def content(self): + ret="" + for child in self.children: + ret+=child.header() # Ligne de chaque tab direct, puis tout + for child in self.children: + ret+=child.content() + ret+="
\n" + return ret + + def css(self): + "Return the whole css, printable" + ret="""div.sheet-tab-content { display: none; }""" + for child in self.children: + ret+="input.sheet-tab{}:checked ~ div.sheet-tab{},\n".format(child.number) + ret=ret[:-1] + ret+="{display: block;}" + return ret + +class Tab(Node): + """Tab node, contains""" + + def __init__(self, name,nb): + super(Tab, self).__init__(name,nb) + + def header(self): # Comes first + return '\n'.format(self=self) + + def content(self): + ret='
\n
\n'.format(self=self) # And add all content + for child in self.children: + ret+=child.header() + ret+="
\n" + for child in self.children: + ret+=child.content() + return ret + +class SubTab(Node): + def __init__(self,name,nb): + super(SubTab,self).__init__(name,nb) + + def header(self): + return """ \n""".format(self=self) + + def content(self): + ret= '
\n'.format(self=self) + ret+=" \n

{self.name}

\n".format(self=self) + for child in self.children: + ret+=child.content() + ret+="
\n" + return ret + +class Skill(Node): + """Print a skill.""" + def __init__(self, name,nb): + super(Skill, self).__init__(name,nb) + + def content(self): + ret=""" + + + + + +
""".format(self=self) -def gen_subtab(name,secname,tab_nb,subtab_nb): - if subtab_nb==1: - intro="""
-
""".format(tab_nb) - else: - intro="" - line="""""".format(name=name,nb=subtab_nb,check=checked(subtab_nb)) - return intro+line # #

Compétences Intellectuelles

@@ -54,65 +138,34 @@ def gen_subtab(name,secname,tab_nb,subtab_nb): # #
-def gen_repeating(name): - pass - -# -# -# -# -# -# -# -# -#
- -#
-def gen_technique(name,tab_name,tab_nb,first_technique): - - if first_technique: - intro="""
""".format(name) - else: - intro="" - pass - if __name__ == '__main__': # filen=sys.argv[1] filen="cyberpnk.txt" def parse(filen): - tab,subtab="","" - tab_nb,subtab_nb=0,0 - first_technique=True + root=Root() + active_tab,active_subtab=None,None + tab_nb,subtab_nb,skill_nb=1,1,1 try: with open(filen) as f: for line in f.readlines(): - if line[0]=="#": # section - first_technique=True - subtab_content=gen_tab(line[1:],tab_nb) - tab=printable(line[1:]) - print(tab,subtab_content) + if line[0]=="@": # Tab + active_tab=Tab(line[1:-1],tab_nb) + root.addchild(active_tab) tab_nb+=1 - elif line[0]=="@": - # first_technique=True - subtab_content=gen_subtab(line[1:],tab,tab_nb,subtab_nb) - subtab=printable(line[1:]) - print(subtab,subtab_content) - elif line[0]==":": - tech_content=gen_technique(line[1:],tab,tab_nb,first_technique) - # tech=printable() + subtab_nb=1 + elif line[0]=="+": + active_subtab=SubTab(line[1:-1],subtab_nb) + active_tab.addchild(active_subtab) + subtab_nb+=1 + skill_nb=1 + elif line[0]=="-": + tech_content=Skill(line[1:-1],skill_nb) + active_subtab.addchild(tech_content) + skill_nb+=1 except FileNotFoundError: print(filen,"was not found") - - parse(filen) + return root + root=parse(filen) + print(root.content()) From 97bbea1befa5244212c8d6e65e5d20f804bfffef Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 23 Jan 2020 21:38:45 +0100 Subject: [PATCH 45/62] Starting to implement gen --- cyberpnk.txt | 139 ++++- gen.html | 1680 ++++++++++++++++++++++++++++++++++++++++++++++++++ gencss.css | 21 + generator.py | 101 +-- light.txt | 3 + 5 files changed, 1890 insertions(+), 54 deletions(-) create mode 100644 gen.html create mode 100644 gencss.css create mode 100644 light.txt diff --git a/cyberpnk.txt b/cyberpnk.txt index 376c058..a22a1f9 100644 --- a/cyberpnk.txt +++ b/cyberpnk.txt @@ -1,13 +1,126 @@ -@ Compétences -+ Sub section -- Competence 1 -- Competence 2 -. Repeating 1 -+ Sub section 2 -+ Sub section 3 -+ Sub section 4 -@ Magie -+ Subsection 2 -@ Combat -+ Subsection 2 -- Competence2 +@ Physique ++ Compétences de combat +- : Armes à feu +- : Armes d'assaut +- : Armes de poing +- Armes Lourdes +- : Projectiles autopropulsés +- : Armement laser +- Artillerie + : Guidage de missiles + : Systemes de défences + : Balistique superlative +- Combat à Mains Nues + : Neo Kwon Do + : Zero-G +- Combat Armé + : Armes Contandantes + : Armes Tranchantes +- Maniement des Explosifs + ++ Compétences physiques +- Athlétisme +- : Aerien +- : Terrestre +- : Maritime +- : Zero G +- Survie +- : Environnement Sauvage +- : Environnement Urbain +- : Environnement Spacial + ++ Utilisation d’implants +- Utilisation de Cyberware +- : Utilisation de Neuro Accelerateurs +- : Utilisation d'Interfaces de tir +- : Overdrive Physique + ++ Compétences de Pilotage +- Pilotage athmosphérique +- : Pilotage de Chasseurs +- : Pilotage de Navettes +- Vehicules Terestres +- : Vehicules Legers +- : Vehicules Lourds +- : Véhicules de Course +- Vaisseaux Spatiaux +- : Batiments légers +- : Batiments lourds +- : Batiments super lourds + +@ Intelectuelles + ++ Compétences Techniques +- Biotech +- : Chirurgie d’implants +- Electronique +- : Interconnection des systèmes +- : Verrous magnétiques +- Informatique +- : Hardware +- : Software +- : Systèmes embarqués +- Mecanique +- : Réacteurs à Fusion +- : Réacteurs à Fission +- : Compensateurs d'Inertie +- : Technologie Lightfold +- : Systèmes de Survie +- : Systemes de Propultion +- Prospection stellaire +- : Corps stellaires +- : Excavation planetaire + ++ Connaissances +- Bioware +- : Implants Céphaliens +- : Implants Corporels +- Médecine +- : Soins Intensifs +- : Cybernetisation +- Sciences +- : Astromathématiques +- : Biologie +- : Xenobiologie +- : Mathématiques +- : Physique/Chimie +- : Lightfold +- : Sociologie + ++ Culture Générale +- Instruction Civique +- : Administratif/Politique/Droit +- : Finances +- : Psychologie +- Théorie Militaire +- : Tactique +- : Stratégie + +@ Social ++ Compétences Sociales +- Etiquette +- : Alpha Centauri +- : Eridani +- : Banard +- : Tau +- : Sirius +- : C.I.C. +- : Sol +- : Pègre +- Interrogation +- : Intimidation +- Commandement +- Négociation +- Baratin + ++ Competences Clandestines +- Discretion +- Crochetage +- Informations +- Larcin +- Marchés noirs +- : Acquisition d’Objets +- : Acquisition d’Informations + ++ Contacts et Réputations +. Contacts diff --git a/gen.html b/gen.html new file mode 100644 index 0000000..94c664b --- /dev/null +++ b/gen.html @@ -0,0 +1,1680 @@ + + + +
+
+ + + + +
+
+ +

Compétences de combat

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Compétences physiques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Utilisation d’implants

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Compétences de Pilotage

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+
+
+ + + +
+
+ +

Compétences Techniques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Connaissances

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Culture Générale

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+
+
+ + + +
+
+ +

Compétences Sociales

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Competences Clandestines

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Contacts et Réputations

+
+
diff --git a/gencss.css b/gencss.css new file mode 100644 index 0000000..5d67c3a --- /dev/null +++ b/gencss.css @@ -0,0 +1,21 @@ +div.sheet-tab-content { display: none; } +input.sheet-tab1:checked ~ div.sheet-tab1, +input.sheet-tab2:checked ~ div.sheet-tab2, +input.sheet-tab3:checked ~ div.sheet-tab3 +{display: block;} + +input.sheet-physique1:checked ~ div.sheet-physique1, +input.sheet-physique2:checked ~ div.sheet-physique2, +input.sheet-physique3:checked ~ div.sheet-physique3, +input.sheet-physique4:checked ~ div.sheet-physique4 +{display: block;} + +input.sheet-intelectuelles1:checked ~ div.sheet-intelectuelles1, +input.sheet-intelectuelles2:checked ~ div.sheet-intelectuelles2, +input.sheet-intelectuelles3:checked ~ div.sheet-intelectuelles3 +{display: block;} + +input.sheet-social1:checked ~ div.sheet-social1, +input.sheet-social2:checked ~ div.sheet-social2, +input.sheet-social3:checked ~ div.sheet-social3 +{display: block;} diff --git a/generator.py b/generator.py index 4a2db07..fdfffdb 100644 --- a/generator.py +++ b/generator.py @@ -1,19 +1,24 @@ -#ENCODING UTF-8 +# -*- coding: utf-8 -*- + # content skills sections and others from a file, on the long run, it should be able to content the whole sheet import argparse, sys, os +from unidecode import unidecode +# import unicode +def remove_non_ascii(text): + return unidecode(text) class Node(object): """Generic Node.""" def __init__(self, name,nb): - self.name = name.strip(" ") + self.name = name#name.strip(" ") self.number=nb self.children=[] self.checked="" self.parent=None - self.pname=name.replace(" ","").lower() + self.pname=u""+remove_non_ascii(self.name.replace(" ","")).lower() if nb==1: self.checked='checked="checked"' @@ -28,9 +33,7 @@ def css(self): def addchild(self,child): self.children+=[child] - - # def printable(self,name): - # return + child.parent=self class Root(Node): """docstring for Root.""" @@ -52,11 +55,13 @@ def content(self): def css(self): "Return the whole css, printable" - ret="""div.sheet-tab-content { display: none; }""" + ret="div.sheet-tab-content { display: none; }" for child in self.children: - ret+="input.sheet-tab{}:checked ~ div.sheet-tab{},\n".format(child.number) + ret+="\ninput.sheet-tab{node.number}:checked ~ div.sheet-tab{node.number},".format(node=child) ret=ret[:-1] - ret+="{display: block;}" + ret+="\n{display: block;}\n" + for child in self.children: + ret+=child.css() return ret class Tab(Node): @@ -76,47 +81,56 @@ def content(self): for child in self.children: ret+=child.content() return ret - + def css(self): + ret=" " + for child in self.children: + ret+="\ninput.sheet-{node.pname}{child.number}:checked ~ div.sheet-{node.pname}{child.number},".format(child=child,node=self) + ret=ret[:-1] + ret+="\n{display: block;}\n" + return ret class SubTab(Node): def __init__(self,name,nb): super(SubTab,self).__init__(name,nb) def header(self): - return """ \n""".format(self=self) + return """ \n""".format(self=self) def content(self): - ret= '
\n'.format(self=self) + ret= '
\n'.format(self=self) ret+=" \n

{self.name}

\n".format(self=self) for child in self.children: ret+=child.content() ret+="
\n" return ret + def css(self): + return "" class Skill(Node): """Print a skill.""" def __init__(self, name,nb): super(Skill, self).__init__(name,nb) - def content(self): + def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause a confict, legacy keeping I guess ? ret=""" - + - - + - -
""".format(self=self) - + +
\n""".format(self=self) + return ret +# # #

Compétences Intellectuelles

#
@@ -124,31 +138,33 @@ def content(self): # # # - # + # #
#
if __name__ == '__main__': # filen=sys.argv[1] + # filen="light.txt" filen="cyberpnk.txt" - + output="gen.html" + outcss="gencss.css" def parse(filen): root=Root() active_tab,active_subtab=None,None tab_nb,subtab_nb,skill_nb=1,1,1 try: - with open(filen) as f: + with open(filen,encoding="utf-8") as f: for line in f.readlines(): if line[0]=="@": # Tab active_tab=Tab(line[1:-1],tab_nb) @@ -168,4 +184,7 @@ def parse(filen): print(filen,"was not found") return root root=parse(filen) - print(root.content()) + with open(output,"w",encoding="utf-8") as f: + f.write(root.content()) + with open(outcss,"w",encoding="utf-8") as f: + f.write(root.css()) diff --git a/light.txt b/light.txt new file mode 100644 index 0000000..9c069a3 --- /dev/null +++ b/light.txt @@ -0,0 +1,3 @@ +@ Physique ++ Compétences de combat +- : Armes à feu From 9f298f8298052293443eedb2b4e3a9e8bce59b83 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 23 Jan 2020 21:40:15 +0100 Subject: [PATCH 46/62] Movearound --- Skills.txt => helpers/Skills.txt | 0 Todo and utils.txt => helpers/Todo and utils.txt | 0 cyberpnk.txt => helpers/cyberpnk.txt | 0 gen.html => helpers/gen.html | 0 gencss.css => helpers/gencss.css | 0 generator.py => helpers/generator.py | 0 light.txt => helpers/light.txt | 0 skill_generator.py => helpers/skill_generator.py | 0 tesidy.html => helpers/tesidy.html | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename Skills.txt => helpers/Skills.txt (100%) rename Todo and utils.txt => helpers/Todo and utils.txt (100%) rename cyberpnk.txt => helpers/cyberpnk.txt (100%) rename gen.html => helpers/gen.html (100%) rename gencss.css => helpers/gencss.css (100%) rename generator.py => helpers/generator.py (100%) rename light.txt => helpers/light.txt (100%) rename skill_generator.py => helpers/skill_generator.py (100%) mode change 100755 => 100644 rename tesidy.html => helpers/tesidy.html (100%) diff --git a/Skills.txt b/helpers/Skills.txt similarity index 100% rename from Skills.txt rename to helpers/Skills.txt diff --git a/Todo and utils.txt b/helpers/Todo and utils.txt similarity index 100% rename from Todo and utils.txt rename to helpers/Todo and utils.txt diff --git a/cyberpnk.txt b/helpers/cyberpnk.txt similarity index 100% rename from cyberpnk.txt rename to helpers/cyberpnk.txt diff --git a/gen.html b/helpers/gen.html similarity index 100% rename from gen.html rename to helpers/gen.html diff --git a/gencss.css b/helpers/gencss.css similarity index 100% rename from gencss.css rename to helpers/gencss.css diff --git a/generator.py b/helpers/generator.py similarity index 100% rename from generator.py rename to helpers/generator.py diff --git a/light.txt b/helpers/light.txt similarity index 100% rename from light.txt rename to helpers/light.txt diff --git a/skill_generator.py b/helpers/skill_generator.py old mode 100755 new mode 100644 similarity index 100% rename from skill_generator.py rename to helpers/skill_generator.py diff --git a/tesidy.html b/helpers/tesidy.html similarity index 100% rename from tesidy.html rename to helpers/tesidy.html From 2840646473c8cbbfca69dac0251ac13a0ea65c72 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Fri, 24 Jan 2020 00:34:32 +0100 Subject: [PATCH 47/62] Fixed the gen At last --- feuille_sysd10.html | 2170 +++++++++++++++++++++++++++++++----------- helpers/base.py | 604 ++++++++++++ helpers/cyberpnk.txt | 161 ++-- helpers/gen.html | 1320 +++++++++++++++---------- helpers/gencss.css | 290 +++++- helpers/generator.py | 83 +- helpers/light.txt | 6 +- style.css | 31 +- 8 files changed, 3495 insertions(+), 1170 deletions(-) create mode 100644 helpers/base.py diff --git a/feuille_sysd10.html b/feuille_sysd10.html index cdbf90c..67522a8 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -161,7 +161,7 @@
-
+

@@ -294,183 +294,1320 @@

 


- - - - + + + +
-
- - - - -
- -

Compétences générales

-
- - - - - -
-
- -
- -

Compétences sociales

-
- - - - - -
-
- -
- -

Compétences Intellectuelles

-
- - - - - -
-
- + + + + +
+ +

Combat

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Physiques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Implants

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Pilotage

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Techniques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
-
- - -
-
- - -
-

Compétences magiques

-
- - - - - -
-
- +
+ +

Connaissances

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Culture Générale

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
- - +
- - - - - - -
- - - - - + - + - - - > - ∀ -
- - - - - - - -
- - - - - -
- - - - - -
- - - - - - - - -
- - - - + +
+ +

Sociales

+ + + + + - -
- -
- - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + + + - -
-
- - -
- - - + - - - > - ∀ -
- - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + + + - -
-
- - -
. - - ∘ - ∀ - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - -
- - - - + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + - -
+ +
- -
- - -
- - -
- - -
- - +
+ +

Clandestines

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
- -
+ +
@@ -927,7 +2014,6 @@

Compétences magiques

{{#rollWasFumble() result}} {{result}}-{{base}} {{/rollWasFumble() result}} - - +
diff --git a/helpers/base.py b/helpers/base.py new file mode 100644 index 0000000..e164924 --- /dev/null +++ b/helpers/base.py @@ -0,0 +1,604 @@ +head=""" + + +""" +script=""" +""" +header=""" +
+
+ +
+ +
+
+
+
+

Ressources

+ + + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

Dégats aggravés

+
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
+
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
+
+
+""" + +footer=""" +
+ + + + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} + {{#rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/rollWasFumble() result}} + {{#^rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/^rollWasFumble() result}} + {{/^rollWasCrit() result}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
+
+ + + + +
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} + {{#rollWasCrit() result}} + +{{base}} + {{/rollWasCrit() result}} + {{#rollWasFumble() result}} + {{result}}-{{base}} + {{/rollWasFumble() result}} +
+
+""" +css_footer="""input.sheet-tab{ + -moz-appearance: none; + width:150px; + height: 20px; + top: 5px; + left: 6px; + margin: 5px; + cursor: pointer; + z-index: 1; + content: attr(title); +} +input.sheet-tab::before{ + -moz-appearance: none; + content: attr(title); + border-radius:.5em; + border:2px solid black; + text-align: center; + display: inline-block; + background: black; + color:white; + width: 150px; + height: 20px; + font-size: 18px; +} +input.sheet-tab:checked::before{ + -moz-appearance: none; + background:#CCCCCC; + color:black; + border-radius:.5em; + border:2px solid black; +} + +input.sheet-small_tab{ + -moz-appearance: none; + width:120px; + height: 20px; + cursor: pointer; + z-index: 1; + margin:5px; +} +input.sheet-small_tab::before{ + -moz-appearance: none; + content: attr(title); + border-radius:.5em; + text-align: center; + display: inline-block; + color:white; + background:black; + border:2px solid black; + width: 120px; + height:20px; + font-size: 14px; +} +input.sheet-small_tab:checked::before{ + -moz-appearance: none; + border:2px solid black; + background:#CCCCCC; + color:black; + border-radius:.5em; +} + +input.sheet-skill_name{ + -moz-appearance: none; + width:400px; +} +input.sheet-skill_hidden{ + visibility: hidden; +} +div.sheet-tab-content{ + border-top-color: #000; + margin: 2px 0 0 0; +} +select.sheet-skill_select{ + width:55px; + margin-bottom:-1px; +} +select.sheet-dice_select{ + width:85px; + margin-bottom:-1px; +} +.sheet-trait{ + width: 30px; +} +.sheet-numberbox { + width: 50px; +} + +.sheet-rolltemplate-d10init table, +.sheet-rolltemplate-d10skillcheck table { + border-radius: 6px; + width:100%; + padding:0px; + margin:0px; + padding: 2px; + border: 1px solid; + background-color: #ffffff; + border-width: 1px; + border-style: solid; + border-color: #000; + border-image-source: none; +} +.sheet-rolltemplate-d10init .sheet-roll-title, +.sheet-rolltemplate-d10init th, +.sheet-rolltemplate-d10skillcheck .sheet-roll-title, +.sheet-rolltemplate-d10skillcheck th { + color: rgb(42, 42, 42); + padding:0px; + margin:0px; + padding-left: 5px; + font-size: 1.2em; + text-align: left; + font-family: "Times New Roman", Times, serif; + font-variant: small-caps; + text-transform: capitalize; + border-width: 0px; +} +.sheet-rolltemplate-d10init .sheet-roll-attr, +.sheet-rolltemplate-d10skillcheck .sheet-roll-attr{ + color: #555555; + font-size: 1em; + font-style: italic; + padding:0px; + margin:0px; + padding-left: 9px; + border-width: 0px; + margin-top: -10px; +} +.sheet-rolltemplate-d10init .sheet-roll-sucess, +.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , +.sheet-rolltemplate-d10skillcheck .sheet-roll-fail { + padding:0px; + margin:0px; + border-width: 0px; + padding-left: 5px; +} +.sheet-rolltemplate-d10skillcheck .sheet-roll-crit { + padding:0px; + margin:0px; + border-width: 0px; + padding-left: 5px; + background-color:#b0d6ad; +} +.sheet-rolltemplate-d10skillcheck .sheet-roll-fumble { + padding-left: 5px; + border-width: 0px; + background-color:#d6adad; +} +.sheet-rolltemplate-d10init .sheet-inline, +.sheet-rolltemplate-d10init .inlinerollresult, +.sheet-rolltemplate-d10skillcheck .sheet-inline, +.sheet-rolltemplate-d10skillcheck .inlinerollresult { + background-color: transparent; + border: none; + font-weight: bold; + padding:0px; + font-family: "Times New Roman", Times, serif; +} +.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullcrit, +.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit { + color: #3FB315; + border: none; +} +.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail, +.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { + color: #B31515; + border: none; +} +.sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll { + color: #4A57ED; + border: none; +} + +.sheet-rolltemplate-d10fight-blob{ + border-radius: 6px; + border: 1px solid #898989; + z-index: 1; +} +.sheet-rolltemplate-d10fight table{ + padding:0px; + margin:0px; + text-align: left; + width:100%; + border:none; + cellpadding:3px; + cellspacing:0px; +} +.sheet-rolltemplate-d10fight .sheet-sum{ + padding:0px; + margin:0px; + border:none; + text-align: right; + padding-right:10px; +} +.sheet-rolltemplate-d10fight .sheet-sucess, +.sheet-rolltemplate-d10fight .sheet-line{ + padding:0px; + margin:0px; + padding-left: 3px; + border:none; +} +.sheet-rolltemplate-d10fight .sheet-critical{ + padding:0px; + margin:0px; + border:none; + padding-left: 3px; + border-radius: 4px; + background-color:#b0d6ad; +} +.sheet-rolltemplate-d10fight .sheet-hit{ + padding:0px; + margin:0px; + padding-left: 3px; + border-radius: 4px; + background-color:#b0d6ad; + border:none; +} +.sheet-rolltemplate-d10fight .sheet-miss{ + padding:0px; + margin:0px; + padding-left: 3px; + border:none; + border-radius: 4px; + background-color:#d6adad; +} +.sheet-rolltemplate-d10fight .sheet-name{ + padding:0px; + padding-left: 3px; + margin:0px; + border:none; + border-radius: 4px; + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + background-color: #999999; +} +.sheet-rolltemplate-d10fight .sheet-additional{ + padding:0px; + margin:0px; + border:none; + padding-left:10px; +} +.sheet-rolltemplate-d10fight-grey{ + color: #999999; +} +.sheet-rolltemplate-d10fight-green{ + color: #009900; +} +.sheet-rolltemplate-d10fight a, +.sheet-rolltemplate-d10fight a[href^="!"], +.sheet-rolltemplate-d10fight a[href^="~"]{ + text-align:right; + background-color: #999999; !important +} +""" diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index a22a1f9..37ca4ec 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -1,126 +1,125 @@ @ Physique -+ Compétences de combat -- : Armes à feu -- : Armes d'assaut -- : Armes de poing ++ Combat +- Armes à feu +- ⇥ Armes d'assaut +- ⇥ Armes de poing - Armes Lourdes -- : Projectiles autopropulsés -- : Armement laser +- ⇥ Projectiles autopropulsés +- ⇥ Armement laser - Artillerie - : Guidage de missiles - : Systemes de défences - : Balistique superlative + ⇥ Guidage de missiles + ⇥ Systemes de défences + ⇥ Balistique superlative - Combat à Mains Nues - : Neo Kwon Do - : Zero-G + ⇥ Neo Kwon Do + ⇥ Zero-G - Combat Armé - : Armes Contandantes - : Armes Tranchantes + ⇥ Armes Contandantes + ⇥ Armes Tranchantes - Maniement des Explosifs -+ Compétences physiques ++ Physiques - Athlétisme -- : Aerien -- : Terrestre -- : Maritime -- : Zero G +- ⇥ Aerien +- ⇥ Terrestre +- ⇥ Maritime +- ⇥ Zero G - Survie -- : Environnement Sauvage -- : Environnement Urbain -- : Environnement Spacial +- ⇥ Environnement Sauvage +- ⇥ Environnement Urbain +- ⇥ Environnement Spacial -+ Utilisation d’implants ++ Implants - Utilisation de Cyberware -- : Utilisation de Neuro Accelerateurs -- : Utilisation d'Interfaces de tir -- : Overdrive Physique +- ⇥ Utilisation de Neuro Accelerateurs +- ⇥ Utilisation d'Interfaces de tir +- ⇥ Overdrive Physique -+ Compétences de Pilotage ++ Pilotage - Pilotage athmosphérique -- : Pilotage de Chasseurs -- : Pilotage de Navettes +- ⇥ Pilotage de Chasseurs +- ⇥ Pilotage de Navettes - Vehicules Terestres -- : Vehicules Legers -- : Vehicules Lourds -- : Véhicules de Course +- ⇥ Vehicules Legers +- ⇥ Vehicules Lourds +- ⇥ Véhicules de Course - Vaisseaux Spatiaux -- : Batiments légers -- : Batiments lourds -- : Batiments super lourds +- ⇥ Batiments légers +- ⇥ Batiments lourds +- ⇥ Batiments super lourds @ Intelectuelles - -+ Compétences Techniques ++ Techniques - Biotech -- : Chirurgie d’implants +- ⇥ Chirurgie d’implants - Electronique -- : Interconnection des systèmes -- : Verrous magnétiques +- ⇥ Interconnection des systèmes +- ⇥ Verrous magnétiques - Informatique -- : Hardware -- : Software -- : Systèmes embarqués -- Mecanique -- : Réacteurs à Fusion -- : Réacteurs à Fission -- : Compensateurs d'Inertie -- : Technologie Lightfold -- : Systèmes de Survie -- : Systemes de Propultion +- ⇥ Hardware +- ⇥ Software +- ⇥ Systèmes embarqués +- Mécanique +- ⇥ Réacteurs à Fusion +- ⇥ Réacteurs à Fission +- ⇥ Compensateurs d'Inertie +- ⇥ Technologie Lightfold +- ⇥ Systèmes de Survie +- ⇥ Systemes de Propultion - Prospection stellaire -- : Corps stellaires -- : Excavation planetaire +- ⇥ Corps stellaires +- ⇥ Excavation planetaire + Connaissances - Bioware -- : Implants Céphaliens -- : Implants Corporels +- ⇥ Implants Céphaliens +- ⇥ Implants Corporels - Médecine -- : Soins Intensifs -- : Cybernetisation +- ⇥ Soins Intensifs +- ⇥ Cybernetisation - Sciences -- : Astromathématiques -- : Biologie -- : Xenobiologie -- : Mathématiques -- : Physique/Chimie -- : Lightfold -- : Sociologie +- ⇥ Astromathématiques +- ⇥ Biologie +- ⇥ Xenobiologie +- ⇥ Mathématiques +- ⇥ Physique/Chimie +- ⇥ Lightfold +- ⇥ Sociologie + Culture Générale - Instruction Civique -- : Administratif/Politique/Droit -- : Finances -- : Psychologie +- ⇥ Administratif/Politique/Droit +- ⇥ Finances +- ⇥ Psychologie - Théorie Militaire -- : Tactique -- : Stratégie +- ⇥ Tactique +- ⇥ Stratégie @ Social -+ Compétences Sociales ++ Sociales - Etiquette -- : Alpha Centauri -- : Eridani -- : Banard -- : Tau -- : Sirius -- : C.I.C. -- : Sol -- : Pègre +- ⇥ Alpha Centauri +- ⇥ Eridani +- ⇥ Banard +- ⇥ Tau +- ⇥ Sirius +- ⇥ C.I.C. +- ⇥ Sol +- ⇥ Pègre - Interrogation -- : Intimidation +- ⇥ Intimidation - Commandement - Négociation - Baratin -+ Competences Clandestines ++ Clandestines - Discretion - Crochetage - Informations - Larcin - Marchés noirs -- : Acquisition d’Objets -- : Acquisition d’Informations +- ⇥ Acquisition d’Objets +- ⇥ Acquisition d’Informations -+ Contacts et Réputations ++ Contacts . Contacts diff --git a/helpers/gen.html b/helpers/gen.html index 94c664b..ee03a6e 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -1,21 +1,316 @@ + + + + + +
+
+ +
+ +
+
+
+
+

Ressources

+ + + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

Dégats aggravés

+
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
+
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
+
+
+
-
- - - - -
-
- -

Compétences de combat

- - + + + + +
+ +

Combat

+ + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- + - - + - +
- + - - + - +
- + - - + - +
-
- -

Compétences physiques

+
+ +

Physiques

- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
-
- -

Utilisation d’implants

+
+ +

Implants

- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
-
- -

Compétences de Pilotage

+
+ +

Pilotage

- + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
+
-
- - - -
-
- -

Compétences Techniques

+ + + +
+ +

Techniques

- + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
-
+

Connaissances

@@ -956,11 +1250,11 @@

Connaissances


- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
@@ -1058,11 +1352,11 @@

Connaissances


- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
-
+

Culture Générale

- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
+
-
- - - -
-
- -

Compétences Sociales

+ + + +
+ +

Sociales

- + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- - + + - - + - +
- + - - + - +
- - + + - - + - +
- + - - + - +
- + - - + - +
- + - - + - +
-
- -

Competences Clandestines

+
+ +

Clandestines

- + - - + - +
- + - - + - +
- + - - + - +
- + - - + - +
- + - - + - +
- - + + - - + - +
- - + + - - + - +
-
- -

Contacts et Réputations

+
+ +

Contacts

+ +
+ + + + + +
+
+ +
+ + + + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} + {{#rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/rollWasFumble() result}} + {{#^rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/^rollWasFumble() result}} + {{/^rollWasCrit() result}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
+
+ + + + +
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} + {{#rollWasCrit() result}} + +{{base}} + {{/rollWasCrit() result}} + {{#rollWasFumble() result}} + {{result}}-{{base}} + {{/rollWasFumble() result}} +
+
diff --git a/helpers/gencss.css b/helpers/gencss.css index 5d67c3a..a3d3b99 100644 --- a/helpers/gencss.css +++ b/helpers/gencss.css @@ -2,20 +2,276 @@ div.sheet-tab-content { display: none; } input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, input.sheet-tab3:checked ~ div.sheet-tab3 -{display: block;} - -input.sheet-physique1:checked ~ div.sheet-physique1, -input.sheet-physique2:checked ~ div.sheet-physique2, -input.sheet-physique3:checked ~ div.sheet-physique3, -input.sheet-physique4:checked ~ div.sheet-physique4 -{display: block;} - -input.sheet-intelectuelles1:checked ~ div.sheet-intelectuelles1, -input.sheet-intelectuelles2:checked ~ div.sheet-intelectuelles2, -input.sheet-intelectuelles3:checked ~ div.sheet-intelectuelles3 -{display: block;} - -input.sheet-social1:checked ~ div.sheet-social1, -input.sheet-social2:checked ~ div.sheet-social2, -input.sheet-social3:checked ~ div.sheet-social3 -{display: block;} +{ + display: block; +} +input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1, +input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2, +input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3, +input.sheet-secondary_physique_tab4:checked ~ div.sheet-secondary_physique_tab4 +{ + display: block; +} +input.sheet-secondary_intelectuelles_tab1:checked ~ div.sheet-secondary_intelectuelles_tab1, +input.sheet-secondary_intelectuelles_tab2:checked ~ div.sheet-secondary_intelectuelles_tab2, +input.sheet-secondary_intelectuelles_tab3:checked ~ div.sheet-secondary_intelectuelles_tab3 +{ + display: block; +} +input.sheet-secondary_social_tab1:checked ~ div.sheet-secondary_social_tab1, +input.sheet-secondary_social_tab2:checked ~ div.sheet-secondary_social_tab2, +input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3 +{ + display: block; +}input.sheet-tab{ + -moz-appearance: none; + width:150px; + height: 20px; + top: 5px; + left: 6px; + margin: 5px; + cursor: pointer; + z-index: 1; + content: attr(title); +} +input.sheet-tab::before{ + -moz-appearance: none; + content: attr(title); + border-radius:.5em; + border:2px solid black; + text-align: center; + display: inline-block; + background: black; + color:white; + width: 150px; + height: 20px; + font-size: 18px; +} +input.sheet-tab:checked::before{ + -moz-appearance: none; + background:#CCCCCC; + color:black; + border-radius:.5em; + border:2px solid black; +} + +input.sheet-small_tab{ + -moz-appearance: none; + width:120px; + height: 20px; + cursor: pointer; + z-index: 1; + margin:5px; +} +input.sheet-small_tab::before{ + -moz-appearance: none; + content: attr(title); + border-radius:.5em; + text-align: center; + display: inline-block; + color:white; + background:black; + border:2px solid black; + width: 120px; + height:20px; + font-size: 14px; +} +input.sheet-small_tab:checked::before{ + -moz-appearance: none; + border:2px solid black; + background:#CCCCCC; + color:black; + border-radius:.5em; +} + +input.sheet-skill_name{ + -moz-appearance: none; + width:400px; +} +input.sheet-skill_hidden{ + visibility: hidden; +} +div.sheet-tab-content{ + border-top-color: #000; + margin: 2px 0 0 0; +} +select.sheet-skill_select{ + width:55px; + margin-bottom:-1px; +} +select.sheet-dice_select{ + width:85px; + margin-bottom:-1px; +} +.sheet-trait{ + width: 30px; +} +.sheet-numberbox { + width: 50px; +} + +.sheet-rolltemplate-d10init table, +.sheet-rolltemplate-d10skillcheck table { + border-radius: 6px; + width:100%; + padding:0px; + margin:0px; + padding: 2px; + border: 1px solid; + background-color: #ffffff; + border-width: 1px; + border-style: solid; + border-color: #000; + border-image-source: none; +} +.sheet-rolltemplate-d10init .sheet-roll-title, +.sheet-rolltemplate-d10init th, +.sheet-rolltemplate-d10skillcheck .sheet-roll-title, +.sheet-rolltemplate-d10skillcheck th { + color: rgb(42, 42, 42); + padding:0px; + margin:0px; + padding-left: 5px; + font-size: 1.2em; + text-align: left; + font-family: "Times New Roman", Times, serif; + font-variant: small-caps; + text-transform: capitalize; + border-width: 0px; +} +.sheet-rolltemplate-d10init .sheet-roll-attr, +.sheet-rolltemplate-d10skillcheck .sheet-roll-attr{ + color: #555555; + font-size: 1em; + font-style: italic; + padding:0px; + margin:0px; + padding-left: 9px; + border-width: 0px; + margin-top: -10px; +} +.sheet-rolltemplate-d10init .sheet-roll-sucess, +.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , +.sheet-rolltemplate-d10skillcheck .sheet-roll-fail { + padding:0px; + margin:0px; + border-width: 0px; + padding-left: 5px; +} +.sheet-rolltemplate-d10skillcheck .sheet-roll-crit { + padding:0px; + margin:0px; + border-width: 0px; + padding-left: 5px; + background-color:#b0d6ad; +} +.sheet-rolltemplate-d10skillcheck .sheet-roll-fumble { + padding-left: 5px; + border-width: 0px; + background-color:#d6adad; +} +.sheet-rolltemplate-d10init .sheet-inline, +.sheet-rolltemplate-d10init .inlinerollresult, +.sheet-rolltemplate-d10skillcheck .sheet-inline, +.sheet-rolltemplate-d10skillcheck .inlinerollresult { + background-color: transparent; + border: none; + font-weight: bold; + padding:0px; + font-family: "Times New Roman", Times, serif; +} +.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullcrit, +.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit { + color: #3FB315; + border: none; +} +.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail, +.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { + color: #B31515; + border: none; +} +.sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll { + color: #4A57ED; + border: none; +} + +.sheet-rolltemplate-d10fight-blob{ + border-radius: 6px; + border: 1px solid #898989; + z-index: 1; +} +.sheet-rolltemplate-d10fight table{ + padding:0px; + margin:0px; + text-align: left; + width:100%; + border:none; + cellpadding:3px; + cellspacing:0px; +} +.sheet-rolltemplate-d10fight .sheet-sum{ + padding:0px; + margin:0px; + border:none; + text-align: right; + padding-right:10px; +} +.sheet-rolltemplate-d10fight .sheet-sucess, +.sheet-rolltemplate-d10fight .sheet-line{ + padding:0px; + margin:0px; + padding-left: 3px; + border:none; +} +.sheet-rolltemplate-d10fight .sheet-critical{ + padding:0px; + margin:0px; + border:none; + padding-left: 3px; + border-radius: 4px; + background-color:#b0d6ad; +} +.sheet-rolltemplate-d10fight .sheet-hit{ + padding:0px; + margin:0px; + padding-left: 3px; + border-radius: 4px; + background-color:#b0d6ad; + border:none; +} +.sheet-rolltemplate-d10fight .sheet-miss{ + padding:0px; + margin:0px; + padding-left: 3px; + border:none; + border-radius: 4px; + background-color:#d6adad; +} +.sheet-rolltemplate-d10fight .sheet-name{ + padding:0px; + padding-left: 3px; + margin:0px; + border:none; + border-radius: 4px; + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + background-color: #999999; +} +.sheet-rolltemplate-d10fight .sheet-additional{ + padding:0px; + margin:0px; + border:none; + padding-left:10px; +} +.sheet-rolltemplate-d10fight-grey{ + color: #999999; +} +.sheet-rolltemplate-d10fight-green{ + color: #009900; +} +.sheet-rolltemplate-d10fight a, +.sheet-rolltemplate-d10fight a[href^="!"], +.sheet-rolltemplate-d10fight a[href^="~"]{ + text-align:right; + background-color: #999999; !important +} diff --git a/helpers/generator.py b/helpers/generator.py index fdfffdb..e290ac2 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -4,11 +4,13 @@ # content skills sections and others from a file, on the long run, it should be able to content the whole sheet import argparse, sys, os -from unidecode import unidecode +import string +# from unidecode import unidecode # import unicode def remove_non_ascii(text): - return unidecode(text) + return "".join([c for c in text if c in string.ascii_letters]).strip(" ") + # return unidecode(text) class Node(object): """Generic Node.""" @@ -59,14 +61,13 @@ def css(self): for child in self.children: ret+="\ninput.sheet-tab{node.number}:checked ~ div.sheet-tab{node.number},".format(node=child) ret=ret[:-1] - ret+="\n{display: block;}\n" + ret+="\n{\n display: block;\n}" for child in self.children: ret+=child.css() return ret class Tab(Node): """Tab node, contains""" - def __init__(self, name,nb): super(Tab, self).__init__(name,nb) @@ -74,29 +75,30 @@ def header(self): # Comes first return '\n'.format(self=self) def content(self): - ret='
\n
\n'.format(self=self) # And add all content + ret='\n
\n'.format(self=self) # And add all content for child in self.children: ret+=child.header() - ret+="
\n" for child in self.children: ret+=child.content() return ret + def css(self): ret=" " for child in self.children: - ret+="\ninput.sheet-{node.pname}{child.number}:checked ~ div.sheet-{node.pname}{child.number},".format(child=child,node=self) + ret+="\ninput.sheet-secondary_{node.pname}_tab{child.number}:checked ~ div.sheet-secondary_{node.pname}_tab{child.number},".format(child=child,node=self) ret=ret[:-1] - ret+="\n{display: block;}\n" + ret+="\n{\n display: block;\n}" return ret + class SubTab(Node): def __init__(self,name,nb): super(SubTab,self).__init__(name,nb) def header(self): - return """ \n""".format(self=self) + return """ \n""".format(self=self) def content(self): - ret= '
\n'.format(self=self) + ret= '
\n'.format(self=self) ret+=" \n

{self.name}

\n".format(self=self) for child in self.children: ret+=child.content() @@ -130,28 +132,35 @@ def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause
\n""".format(self=self) return ret -# - # - #

Compétences Intellectuelles

- #
- # - # - # - # - # - #
- #
+class Repeating(Node): + """Repeating section""" + def __init__(self, name,nb): + super(Repeating, self).__init__(name,nb) + + def content(self): + ret=""" +
+ + + + + +
+
\n""".format(node=self) + return ret if __name__ == '__main__': # filen=sys.argv[1] @@ -162,7 +171,7 @@ def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause def parse(filen): root=Root() active_tab,active_subtab=None,None - tab_nb,subtab_nb,skill_nb=1,1,1 + tab_nb,subtab_nb,skill_nb,repeating_nb=1,1,1,1 try: with open(filen,encoding="utf-8") as f: for line in f.readlines(): @@ -180,11 +189,21 @@ def parse(filen): tech_content=Skill(line[1:-1],skill_nb) active_subtab.addchild(tech_content) skill_nb+=1 + elif line[0]==".": + tech_content=Repeating(line[1:-1],repeating_nb) + active_subtab.addchild(tech_content) + repeating_nb+=1 except FileNotFoundError: print(filen,"was not found") return root root=parse(filen) + import base with open(output,"w",encoding="utf-8") as f: + f.write(base.head) + f.write(base.script) + f.write(base.header) f.write(root.content()) + f.write(base.footer) with open(outcss,"w",encoding="utf-8") as f: f.write(root.css()) + f.write(base.css_footer) diff --git a/helpers/light.txt b/helpers/light.txt index 9c069a3..16e7aae 100644 --- a/helpers/light.txt +++ b/helpers/light.txt @@ -1,3 +1,5 @@ @ Physique -+ Compétences de combat -- : Armes à feu ++ Combat +- Armes à feu ++ Soc +- Charisme diff --git a/style.css b/style.css index 79f3e10..98e55df 100644 --- a/style.css +++ b/style.css @@ -3,29 +3,26 @@ input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, input.sheet-tab3:checked ~ div.sheet-tab3 { - display: block; + display: block; } -input.sheet-secondary_tab1:checked ~ div.sheet-secondary_tab1, -input.sheet-secondary_tab2:checked ~ div.sheet-secondary_tab2, -input.sheet-secondary_tab3:checked ~ div.sheet-secondary_tab3, -input.sheet-secondary_tab4:checked ~ div.sheet-secondary_tab4, -input.sheet-secondary_tab5:checked ~ div.sheet-secondary_tab5 +input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1, +input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2, +input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3, +input.sheet-secondary_physique_tab4:checked ~ div.sheet-secondary_physique_tab4 { - display:block; + display: block; } -input.sheet-secondary_magic_tab1:checked ~ div.sheet-secondary_magic_tab1, -input.sheet-secondary_magic_tab2:checked ~ div.sheet-secondary_magic_tab2, -input.sheet-secondary_magic_tab3:checked ~ div.sheet-secondary_magic_tab3, -input.sheet-secondary_magic_tab4:checked ~ div.sheet-secondary_magic_tab4, -input.sheet-secondary_magic_tab5:checked ~ div.sheet-secondary_magic_tab5 +input.sheet-secondary_intelectuelles_tab1:checked ~ div.sheet-secondary_intelectuelles_tab1, +input.sheet-secondary_intelectuelles_tab2:checked ~ div.sheet-secondary_intelectuelles_tab2, +input.sheet-secondary_intelectuelles_tab3:checked ~ div.sheet-secondary_intelectuelles_tab3 { - display:block; + display: block; } -input.sheet-secondary_skills_tab1:checked ~ div.sheet-secondary_skills_tab1, -input.sheet-secondary_skills_tab2:checked ~ div.sheet-secondary_skills_tab2, -input.sheet-secondary_skills_tab3:checked ~ div.sheet-secondary_skills_tab3 +input.sheet-secondary_social_tab1:checked ~ div.sheet-secondary_social_tab1, +input.sheet-secondary_social_tab2:checked ~ div.sheet-secondary_social_tab2, +input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3 { - display:block; + display: block; } input.sheet-tab{ From 8c3fac5cea34fe1a1616fcd1f90b51e04e924223 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Fri, 24 Jan 2020 00:58:13 +0100 Subject: [PATCH 48/62] Couple cosmetic changes --- helpers/cyberpnk.txt | 18 +++--- helpers/gen.html | 127 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 132 insertions(+), 13 deletions(-) diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index 37ca4ec..9e57303 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -2,20 +2,20 @@ + Combat - Armes à feu - ⇥ Armes d'assaut -- ⇥ Armes de poing +- ⇥ Armes de poing - Armes Lourdes -- ⇥ Projectiles autopropulsés +- ⇥ Projectiles autopropulsés - ⇥ Armement laser - Artillerie - ⇥ Guidage de missiles - ⇥ Systemes de défences - ⇥ Balistique superlative +- ⇥ Guidage de missiles +- ⇥ Systemes de défences +- ⇥ Balistique superlative - Combat à Mains Nues - ⇥ Neo Kwon Do - ⇥ Zero-G +- ⇥ Neo Kwon Do +- ⇥ Zero-G - Combat Armé - ⇥ Armes Contandantes - ⇥ Armes Tranchantes +- ⇥ Armes Contandantes +- ⇥ Armes Tranchantes - Maniement des Explosifs + Physiques diff --git a/helpers/gen.html b/helpers/gen.html index ee03a6e..83834aa 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -340,8 +340,8 @@

Combat


- - + +
- - + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
@@ -442,6 +493,40 @@

Combat


+ + + + + + +
+ + + + + + +
@@ -459,6 +544,40 @@

Combat


+ + + + + + +
+ + + + + + +
From 16d43aef123f30eb1767f4071ba107b71304366d Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Fri, 31 Jan 2020 19:16:13 +0100 Subject: [PATCH 49/62] Purged the non-cyberpunk --- feuille_sysd10.html | 3672 +++++++++++++++++++++--------------------- helpers/base.py | 190 +-- helpers/gen.html | 396 ++--- helpers/generator.py | 12 +- 4 files changed, 2007 insertions(+), 2263 deletions(-) diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 67522a8..6b83fa6 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -2,162 +2,29 @@ - +
@@ -171,20 +38,19 @@

Ressources

- - + + + + + + + - - - - - -

Points de Vie

Points de Fatigue

Dégats aggravés

@@ -196,7 +62,7 @@

Ressources

Utilisés - @@ -294,1679 +160,1821 @@

 


- - - - -
- - - - -
- -

Combat

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Physiques

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Implants

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Pilotage

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
+ + + + +
+ + + + +
+ +

Combat

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
- -
- - - -
- -

Techniques

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Connaissances

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Culture Générale

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
+
+ +

Physiques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
- -
- - -
- -

Sociales

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Clandestines

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
+
+ +

Implants

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
- +
+ +

Pilotage

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Techniques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Connaissances

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Culture Générale

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Sociales

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Clandestines

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Contacts

+ +
+ + + + + +
+
+
+
diff --git a/helpers/base.py b/helpers/base.py index e164924..74b2612 100644 --- a/helpers/base.py +++ b/helpers/base.py @@ -3,163 +3,30 @@ """ script=""" """ -header=""" +header="""
@@ -173,20 +40,19 @@ - - + + + + + + + - - - - - -

Points de Vie

Points de Fatigue

Dégats aggravés

@@ -198,7 +64,7 @@ Utilisés - diff --git a/helpers/gen.html b/helpers/gen.html index 83834aa..6b83fa6 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -2,162 +2,29 @@ - +
@@ -171,20 +38,19 @@

Ressources

- - + + + + + + + - - - - - -

Points de Vie

Points de Fatigue

Dégats aggravés

@@ -196,7 +62,7 @@

Ressources

Utilisés - @@ -321,7 +187,7 @@

Combat

- +
@@ -338,7 +204,7 @@

Combat

- +
@@ -355,7 +221,7 @@

Combat

- +
@@ -372,7 +238,7 @@

Combat

- +
@@ -389,7 +255,7 @@

Combat

- +
@@ -406,7 +272,7 @@

Combat

- +
@@ -423,7 +289,7 @@

Combat

- +
@@ -440,7 +306,7 @@

Combat

- +
@@ -457,7 +323,7 @@

Combat

- +
@@ -474,7 +340,7 @@

Combat

- +
@@ -491,7 +357,7 @@

Combat

- +
@@ -508,7 +374,7 @@

Combat

- +
@@ -525,7 +391,7 @@

Combat

- +
@@ -542,7 +408,7 @@

Combat

- +
@@ -559,7 +425,7 @@

Combat

- +
@@ -576,7 +442,7 @@

Combat

- +
@@ -593,7 +459,7 @@

Combat

- +
@@ -614,7 +480,7 @@

Physiques

- +
@@ -631,7 +497,7 @@

Physiques

- +
@@ -648,7 +514,7 @@

Physiques

- +
@@ -665,7 +531,7 @@

Physiques

- +
@@ -682,7 +548,7 @@

Physiques

- +
@@ -699,7 +565,7 @@

Physiques

- +
@@ -716,7 +582,7 @@

Physiques

- +
@@ -733,7 +599,7 @@

Physiques

- +
@@ -750,7 +616,7 @@

Physiques

- +
@@ -771,7 +637,7 @@

Implants

- +
@@ -788,7 +654,7 @@

Implants

- +
@@ -805,7 +671,7 @@

Implants

- +
@@ -822,7 +688,7 @@

Implants

- +
@@ -843,7 +709,7 @@

Pilotage

- +
@@ -860,7 +726,7 @@

Pilotage

- +
@@ -877,7 +743,7 @@

Pilotage

- +
@@ -894,7 +760,7 @@

Pilotage

- +
@@ -911,7 +777,7 @@

Pilotage

- +
@@ -928,7 +794,7 @@

Pilotage

- +
@@ -945,7 +811,7 @@

Pilotage

- +
@@ -962,7 +828,7 @@

Pilotage

- +
@@ -979,7 +845,7 @@

Pilotage

- +
@@ -996,7 +862,7 @@

Pilotage

- +
@@ -1013,7 +879,7 @@

Pilotage

- +
@@ -1040,7 +906,7 @@

Techniques

- +
@@ -1057,7 +923,7 @@

Techniques

- +
@@ -1074,7 +940,7 @@

Techniques

- +
@@ -1091,7 +957,7 @@

Techniques

- +
@@ -1108,7 +974,7 @@

Techniques

- +
@@ -1125,7 +991,7 @@

Techniques

- +
@@ -1142,7 +1008,7 @@

Techniques

- +
@@ -1159,7 +1025,7 @@

Techniques

- +
@@ -1176,7 +1042,7 @@

Techniques

- +
@@ -1193,7 +1059,7 @@

Techniques

- +
@@ -1210,7 +1076,7 @@

Techniques

- +
@@ -1227,7 +1093,7 @@

Techniques

- +
@@ -1244,7 +1110,7 @@

Techniques

- +
@@ -1261,7 +1127,7 @@

Techniques

- +
@@ -1278,7 +1144,7 @@

Techniques

- +
@@ -1295,7 +1161,7 @@

Techniques

- +
@@ -1312,7 +1178,7 @@

Techniques

- +
@@ -1329,7 +1195,7 @@

Techniques

- +
@@ -1346,7 +1212,7 @@

Techniques

- +
@@ -1367,7 +1233,7 @@

Connaissances

- +
@@ -1384,7 +1250,7 @@

Connaissances

- +
@@ -1401,7 +1267,7 @@

Connaissances

- +
@@ -1418,7 +1284,7 @@

Connaissances

- +
@@ -1435,7 +1301,7 @@

Connaissances

- +
@@ -1452,7 +1318,7 @@

Connaissances

- +
@@ -1469,7 +1335,7 @@

Connaissances

- +
@@ -1486,7 +1352,7 @@

Connaissances

- +
@@ -1503,7 +1369,7 @@

Connaissances

- +
@@ -1520,7 +1386,7 @@

Connaissances

- +
@@ -1537,7 +1403,7 @@

Connaissances

- +
@@ -1554,7 +1420,7 @@

Connaissances

- +
@@ -1571,7 +1437,7 @@

Connaissances

- +
@@ -1588,7 +1454,7 @@

Connaissances

- +
@@ -1609,7 +1475,7 @@

Culture Générale

- +
@@ -1626,7 +1492,7 @@

Culture Générale

- +
@@ -1643,7 +1509,7 @@

Culture Générale

- +
@@ -1660,7 +1526,7 @@

Culture Générale

- +
@@ -1677,7 +1543,7 @@

Culture Générale

- +
@@ -1694,7 +1560,7 @@

Culture Générale

- +
@@ -1711,7 +1577,7 @@

Culture Générale

- +
@@ -1738,7 +1604,7 @@

Sociales

- +
@@ -1755,7 +1621,7 @@

Sociales

- +
@@ -1772,7 +1638,7 @@

Sociales

- +
@@ -1789,7 +1655,7 @@

Sociales

- +
@@ -1806,7 +1672,7 @@

Sociales

- +
@@ -1823,7 +1689,7 @@

Sociales

- +
@@ -1840,7 +1706,7 @@

Sociales

- +
@@ -1857,7 +1723,7 @@

Sociales

- +
@@ -1874,7 +1740,7 @@

Sociales

- +
@@ -1891,7 +1757,7 @@

Sociales

- +
@@ -1908,7 +1774,7 @@

Sociales

- +
@@ -1925,7 +1791,7 @@

Sociales

- +
@@ -1942,7 +1808,7 @@

Sociales

- +
@@ -1959,7 +1825,7 @@

Sociales

- +
@@ -1980,7 +1846,7 @@

Clandestines

- +
@@ -1997,7 +1863,7 @@

Clandestines

- +
@@ -2014,7 +1880,7 @@

Clandestines

- +
@@ -2031,7 +1897,7 @@

Clandestines

- +
@@ -2048,7 +1914,7 @@

Clandestines

- +
@@ -2065,7 +1931,7 @@

Clandestines

- +
@@ -2082,7 +1948,7 @@

Clandestines

- +
@@ -2104,7 +1970,7 @@

Contacts

- +
diff --git a/helpers/generator.py b/helpers/generator.py index e290ac2..45894f0 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -128,7 +128,7 @@ def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause - +
\n""".format(self=self) return ret @@ -155,9 +155,13 @@ def content(self): - +
\n""".format(node=self) return ret From d5bd131422e8562881c0185977b427267ce77a84 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sun, 2 Feb 2020 22:14:48 +0100 Subject: [PATCH 50/62] Bit fixup --- helpers/gen.html | 204 +++++++++++++++++++++---------------------- helpers/generator.py | 2 +- 2 files changed, 103 insertions(+), 103 deletions(-) diff --git a/helpers/gen.html b/helpers/gen.html index 6b83fa6..a35f2f3 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -174,7 +174,7 @@

 

Combat

- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + +
- - - - + + + +

Combat

@@ -291,6 +293,23 @@

Combat


+ + + + + + +
@@ -885,9 +904,9 @@

Pilotage

- - - + + +

Techniques

@@ -1583,9 +1602,9 @@

Culture Générale

- - - + + +

Sociales

@@ -1975,6 +1994,67 @@

Contacts


+ +
+ + +
+ + +
+
+
+ + + + + + + + + + +
+
+ + + Dégats + +
+
+ + + + + + + + + + + + + + + +
+
+
+
+ +

Melée

+
+
@@ -2025,3 +2105,38 @@

Contacts

+ + +
+

{{name}}

+
{{subtags}}
+
+ {{#attack}} +
Attack: {{attack}} sucesses
+ {{#mode}} +
Mode: {{mode}} ({{usedammo}})
+ {{/mode}} + {{/attack}} + {{#damage}} +
+ Damage: {{damage}} +
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
+ {{/damage}} + {{#damagedone}} +
+ Damage: {{damagedone}} +
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
+ {{/damagedone}} + {{#special}} +
+ Special: {{special}} +
+ {{/special}} +
+
diff --git a/helpers/gen3.html b/helpers/gen3.html new file mode 100644 index 0000000..37cd0db --- /dev/null +++ b/helpers/gen3.html @@ -0,0 +1,2139 @@ + + + + + + +
+
+ +
+ +
+
+
+
+

Ressources

+ + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

+
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
+
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
+
+
+ + + + + +
+ + + + +
+ +

Combat

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Physiques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Implants

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Pilotage

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Techniques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Connaissances

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Culture Générale

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Sociales

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Clandestines

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Contacts

+ +
+ + + + + +
+
+
+
+ +
+ + +
+ + +
+
+
+ + + + + + + + + + +
+
+ + + + +
+
+ + + + + + + + + + + + + + + +
+
+
+
+ +

Melée

+
+
+ +
+ + + + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} + {{#rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/rollWasFumble() result}} + {{#^rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/^rollWasFumble() result}} + {{/^rollWasCrit() result}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
+
+ + + + +
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} + {{#rollWasCrit() result}} + +{{base}} + {{/rollWasCrit() result}} + {{#rollWasFumble() result}} + {{result}}-{{base}} + {{/rollWasFumble() result}} +
+
+ + +
+

{{name}}

+
{{subtags}}
+
+ {{#attack}} +
Attack: {{attack}} sucesses
+
Mode: {{mode}} ({{usedammo}})
+ {{/attack}} + {{#damage}} +
+ Damage: {{damage}} +
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
+ {{/damage}} + {{#damagedone}} +
+ Damage: {{damagedone}} +
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
+ {{/damagedone}} + {{#special}} +
+ Special: {{special}} +
+ {{/special}} +
+
diff --git a/helpers/gencss.css b/helpers/gencss.css index a3d3b99..e245bb0 100644 --- a/helpers/gencss.css +++ b/helpers/gencss.css @@ -1,26 +1,33 @@ div.sheet-tab-content { display: none; } input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, -input.sheet-tab3:checked ~ div.sheet-tab3 +input.sheet-tab3:checked ~ div.sheet-tab3, +input.sheet-tab4:checked ~ div.sheet-tab4 { display: block; -} +} + input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1, input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2, input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3, input.sheet-secondary_physique_tab4:checked ~ div.sheet-secondary_physique_tab4 { display: block; -} +} input.sheet-secondary_intelectuelles_tab1:checked ~ div.sheet-secondary_intelectuelles_tab1, input.sheet-secondary_intelectuelles_tab2:checked ~ div.sheet-secondary_intelectuelles_tab2, input.sheet-secondary_intelectuelles_tab3:checked ~ div.sheet-secondary_intelectuelles_tab3 { display: block; -} +} input.sheet-secondary_social_tab1:checked ~ div.sheet-secondary_social_tab1, input.sheet-secondary_social_tab2:checked ~ div.sheet-secondary_social_tab2, input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3 +{ + display: block; +} +input.sheet-secondary_arsenal_tab1:checked ~ div.sheet-secondary_arsenal_tab1, +input.sheet-secondary_arsenal_tab2:checked ~ div.sheet-secondary_arsenal_tab2 { display: block; }input.sheet-tab{ @@ -275,3 +282,91 @@ select.sheet-dice_select{ text-align:right; background-color: #999999; !important } + +.sheet-rolltemplate-d10Shooting .sheet-container { + background-color: #ffffff; + border: 1px solid; + padding: 2px; + width: 189px; +} + +.sheet-rolltemplate-d10Shooting .sheet-container h1 { + color: rgb(126, 45, 64); + font-size: 1.2em; + font-variant: small-caps; + line-height: 20px; +} + +.sheet-rolltemplate-d10Shooting div { + padding: 2px; +}; + +.sheet-rolltemplate-d10Shooting span { + color: rgb(126, 45, 64); + font-family: "Times New Roman", Times, serif; + font-size: 1.2em; + font-variant: small-caps; + line-height: 1.6em; + padding-left: 5px; + text-align: left; +} + +.sheet-rolltemplate-d10Shooting .sheet-subheader { + color: #000; + font-size: 1em; + font-style: italic; +} + +.sheet-rolltemplate-d10Shooting .sheet-arrow-right { + border-bottom: 2px solid transparent; + border-left: 180px solid rgb(126, 45, 64); + border-top: 2px solid transparent; +} + +.sheet-rolltemplate-d10Shooting .sheet-tcat { + font-style: italic; +} + +.sheet-rolltemplate-d10Shooting .inlinerollresult { + background-color: #ffffff; + border: none; +} + +.sheet-rolltemplate-d10Shooting .inlinerollresult.fullcrit { + color: #3FB315; + border: none; +} + +.sheet-rolltemplate-d10Shooting .inlinerollresult.fullfail { + color: #B31515; + border: none; +} + +.sheet-rolltemplate-d10Shooting .inlinerollresult.importandivoll { + color: #4A57ED; + border: none; +} + +select.sheet-weapon_type_select{ + line-height: 0px; + margin-bottom:0px; + margin: 0px; +} +label { + display: inline; + margin: 0px; + padding: 0px; +} +div.sheet-row{ + margin: 0px; + padding: 3px; +} +div.sheet-quickborder{ + border: 1px solid #ccc; + border-color: grey; + margin:5px; + padding:5px; +} +div.repeating_ranged-weapon{ + margin:5px; +} diff --git a/helpers/generator.py b/helpers/generator.py index 7b7995b..690406e 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -61,7 +61,7 @@ def css(self): for child in self.children: ret+="\ninput.sheet-tab{node.number}:checked ~ div.sheet-tab{node.number},".format(node=child) ret=ret[:-1] - ret+="\n{\n display: block;\n}" + ret+="\n{\n display: block;\n}\n" for child in self.children: ret+=child.css() return ret @@ -95,7 +95,7 @@ def __init__(self,name,nb): super(SubTab,self).__init__(name,nb) def header(self): - return """ \n""".format(self=self) + return """ \n""".format(self=self) def content(self): ret= '
\n'.format(self=self) diff --git a/helpers/old.html b/helpers/old.html new file mode 100644 index 0000000..668be0a --- /dev/null +++ b/helpers/old.html @@ -0,0 +1,2077 @@ + + + + + +
+
+ +
+ +
+
+
+
+

Ressources

+ + + + + + + + + + + + + + + + +

Points de Vie

Points de Fatigue

+
+
+ + + +
+ + + + + + + + +

Points de compétence :

Utilisés + +
Restants
+
+
+
+
+

Caractéristiques

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
+
+
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
+
+
+
+ + + + +
+ + + + +
+ +

Combat

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Physiques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Implants

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Pilotage

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Techniques

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Connaissances

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Culture Générale

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +
+ + + +
+ +

Sociales

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Clandestines

+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+
+ +

Contacts

+ +
+ + + + + +
+
+
+
+ +
+ + + + + + {{#rollWasCrit() result}} + + {{/rollWasCrit() result}} + {{#^rollWasCrit() result}} + {{#rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/rollWasFumble() result}} + {{#^rollWasFumble() result}} + {{#rollGreater() result 1}} + + {{/rollGreater() result 1}} + {{#rollBetween() result 0 1}} + + {{/rollBetween() result 0 1}} + {{#rollLess() result 0}} + + {{/rollLess() result 0}} + {{/^rollWasFumble() result}} + {{/^rollWasCrit() result}} + +
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
+
+ + + + +
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} + {{#rollWasCrit() result}} + +{{base}} + {{/rollWasCrit() result}} + {{#rollWasFumble() result}} + {{result}}-{{base}} + {{/rollWasFumble() result}} +
+
+ + +
+

{{name}}

+
{{subtags}}
+
+ {{#attack}} +
Attack: {{attack}} sucesses
+
Mode: {{mode}} ({{usedammo}})
+ {{/attack}} + {{#damage}} +
+ Damage: {{damage}} +
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
+ {{/damage}} + {{#damagedone}} +
+ Damage: {{damagedone}} +
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
+ {{/damagedone}} + {{#special}} +
+ Special: {{special}} +
+ {{/special}} +
+
diff --git a/helpers/weapon.html b/helpers/weapon.html new file mode 100644 index 0000000..8c1e983 --- /dev/null +++ b/helpers/weapon.html @@ -0,0 +1,79 @@ +
+
+
+ + + + + + + + + + +
+
+ + + Dégats + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + +
+
+
+ + + + +
+
+ + + +
+
+ + + + + + + +
+
From d291508726b2c10914b1fd22691a768c06997e47 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sat, 20 Mar 2021 08:06:20 +0100 Subject: [PATCH 52/62] Working Ammory --- helpers/base.py | 11 +++++++---- helpers/gen.html | 39 +++++++++++++++++++++++++++++++++++---- helpers/weapon.html | 5 +++-- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/helpers/base.py b/helpers/base.py index 887e581..f47af55 100644 --- a/helpers/base.py +++ b/helpers/base.py @@ -215,7 +215,6 @@ -

{{name}}

@@ -223,25 +222,29 @@
{{#attack}}
Attack: {{attack}} sucesses
- {{#mode}} -
Mode: {{mode}} ({{usedammo}})
- {{/mode}} + {{#mode}} +
Mode: {{mode}} ({{usedammo}})
+ {{/mode}} {{/attack}} {{#damage}}
Damage: {{damage}}
+ {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
+ {{/ammocurrent}} {{/damage}} {{#damagedone}}
Damage: {{damagedone}}
+ {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
+ {{/ammocurrent}} {{/damagedone}} {{#special}}
diff --git a/helpers/gen.html b/helpers/gen.html index b9c8121..2800c99 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -2027,9 +2027,9 @@

Contacts

- Dégats - + + +
@@ -2052,7 +2052,34 @@

Contacts

-

Melée

+
+
+
+ + + + +
+
+ + + +
+
+ + + + + + + + +
+
@@ -2121,17 +2148,21 @@

Melée

Damage: {{damage}}
+ {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
+ {{/ammocurrent}} {{/damage}} {{#damagedone}}
Damage: {{damagedone}}
+ {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
+ {{/ammocurrent}} {{/damagedone}} {{#special}}
diff --git a/helpers/weapon.html b/helpers/weapon.html index 8c1e983..851ad5a 100644 --- a/helpers/weapon.html +++ b/helpers/weapon.html @@ -24,8 +24,8 @@ - Dégats + +
@@ -75,5 +75,6 @@ +
From 5eae4f0914dc6f263e772b93b9633fabf15f33bd Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sat, 20 Mar 2021 21:11:06 +0100 Subject: [PATCH 53/62] Added Munitions Solides --- helpers/cyberpnk.txt | 1 + helpers/gen3.html | 73 +++++++++++++++----------------------------- helpers/gencss.css | 8 ++--- helpers/generator.py | 2 +- 4 files changed, 30 insertions(+), 54 deletions(-) diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index 0743590..fd7fa6a 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -4,6 +4,7 @@ - ⇥ Armes d'assaut - ⇥ Armes de poing - Armes Lourdes +- ⇥ Munitions solide - ⇥ Projectiles autopropulsés - ⇥ Armement laser - Artillerie diff --git a/helpers/gen3.html b/helpers/gen3.html index 37cd0db..df3b7cf 100644 --- a/helpers/gen3.html +++ b/helpers/gen3.html @@ -242,6 +242,23 @@

Combat


+ + + + + + +
@@ -2000,54 +2017,7 @@

Contacts

- -
-
-
- - - - - - - - - - -
-
- - - - -
-
- - - - - - - - - - - - - - - -
-
+

Distance

@@ -2104,7 +2074,6 @@

Melée

-

{{name}}

@@ -2112,23 +2081,29 @@

Melée

{{#attack}}
Attack: {{attack}} sucesses
+ {{#mode}}
Mode: {{mode}} ({{usedammo}})
+ {{/mode}} {{/attack}} {{#damage}}
Damage: {{damage}}
+ {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
+ {{/ammocurrent}} {{/damage}} {{#damagedone}}
Damage: {{damagedone}}
+ {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
+ {{/ammocurrent}} {{/damagedone}} {{#special}}
diff --git a/helpers/gencss.css b/helpers/gencss.css index e245bb0..efa4022 100644 --- a/helpers/gencss.css +++ b/helpers/gencss.css @@ -6,26 +6,26 @@ input.sheet-tab4:checked ~ div.sheet-tab4 { display: block; } - + input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1, input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2, input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3, input.sheet-secondary_physique_tab4:checked ~ div.sheet-secondary_physique_tab4 { display: block; -} +} input.sheet-secondary_intelectuelles_tab1:checked ~ div.sheet-secondary_intelectuelles_tab1, input.sheet-secondary_intelectuelles_tab2:checked ~ div.sheet-secondary_intelectuelles_tab2, input.sheet-secondary_intelectuelles_tab3:checked ~ div.sheet-secondary_intelectuelles_tab3 { display: block; -} +} input.sheet-secondary_social_tab1:checked ~ div.sheet-secondary_social_tab1, input.sheet-secondary_social_tab2:checked ~ div.sheet-secondary_social_tab2, input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3 { display: block; -} +} input.sheet-secondary_arsenal_tab1:checked ~ div.sheet-secondary_arsenal_tab1, input.sheet-secondary_arsenal_tab2:checked ~ div.sheet-secondary_arsenal_tab2 { diff --git a/helpers/generator.py b/helpers/generator.py index 690406e..1209c3e 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -170,7 +170,7 @@ def content(self): # filen=sys.argv[1] # filen="light.txt" filen="cyberpnk.txt" - output="gen.html" + output="gen3.html" outcss="gencss.css" def parse(filen): root=Root() From f53fe21faf4cfa8ff3728d60c37072fe6b700efe Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sun, 21 Mar 2021 04:39:17 +0100 Subject: [PATCH 54/62] Consumables --- helpers/cyberpnk.txt | 1 + helpers/gen.html | 38 ++++++++++++++++++++++++++++++++++++++ helpers/gen3.html | 5 +++++ helpers/gencss.css | 3 ++- helpers/weapon.html | 18 ++++++++++++++++++ 5 files changed, 64 insertions(+), 1 deletion(-) diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index fd7fa6a..346bde6 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -129,3 +129,4 @@ @ Arsenal + Distance + Melée ++ Consommable diff --git a/helpers/gen.html b/helpers/gen.html index 2800c99..6805a88 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -242,6 +242,25 @@

Combat


+ + + + + + + +
+ @@ -1998,6 +2017,7 @@

Contacts

+
@@ -2021,6 +2041,7 @@

Contacts

+ + + + + +
+
+ +
+ +
diff --git a/helpers/gen3.html b/helpers/gen3.html index df3b7cf..4a501b5 100644 --- a/helpers/gen3.html +++ b/helpers/gen3.html @@ -2015,6 +2015,7 @@

Contacts

+

Distance

@@ -2023,6 +2024,10 @@

Distance

Melée

+
+ +

Consommable

+
diff --git a/helpers/gencss.css b/helpers/gencss.css index efa4022..1ddc343 100644 --- a/helpers/gencss.css +++ b/helpers/gencss.css @@ -27,7 +27,8 @@ input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3 display: block; } input.sheet-secondary_arsenal_tab1:checked ~ div.sheet-secondary_arsenal_tab1, -input.sheet-secondary_arsenal_tab2:checked ~ div.sheet-secondary_arsenal_tab2 +input.sheet-secondary_arsenal_tab2:checked ~ div.sheet-secondary_arsenal_tab2, +input.sheet-secondary_arsenal_tab3:checked ~ div.sheet-secondary_arsenal_tab3 { display: block; }input.sheet-tab{ diff --git a/helpers/weapon.html b/helpers/weapon.html index 851ad5a..ef288c5 100644 --- a/helpers/weapon.html +++ b/helpers/weapon.html @@ -18,6 +18,7 @@ + + + + +
+
+ + + +
+ From 742e0938c811f75e4a7460291d4976ee27eecd3e Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 31 Mar 2021 07:40:22 +0200 Subject: [PATCH 55/62] Tryout of full auto gen --- helpers/customs.py | 138 +++ helpers/cyberpnk.txt | 3 + helpers/gen3.html | 2119 ------------------------------------------ helpers/generator.py | 7 +- 4 files changed, 147 insertions(+), 2120 deletions(-) create mode 100644 helpers/customs.py delete mode 100644 helpers/gen3.html diff --git a/helpers/customs.py b/helpers/customs.py new file mode 100644 index 0000000..211e25e --- /dev/null +++ b/helpers/customs.py @@ -0,0 +1,138 @@ +import generator + +__ALL__=["DISTANCE","MELEE"] + +class DISTANCE(generator.Node): + """DISTANCE Weapons""" + + def __init__(self, name,nb): + super(DISTANCE, self).__init__("repeating_ranged-weapons",0) + + def content(self): + ret=""" +
+
+
+ + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + + + + + + + + + + +
+
""" + return ret + + +class MELEE(generator.Node): + """MELEE Weapons""" + + def __init__(self, name,nb): + super(MELEE, self).__init__(name,nb) + + def content(self): + ret=""" +
+
+
+ + + + +
+
+ + + +
+
+ + + + + + + + +
+
""" + return ret + +class CONSOMMABLE(generator.Node): + """CONSUMMABLES""" + + def __init__(self, name,nb): + super(CONSOMMABLE, self).__init__(name,nb) + + def content(self): + return """
+
+
+ + + + +
+
+ + + +
+
+ + + + + + + + +
+
+ """ diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index 346bde6..50ee0ba 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -128,5 +128,8 @@ @ Arsenal + Distance +# DISTANCE + Melée +# MELEE + Consommable +# CONSOMMABLE diff --git a/helpers/gen3.html b/helpers/gen3.html deleted file mode 100644 index 4a501b5..0000000 --- a/helpers/gen3.html +++ /dev/null @@ -1,2119 +0,0 @@ - - - - - - -
-
- -
- -
-
-
-
-

Ressources

- - - - - - - - - - - - - - - - -

Points de Vie

Points de Fatigue

-
-
- - - -
- - - - - - - - -

Points de compétence :

Utilisés - -
Restants
-
-
-
-
-

Caractéristiques

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
-
-
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
-
-
-
- - - - - -
- - - - -
- -

Combat

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Physiques

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Implants

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Pilotage

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -
- - - -
- -

Techniques

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Connaissances

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Culture Générale

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -
- - - -
- -

Sociales

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Clandestines

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Contacts

- -
- - - - - -
-
-
-
- -
- - - -
- -

Distance

-
-
- -

Melée

-
-
- -

Consommable

-
-
- -
- - - - - - {{#rollWasCrit() result}} - - {{/rollWasCrit() result}} - {{#^rollWasCrit() result}} - {{#rollWasFumble() result}} - {{#rollGreater() result 1}} - - {{/rollGreater() result 1}} - {{#rollBetween() result 0 1}} - - {{/rollBetween() result 0 1}} - {{#rollLess() result 0}} - - {{/rollLess() result 0}} - {{/rollWasFumble() result}} - {{#^rollWasFumble() result}} - {{#rollGreater() result 1}} - - {{/rollGreater() result 1}} - {{#rollBetween() result 0 1}} - - {{/rollBetween() result 0 1}} - {{#rollLess() result 0}} - - {{/rollLess() result 0}} - {{/^rollWasFumble() result}} - {{/^rollWasCrit() result}} - -
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
-
- - - - -
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} - {{#rollWasCrit() result}} - +{{base}} - {{/rollWasCrit() result}} - {{#rollWasFumble() result}} - {{result}}-{{base}} - {{/rollWasFumble() result}} -
-
- -
-

{{name}}

-
{{subtags}}
-
- {{#attack}} -
Attack: {{attack}} sucesses
- {{#mode}} -
Mode: {{mode}} ({{usedammo}})
- {{/mode}} - {{/attack}} - {{#damage}} -
- Damage: {{damage}} -
- {{#ammocurrent}} -
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
- {{/ammocurrent}} - {{/damage}} - {{#damagedone}} -
- Damage: {{damagedone}} -
- {{#ammocurrent}} -
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
- {{/ammocurrent}} - {{/damagedone}} - {{#special}} -
- Special: {{special}} -
- {{/special}} -
-
diff --git a/helpers/generator.py b/helpers/generator.py index 1209c3e..7406b9a 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -169,8 +169,9 @@ def content(self): if __name__ == '__main__': # filen=sys.argv[1] # filen="light.txt" + import customs as custom_skills filen="cyberpnk.txt" - output="gen3.html" + output="gen.html" outcss="gencss.css" def parse(filen): root=Root() @@ -197,6 +198,10 @@ def parse(filen): tech_content=Repeating(line[1:-1],repeating_nb) active_subtab.addchild(tech_content) repeating_nb+=1 + elif line[0]=="#": + skill=custom_skills.__getattribute__(line[2:-1])("","") + active_subtab.addchild(skill) + repeating_nb+=1 # ??? except FileNotFoundError: print(filen,"was not found") return root From df97d0e56f49437a9c5b8451c884d16b2f96242d Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 31 Mar 2021 07:56:42 +0200 Subject: [PATCH 56/62] Full automatism on customs --- helpers/base.py | 6 ++-- helpers/customs.py | 68 +++++++++++++++++++--------------------------- helpers/gen.html | 15 +++++----- 3 files changed, 39 insertions(+), 50 deletions(-) diff --git a/helpers/base.py b/helpers/base.py index f47af55..cf6baee 100644 --- a/helpers/base.py +++ b/helpers/base.py @@ -230,11 +230,11 @@
Damage: {{damage}}
- {{#ammocurrent}} + {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
- {{/ammocurrent}} + {{/ammocurrent}} {{/damage}} {{#damagedone}}
@@ -244,7 +244,7 @@
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
- {{/ammocurrent}} + {{/ammocurrent}} {{/damagedone}} {{#special}}
diff --git a/helpers/customs.py b/helpers/customs.py index 211e25e..e004534 100644 --- a/helpers/customs.py +++ b/helpers/customs.py @@ -58,7 +58,8 @@ def content(self):
- """ + +""" return ret @@ -70,44 +71,7 @@ def __init__(self, name,nb): def content(self): ret=""" -
-
-
- - - - -
-
- - - -
-
- - - - - - - - -
-
""" - return ret - -class CONSOMMABLE(generator.Node): - """CONSUMMABLES""" - - def __init__(self, name,nb): - super(CONSOMMABLE, self).__init__(name,nb) - - def content(self): - return """
+
@@ -135,4 +99,28 @@ def content(self):
- """ +""" + return ret + +class CONSOMMABLE(generator.Node): + """CONSUMMABLES""" + + def __init__(self, name,nb): + super(CONSOMMABLE, self).__init__(name,nb) + + def content(self): + return """
+
+
+ + + + + + +
+
+ +
+
+""" diff --git a/helpers/gen.html b/helpers/gen.html index 6805a88..5afe52e 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -242,7 +242,6 @@

Combat


- @@ -260,7 +259,6 @@

Combat


- @@ -2020,6 +2018,7 @@

Contacts

+

Distance

@@ -2072,6 +2071,8 @@

Contacts

+ +

Melée

@@ -2104,6 +2105,7 @@

Contacts

+

Consommable

@@ -2170,7 +2172,6 @@

Contacts

-

{{name}}

@@ -2186,21 +2187,21 @@

Contacts

Damage: {{damage}}
- {{#ammocurrent}} + {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
- {{/ammocurrent}} + {{/ammocurrent}} {{/damage}} {{#damagedone}}
Damage: {{damagedone}}
- {{#ammocurrent}} + {{#ammocurrent}}
Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}}
- {{/ammocurrent}} + {{/ammocurrent}} {{/damagedone}} {{#special}}
From 6516c9833503934ec5a58845fc2ab7ba06c45ec3 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 31 Mar 2021 08:11:48 +0200 Subject: [PATCH 57/62] Added Subskills --- helpers/cyberpnk.txt | 64 +++++++++---------- helpers/gen.html | 144 +++++++++++++++++++++---------------------- helpers/generator.py | 34 +++++++++- 3 files changed, 137 insertions(+), 105 deletions(-) diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index 50ee0ba..8b891ea 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -1,85 +1,85 @@ @ Physique + Combat -- Armes à feu += Armes à feu - ⇥ Armes d'assaut - ⇥ Armes de poing -- Armes Lourdes += Armes Lourdes - ⇥ Munitions solide - ⇥ Projectiles autopropulsés - ⇥ Armement laser -- Artillerie += Artillerie - ⇥ Projectiles balistiques - ⇥ Guidage de missiles - ⇥ Systemes de défences - ⇥ Balistique superlative -- Combat à Mains Nues += Combat à Mains Nues - ⇥ Neo Kwon Do - ⇥ Zero-G -- Combat Armé += Combat Armé - ⇥ Armes Contandantes - ⇥ Armes Tranchantes -- Maniement des Explosifs += Maniement des Explosifs + Physiques -- Athlétisme += Athlétisme - ⇥ Aerien - ⇥ Terrestre - ⇥ Maritime - ⇥ Zero G -- Survie += Survie - ⇥ Environnement Sauvage - ⇥ Environnement Urbain - ⇥ Environnement Spacial + Implants -- Utilisation de Cyberware += Utilisation de Cyberware - ⇥ Utilisation de Neuro Accelerateurs - ⇥ Utilisation d'Interfaces de tir - ⇥ Overdrive Physique + Pilotage -- Pilotage athmosphérique += Pilotage athmosphérique - ⇥ Pilotage de Chasseurs - ⇥ Pilotage de Navettes -- Vehicules Terestres += Vehicules Terestres - ⇥ Vehicules Legers - ⇥ Vehicules Lourds - ⇥ Véhicules de Course -- Vaisseaux Spatiaux += Vaisseaux Spatiaux - ⇥ Batiments légers - ⇥ Batiments lourds - ⇥ Batiments super lourds @ Intelectuelles + Techniques -- Biotech += Biotech - ⇥ Chirurgie d’implants -- Electronique += Electronique - ⇥ Interconnection des systèmes - ⇥ Verrous magnétiques -- Informatique += Informatique - ⇥ Hardware - ⇥ Software - ⇥ Systèmes embarqués -- Mécanique += Mécanique - ⇥ Réacteurs à Fusion - ⇥ Réacteurs à Fission - ⇥ Compensateurs d'Inertie - ⇥ Technologie Lightfold - ⇥ Systèmes de Survie - ⇥ Systemes de Propultion -- Prospection stellaire += Prospection stellaire - ⇥ Corps stellaires - ⇥ Excavation planetaire + Connaissances -- Bioware += Bioware - ⇥ Implants Céphaliens - ⇥ Implants Corporels -- Médecine += Médecine - ⇥ Soins Intensifs - ⇥ Cybernetisation -- Sciences += Sciences - ⇥ Astromathématiques - ⇥ Biologie - ⇥ Xenobiologie @@ -89,17 +89,17 @@ - ⇥ Sociologie + Culture Générale -- Instruction Civique += Instruction Civique - ⇥ Administratif/Politique/Droit - ⇥ Finances - ⇥ Psychologie -- Théorie Militaire += Théorie Militaire - ⇥ Tactique - ⇥ Stratégie @ Social + Sociales -- Etiquette += Etiquette - ⇥ Alpha Centauri - ⇥ Eridani - ⇥ Banard @@ -108,18 +108,18 @@ - ⇥ C.I.C. - ⇥ Sol - ⇥ Pègre -- Interrogation += Interrogation - ⇥ Intimidation -- Commandement -- Négociation -- Baratin += Commandement += Négociation += Baratin + Clandestines -- Discretion -- Crochetage -- Informations -- Larcin -- Marchés noirs += Discretion += Crochetage += Informations += Larcin += Marchés noirs - ⇥ Acquisition d’Objets - ⇥ Acquisition d’Informations diff --git a/helpers/gen.html b/helpers/gen.html index 5afe52e..e68801a 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -206,7 +206,7 @@

Combat

- +
@@ -223,7 +223,7 @@

Combat

- +
@@ -257,7 +257,7 @@

Combat

- +
@@ -274,7 +274,7 @@

Combat

- +
@@ -291,7 +291,7 @@

Combat

- +
@@ -325,7 +325,7 @@

Combat

- +
@@ -342,7 +342,7 @@

Combat

- +
@@ -359,7 +359,7 @@

Combat

- +
@@ -376,7 +376,7 @@

Combat

- +
@@ -410,7 +410,7 @@

Combat

- +
@@ -427,7 +427,7 @@

Combat

- +
@@ -461,7 +461,7 @@

Combat

- +
@@ -478,7 +478,7 @@

Combat

- +
@@ -533,7 +533,7 @@

Physiques

- +
@@ -550,7 +550,7 @@

Physiques

- +
@@ -567,7 +567,7 @@

Physiques

- +
@@ -584,7 +584,7 @@

Physiques

- +
@@ -618,7 +618,7 @@

Physiques

- +
@@ -635,7 +635,7 @@

Physiques

- +
@@ -652,7 +652,7 @@

Physiques

- +
@@ -690,7 +690,7 @@

Implants

- +
@@ -707,7 +707,7 @@

Implants

- +
@@ -724,7 +724,7 @@

Implants

- +
@@ -762,7 +762,7 @@

Pilotage

- +
@@ -779,7 +779,7 @@

Pilotage

- +
@@ -813,7 +813,7 @@

Pilotage

- +
@@ -830,7 +830,7 @@

Pilotage

- +
@@ -847,7 +847,7 @@

Pilotage

- +
@@ -881,7 +881,7 @@

Pilotage

- +
@@ -898,7 +898,7 @@

Pilotage

- +
@@ -915,7 +915,7 @@

Pilotage

- +
@@ -959,7 +959,7 @@

Techniques

- +
@@ -993,7 +993,7 @@

Techniques

- +
@@ -1010,7 +1010,7 @@

Techniques

- +
@@ -1044,7 +1044,7 @@

Techniques

- +
@@ -1061,7 +1061,7 @@

Techniques

- +
@@ -1078,7 +1078,7 @@

Techniques

- +
@@ -1112,7 +1112,7 @@

Techniques

- +
@@ -1129,7 +1129,7 @@

Techniques

- +
@@ -1146,7 +1146,7 @@

Techniques

- +
@@ -1163,7 +1163,7 @@

Techniques

- +
@@ -1180,7 +1180,7 @@

Techniques

- +
@@ -1197,7 +1197,7 @@

Techniques

- +
@@ -1231,7 +1231,7 @@

Techniques

- +
@@ -1248,7 +1248,7 @@

Techniques

- +
@@ -1286,7 +1286,7 @@

Connaissances

- +
@@ -1303,7 +1303,7 @@

Connaissances

- +
@@ -1337,7 +1337,7 @@

Connaissances

- +
@@ -1354,7 +1354,7 @@

Connaissances

- +
@@ -1388,7 +1388,7 @@

Connaissances

- +
@@ -1405,7 +1405,7 @@

Connaissances

- +
@@ -1422,7 +1422,7 @@

Connaissances

- +
@@ -1439,7 +1439,7 @@

Connaissances

- +
@@ -1456,7 +1456,7 @@

Connaissances

- +
@@ -1473,7 +1473,7 @@

Connaissances

- +
@@ -1490,7 +1490,7 @@

Connaissances

- +
@@ -1528,7 +1528,7 @@

Culture Générale

- +
@@ -1545,7 +1545,7 @@

Culture Générale

- +
@@ -1562,7 +1562,7 @@

Culture Générale

- +
@@ -1596,7 +1596,7 @@

Culture Générale

- +
@@ -1613,7 +1613,7 @@

Culture Générale

- +
@@ -1657,7 +1657,7 @@

Sociales

- +
@@ -1674,7 +1674,7 @@

Sociales

- +
@@ -1691,7 +1691,7 @@

Sociales

- +
@@ -1708,7 +1708,7 @@

Sociales

- +
@@ -1725,7 +1725,7 @@

Sociales

- +
@@ -1742,7 +1742,7 @@

Sociales

- +
@@ -1759,7 +1759,7 @@

Sociales

- +
@@ -1776,7 +1776,7 @@

Sociales

- +
@@ -1810,7 +1810,7 @@

Sociales

- +
@@ -1967,7 +1967,7 @@

Clandestines

- +
@@ -1984,7 +1984,7 @@

Clandestines

- +
diff --git a/helpers/generator.py b/helpers/generator.py index 7406b9a..65761e1 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -132,6 +132,32 @@ def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause
\n""".format(self=self) return ret +class SubSkill(Node): + """Print a subskill.""" + def __init__(self, name,nb,superskill): + super(SubSkill, self).__init__(name,nb) + self.superskill=superskill + print(name,superskill.pname) + def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause a confict, legacy keeping I guess ? + ret=""" + + + + + +
\n""".format(self=self) + return ret + class Repeating(Node): """Repeating section""" @@ -177,6 +203,7 @@ def parse(filen): root=Root() active_tab,active_subtab=None,None tab_nb,subtab_nb,skill_nb,repeating_nb=1,1,1,1 + mainskill=None try: with open(filen,encoding="utf-8") as f: for line in f.readlines(): @@ -190,9 +217,14 @@ def parse(filen): active_tab.addchild(active_subtab) subtab_nb+=1 skill_nb=1 - elif line[0]=="-": + elif line[0]=="=": tech_content=Skill(line[1:-1],skill_nb) active_subtab.addchild(tech_content) + mainskill=tech_content + skill_nb+=1 + elif line[0]=="-": + tech_content=SubSkill(line[1:-1],skill_nb,mainskill) + active_subtab.addchild(tech_content) skill_nb+=1 elif line[0]==".": tech_content=Repeating(line[1:-1],repeating_nb) From b0edc9c58a0ceb16b457087efccb5a2b720aa246 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 14 Apr 2021 00:37:27 +0200 Subject: [PATCH 58/62] Actual correction of superskill --- helpers/gen.html | 144 +++++++++++++++++++++---------------------- helpers/generator.py | 2 +- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/helpers/gen.html b/helpers/gen.html index e68801a..9f76d6e 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -206,7 +206,7 @@

Combat

- +
@@ -223,7 +223,7 @@

Combat

- +
@@ -257,7 +257,7 @@

Combat

- +
@@ -274,7 +274,7 @@

Combat

- +
@@ -291,7 +291,7 @@

Combat

- +
@@ -325,7 +325,7 @@

Combat

- +
@@ -342,7 +342,7 @@

Combat

- +
@@ -359,7 +359,7 @@

Combat

- +
@@ -376,7 +376,7 @@

Combat

- +
@@ -410,7 +410,7 @@

Combat

- +
@@ -427,7 +427,7 @@

Combat

- +
@@ -461,7 +461,7 @@

Combat

- +
@@ -478,7 +478,7 @@

Combat

- +
@@ -533,7 +533,7 @@

Physiques

- +
@@ -550,7 +550,7 @@

Physiques

- +
@@ -567,7 +567,7 @@

Physiques

- +
@@ -584,7 +584,7 @@

Physiques

- +
@@ -618,7 +618,7 @@

Physiques

- +
@@ -635,7 +635,7 @@

Physiques

- +
@@ -652,7 +652,7 @@

Physiques

- +
@@ -690,7 +690,7 @@

Implants

- +
@@ -707,7 +707,7 @@

Implants

- +
@@ -724,7 +724,7 @@

Implants

- +
@@ -762,7 +762,7 @@

Pilotage

- +
@@ -779,7 +779,7 @@

Pilotage

- +
@@ -813,7 +813,7 @@

Pilotage

- +
@@ -830,7 +830,7 @@

Pilotage

- +
@@ -847,7 +847,7 @@

Pilotage

- +
@@ -881,7 +881,7 @@

Pilotage

- +
@@ -898,7 +898,7 @@

Pilotage

- +
@@ -915,7 +915,7 @@

Pilotage

- +
@@ -959,7 +959,7 @@

Techniques

- +
@@ -993,7 +993,7 @@

Techniques

- +
@@ -1010,7 +1010,7 @@

Techniques

- +
@@ -1044,7 +1044,7 @@

Techniques

- +
@@ -1061,7 +1061,7 @@

Techniques

- +
@@ -1078,7 +1078,7 @@

Techniques

- +
@@ -1112,7 +1112,7 @@

Techniques

- +
@@ -1129,7 +1129,7 @@

Techniques

- +
@@ -1146,7 +1146,7 @@

Techniques

- +
@@ -1163,7 +1163,7 @@

Techniques

- +
@@ -1180,7 +1180,7 @@

Techniques

- +
@@ -1197,7 +1197,7 @@

Techniques

- +
@@ -1231,7 +1231,7 @@

Techniques

- +
@@ -1248,7 +1248,7 @@

Techniques

- +
@@ -1286,7 +1286,7 @@

Connaissances

- +
@@ -1303,7 +1303,7 @@

Connaissances

- +
@@ -1337,7 +1337,7 @@

Connaissances

- +
@@ -1354,7 +1354,7 @@

Connaissances

- +
@@ -1388,7 +1388,7 @@

Connaissances

- +
@@ -1405,7 +1405,7 @@

Connaissances

- +
@@ -1422,7 +1422,7 @@

Connaissances

- +
@@ -1439,7 +1439,7 @@

Connaissances

- +
@@ -1456,7 +1456,7 @@

Connaissances

- +
@@ -1473,7 +1473,7 @@

Connaissances

- +
@@ -1490,7 +1490,7 @@

Connaissances

- +
@@ -1528,7 +1528,7 @@

Culture Générale

- +
@@ -1545,7 +1545,7 @@

Culture Générale

- +
@@ -1562,7 +1562,7 @@

Culture Générale

- +
@@ -1596,7 +1596,7 @@

Culture Générale

- +
@@ -1613,7 +1613,7 @@

Culture Générale

- +
@@ -1657,7 +1657,7 @@

Sociales

- +
@@ -1674,7 +1674,7 @@

Sociales

- +
@@ -1691,7 +1691,7 @@

Sociales

- +
@@ -1708,7 +1708,7 @@

Sociales

- +
@@ -1725,7 +1725,7 @@

Sociales

- +
@@ -1742,7 +1742,7 @@

Sociales

- +
@@ -1759,7 +1759,7 @@

Sociales

- +
@@ -1776,7 +1776,7 @@

Sociales

- +
@@ -1810,7 +1810,7 @@

Sociales

- +
@@ -1967,7 +1967,7 @@

Clandestines

- +
@@ -1984,7 +1984,7 @@

Clandestines

- +
diff --git a/helpers/generator.py b/helpers/generator.py index 65761e1..bbb303d 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -154,7 +154,7 @@ def content(self): # {self.parent.pname} is not needed, else _skilllevel_ cause - +
\n""".format(self=self) return ret From 868fa87edb0d81a8d699e08067c84724b4de53ae Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 1 Dec 2021 19:54:21 +0100 Subject: [PATCH 59/62] Generator shitshow --- .gitignore | 5 + .gitmodules | 2 +- helpers/customs.py | 6 +- helpers/gen.html | 8 +- helpers/generator.py | 4 +- minitest => helpers/minitest | 0 helpers/skill_generator.py | 619 +++++++++++++---------------------- helpers/tests.py | 215 ++++++++++++ helpers/weapon.html | 2 +- style.css | 7 + 10 files changed, 459 insertions(+), 409 deletions(-) rename minitest => helpers/minitest (100%) create mode 100644 helpers/tests.py diff --git a/.gitignore b/.gitignore index 4e88c56..192fa56 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,8 @@ venv.bak/ .mypy_cache/ .dmypy.json dmypy.json +.idea/vcs.xml +.idea/sys_d10.iml +.idea/modules.xml +.idea/misc.xml +.idea/inspectionProfiles/profiles_settings.xml diff --git a/.gitmodules b/.gitmodules index 6a38e14..bad102e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "minitest"] - path = minitest + path = helpers/minitest url = git@github.com:Malphaet/minitest.git diff --git a/helpers/customs.py b/helpers/customs.py index e004534..184e4fa 100644 --- a/helpers/customs.py +++ b/helpers/customs.py @@ -57,7 +57,7 @@ def content(self): -
+
""" return ret @@ -97,7 +97,7 @@ def content(self): -
+
""" return ret @@ -121,6 +121,6 @@ def content(self):
-
+
""" diff --git a/helpers/gen.html b/helpers/gen.html index 9f76d6e..7a5b138 100644 --- a/helpers/gen.html +++ b/helpers/gen.html @@ -2007,7 +2007,7 @@

Contacts

- +
@@ -2067,7 +2067,7 @@

Distance

-
+
@@ -2100,7 +2100,7 @@

Melée

-
+
@@ -2118,7 +2118,7 @@

Consommable

-
+
diff --git a/helpers/generator.py b/helpers/generator.py index bbb303d..8cccef1 100644 --- a/helpers/generator.py +++ b/helpers/generator.py @@ -188,7 +188,7 @@ def content(self): {{{{result=[[@{{{node.pname}_skilllevel}}+(@{{{node.pname}_attribute_select}})-d@{{dice}}cs1cf@{{dice}}]]}}}}\ {{{{threshold=[[@{{{node.pname}_skilllevel}}+(@{{{node.pname}_attribute_select}})]]}}}}">\ - +
\n""".format(node=self) return ret @@ -197,7 +197,7 @@ def content(self): # filen="light.txt" import customs as custom_skills filen="cyberpnk.txt" - output="gen.html" + output="gent.html" outcss="gencss.css" def parse(filen): root=Root() diff --git a/minitest b/helpers/minitest similarity index 100% rename from minitest rename to helpers/minitest diff --git a/helpers/skill_generator.py b/helpers/skill_generator.py index 3b26d4e..09a5019 100644 --- a/helpers/skill_generator.py +++ b/helpers/skill_generator.py @@ -2,146 +2,154 @@ # -*- coding: UTF-8 -*- # Not actually part of the project; just easier to maintain everything here - -import sys,os,traceback +import importlib import re +import sys,os +import traceback try: + # path=os.path.join(os.path.dirname(__file__),"..","minitest") + # minitest=importlib.import_module("...minitest.minitest","skill_generator") from minitest import minitest - term=minitest.Terminal() -except: - pass + term = minitest.Terminal() + from test import testReroll,testInit,testWrapper,testParser + +except ImportError as e: + print(e) + print("Minitest isn't imported, the system cannot execute test units") + try: - args=sys.argv[1:] - command=sys.argv[1] + args = sys.argv[1:] + command = sys.argv[1] except: - print("No command specified, just outputing the help") - command="help" + print("No command specified, just outputting the help") + command = "help" -EOL="\n" -tab=" " -#Custom parsing -ENCAISSEMENT_PARSE="""d_vars.encaissement=to_number(tab[i+1]); +EOL = "\n" +tab = " " +# Custom parsing +ENCAISSEMENT_PARSE = """d_vars.encaissement=to_number(tab[i+1]); d_vars.encaissement_dices="d20"; if (tab[i+2]=="4") d_vars.encaissement_dices="d10"; i+=3; break;""" -FLAT_DICES_PARSE="""d_vars.flat_dices[d_vars.nb_flat_dices]=to_p_number(tab[i+1]); +FLAT_DICES_PARSE = """d_vars.flat_dices[d_vars.nb_flat_dices]=to_p_number(tab[i+1]); d_vars.nb_flat_dices++; i+=2; break;""" -TECHNIQUE_PARSE="""d_vars.technique_m=to_p_number(tab[i+2]); +TECHNIQUE_PARSE = """d_vars.technique_m=to_p_number(tab[i+2]); i+=3; break;""" ## Custom adders: -lambda_flat_dices=lambda a: "@flat_dices[@flat_dices]=type({tab+1});\n@nb_flat_dices++;" +lambda_flat_dices = lambda a: "@flat_dices[@flat_dices]=type({tab+1});\n@nb_flat_dices++;" ## Custom rerolls: -categories=['varname','Pretty name','nb_args','type','code','id','default','action','parser'] -hashedCategories={} +categories = ['varname', 'Pretty name', 'nb_args', 'type', 'code', 'id', 'default', 'action', 'parser'] +hashedCategories = {} for c in range(len(categories)): - hashedCategories[categories[c]]=c + hashedCategories[categories[c]] = c -def findCat(element,category): - return element[hashedCategories[category]] -list=[] -#list.append(['varname','Pretty name','nb_args','type','code','id','default','action','parser']) -list.append(['perfection','Perfection',1,'pint','P',0,0,"",None]) -list.append(['defense_i_0','Defence impénétrable simple',2,'pint','I',1,0,"",None]) -list.append(['defense_i_1','Defence impénétrable expert',2,'pint','I',2,0,"",None]) -list.append(['defense_i_2','Defence impénétrable meta',2,'pint','I',4,0,"",None]) -list.append(['rempart_p','Rempart parfait',1,'pint','R',0,0,"",None]) -list.append(['technique_m','Perfection',1,'pint','M',0,0,"",TECHNIQUE_PARSE]) #+=3 -list.append(['coup_d','Coup_déchirant',1,'pint','D',0,0,"",None]) -list.append(['fauchage','Fauchage',1,'pint','F',0,0,"",None]) -list.append(['exploiter_p_0','Exploiter_les_points_faibles simple',2,'pint','E',1,0,"",None]) -list.append(['exploiter_p_1','Exploiter_les_points_faibles expert',2,'pint','E',2,0,"",None]) -list.append(['exploiter_p_2','Exploiter_les_points_faibles meta',2,'pint','E',4,0,"",None]) -list.append(['tir_p_0','Tir_précis expert',2,'pint','T',2,0,"",None]) -list.append(['tir_p_1','Tir_précis meta',2,'pint','T',4,0,"",None]) -list.append(['tir_i','Tir_implacable',1,'pint','i',0,0,"",None]) -list.append(['charge','Charge',1,'pint','C',0,0,"",None]) -list.append(['charge_i','Charge_indomptable',1,'pint','N',0,0,"",None]) -list.append(['nb_2add','Nombre à ajouter',1,'int','+',0,0,"+",None]) -list.append(['nb_2sub','Nombre a soustraire',1,'int','-',0,0,"+",None]) -list.append(['relances','Relances',1,'pint','r',0,0,"",None]) -list.append(['seuil','Seuil',1,'pint','s',0,0,"",None]) -list.append(['action','Type d\'Action',1,'str','a',0,'""',"",None]) -list.append(['flat_dices','Des fixes',1,'pint','d',0,"[]","+",FLAT_DICES_PARSE]) -list.append(['on_hit_c','Dégats a l\'impact critique',1,'int','H',0,0,"+",None]) -list.append(['attribute','Caractéristique',1,'int','A',0,0,"+",None]) -list.append(['encaissement','Encaissement',1,'pint','S',0,0,"",ENCAISSEMENT_PARSE]) # It's actually 2 args but no switch -list.append(['replace','Des de substitution',1,'int','L',0,-1,"",None]) -list.append(['add_to_all','Valeur d\'ajout aux des',1,'int','l',0,0,"",None]) -list.append(['max_dices','Nombre de des max',1,'pint','m',0,-1,"",None]) -list.append(['player_name','Nom du joueur',1,'str','n',0,'""',"",None]) - -list.append(['crit_level','Niveau de critique',1,'pint','c',0,2,"",None]) -list.append(['transcendence','Transcendence',1,'pint','t',0,3,"",None]) -list.append(['pctreceived','Pourcentage dégats recus',1,'int','v',0,0,"",None]) -list.append(['pctinflicted','Pourcentage dégats infligés',1,'int','f',0,0,"",None]) - -list.append(['nb_dices','Nombre de des',1,'pint','',0,0,"",None]) -list.append(['nb_flat_dices','Nombre de des fixes',1,'pint','',0,0,"",None]) -list.append(['encaissement_dices','Perfection',1,'pint','',0,'""',"",None]) -list.append(['results','Resultats',1,'pint','',0,"[]","",None]) -list.append(['cleave','Fauchage',1,'pint','',0,"[]","",None]) -list.append(['encaissement_result','Resultat d\'encaissement',1,'pint','',0,0,"",None]) -list.append(['technique_result','Dégats technique martiale',1,'int','',0,0,"",None]) -list.append(['coup_d_results','Coup déchirant results',1,'pint','',0,"[]","",None]) +def findCat(element, category): + return element[hashedCategories[category]] +list = [] +# list.append(['varname','Pretty name','nb_args','type','code','id','default','action','parser']) +list.append(['perfection', 'Perfection', 1, 'pint', 'P', 0, 0, "", None]) +list.append(['defense_i_0', 'Defence impénétrable simple', 2, 'pint', 'I', 1, 0, "", None]) +list.append(['defense_i_1', 'Defence impénétrable expert', 2, 'pint', 'I', 2, 0, "", None]) +list.append(['defense_i_2', 'Defence impénétrable meta', 2, 'pint', 'I', 4, 0, "", None]) +list.append(['rempart_p', 'Rempart parfait', 1, 'pint', 'R', 0, 0, "", None]) +list.append(['technique_m', 'Perfection', 1, 'pint', 'M', 0, 0, "", TECHNIQUE_PARSE]) # +=3 +list.append(['coup_d', 'Coup_déchirant', 1, 'pint', 'D', 0, 0, "", None]) +list.append(['fauchage', 'Fauchage', 1, 'pint', 'F', 0, 0, "", None]) +list.append(['exploiter_p_0', 'Exploiter_les_points_faibles simple', 2, 'pint', 'E', 1, 0, "", None]) +list.append(['exploiter_p_1', 'Exploiter_les_points_faibles expert', 2, 'pint', 'E', 2, 0, "", None]) +list.append(['exploiter_p_2', 'Exploiter_les_points_faibles meta', 2, 'pint', 'E', 4, 0, "", None]) +list.append(['tir_p_0', 'Tir_précis expert', 2, 'pint', 'T', 2, 0, "", None]) +list.append(['tir_p_1', 'Tir_précis meta', 2, 'pint', 'T', 4, 0, "", None]) +list.append(['tir_i', 'Tir_implacable', 1, 'pint', 'i', 0, 0, "", None]) +list.append(['charge', 'Charge', 1, 'pint', 'C', 0, 0, "", None]) +list.append(['charge_i', 'Charge_indomptable', 1, 'pint', 'N', 0, 0, "", None]) +list.append(['nb_2add', 'Nombre à ajouter', 1, 'int', '+', 0, 0, "+", None]) +list.append(['nb_2sub', 'Nombre a soustraire', 1, 'int', '-', 0, 0, "+", None]) +list.append(['relances', 'Relances', 1, 'pint', 'r', 0, 0, "", None]) +list.append(['seuil', 'Seuil', 1, 'pint', 's', 0, 0, "", None]) +list.append(['action', 'Type d\'Action', 1, 'str', 'a', 0, '""', "", None]) +list.append(['flat_dices', 'Des fixes', 1, 'pint', 'd', 0, "[]", "+", FLAT_DICES_PARSE]) +list.append(['on_hit_c', 'Dégats a l\'impact critique', 1, 'int', 'H', 0, 0, "+", None]) +list.append(['attribute', 'Caractéristique', 1, 'int', 'A', 0, 0, "+", None]) +list.append(['encaissement', 'Encaissement', 1, 'pint', 'S', 0, 0, "", + ENCAISSEMENT_PARSE]) # It's actually 2 args but no switch +list.append(['replace', 'Des de substitution', 1, 'int', 'L', 0, -1, "", None]) +list.append(['add_to_all', 'Valeur d\'ajout aux des', 1, 'int', 'l', 0, 0, "", None]) +list.append(['max_dices', 'Nombre de des max', 1, 'pint', 'm', 0, -1, "", None]) +list.append(['player_name', 'Nom du joueur', 1, 'str', 'n', 0, '""', "", None]) + +list.append(['crit_level', 'Niveau de critique', 1, 'pint', 'c', 0, 2, "", None]) +list.append(['transcendence', 'Transcendence', 1, 'pint', 't', 0, 3, "", None]) +list.append(['pctreceived', 'Pourcentage dégats recus', 1, 'int', 'v', 0, 0, "", None]) +list.append(['pctinflicted', 'Pourcentage dégats infligés', 1, 'int', 'f', 0, 0, "", None]) + +list.append(['nb_dices', 'Nombre de des', 1, 'pint', '', 0, 0, "", None]) +list.append(['nb_flat_dices', 'Nombre de des fixes', 1, 'pint', '', 0, 0, "", None]) +list.append(['encaissement_dices', 'Perfection', 1, 'pint', '', 0, '""', "", None]) +list.append(['results', 'Resultats', 1, 'pint', '', 0, "[]", "", None]) +list.append(['cleave', 'Fauchage', 1, 'pint', '', 0, "[]", "", None]) +list.append(['encaissement_result', 'Resultat d\'encaissement', 1, 'pint', '', 0, 0, "", None]) +list.append(['technique_result', 'Dégats technique martiale', 1, 'int', '', 0, 0, "", None]) +list.append(['coup_d_results', 'Coup déchirant results', 1, 'pint', '', 0, "[]", "", None]) class megaListWrapper(): - def __init__(self,table=list): - self.table=table - self.len=len(table) - self.indexes={} + def __init__(self, table=list): + self.table = table + self.len = len(table) + self.indexes = {} for i in range(len(table)): - self.indexes[findCat(table[i],"varname")]=i + self.indexes[findCat(table[i], "varname")] = i # Theese are array because you can't acess them directly - self.singles=[] - self.code=[] - self.doubles={} + self.singles = [] + self.code = [] + self.doubles = {} for i in table: - if findCat(i,'nb_args')==1: + if findCat(i, 'nb_args') == 1: self.singles.append(i) - elif findCat(i,'nb_args')==2: - n=findCat(i,'code') + elif findCat(i, 'nb_args') == 2: + n = findCat(i, 'code') if n not in self.doubles: - self.doubles[n]=[] + self.doubles[n] = [] self.doubles[n].append(i) - if findCat(i,'code')!='': + if findCat(i, 'code') != '': self.code.append(i) - def __getitem__(self,argument): #Actually return the full line as a list wrapper + def __getitem__(self, argument): # Actually return the full line as a list wrapper return listWrapper(self.table[self.indexes[argument]]) def __iter__(self): - for index,key in self.indexes.items(): + for index, key in self.indexes.items(): yield self[index] def itersingles(self): "Only iterate over the simple argument ones" for index in self.singles: - yield self[findCat(index,'varname')] + yield self[findCat(index, 'varname')] def iterdoubles(self): "Only iterate over the double arguments ones return a table with all" for table in self.doubles.values(): - yield [self[findCat(l,'varname')] for l in table] + yield [self[findCat(l, 'varname')] for l in table] def iterdefined(self): "Only iterate over the ones with defined code" pass - def __contains__(self,val): + def __contains__(self, val): return val in self.indexes def __len__(self): @@ -149,12 +157,13 @@ def __len__(self): def pprint(self): for e in self: - print(e[0],":",e) + print(e[0], ":", e) + class listWrapper(): - def __init__(self,list,index=hashedCategories): - self.list=list - self.indexes=index + def __init__(self, list, index=hashedCategories): + self.list = list + self.indexes = index def pprint(self): print(self.list) @@ -168,433 +177,247 @@ def __len__(self): def __repr__(self): return str(self.list) - def __getitem__(self,nb): + def __getitem__(self, nb): return self.list[nb] - def __getattr__(self,index): + def __getattr__(self, index): return self.list[self.indexes[index]] def __iter__(self): for e in self.list: yield e + ## Commands def initialise(args): "Initialise the variables for the switch" - text="var d_vars={" + text = "var d_vars={" for line in list: - text+='"{}":{},'.format(line[0],line[6]) - text=text[:-1]+'};' + text += '"{}":{},'.format(line[0], line[6]) + text = text[:-1] + '};' return text + def pprint(args): "Print the whole list of values" for i in list: print(i) -def pErrors(name,errors): + +def pErrors(name, errors): "Print sucess or error of given test" if errors: - print("{:<15}: {} errors occured".format(name,errors)) + print("{:<15}: {} errors occured".format(name, errors)) else: print("{:<15}: All test sucessful".format(name)) return errors + def reroll(args): "Generate the reroll inline message" - reroll="var msg_relance=\"Relancer ce jet";' + reroll += '+" r ?{Relances ?}";\n' + reroll += 'for (var i=0,len=d_vars.results.length;iRelancer ce jet";' return reroll + def find_code(args): "Find the next available code for given name" try: - code=args[1] + code = args[1] except: print("One argument expected") return 0 - listFree='' + listFree = '' for letter in code: - Letter=letter.capitalize() - free,Free=1,1 + Letter = letter.capitalize() + free, Free = 1, 1 for line in wrapper: - if free and letter==line.code: - free=0 - if Free and Letter==line.code: - Free=0 + if free and letter == line.code: + free = 0 + if Free and Letter == line.code: + Free = 0 if not free and not Free: break if Free and Letter not in listFree: - listFree+=Letter + listFree += Letter if free and letter not in listFree: - listFree+=letter + listFree += letter if listFree: - if len(listFree)==1: + if len(listFree) == 1: return 'The code "{}" is available.'.format(listFree) else: return 'The following codes "{}" are available'.format(listFree) else: print('No letter from name "{}" is available'.format(code)) - print(find_code([0,"abcdefghijklmnopqrstuvwxyz&_?.§!;"])) + print(find_code([0, "abcdefghijklmnopqrstuvwxyz&_?.§!;"])) + def parser(args): "Generate the argument parser" - res=tab+"if (len_args>0){"+EOL - res+=tab*2+"d_vars.nb_dices=to_p_number(tab[0]);"+EOL - res+=tab+"}"+EOL - res+=tab+"for (i = 1; i < len_args;) {"+EOL - res+=tab*2+"switch(tab[i]) {"+EOL + res = tab + "if (len_args>0){" + EOL + res += tab * 2 + "d_vars.nb_dices=to_p_number(tab[0]);" + EOL + res += tab + "}" + EOL + res += tab + "for (i = 1; i < len_args;) {" + EOL + res += tab * 2 + "switch(tab[i]) {" + EOL + def typewise(type): - if type=="pint": + if type == "pint": return "to_p_number({});" - elif type=='int': + elif type == 'int': return "to_number({});" return "{};" - doubles={} + doubles = {} for elt in wrapper.itersingles(): if elt.parser: - res+=tab*3+'case "{}":'.format(elt.code)+EOL + res += tab * 3 + 'case "{}":'.format(elt.code) + EOL for l in elt.parser.splitlines(): - res+=tab*4+l+EOL - elif elt.code!="": - res+=tab*3+'case "{}":'.format(elt.code)+EOL - res+=tab*4+'d_vars.{}{}={}'.format(elt.varname,elt.action,typewise(elt.type).format("tab[i+1]"))+EOL - res+=tab*4+'i+=2;'+EOL - res+=tab*4+'break;'+EOL + res += tab * 4 + l + EOL + elif elt.code != "": + res += tab * 3 + 'case "{}":'.format(elt.code) + EOL + res += tab * 4 + 'd_vars.{}{}={}'.format(elt.varname, elt.action, + typewise(elt.type).format("tab[i+1]")) + EOL + res += tab * 4 + 'i+=2;' + EOL + res += tab * 4 + 'break;' + EOL for grp in wrapper.iterdoubles(): - res+=tab*3+'case "{}":'.format(grp[0].code)+EOL - res+=tab*4+'switch (tab[i+1]) {'+EOL + res += tab * 3 + 'case "{}":'.format(grp[0].code) + EOL + res += tab * 4 + 'switch (tab[i+1]) {' + EOL for elt in grp: if elt.parser: for l in elt.parser.splitlines(): - res+=tab*5+l+EOL - elif elt.code!="": - res+=tab*5+'case "{}":'.format(elt.id)+EOL - res+=tab*6+'d_vars.{}{}={}'.format(elt.varname,elt.action,typewise(elt.type).format("tab[i+2]"))+EOL - res+=tab*6+'break;'+EOL + res += tab * 5 + l + EOL + elif elt.code != "": + res += tab * 5 + 'case "{}":'.format(elt.id) + EOL + res += tab * 6 + 'd_vars.{}{}={}'.format(elt.varname, elt.action, + typewise(elt.type).format("tab[i+2]")) + EOL + res += tab * 6 + 'break;' + EOL if not elt.parser: - res+=tab*4+"}"+EOL - res+=tab*4+'i+=3;'+EOL - res+=tab*4+'break;'+EOL - - res+=tab*3+"default:"+EOL - res+=tab*4+'logit("Argument "+tab[i]+" unknown.");'+EOL - res+=tab*4+"i++;"+EOL - res+=tab*4+"break;"+EOL - res+=tab*2+"}"+EOL - res+=tab*1+"}"+EOL + res += tab * 4 + "}" + EOL + res += tab * 4 + 'i+=3;' + EOL + res += tab * 4 + 'break;' + EOL + + res += tab * 3 + "default:" + EOL + res += tab * 4 + 'logit("Argument "+tab[i]+" unknown.");' + EOL + res += tab * 4 + "i++;" + EOL + res += tab * 4 + "break;" + EOL + res += tab * 2 + "}" + EOL + res += tab * 1 + "}" + EOL return res -class testInit(minitest.simpleTestUnit): - """Check the initialisation message""" - def __init__(self): - super(testInit, self).__init__("initialisation variables") - - def _testInit(self): - self.currentTest("generating test values") - - test_values={"nb_dices":0,"perfection":0,"defense_i_0":0,"defense_i_1":0, - "defense_i_2":0,"rempart_p":0,"technique_m":0,"coup_d":0,"coup_d_results":"[]", - "fauchage":0,"exploiter_p_0":0,"exploiter_p_1":0,"exploiter_p_2":0,"tir_p_0":0, - "tir_p_1":0,"tir_i":0,"charge":0,"charge_i":0,"nb_2add":0,"nb_2sub":0,"relances":0, - "seuil":0,"nb_flat_dices":0,"action":'""',"flat_dices":"[]","results":"[]","technique_result":0, - "cleave":"[]","on_hit_c":0,"attribute":0,"encaissement":0,"encaissement_dices":'""', - "encaissement_result":0,"replace":-1,"add_to_all":0,"max_dices":-1,"player_name":'""'} - a=len(test_values) - b=len(list) - try: - dict_list={} - for l in list: - dict_list[l[0]]=l[6] - self.addSuccess() - except Exception as ex: - self.addFailure(str(ex)) - - self.currentTest("testing list") - if a 1: + filen = args[1] + try: + f = open(filen) + except: + filen = "export.log" + f = open(filen, "w+") + + def title(t): + return "{} {} {}".format("#" * 10, t, "#" * 10) + EOL + + f.write(title("Relances")) + f.write(reroll([]) + EOL) + f.write(title("Reroll")) + f.write(initialise([]) + EOL) + f.write(title("Parse")) + f.write(parser([]) + EOL) + + f.close() + + return "All data written in '{}'".format(filen) - self.currentTest("testing i++ count") - count=par.count("i+=") - nb_code=nb_code+len([l for l in wrapper.iterdoubles()])-sum([len(l) for l in wrapper.iterdoubles()]) - if count!=nb_code: - self.addFailure("{} occurences found (expected {})".format(par.count("i+="),nb_code)) - else: - self.addSuccess() - - self.currentTest("counting {}") - counto=par.count("{") - countc=par.count("}") - tot=len([l for l in wrapper.iterdoubles()])+3 - if counto!=countc or counto!=tot: - self.addFailure("found {} '{{' and {} '}} ' instead of {}".format(counto,countc,tot)) - else: - self.addSuccess() - - f=0 - self.currentTest("checking special text") - for line in list: - cat=findCat(line,"parser") - if cat: - for l in cat.splitlines(): - if l not in par: - self.addFailure("{} isn't in the end result".format(l),nonDestructive=True) - if f==0: - self.addSuccess() - else: - self.addFailure("{} failures".format(f)) - """for varname with symbol, find symbol - for Special text, find special - """ def test_all(args): "Execute all tests" - subclass=minitest.testGroup("Main Classes",term,verbose=True) - all_s,t=["reroll","init","wrapper","parser"],0 - if len(args)>1: - sub=[]# A list of test to execute + subclass = minitest.testGroup("Main Classes", term, verbose=True) + all_s, t = ["reroll", "init", "wrapper", "parser"], 0 + if len(args) > 1: + sub = [] # A list of test to execute for a in args[1:]: - a=a.strip("-") - if a in all_s or a=="all": - t+=1 + a = a.strip("-") + if a in all_s or a == "all": + t += 1 sub.append(a.strip("-")) else: print("Argument {} unknown".format(a)) else: - sub=all_s - t=len(sub) + sub = all_s + t = len(sub) if "all" in sub or "reroll" in sub: - #"Check the reroll inline generation" + # "Check the reroll inline generation" subclass.addTest(testReroll()) if "all" in sub or "init" in sub: - #"Check the initialisation message" + # "Check the initialisation message" subclass.addTest(testInit()) if "all" in sub or "wrapper" in sub: - #"Test the wrapper, only useful internally" + # "Test the wrapper, only useful internally" subclass.addTest(testWrapper()) if "all" in sub or "parser" in sub: - #"Check the reroll inline generation" + # "Check the reroll inline generation" subclass.addTest(testParser()) - if t>0: + if t > 0: subclass.test() - status=subclass.get_status() + status = subclass.get_status() return status['failure'] return 0 -def export(args): - if len(args)>1: - filen=args[1] - try: - f=open(filen) - except: - filen="export.log" - f=open(filen,"w+") - - def title(t): - return "{} {} {}".format("#"*10,t,"#"*10)+EOL - - f.write(title("Relances")) - f.write(reroll([])+EOL) - f.write(title("Reroll")) - f.write(initialise([])+EOL) - f.write(title("Parse")) - f.write(parser([])+EOL) - - f.close() - - return "All data written in '{}'".format(filen) - def help(args): "Help, print the following message" print("List of availables commands") for key in commands.keys(): - print(" {}: {}".format(key,commands[key].__doc__)) + print(" {}: {}".format(key, commands[key].__doc__)) + -commands={"init":initialise,"print":pprint,"reroll":reroll, -"test":test_all,"code":find_code,"parser":parser,"export":export,"help":help} +commands = {"init": initialise, "print": pprint, "reroll": reroll, + "test": test_all, "code": find_code, "parser": parser, "export": export, "help": help} if __name__ == '__main__': - wrapper=megaListWrapper() + wrapper = megaListWrapper() try: - ret=commands[command](args) + ret = commands[command](args) if ret: print(ret) except KeyError: print("Command {} doesn't exist".format(command)) commands['help'](args) except Exception: - print("Couldn't execute command "+command) - print(" > {} ({})".format(sys.exc_info()[1],sys.exc_info()[0])) + print("Couldn't execute command " + command) + print(" > {} ({})".format(sys.exc_info()[1], sys.exc_info()[0])) traceback.print_tb(sys.exc_info()[2]) diff --git a/helpers/tests.py b/helpers/tests.py new file mode 100644 index 0000000..bc30ca1 --- /dev/null +++ b/helpers/tests.py @@ -0,0 +1,215 @@ +import minitest +import re +from skill_generator import * + +__all__=["testParser","testWrapper","testInit","testReroll"] + +class testInit(minitest.simpleTestUnit): + """Check the initialisation message""" + + def __init__(self): + super(testInit, self).__init__("initialisation variables") + + def _testInit(self): + self.currentTest("generating test values") + + test_values = {"nb_dices": 0, "perfection": 0, "defense_i_0": 0, "defense_i_1": 0, + "defense_i_2": 0, "rempart_p": 0, "technique_m": 0, "coup_d": 0, "coup_d_results": "[]", + "fauchage": 0, "exploiter_p_0": 0, "exploiter_p_1": 0, "exploiter_p_2": 0, "tir_p_0": 0, + "tir_p_1": 0, "tir_i": 0, "charge": 0, "charge_i": 0, "nb_2add": 0, "nb_2sub": 0, "relances": 0, + "seuil": 0, "nb_flat_dices": 0, "action": '""', "flat_dices": "[]", "results": "[]", + "technique_result": 0, + "cleave": "[]", "on_hit_c": 0, "attribute": 0, "encaissement": 0, "encaissement_dices": '""', + "encaissement_result": 0, "replace": -1, "add_to_all": 0, "max_dices": -1, "player_name": '""'} + a = len(test_values) + b = len(list) + try: + dict_list = {} + for l in list: + dict_list[l[0]] = l[6] + self.addSuccess() + except Exception as ex: + self.addFailure(str(ex)) + + self.currentTest("testing list") + if a < b: + pass # Only if the values are updated + # self.addFailure("Too many values in the list") + # for l in dict_list.keys(): + # if l not in test_values: + # self.currentTest(l) + # self.addFailure("{} missing from the test template".format(l)) + elif b < a: + self.addFailure("Too few values in the list") + for t, v in test_values.items(): + if t not in dict_list.keys(): + self.currentTest(t) + self.addFailure("Missing element {}".format(v)) + else: + for l, vl in dict_list.items(): + if l in test_values.keys(): + if test_values[l] != vl: + self.currentTest(test_values[l]) + self.addFailure("Expected {}, got {}".format(l, vl)) + else: + self.currentTest(l) + self.addFailure("The element is not in the test values") + self.addSuccess() + + +class testReroll(minitest.simpleTestUnit): + """Check the reroll inline message""" + + def __init__(self): + super(testReroll, self).__init__("inline message") + + def _testReroll(self): + self.currentTest("regex generation") + model = """"var msg_relance="Relancer ce jet";""" + var = re.compile(' ([a-zA-Z:+_] .*?".*?)(?:\+"|;)') + self.addSuccess() + + self.currentTest('generating inline message') + roll = reroll(args) + self.addSuccess() + + self.currentTest("checking generated roll") + for e in (var.findall(model)): + if roll.find(e) < 0: + self.currentTest("[{}]".format(e)) + self.addFailure("missing value") + self.addSuccess() + + # Only if the args are updated + # self.currentTest("checking model") + # for e in var.findall(roll): + # if model.find(e)<0: + # self.currentTest("[{}]".format(e)) + # self.addFailure("missing value") + # self.addSuccess() + + +class testWrapper(minitest.simpleTestUnit): + """Check the reroll inline message""" + + def __init__(self): + super(testWrapper, self).__init__("inline message") + + def _testWrapper(self): + self.currentTest("generating wrapper") + s = len(hashedCategories) + errors=0 + try: + wrapper[-1] + errors += 1 + self.addFailure("Error: Element -1 shouldn't exist") + except: + self.addSuccess() + + f = 0 + self.currentTest("hashing categories") + for ele in wrapper: + for c in hashedCategories.keys(): + if ele.__getattr__(c) != findCat(ele, c): + f += 1 + self.currentTest(ele[0]) + self.addFailure("{} found, should be {}".format(findCat(ele, c), ele.__getattr__(c))) + + for i in range(s): + if wrapper[ele[0]][i] != ele.asList()[i] or wrapper[ele[0]][i] != ele[i]: + f += 1 + self.currentTest(i) + self.addFailure("Element differs {}!={}".format(wrapper[ele[0]][i], ele.asList()[i])) + if f == 0: + self.addSuccess() + else: + self.addFailure("{} elements failed".format(f)) + + f = 0 + self.currentTest("single variable") + for i in wrapper.itersingles(): + if i[0] not in wrapper: + f += 1 + self.addFailure("{} element missing".format(i[0]), nonDestructive=True) + if f == 0: + self.addSuccess() + else: + self.addFailure("{} elements failed".format(f)) + + f = 0 + self.currentTest("double variables") + for l in wrapper.iterdoubles(): + for i in l: + if i[0] not in wrapper: + f += 1 + self.addFailure("{} element missing".format(i[0]), nonDestructive=True) + if f == 0: + self.addSuccess() + else: + self.addFailure("{} elements failed".format(f)) + + +class testParser(minitest.simpleTestUnit): + """Check the reroll inline message""" + + def __init__(self): + super(testParser, self).__init__("inline message") + + def _testParser(self): + self.currentTest("loading parser") + par = parser(args) + self.addSuccess() + f = 0 + nb_code = 0 + self.currentTest("testing all variables") + for line in list: + cat = findCat(line, "code") + if cat != "": + nb_code += 1 + if 'case "{}"'.format(cat) not in par: + f += 1 + self.addFailure("code {} not found".format(cat), nonDestructive=True) + if 'd_vars.{}'.format(findCat(line, "varname")) not in par: + f += 1 + self.addFailure("variable {} not found".format(findCat(line, "varname")), nonDestructive=True) + if f == 0: + self.addSuccess() + else: + self.addFailure("{} failures".format(f)) + + self.currentTest("testing i++ count") + count = par.count("i+=") + nb_code = nb_code + len([l for l in wrapper.iterdoubles()]) - sum([len(l) for l in wrapper.iterdoubles()]) + if count != nb_code: + self.addFailure("{} occurences found (expected {})".format(par.count("i+="), nb_code)) + else: + self.addSuccess() + + self.currentTest("counting {}") + counto = par.count("{") + countc = par.count("}") + tot = len([l for l in wrapper.iterdoubles()]) + 3 + if counto != countc or counto != tot: + self.addFailure("found {} '{{' and {} '}} ' instead of {}".format(counto, countc, tot)) + else: + self.addSuccess() + + f = 0 + self.currentTest("checking special text") + for line in list: + cat = findCat(line, "parser") + if cat: + for l in cat.splitlines(): + if l not in par: + self.addFailure("{} isn't in the end result".format(l), nonDestructive=True) + if f == 0: + self.addSuccess() + else: + self.addFailure("{} failures".format(f)) + """for varname with symbol, find symbol + for Special text, find special + """ + +term = minitest.Terminal() \ No newline at end of file diff --git a/helpers/weapon.html b/helpers/weapon.html index ef288c5..93e72c2 100644 --- a/helpers/weapon.html +++ b/helpers/weapon.html @@ -45,7 +45,7 @@ -
+
diff --git a/style.css b/style.css index 98e55df..bc49b4b 100644 --- a/style.css +++ b/style.css @@ -2,9 +2,16 @@ div.sheet-tab-content { display: none; } input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, input.sheet-tab3:checked ~ div.sheet-tab3 +{ + display: block; + +div.sheet-header-tab-content { display: none; } +input.sheet-header-tab1:checked ~ div.sheet-header-tab1, +input.sheet-header-tab2:checked ~ div.sheet-header-tab2, { display: block; } + input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1, input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2, input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3, From 17ac2dec13d2dc8e648b078a1c6c9fde421751fb Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 2 Dec 2021 19:01:17 +0100 Subject: [PATCH 60/62] Cleanup --- helpers/Skills.txt | 61 - helpers/Todo and utils.txt | 93 - helpers/base.py | 7 +- helpers/generator.py | 4 +- helpers/old.html | 2077 ----------------- .../{gencss.css => systemd10cyberpunk.css} | 0 helpers/{gen.html => systemd10cyberpunk.html} | 7 +- helpers/tesidy.html | 197 -- helpers/weapon.html | 98 - 9 files changed, 8 insertions(+), 2536 deletions(-) delete mode 100644 helpers/Skills.txt delete mode 100644 helpers/Todo and utils.txt delete mode 100644 helpers/old.html rename helpers/{gencss.css => systemd10cyberpunk.css} (100%) rename helpers/{gen.html => systemd10cyberpunk.html} (99%) delete mode 100644 helpers/tesidy.html delete mode 100644 helpers/weapon.html diff --git a/helpers/Skills.txt b/helpers/Skills.txt deleted file mode 100644 index d1d18d0..0000000 --- a/helpers/Skills.txt +++ /dev/null @@ -1,61 +0,0 @@ -General -Initiative (Comp) -Rapidite_surnaturelle @Actions -Frères_d'arme @Reserve -Perfection P -Prescience_ @Reserve -Rage_primale @Reserve -A_corps_perdu @Reserve -undescored_name : - -Defence -Encaissement @Defence -Encaissement @Defence -Resistances @Defence -Endurance_surnaturelle @PV -Riposte @Reserve -Riposte @Reserve -Parade @Reserve -Defense_impenetrable I_1 -Defense_impenetrable I_2 -Defense_impenetrable I_4 -Rempart_parfait R -Infatigable (Rappel) -Dernier_Souffle_ (Rappel) -Envers_et_contre_tout (Rappel) -Regeneration (Rappel) -Regeneration (Rappel) -Presence_ecrasante (Rappel) -Maîtrise_du_combat (Rappel) - -Offense -Technique_martiale M_1 -Technique_martiale M_2 -Coup_en_Puissance @Reserve -Coup_Double @Reserve -Coup_dechirant D -Fauchage F -Coup_mortel (Rappel)@Reserve -Combat_acrobatique (Rappel) -Assaut_implacable (Rappel) -Tir_en_mouvement (Rappel) -Exploiter_les_points_faibles E_1 -Exploiter_les_points_faibles E_2 -Exploiter_les_points_faibles E_4 -Double_initiative (Rappel)** -Marcher_dans_les_ombres (Rappel) -Rage_Berserk (Rappel)** -Influx_meurtrier (Rappel)** - - - -Special -Tir_mortel @Reserve -Tir_precis T_1 -Tir_precis T_2 -replace L -add_to_add l -Tir_implacable i -Charge C -Charge_Mortelle (Rappel) -Charge_indomptable N diff --git a/helpers/Todo and utils.txt b/helpers/Todo and utils.txt deleted file mode 100644 index 9c68fef..0000000 --- a/helpers/Todo and utils.txt +++ /dev/null @@ -1,93 +0,0 @@ -//Variables a initialiser par parse -/* -var nb_dices=0; -Action a a e d -var all_dices d* -var nb_2add=0; //+ -var nb_2sub=0; //- - -var relances=0; //r -Perfection P - -Defense -Défense_impénétrable I 1 -Défense_impénétrable I 2 - Rappel -Défense_impénétrable I 4 -Rempart_parfait R - -Offense -Technique_martiale M 1 -Technique_martiale M 2 -Coup_déchirant D -Fauchage F -Exploiter_les_points_faibles E 1 -Exploiter_les_points_faibles E 2 - Rappel -Exploiter_les_points_faibles E 4 - -Spécial -Tir_précis T 1 -Tir_précis T 2 -Tir_implacable i -Charge C -Charge_indomptable N - (Sur la feuille de perso) -Seuil s -On Hit crit H -Attribute values A -Encaissement S - -*/ - -// SKILLNAME -on("change:skill_SKILLNAME_activation change:general_skilllevel_SKILLNAME", function() { - getAttrs(["skill_SKILLNAME_activation", "general_skilllevel_SKILLNAME"], function(values) { - setAttrs({"general_effective_SKILLNAME":values.skill_SKILLNAME_activation*values.general_skilllevel_SKILLNAME}); - }); -}); - - - - - - - - - - - -
- - - - - -
- - - - - - - -// 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}); - }); -}); - -name roll_name dice_name result threshold -/e - Test d.+(\w*).*\[\[(.*)-.*\]\] -&{template:d10skillcheck}{{name=@{character_name}} {{roll_name=$1}} {{dice_name=@{dice}}} {{result=$2}} {{threshold=[[]]}} - -/e .* @{(\w*)}.*\[(.*) -.*\)?\]\] -&{template:d10skillcheck}{{name=@{character_name}}} {{roll_name=@{$1}}} {{dice_name=@{dice}}} {{result=[[$2-d@{dice}cs1cf@{dice}]]}} {{threshold=[[$2]]}} diff --git a/helpers/base.py b/helpers/base.py index cf6baee..a37ec4f 100644 --- a/helpers/base.py +++ b/helpers/base.py @@ -1,5 +1,5 @@ head=""" - + """ script=""" - -
-
- -
- -
-
-
-
-

Ressources

- - - - - - - - - - - - - - - - -

Points de Vie

Points de Fatigue

-
-
- - - -
- - - - - - - - -

Points de compétence :

Utilisés - -
Restants
-
-
-
-
-

Caractéristiques

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Force
Agilité
Perception
Charisme
-
-
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracValeurBonusLancer
Intelligence
Volonté
Psyché
Chance
-
-
-
- - - - -
- - - - -
- -

Combat

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Physiques

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Implants

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Pilotage

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -
- - - -
- -

Techniques

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Connaissances

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Culture Générale

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -
- - - -
- -

Sociales

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Clandestines

- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
-
-
- -

Contacts

- -
- - - - - -
-
-
-
- -
- - - - - - {{#rollWasCrit() result}} - - {{/rollWasCrit() result}} - {{#^rollWasCrit() result}} - {{#rollWasFumble() result}} - {{#rollGreater() result 1}} - - {{/rollGreater() result 1}} - {{#rollBetween() result 0 1}} - - {{/rollBetween() result 0 1}} - {{#rollLess() result 0}} - - {{/rollLess() result 0}} - {{/rollWasFumble() result}} - {{#^rollWasFumble() result}} - {{#rollGreater() result 1}} - - {{/rollGreater() result 1}} - {{#rollBetween() result 0 1}} - - {{/rollBetween() result 0 1}} - {{#rollLess() result 0}} - - {{/rollLess() result 0}} - {{/^rollWasFumble() result}} - {{/^rollWasCrit() result}} - -
{{name}} — {{roll_name}}
Test au d{{dice_name}} seuil {{threshold}}
Critique ! {{result}}x2 degrés de réussiteÉchec critique ! {{result}}/2 degrés de réussiteÉchec critique ! {{result}}/2 degré de réussiteÉchec critique ! {{result}}x2 degrés d'échec{{result}} degrés de réussite{{result}} degré de réussite{{result}} degrés d'échec
-
- - - - -
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} - {{#rollWasCrit() result}} - +{{base}} - {{/rollWasCrit() result}} - {{#rollWasFumble() result}} - {{result}}-{{base}} - {{/rollWasFumble() result}} -
-
- - -
-

{{name}}

-
{{subtags}}
-
- {{#attack}} -
Attack: {{attack}} sucesses
-
Mode: {{mode}} ({{usedammo}})
- {{/attack}} - {{#damage}} -
- Damage: {{damage}} -
-
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
- {{/damage}} - {{#damagedone}} -
- Damage: {{damagedone}} -
-
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
- {{/damagedone}} - {{#special}} -
- Special: {{special}} -
- {{/special}} -
-
diff --git a/helpers/gencss.css b/helpers/systemd10cyberpunk.css similarity index 100% rename from helpers/gencss.css rename to helpers/systemd10cyberpunk.css diff --git a/helpers/gen.html b/helpers/systemd10cyberpunk.html similarity index 99% rename from helpers/gen.html rename to helpers/systemd10cyberpunk.html index 7a5b138..6798dfe 100644 --- a/helpers/gen.html +++ b/helpers/systemd10cyberpunk.html @@ -1,5 +1,5 @@ - + - - - - - diff --git a/helpers/weapon.html b/helpers/weapon.html deleted file mode 100644 index 93e72c2..0000000 --- a/helpers/weapon.html +++ /dev/null @@ -1,98 +0,0 @@ -
-
-
- - - - - - - - - - -
-
- - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - -
-
-
- - - - -
-
- - - -
-
- - - - - - - - -
-
- - -
-
-
- - - - - -
-
- - - -
-
From 86335f4ec7c01fed85e471bdf109838d78146ec4 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 2 Dec 2021 20:20:15 +0100 Subject: [PATCH 61/62] Some spellchecks --- crit.js | 2 +- feuille_sysd10.html | 6 +-- helpers/base.py | 92 ++++++++++++++------------------- helpers/customs.py | 4 +- helpers/skill_generator.py | 4 +- helpers/systemd10cyberpunk.css | 12 ++--- helpers/systemd10cyberpunk.html | 78 ++++++++++------------------ style.css | 6 +-- 8 files changed, 82 insertions(+), 122 deletions(-) diff --git a/crit.js b/crit.js index 7985649..f4a330d 100644 --- a/crit.js +++ b/crit.js @@ -235,7 +235,7 @@ function show_rolls(who,d_vars){ } else if (d_vars.action=="d"||d_vars.action=="e"){ // Can't miss a block or a dodge, can be a shitty roll tho } else { - msg+="L'action est un succes (seuil "+d_vars.seuil+")"; + msg+="L'action est un succes (seuil "+d_vars.seuil+")"; } } } else { diff --git a/feuille_sysd10.html b/feuille_sysd10.html index 6b83fa6..6786a8e 100644 --- a/feuille_sysd10.html +++ b/feuille_sysd10.html @@ -1999,10 +1999,10 @@

Contacts

{{/rollWasFumble() result}} {{#^rollWasFumble() result}} {{#rollGreater() result 1}} - {{result}} degrés de réussite + {{result}} degrés de réussite {{/rollGreater() result 1}} {{#rollBetween() result 0 1}} - {{result}} degré de réussite + {{result}} degré de réussite {{/rollBetween() result 0 1}} {{#rollLess() result 0}} {{result}} degrés d'échec @@ -2015,7 +2015,7 @@

Contacts

- + {{/rollGreater() result 1}} {{#rollBetween() result 0 1}} - + {{/rollBetween() result 0 1}} {{#rollLess() result 0}} @@ -2161,7 +2137,7 @@

Consommable

{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} +
1d10+{{value}} = {{result}} {{#rollWasCrit() result}} +{{base}} {{/rollWasCrit() result}} diff --git a/helpers/base.py b/helpers/base.py index a37ec4f..9f6cee3 100644 --- a/helpers/base.py +++ b/helpers/base.py @@ -1,8 +1,9 @@ -head=""" +head = """ """ -script=""" """ -header=""" +header = """
@@ -36,25 +37,6 @@

-
-

Ressources

- - - - - - - - - - - - - - - -

Points de Vie

Points de Fatigue

-
@@ -88,6 +70,8 @@

Caractéristiques

+
+
@@ -164,7 +148,7 @@
""" -footer=""" +footer = """
Carac
@@ -188,10 +172,10 @@ {{/rollWasFumble() result}} {{#^rollWasFumble() result}} {{#rollGreater() result 1}} - + {{/rollGreater() result 1}} {{#rollBetween() result 0 1}} - + {{/rollBetween() result 0 1}} {{#rollLess() result 0}} @@ -204,7 +188,7 @@
{{result}} degrés de réussite{{result}} degrés de réussite{{result}} degré de réussite{{result}} degré de réussite{{result}} degrés d'échec
- - +
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} +
1d10+{{value}} = {{result}} {{#rollWasCrit() result}} +{{base}} {{/rollWasCrit() result}} @@ -219,32 +203,32 @@

{{name}}

{{subtags}}
- {{#attack}} -
Attack: {{attack}} sucesses
+ {{#attack}} +
Attack: {{attack}} successes
{{#mode}} -
Mode: {{mode}} ({{usedammo}})
+
Mode: {{mode}} ({{usedammo}})
{{/mode}} - {{/attack}} - {{#damage}} -
- Damage: {{damage}} -
+ {{/attack}} + {{#damage}} +
+ Damage: {{damage}} +
{{#ammocurrent}} -
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
{{/ammocurrent}} - {{/damage}} - {{#damagedone}} -
- Damage: {{damagedone}} -
- {{#ammocurrent}} -
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
+ {{/damage}} + {{#damagedone}} +
+ Damage: {{damagedone}} +
+ {{#ammocurrent}} +
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
{{/ammocurrent}} - {{/damagedone}} + {{/damagedone}} {{#special}}
Special: {{special}} @@ -253,7 +237,7 @@
""" -css_footer="""input.sheet-tab{ +css_footer = """input.sheet-tab{ -moz-appearance: none; width:150px; height: 20px; @@ -380,8 +364,8 @@ border-width: 0px; margin-top: -10px; } -.sheet-rolltemplate-d10init .sheet-roll-sucess, -.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , +.sheet-rolltemplate-d10init .sheet-roll-success, +.sheet-rolltemplate-d10skillcheck .sheet-roll-success , .sheet-rolltemplate-d10skillcheck .sheet-roll-fail { padding:0px; margin:0px; @@ -412,16 +396,16 @@ } .sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullcrit, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit { - color: #3FB315; + color: #3FB315; border: none; } .sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { - color: #B31515; + color: #B31515; border: none; } .sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll { - color: #4A57ED; + color: #4A57ED; border: none; } @@ -446,7 +430,7 @@ text-align: right; padding-right:10px; } -.sheet-rolltemplate-d10fight .sheet-sucess, +.sheet-rolltemplate-d10fight .sheet-success, .sheet-rolltemplate-d10fight .sheet-line{ padding:0px; margin:0px; diff --git a/helpers/customs.py b/helpers/customs.py index 184e4fa..0dff0e7 100644 --- a/helpers/customs.py +++ b/helpers/customs.py @@ -38,7 +38,7 @@ def content(self): - +
@@ -96,7 +96,7 @@ def content(self): - +
""" diff --git a/helpers/skill_generator.py b/helpers/skill_generator.py index 09a5019..483e52b 100644 --- a/helpers/skill_generator.py +++ b/helpers/skill_generator.py @@ -205,11 +205,11 @@ def pprint(args): def pErrors(name, errors): - "Print sucess or error of given test" + "Print success or error of given test" if errors: print("{:<15}: {} errors occured".format(name, errors)) else: - print("{:<15}: All test sucessful".format(name)) + print("{:<15}: All test successful".format(name)) return errors diff --git a/helpers/systemd10cyberpunk.css b/helpers/systemd10cyberpunk.css index 1ddc343..e1af46c 100644 --- a/helpers/systemd10cyberpunk.css +++ b/helpers/systemd10cyberpunk.css @@ -158,8 +158,8 @@ select.sheet-dice_select{ border-width: 0px; margin-top: -10px; } -.sheet-rolltemplate-d10init .sheet-roll-sucess, -.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , +.sheet-rolltemplate-d10init .sheet-roll-success, +.sheet-rolltemplate-d10skillcheck .sheet-roll-success , .sheet-rolltemplate-d10skillcheck .sheet-roll-fail { padding:0px; margin:0px; @@ -190,16 +190,16 @@ select.sheet-dice_select{ } .sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullcrit, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit { - color: #3FB315; + color: #3FB315; border: none; } .sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail, .sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail { - color: #B31515; + color: #B31515; border: none; } .sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll { - color: #4A57ED; + color: #4A57ED; border: none; } @@ -224,7 +224,7 @@ select.sheet-dice_select{ text-align: right; padding-right:10px; } -.sheet-rolltemplate-d10fight .sheet-sucess, +.sheet-rolltemplate-d10fight .sheet-success, .sheet-rolltemplate-d10fight .sheet-line{ padding:0px; margin:0px; diff --git a/helpers/systemd10cyberpunk.html b/helpers/systemd10cyberpunk.html index 6798dfe..591d927 100644 --- a/helpers/systemd10cyberpunk.html +++ b/helpers/systemd10cyberpunk.html @@ -1,31 +1,7 @@ - -
@@ -49,7 +25,7 @@

Ressources

Points de Fatigue

@@ -2047,7 +2023,7 @@

Distance

- +
@@ -2098,7 +2074,7 @@

Melée

- +
@@ -2145,10 +2121,10 @@

Consommable

{{/rollWasFumble() result}} {{#^rollWasFumble() result}} {{#rollGreater() result 1}} -
{{result}} degrés de réussite{{result}} degrés de réussite{{result}} degré de réussite{{result}} degré de réussite{{result}} degrés d'échec
-
{{name}} — {{roll_name}}
1d10+{{value}} = {{result}} +
1d10+{{value}} = {{result}} {{#rollWasCrit() result}} +{{base}} {{/rollWasCrit() result}} @@ -2176,32 +2152,32 @@

Consommable

{{name}}

{{subtags}}
- {{#attack}} -
Attack: {{attack}} sucesses
+ {{#attack}} +
Attack: {{attack}} successes
{{#mode}} -
Mode: {{mode}} ({{usedammo}})
+
Mode: {{mode}} ({{usedammo}})
{{/mode}} - {{/attack}} - {{#damage}} -
- Damage: {{damage}} -
+ {{/attack}} + {{#damage}} +
+ Damage: {{damage}} +
{{#ammocurrent}} -
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
+
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
{{/ammocurrent}} - {{/damage}} - {{#damagedone}} -
- Damage: {{damagedone}} -
- {{#ammocurrent}} -
- Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} -
+ {{/damage}} + {{#damagedone}} +
+ Damage: {{damagedone}} +
+ {{#ammocurrent}} +
+ Ammunition: {{ammocurrent}}/{{magsize}} | {{ammototal}} +
{{/ammocurrent}} - {{/damagedone}} + {{/damagedone}} {{#special}}
Special: {{special}} diff --git a/style.css b/style.css index bc49b4b..05a9888 100644 --- a/style.css +++ b/style.css @@ -159,8 +159,8 @@ select.sheet-dice_select{ border-width: 0px; margin-top: -10px; } -.sheet-rolltemplate-d10init .sheet-roll-sucess, -.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess , +.sheet-rolltemplate-d10init .sheet-roll-success, +.sheet-rolltemplate-d10skillcheck .sheet-roll-success , .sheet-rolltemplate-d10skillcheck .sheet-roll-fail { padding:0px; margin:0px; @@ -227,7 +227,7 @@ select.sheet-dice_select{ text-align: right; padding-right:10px; } -.sheet-rolltemplate-d10fight .sheet-sucess, +.sheet-rolltemplate-d10fight .sheet-success, .sheet-rolltemplate-d10fight .sheet-line{ padding:0px; margin:0px; From 7813de6a8023091e0fd321979af7f9d3acc4b677 Mon Sep 17 00:00:00 2001 From: vkyfox Date: Thu, 2 Dec 2021 21:24:36 +0100 Subject: [PATCH 62/62] Text adjustments for French langugage --- helpers/cyberpnk.txt | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/helpers/cyberpnk.txt b/helpers/cyberpnk.txt index 8b891ea..aa443a4 100644 --- a/helpers/cyberpnk.txt +++ b/helpers/cyberpnk.txt @@ -10,13 +10,13 @@ = Artillerie - ⇥ Projectiles balistiques - ⇥ Guidage de missiles -- ⇥ Systemes de défences +- ⇥ Systemes de défenses - ⇥ Balistique superlative = Combat à Mains Nues - ⇥ Neo Kwon Do - ⇥ Zero-G = Combat Armé -- ⇥ Armes Contandantes +- ⇥ Armes Contondantes - ⇥ Armes Tranchantes = Maniement des Explosifs @@ -38,23 +38,23 @@ - ⇥ Overdrive Physique + Pilotage -= Pilotage athmosphérique += Pilotage atmosphérique - ⇥ Pilotage de Chasseurs - ⇥ Pilotage de Navettes -= Vehicules Terestres -- ⇥ Vehicules Legers += Vehicules Terrestres +- ⇥ Vehicules Légers - ⇥ Vehicules Lourds - ⇥ Véhicules de Course = Vaisseaux Spatiaux -- ⇥ Batiments légers -- ⇥ Batiments lourds -- ⇥ Batiments super lourds +- ⇥ Bâtiments légers +- ⇥ Bâtiments lourds +- ⇥ Bâtiments super lourds @ Intelectuelles + Techniques = Biotech - ⇥ Chirurgie d’implants -= Electronique += Électronique - ⇥ Interconnection des systèmes - ⇥ Verrous magnétiques = Informatique @@ -67,7 +67,7 @@ - ⇥ Compensateurs d'Inertie - ⇥ Technologie Lightfold - ⇥ Systèmes de Survie -- ⇥ Systemes de Propultion +- ⇥ Systèmes de Propulsion = Prospection stellaire - ⇥ Corps stellaires - ⇥ Excavation planetaire @@ -97,9 +97,9 @@ - ⇥ Tactique - ⇥ Stratégie -@ Social -+ Sociales -= Etiquette +@ Sociales ++ Relations humaines += Étiquette - ⇥ Alpha Centauri - ⇥ Eridani - ⇥ Banard @@ -112,10 +112,10 @@ - ⇥ Intimidation = Commandement = Négociation -= Baratin += Barratin + Clandestines -= Discretion += Discrétion = Crochetage = Informations = Larcin @@ -129,7 +129,7 @@ @ Arsenal + Distance # DISTANCE -+ Melée ++ Mêlée # MELEE + Consommable # CONSOMMABLE