Difference between revisions of "Template:RareItem.dpl2detailed"

Line 9: Line 9:
 
--> {{#arraydefine: shards| Arirang,Asuka,Atlantic,Baja,Balhae,Catskills,Chesapeake,Drachenfels,Europa,Formosa,GL,Hokuto,Izumo,LA,LS,Legends,Mizuho,Mugen,Napa,Oceania,Origin,Pacific,Sakura,SP,Sonoma,Wakoku,Yamato,NL,Test,Abyss,Baekdu,Farmageddon,Retribution,SantaSlay,ShardOfScreams,ShardOfTheDead,ShardOfTheDead2,Winterland}}<!--
 
--> {{#arraydefine: shards| Arirang,Asuka,Atlantic,Baja,Balhae,Catskills,Chesapeake,Drachenfels,Europa,Formosa,GL,Hokuto,Izumo,LA,LS,Legends,Mizuho,Mugen,Napa,Oceania,Origin,Pacific,Sakura,SP,Sonoma,Wakoku,Yamato,NL,Test,Abyss,Baekdu,Farmageddon,Retribution,SantaSlay,ShardOfScreams,ShardOfTheDead,ShardOfTheDead2,Winterland}}<!--
 
--> {{#arraydefine: shardTypes| a,j,w,w,a,w,w,w,w,a,w,j,j,w,w,w,j,jh,w,a,w,w,j,wh,w,j,j,,,,,,,,,,,}}<!--
 
--> {{#arraydefine: shardTypes| a,j,w,w,a,w,w,w,w,a,w,j,j,w,w,w,j,jh,w,a,w,w,j,wh,w,j,j,,,,,,,,,,,}}<!--
--> {{#vardefine: n|0}}{{#vardefine: allwestern|1}}{{#vardefine: alljapan|1}}{{#vardefine: allasia|1}}<!--
+
--> {{#vardefine: n|0}}{{#vardefine: all_western|1}}{{#vardefine: all_japan|1}}{{#vardefine: all_asia|1}}{{#vardefine: wohc_western|0}}{{#vardefine: wohc_japan|0}}{{#vardefine: nonregular|0}}<!--
 
-->{{#loop: i | 0 | {{#arraysize: shards}} |
 
-->{{#loop: i | 0 | {{#arraysize: shards}} |
 
{{#vardefine: exist|{{Boolean|{{{ {{#arrayindex:shards|{{#var:i}}}}|}}} }} }}
 
{{#vardefine: exist|{{Boolean|{{{ {{#arrayindex:shards|{{#var:i}}}}|}}} }} }}
 
{{#switch: {{#arrayindex: shardTypes|{{#var:i}}}}
 
{{#switch: {{#arrayindex: shardTypes|{{#var:i}}}}
|j|jh = {{#ifexpr: {{#var:exist}}||{{#vardefine: alljapan|0}}{{#vardefine: allasia|0}} }}
+
|j = {{#ifexpr: {{#var:exist}}||{{#vardefine: all_japan|0}}{{#vardefine: all_asia|0}} }}
|w|wh = {{#ifexpr: {{#var:exist}}||{{#vardefine: allwestern|0}} }}
+
|jh= {{#ifexpr: {{#var:exist}}||{{#vardefine: wohc_japan|1}} }}
|a = {{#ifexpr: {{#var:exist}}||{{#vardefine: allasia|0}} }}
+
|w = {{#ifexpr: {{#var:exist}}||{{#vardefine: all_western|0}} }}
 +
|wh= {{#ifexpr: {{#var:exist}}||{{#vardefine: wohc_western|1}} }}
 +
|a = {{#ifexpr: {{#var:exist}}||{{#vardefine: all_asia|0}} }}
 +
|#default = {{#ifexpr: {{#var:exist}}|{{#vardefine: nonregular|1}}| }}
 
}}
 
}}
 
}}<!--
 
}}<!--
-->{{#ifexpr: {{#var:allwestern}} and {{#var:allasia}}
+
-->{{#ifexpr: {{#var:all_western}} and {{#var:all_asia}}
|All Shards<br/>
+
|{{#ifexpr: {{#var:nonregular}}|All Regular Shards|All Shards}}<br/>
|{{#ifexpr: {{#var:allasia}}|All Asia Shards<br/>|{{#ifexpr: {{#var:alljapan}}|All Japanese Shards<br/>|}}{{#ifexpr: {{#var:allasia}}|All Western Shards<br/>|}} }}
+
|{{#ifexpr: {{#var:all_asia}}|All Asia Shards<br/>|{{#ifexpr: {{#var:all_japan}}|All Japanese Shards{{#ifexpr:{{#var:wohc_western}}|(w/o Mugen)|}}<br/>|}}{{#ifexpr: {{#var:all_asia}}|All Western Shards{{#ifexpr:{{#var:wohc_western}}|(w/o SP)|}}<br/>|}} }}
 
}}<!--
 
}}<!--
 
-->{{#loop: i | 0 | {{#arraysize: shards}} |
 
-->{{#loop: i | 0 | {{#arraysize: shards}} |
Line 26: Line 29:
 
--> {{#vardefine: exist|{{Boolean|{{{ {{#var:shard}}|}}} }} }}<!--
 
--> {{#vardefine: exist|{{Boolean|{{{ {{#var:shard}}|}}} }} }}<!--
 
--> {{#switch: {{#arrayindex: shardTypes|{{#var:i}}}}
 
--> {{#switch: {{#arrayindex: shardTypes|{{#var:i}}}}
|j|jh = {{#ifexpr: {{#var:alljapan}} or {{#var:allasia}}| {{#vardefine: exist|0}}| }}
+
|j|jh = {{#ifexpr: {{#var:all_japan}} or {{#var:all_asia}}| {{#vardefine: exist|0}}| }}
|w|wh = {{#ifexpr: {{#var:allwestern}}| {{#vardefine: exist|0}}| }}
+
|w|wh = {{#ifexpr: {{#var:all_western}}| {{#vardefine: exist|0}}| }}
|a = {{#ifexpr: {{#var:allasia}}| {{#vardefine: exist|0}}| }}
+
|a = {{#ifexpr: {{#var:all_asia}}| {{#vardefine: exist|0}}| }}
 
}}<!--
 
}}<!--
 
--> {{#vardefine: shardname |
 
--> {{#vardefine: shardname |
Line 48: Line 51:
 
-->{{#ifexpr: {{#var:exist}}| {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}{{#var:shardname}}<br/>|}}
 
-->{{#ifexpr: {{#var:exist}}| {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}{{#var:shardname}}<br/>|}}
 
}}<!--
 
}}<!--
-->{{#ifexpr: {{#var:n}} = 0 and {{#var:allwestern}} = 0 and {{#var:allasia}} = 0 and {{#var:alljapan}} = 0|[[UO:Rares from unknown shards|unknown]]|}}
+
-->{{#ifexpr: {{#var:n}} = 0 and {{#var:all_western}} = 0 and {{#var:all_asia}} = 0 and {{#var:all_japan}} = 0|unknown|}}
 
{{!!}}<!--
 
{{!!}}<!--
 
-->{{#arraydefine: seasons | {{{season|}}}|,}}{{#vardefine: firstseason | {{#arrayindex:seasons|0}} }}<!--
 
-->{{#arraydefine: seasons | {{{season|}}}|,}}{{#vardefine: firstseason | {{#arrayindex:seasons|0}} }}<!--
Line 61: Line 64:
 
--> {{#vardefine: month | {{#switch: {{lc:{{padleft:|3|{{{month|}}}~ }} }} | 1~1 | jan = Jan | 2~2 | feb = Feb | 3~3 | mar = Mar | 4~4 | apr = Apr | 5~5 | may = May | 6~6 | jun = Jun | 7~7 | jul = Jul | 8~8 | aug = Aug | 9~9 | sep | sept = Sep | 10~ | oct = Oct | 11~ | nov = Nov | 12~ | dec = Dec | #default = }} }}{{#var: month}}{{#if: {{{day|}}}|&nbsp;{{{day}}}|}}
 
--> {{#vardefine: month | {{#switch: {{lc:{{padleft:|3|{{{month|}}}~ }} }} | 1~1 | jan = Jan | 2~2 | feb = Feb | 3~3 | mar = Mar | 4~4 | apr = Apr | 5~5 | may = May | 6~6 | jun = Jun | 7~7 | jul = Jul | 8~8 | aug = Aug | 9~9 | sep | sept = Sep | 10~ | oct = Oct | 11~ | nov = Nov | 12~ | dec = Dec | #default = }} }}{{#var: month}}{{#if: {{{day|}}}|&nbsp;{{{day}}}|}}
 
{{!!}}<!--
 
{{!!}}<!--
--> {{#if: {{{quantity|}}} | {{#replace: {{{quantity}}}|*|&lowast;}}|unknown[[:Category:UO:Rares of unknown quantity]]}}
+
--> {{#if: {{{quantity|}}} | {{#replace: {{{quantity}}}|*|&lowast;}}|unknown}}
 
}}
 
}}

Revision as of 09:00, 10 January 2022