User:Relyk/SMW/skill fact

From Guild Wars 2 Wiki
Jump to navigationJump to search

Property:Has skill fact[edit]

Template:Skill infobox[edit]

{{skill infobox
| skill fact=
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
}}

Template:Skill fact[edit]

:{{#vardefine:fact_description|<Skill fact logic>}}{{#var:fact_description}}
{{#subobject:skillfact{{#vardefineecho:factcount|{{#expr:{{#var:factcount|0}}+1}}}}
|Has skill fact index={{#var:factcount}}
|Effect of skill={{PAGENAME}}
|Has effect type={{{1}}}
|Has effect description={{#var:fact_description}}
|Has effect value={{{2}}}
|Has effect stacks={{{stacks|}}}
|Has effect coefficient={{{coefficient|}}}
}}

Query[edit]

{{#ask:[[Effect of skill::Fireball]]
|?Has effect description
}}
{{#ask:[[Effect of skill::+]][[Has effect type::Burning]]}}

Property:Has skill facts[edit]

  • Has property type::Text
  • Format: <skill fact>~<skill fact>~...<skill fact>

Template:Skill infobox[edit]

Code[edit]

{{#arraymap:{{{skill fact}}}|\n|@@@|
  :@@@
  {{#if:{{#var:skill_fact_format_string}}
  |{{#vardefine:skill_fact_format_string|{{#var:skill_fact_format_string}}~@@@}}
  |{{#vardefine:skill_fact_format_string|@@@}}
  }}
|\n}}
{{#set:Has skill facts={{#var:skill_fact_format_string}}}}

Parameters[edit]

{{skill infobox
| skill fact =
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
{{skill fact|{{{1}}}|{{{2}}}|{{{stacks}}}|{{{coefficient}}}}}
}}

Query[edit]

{{#ask:[[Fireball]]
|?Has skill facts
|format=template
|template=Skill fact result format
}}

Template:Skill fact result format[edit]

{{#arraymap:{{{1}}}|~|@@@|
:{{{1}}}
|\n}}