• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Template:Calc AdjAA/ShipAA Tableline"

From Kancolle Wiki
Jump to navigation Jump to search
(Created page with "<includeonly> |- |{{#switch: {{{Type}}}| HA Gun = {{Green Gun}}| AAFD = {{AAFD}}| Radar = {{Radar}}| AA Gun = {{AA Gun}}| T3 = {{AA Shell}}| 46cm = {{Large Gun}}| {{Empty}}}}...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{#vardefine:Icon | {{calc|!{{{Name}}}|?_icon}} }}{{#vardefine:AA | {{calc|!{{{Name}}}|?aa}} }}
 
|-
 
|-
|{{#switch: {{{Type}}}| HA Gun = {{Green Gun}}| AAFD = {{AAFD}}| Radar = {{Radar}}| AA Gun = {{AA Gun}}| T3 = {{AA Shell}}| 46cm = {{Large Gun}}| {{Empty}}}} [[{{{Name}}}]]
+
|{{Equipment/Card|{{{Name}}}|small=true}}
|{{{AA}}}
+
|{{#var:AA}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=0}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}} round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=1}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}} round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=2}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(2) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=3}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(3) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=4}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(4) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=5}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(5) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=6}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(6) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=7}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(7) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=8}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(8) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=9}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(9) round 2}}
|{{Calc AdjAA/ShipAA|AA={{{AA}}}|Type={{{Type}}}|Star=10}}
+
|{{#expr: {{#var:AA}}*{{#switch: {{#var:Icon}}| 16 = 4| 30 = 4| 11 = 3| 15 = 6| 0}}+{{#switch: {{#var:Icon}}| 16 = {{#ifexpr:{{#var:AA}}>7|3|2}}| 30 = 2| 15 = {{#ifexpr:{{#var:AA}}>7|6|4}}| 0}}*sqrt(10) round 2}}</includeonly><noinclude>
</includeonly><noinclude>
 
  
 
This template create a line for a table which contain the Ship Adjusted AA of an equipment for all improvement level.
 
This template create a line for a table which contain the Ship Adjusted AA of an equipment for all improvement level.
Line 20: Line 19:
 
{{Calc AdjAA/ShipAA Tableline
 
{{Calc AdjAA/ShipAA Tableline
 
|Name= (string) Name of the equipment
 
|Name= (string) Name of the equipment
|AA= (interger) AA stat of the equipment
 
|Type= (string) type of the equipment only
 
 
}}
 
}}
 
</pre>
 
</pre>
 
Example:
 
Example:
 
<pre>
 
<pre>
{|class="wikitable sortable"
+
{{Calc AdjAA/Header}}
!rowspan=2|Name!!rowspan=2|{{AA}}!!colspan=11|Ship Adjusted Anti-Air
 
|-
 
!0★!!1★!!2★!!3★!!4★!!5★!!6★!!7★!!8★!!9★!!10★
 
 
{{Calc AdjAA/ShipAA Tableline
 
{{Calc AdjAA/ShipAA Tableline
 
|Name=10cm Twin High-angle Gun Mount
 
|Name=10cm Twin High-angle Gun Mount
|AA=7
 
|Type=HA Gun
 
 
}}
 
}}
 
|}
 
|}
 
</pre>
 
</pre>
{|class="wikitable sortable"
+
{{Calc AdjAA/Header}}
!rowspan=2|Name!!rowspan=2|{{AA}}!!colspan=11|Ship Adjusted Anti-Air
 
|-
 
!0★!!1★!!2★!!3★!!4★!!5★!!6★!!7★!!8★!!9★!!10★
 
 
{{Calc AdjAA/ShipAA Tableline
 
{{Calc AdjAA/ShipAA Tableline
 
|Name=10cm Twin High-angle Gun Mount
 
|Name=10cm Twin High-angle Gun Mount
|AA=7
 
|Type=HA Gun
 
 
}}
 
}}
 
|}
 
|}

Latest revision as of 16:03, 9 September 2024


This template create a line for a table which contain the Ship Adjusted AA of an equipment for all improvement level.

{{Calc AdjAA/ShipAA Tableline
|Name= (string) Name of the equipment
}}

Example:

{{Calc AdjAA/Header}}
{{Calc AdjAA/ShipAA Tableline
|Name=10cm Twin High-angle Gun Mount
}}
|}
Name Anti-Air Fleet Adjusted Anti-Air
0★ 1★ 2★ 3★ 4★ 5★ 6★ 7★ 8★ 9★ 10★
Equipment Card 10cm Twin High-angle Gun Mount.png 7 28 30 30.83 31.46 32 32.47 32.9 33.29 33.66 34 34.32