11,245
editsRearranged the section layout so that condition sources is above the table of conditions with the same stack ID. The stack ID table can get very long which obscured the more pertinent information about the condition sources.
(Only checks if stack id is unique if there is a stack id. Added new features to stack ID documentation.) |
(Rearranged the section layout so that condition sources is above the table of conditions with the same stack ID. The stack ID table can get very long which obscured the more pertinent information about the condition sources.) |
||
(38 intermediate revisions by 5 users not shown) | |||
Line 9: | Line 9: | ||
| {{#ifeq:{{{disease|}}}|yes|disease|{{{type|}}} }} | | {{#ifeq:{{{disease|}}}|yes|disease|{{{type|}}} }} | ||
}}<!-- Check if the stack ID is used by any other conditions and save it as #lvar:stackid --> {{#if:{{{stack id|}}}|{{#vardefine:counter|0 | }}<!-- Check if the stack ID is used by any other conditions and save it as #lvar:stackid --> {{#if:{{{stack id|}}}|{{#vardefine:counter|0 | ||
}}{{#cargo_query:tables=conditions|fields=name|where=stack_id='{{{stack id}}}'|format=template|template=counter | }}{{#cargo_query:tables=conditions|fields=name|where=stack_id='{{{stack id}}}'||order by=name ASC|format=template|template=counter|default= | ||
}}{{#lvardef:stackid|{{# | }}{{#lvardef:stackid|{{#ifeq:{{#var:counter}}|1||1}}}} | ||
}}<!-- Status properties --> {{#lvardef:FreezeDuration|{{#if:{{#invoke:String2|matchAny|source={{{properties}}}|FreezeDuration}}|1|}} | |||
}}{{PageSeo | }}{{PageSeo | ||
Line 22: | Line 23: | ||
{{Condition type|{{#lvar:type}} }}}}{{#if:{{{honour mode|}}}|{{blank}} | {{Condition type|{{#lvar:type}} }}}}{{#if:{{{honour mode|}}}|{{blank}} | ||
== | == Honour mode == | ||
{{{honour mode}}}}}{{#if:{{#lvar:stackid}}{{{status groups|}}}{{{tick type|}}}{{{stack type|}}}{{{properties|}}}|{{blank}} | {{{honour mode}}}}}{{#if:{{#lvar:stackid}}{{{status groups|}}}{{{tick type|}}}{{{stack type|}}}{{{properties|}}}|{{blank}} | ||
Line 28: | Line 29: | ||
{{#if:{{#lvar:stackid}}|{{blank}} | {{#if:{{#lvar:stackid}}|{{blank}} | ||
{{ | {{SmIconLink|Info Icon.png|Stack ID}}: {{code|{{{stack id}}}}}{{Main namespace only|[[Category:Has stack ID]]}}|{{Main namespace only|[[Category:No stack ID]]}} | ||
}}{{#if: {{{status groups|}}}|{{blank}} | }}{{#if: {{{status groups|}}}|{{blank}} | ||
{{#arraydefine:status groups|{{{status groups|}}}|,}} | {{#arraydefine:status groups|{{{status groups|}}}|,}} | ||
{{ | {{SmIconLink|Plus Icon.png|Status groups}}: {{#arrayprint:status groups|, |@|{{SG|@}}}}{{Main namespace only|[[Category:Has status groups]]}}|{{Main namespace only|[[Category:No status groups]]}} | ||
}}{{#if: {{{tick type|}}}|{{blank}} | }}{{#if: {{{tick type|}}}{{#lvar:FreezeDuration}}|{{blank}} | ||
{{ | {{SmIconLink|Duration Icons.png|Conditions#Duration|Loses duration}}: {{#if:{{#lvar:FreezeDuration}}|{{SP|FreezeDuration|No}}|{{#switch: {{lc:{{{tick type}}}}} | ||
| start | start turn | startturn = start of turn | | start | start turn | startturn = start of turn | ||
| end | end turn | endturn = end of turn | | end | end turn | endturn = end of turn | ||
Line 41: | Line 42: | ||
| none = N/A | | none = N/A | ||
| #default = !syntax error! | | #default = !syntax error! | ||
}}{{Main namespace only|[[Category:Has tick type]]}}|{{Main namespace only|[[Category:No tick type]]}}}}{{#if: {{{stack type|}}}|{{blank}} | }}}}{{Main namespace only|[[Category:Has tick type]]}}|{{Main namespace only|[[Category:No tick type]]}}}}{{#if: {{{stack type|}}}|{{blank}} | ||
{{ | {{SmIconLink|Sort Icon.png|Conditions#Stack type|If already applied}}: {{#switch: {{lc:{{{stack type}}}}} | ||
| additive = add to duration | | additive = add to duration | ||
| overwrite = replace current | | overwrite = replace current | ||
Line 52: | Line 53: | ||
}}{{#if: {{{stack priority|}}}|{{blank}} | }}{{#if: {{{stack priority|}}}|{{blank}} | ||
{{ | {{SmIconLink|Empty Icon.png|Stack priority}}: {{{stack priority}}}{{Main namespace only|[[Category:Has stack priority]]}}|{{Main namespace only|[[Category:No stack priority]]}} | ||
}}{{#if: {{{properties|}}}|{{blank}} | }}{{#if: {{{properties|}}}|{{blank}} | ||
{{ | {{SmIconLink|Options Icon.png|Status properties|More properties}}:{{#invoke:ParseList|main|{{#arraydefine:propertiesList|{{{properties|}}}|,}}{{#arrayprint:propertiesList|,|@|{{SP|@}}}}|type=htmlList}}{{Main namespace only|[[Category:Has status properties]]}}|{{Main namespace only|[[Category:No status properties]]}}}}|{{Main namespace only|[[Category:No stack ID]][[Category:No status groups]][[Category:No tick type]][[Category:No stack type]][[Category:No stack priority]][[Category:No status properties]]}} | ||
</div><references/> | |{{Main namespace only|[[Category:Condition pages with no properties]]}}}} | ||
</div> {{#if: {{{grants|}}} | | |||
<h2> Grants: </h2> | |||
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common"> | |||
{{#invoke: ParseList | main | {{{grants}}} | type = htmlListNoBullets | useTemplate = SAI/fixed }} | |||
</div> | |||
}}{{#if: {{{condition|}}} | | |||
<h2> Condition: {{{condition}}} </h2> | |||
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common"> | |||
{{Condition | {{{condition}}} | |||
| save = {{{condition save|}}} | |||
| dc = {{{condition dc|}}} | |||
| radius m = {{{condition radius m|}}} | |||
| duration = {{{condition duration|}}} | |||
}} | |||
{{main namespace only|{{Inflicts|{{{condition}}}|cond|type=condition|dc={{{condition dc|}}}|save={{{condition save|}}}|duration={{{condition duration|}}}}}}} | |||
</div> | |||
}}{{#if: {{{condition2|}}} | {{blank}} | |||
<h2> Condition: {{{condition2}}} </h2> | |||
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common"> | |||
{{Condition | {{{condition2}}} | |||
| save = {{{condition2 save|}}} | |||
| dc = {{{condition2 dc|}}} | |||
| radius m = {{{condition2 radius m|}}} | |||
| duration = {{{condition2 duration|}}} | |||
}} | |||
{{main namespace only|{{Inflicts|{{{condition2}}}|cond|type=condition|dc={{{condition2 dc|}}}|save={{{condition2 save|}}}|duration={{{condition2 duration|}}}}}}} | |||
</div> | |||
}}{{#if: {{{condition3|}}} | {{blank}} | |||
<h2> Condition: {{{condition3}}} </h2> | |||
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common"> | |||
{{Condition | {{{condition3}}} | |||
| save = {{{condition3 save|}}} | |||
| dc = {{{condition3 dc|}}} | |||
| radius m = {{{condition3 radius m|}}} | |||
| duration = {{{condition3 duration|}}} | |||
}} | |||
{{main namespace only|{{Inflicts|{{{condition3}}}|cond|type=condition|dc={{{condition3 dc|}}}|save={{{condition3 save|}}}|duration={{{condition3 duration|}}}}}}} | |||
</div> | |||
}}<references/> | |||
{{#if:{{{notes|}}}| | {{#if:{{{notes|}}}| | ||
== Notes == | == Notes == | ||
{{{notes}}} | {{{notes}}} | ||
}} | |||
{{#if:{{{bugs|}}}| | |||
== Bugs == | |||
{{{bugs}}} | |||
[[Category:Bugs]] | |||
}}{{#if: {{{suppress sources|}}} | | {{blank}} | |||
== Sources of {{#lvar:name}} == | |||
{{Condition sources | {{#lvar:page}} }} | |||
}} | |||
<!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]{{#cargo_store: _table = conditions | |||
| name = {{#lvar:name}} | |||
| icon = {{#lvar:icon}} | |||
| brief = {{{brief|}}} | |||
| types = {{#lvar:type}} | |||
| condition_name = {{{condition|}}} | |||
| condition2_name = {{{condition2|}}} | |||
| condition3_name = {{{condition3|}}} | |||
}}{{#if:{{#lvar:stackid}}|{{blank}} | }}{{#if:{{#lvar:stackid}}|{{blank}} | ||
Line 66: | Line 136: | ||
{{#cargo_query: | {{#cargo_query: | ||
tables = conditions | tables = conditions | ||
|fields = name, icon, effects | |fields = _pageName = page, name, icon, effects | ||
|where = stack_id='{{{stack id}}}' | |where = stack_id='{{{stack id}}}' | ||
|order by = name | |order by = name | ||
Line 74: | Line 144: | ||
|intro={{ConditionsTableHeader}} | |intro={{ConditionsTableHeader}} | ||
|outro={{ConditionsTableFooter}} | |outro={{ConditionsTableFooter}} | ||
}}{{Main namespace only|[[Category:Conditions with shared stack IDs]]}} | |||
}} | }} | ||
}}</includeonly><noinclude>{{documentation}}{{#cargo_declare: _table = conditions | |||
}}</includeonly><noinclude>{{documentation | |||
}} | |||
{{#cargo_declare: _table = conditions | |||
| name = String (unique, mandatory) | | name = String (unique, mandatory) | ||
| icon = File | | icon = File | ||
| effects = Wikitext | | effects = Wikitext | ||
| brief = Wikitext | |||
| types = List (,) of String | | types = List (,) of String | ||
| stack_id = string | | stack_id = string | ||
Line 179: | Line 157: | ||
| properties = List (,) of String | | properties = List (,) of String | ||
| stack_type = String | | stack_type = String | ||
| condition_name = String | |||
| condition_save = String | |||
| condition_dc = String | |||
| condition2_name = String | |||
| condition2_save = String | |||
| condition2_dc = String | |||
| condition3_name = String | |||
| condition3_save = String | |||
| condition3_dc = String | |||
}} | }} | ||
[[Category:Templates]] | |||
[[Category:Condition templates]] | |||
[[Category:Page generating templates]] | |||
[[Category:Cargo templates]] | |||
</noinclude> | |||