Modèle:Équipements/Bonus : Différence entre versions

[version vérifiée][version vérifiée]
Ligne 1 : Ligne 1 :
{{#switch:{{{Mouton|1}}}
+
<div style="display: flex; flex-direction: row;">
|1=<div style="display: flex; flex-direction: row;">
 
 
<div style="display: grid; grid-template-columns: max-content; justify-items: center; column-gap: 4px; row-gap: 2px; margin-right: 4px; align-self: start;">
 
<div style="display: grid; grid-template-columns: max-content; justify-items: center; column-gap: 4px; row-gap: 2px; margin-right: 4px; align-self: start;">
 
<div class="fondfenetre" style="color: white; width: 100%; border: 1px black solid;">Amélioration</div>
 
<div class="fondfenetre" style="color: white; width: 100%; border: 1px black solid;">Amélioration</div>
Ligne 6 : Ligne 5 :
 
  | key
 
  | key
 
  | value
 
  | value
  |<div id="soulignement" style="border: 1px solid black; width: 100%; font-weight: bold;">{{#var:value}}</div>
+
  |{{#ifeq:{{#var:key}}|{{{Emplacement{{#var:terre}}|}}}|{{#vardefine:terre|{{#expr:{{#var:terre}}+1}}}}<div style="background: #EADEB3; border: 1px solid black; width: 100%;"><div style="visibility: hidden;">oui</div></div>||}}<div id="soulignement" style="border: 1px solid black; width: 100%; font-weight: bold;">{{#var:value}}</div>
 
  }}
 
  }}
 
</div>
 
</div>
Ligne 20 : Ligne 19 :
 
  | key
 
  | key
 
  | value
 
  | value
  |
+
  |{{#ifeq:{{#var:key}}|{{{Emplacement{{#var:terre}}|}}}|<div style="background: #EADEB3; border: 1px solid black; width: 100%; grid-column: 1 / {{#expr:2+{{{Up|9}}}}}; font-weight: bold;">Bonus supplémentaire : {{#var:terre}}<sup>{{#ifeq:{{#var:terre}}|1|er|e}}</sup> emplacement</div>{{#vardefine:terre|{{#expr:{{#var:terre}}+1}}}}|}}
 
{{#loop: tortue
 
{{#loop: tortue
 
  |0
 
  |0
Ligne 31 : Ligne 30 :
 
</div>
 
</div>
 
</div>
 
</div>
|2={{#vardefine:prev|0}}<div style="display: flex; flex-direction: row;">
 
<div style="display: grid; grid-template-columns: max-content; justify-items: center; column-gap: 4px; row-gap: 2px; align-self: start; margin-right: 3px;">
 
<div class="fondfenetre" style="color: white; width: 100%; border: 1px black solid;">Amélioration</div>
 
<div style="background: #EADEB3; border: 1px solid black; width: 100%;"><div style="visibility: hidden;">oui</div></div>{{#vardefine:terre|1}}
 
{{#forargs: Bonus
 
| key
 
| value
 
|{{#ifeq:{{#var:key}}|{{{Emplacement{{#var:terre}}|}}}|{{#vardefine:terre|{{#expr:{{#var:terre}}+1}}}}<div style="background: #EADEB3; border: 1px solid black; width: 100%;"><div style="visibility: hidden;">oui</div></div>||}}<div style="width: 100%; display: flex; flex-direction: row; margin-right: 2px;">
 
  <div id="soulignement" style="display: flex; padding: 0 2px; margin-right: 2px; border: 1px solid black; width: 100%; font-weight: bold;"><div style="margin: auto;">{{#var:value}}</div></div>
 
  <div style="display: grid; grid-template-columns: max-content justify-items: center; column-gap: 4px; row-gap: 2px; align-self: start;">
 
{{#forargs: {{#var:key}}Chemin
 
  | key2
 
  | value2
 
  | <div style="width: 100%; border: 1px black solid;">{{#var:key2}}#</div>
 
  }}
 
  </div>
 
  </div>
 
}}
 
</div>
 
<div style="width: 100%; overflow: auto;">
 
<div style="margin: 0 1px 5px 1px;">
 
<div style="width: 100%; display: grid; grid-template-columns: repeat({{#expr:{{{Up|9}}}+1}}, minmax(60px, 1fr)); justify-items: center; column-gap: 4px; row-gap: 2px;">
 
{{#loop: tortue
 
|0
 
|{{#expr:{{{Up|9}}}+1}}
 
|<div class="fondfenetre" style="color: white; width: 100%; border: 1px black solid;">+{{#var:tortue}}</div>
 
}}
 
<div style="background: #EADEB3; border: 1px solid black; width: 100%; grid-column: 1 / {{#expr:2+{{{Up|9}}}}}; font-weight: bold;">Bonus de base</div>{{#vardefine:terre|1}}
 
{{#forargs: Bonus
 
| key
 
| value
 
|{{#ifeq:{{#var:key}}|{{{Emplacement{{#var:terre}}|}}}|<div style="background: #EADEB3; border: 1px solid black; width: 100%; grid-column: 1 / {{#expr:2+{{{Up|9}}}}}; font-weight: bold;">Bonus supplémentaire : {{#var:terre}}<sup>{{#ifeq:{{#var:terre}}|1|er|e}}</sup> emplacement</div>{{#vardefine:terre|{{#expr:{{#var:terre}}+1}}}}|}}
 
{{#forargs: {{#var:key}}Chemin
 
  | key2
 
  | value2
 
  |
 
  {{#loop: tortue
 
  |0
 
  |{{#expr:{{{Up|9}}}+1}}
 
  |<div style="border: 1px solid black; width: 100%;">{{{{{#expr:1+{{#var:tortue}}+{{#var:prev}}}}|0}}}</div>
 
  }}{{#vardefine:prev|{{#expr:{{#var:prev}}+{{{Up|9}}}+1}}}}
 
}}
 
}}
 
</div>
 
</div>
 
</div>
 
</div>
 
}}
 
 
<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>
 
<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>

Version du 4 août 2021 à 21:05

Amélioration
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9