Terraria Wiki
Terraria Wiki
1735
страниц
Westgrass (обсуждение | вклад)
Нет описания правки
(обновление данных)
 
(не показано 28 промежуточных версий 2 участников)
Строка 1: Строка 1:
 
<includeonly><!--
 
<includeonly><!--
   
-->{{item/options|smallicons=y}}{{eicons/options|small=y}}<!--
+
-->{{options/snap|item|for_item_infobox_infoboxView}}{{options/set|item|smallicons=y}}<!--
 
-->{{eicons/options|small=y}}<!--
   
 
--><div class="infobox item {{#if:{{#var:ii:ext:float}}|float-{{#var:ii:ext:float}}}}" style="{{#if:{{#var:ii:ext:boxwidth}}|width:{{#var:ii:ext:boxwidth}};}}{{#var:ii:ext:css}};{{#var:ii:ext:style}}"><!--
 
--><div class="infobox item {{#if:{{#var:ii:ext:float}}|float-{{#var:ii:ext:float}}}}" style="{{#if:{{#var:ii:ext:boxwidth}}|width:{{#var:ii:ext:boxwidth}};}}{{#var:ii:ext:css}};{{#var:ii:ext:style}}"><!--
   
  +
//main name title
 
  +
--><div class="title"><!--
  +
-->{{#vardefine:ii:_e|{{#if:{{#lstfnd:{{lang}}|en,de,es,fr,it,pl,pt,<!--ru,-->zh|,}}||y}}}}<!-- Русский язык отключён, чтобы в карточках дополнительно отображалось английское название
  +
-->{{#if:{{#var:ii:ext:showenglishname}}|{{#switch:{{#var:ii:ext:showenglishname}}|y|yes|on={{#vardefine:ii:_e|y}}|n|no|off={{#vardefine:ii:_e|}}}}}}<!--
 
MAIN-->{{#var:ii:lname}}<!--
  +
EN-->{{#if:{{#var:ii:_e}}|{{#if:{{#var:ii:name}}|{{#ifeq:{{#var:ii:lname}}|{{#var:ii:name}}||<span class="ename">{{#var:ii:name}}</span>}}}}}}<!--
 
SUB -->{{#if:{{#var:ii:namesub}}|<span>{{#var:ii:namesub}}</span>}}<!--
  +
--></div><!-- div.title
   
 
//images area (images, autoswing, stack)
 
//images area (images, autoswing, stack)
 
--><div class="section images"><!--
 
--><div class="section images"><!--
-->{{#if:{{#var:ii:imagealt}}|<!--
+
--><ul class="infobox-{{#if:{{#var:ii:ext:imagebreak}}|block|inline}}"><!--
--><ul class="inline"><li>{{#var:ii:imagealt}}</li></ul><!--
+
-->{{#if:{{#var:ii:imagealt}}|<!--
 
--><li>{{#var:ii:imagealt}}</li><!--
-->|<!--
+
-->|<!--
--><ul class="{{#if:{{#var:ii:ext:imagebreak}}|block|inline}}"><!--
 
 
//main image
 
//main image
 
-->{{#if:{{#var:ii:image}}|<li>{{#var:ii:image}}{{#if:{{#var:ii:imageold}}|&ensp;{{#var:ii:imageold}}}}</li>}}<!--
 
-->{{#if:{{#var:ii:image}}|<li>{{#var:ii:image}}{{#if:{{#var:ii:imageold}}|&ensp;{{#var:ii:imageold}}}}</li>}}<!--
Строка 21: Строка 29:
 
//female image
 
//female image
 
-->{{#if:{{#var:ii:imagefemale}}|<li>{{#var:ii:imagefemale}}</li>}}<!--
 
-->{{#if:{{#var:ii:imagefemale}}|<li>{{#var:ii:imagefemale}}</li>}}<!--
--></ul><!--
+
-->}}<!--
-->}}<!--
+
--></ul><!--
 
//autoswing
 
//autoswing
 
-->{{#if:{{#var:ii:autoswing}}|<!--
 
-->{{#if:{{#var:ii:autoswing}}|<!--
--><div class="auto">[[File:Auto icon.png|18px|link={{tr|Autoswing|link=y}}|{{#if:{{#arraysearch:ii:types|tool|y}}<!--
+
--><div class="auto">[[File:Auto icon.png|18px|link={{tr|Autoswing|link=y}}|<!--
-->|{{l10n|item_infobox|Autoswing}}<!--
+
--> {{#if:{{#rmatch:{{#var:ii:damagetype}}|/melee/i|y}}|{{l10n|item_infobox|Autoswing}}<!-- melee -> Autoswing
-->|{{#switch:{{lc:{{#var:ii:damagetype}}}}<!--
+
-->|{{#if:{{#rmatch:{{#var:ii:damagetype}}|/throwing/i|y}}|{{l10n|item_infobox|Auto-use}}<!-- throwing -> Auto-use
-->|melee={{l10n|item_infobox|Autoswing}}<!--
+
-->|{{#if:{{#rmatch:{{#var:ii:damagetype}}|/ranged{{!}}magic/i|y}}|{{l10n|item_infobox|Autofire}}<!-- ranged/magic -> Autofire
-->|ranged|magic={{l10n|item_infobox|Autofire}}<!--
+
-->|{{l10n|item_infobox|Auto-use}}<!-- default -> Auto-use
  +
(putting throwing in between there because there are a lot of pre-1.4 throwing weapons that are now "ranged", but it doesn't make much sense for them being "autofired", so we let the "throwing" (that is still part of the damagetype from pre-1.4) be matched on first)
-->|#default={{l10n|item_infobox|Auto-use}}<!--
 
-->}}<!--
+
-->}}}}}}<!--
-->}}]]</div><!--
+
-->]]</div><!--
 
-->}}<!--
 
-->}}<!--
 
//stack
 
//stack
-->{{#if:{{#var:ii:stack}}|{{#iferror:{{#expr:{{#var:ii:stack}}>0}}||<!--
+
-->{{#if:{{isNumber|{{#var:ii:stack}}}}|<!-- if $stack is a number (if it is not, then the raw text is displayed like a regular stat further down)
 
--><div class="stack" title="{{l10n|item_infobox|title:maxstack|$stack$={{#var:ii:stack}}}}">{{stack|{{#var:ii:stack}}}}</div><!--
 
--><div class="stack" title="{{l10n|item_infobox|title:maxstack|$stack$={{#var:ii:stack}}}}">{{stack|{{#var:ii:stack}}}}</div><!--
-->}}}}<!--
+
-->}}<!--
 
--></div><!-- div.section.images
 
--></div><!-- div.section.images
   
 
--><div class="section statistics"><!--
 
--><div class="section statistics"><!--
  +
--><div class="title">{{l10n|item_infobox|Statistics}}</div><!-- use: last-child to hide when this section is empty.
 
 
-->{{#if:{{#var:ii:hammer}}{{#var:ii:pick}}{{#var:ii:axe}}|<!--
  +
--><ul class="toolpower"><!--
 
--><li title="{{l10n|item_infobox|pickaxe_power}}" class="{{#if:{{#var:ii:pick}}||zero}} pickaxe"><!--
  +
-->[[File:Pickaxe mask.png|link=]] <!--
 
-->{{percent|{{#iferror:{{#expr:{{#var:ii:pick}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:pick}}}}|{{#var:ii:pick|0}}%}}}}<!--
 
--></li><!--
  +
--><li title="{{l10n|item_infobox|hammer_power}}" class="{{#if:{{#var:ii:hammer}}||zero}} hammer"><!--
  +
-->[[File:Hammer mask.png|link=]] <!--
  +
-->{{percent|{{#iferror:{{#expr:{{#var:ii:hammer}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:hammer}}}}|{{#var:ii:hammer|0}}%}}}}<!--
 
--></li><!--
  +
--><li title="{{l10n|item_infobox|axe_power}}" class="{{#if:{{#var:ii:axe}}||zero}} axe"><!--
  +
-->[[File:Axe mask.png|link=]] <!--
 
-->{{percent|{{#iferror:{{#expr:{{#var:ii:axe}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:axe}}}}|{{#var:ii:axe|0}}%}}}}<!--
 
--></li><!--
 
--></ul><!--
 
-->}}<!--
  +
-->{{#if:{{#var:ii:pickreq}}|<!--
  +
--><ul class="toolpower"><!--
 
--><li title="{{l10n|item_infobox|pickreq}}"><!--
  +
-->[[File:Pickaxe icon.png|16px|link=]] <!--
  +
-->{{percent|{{#iferror:{{#expr:{{#var:ii:pickreq}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:pickreq}}}}|{{#var:ii:pickreq|0}}%}}}}<!--
 
--></li><!--
 
--></ul><!--
 
-->}}<!--
  +
-->{{#if:{{#var:ii:hammerreq}}|<!--
  +
--><ul class="toolpower"><!--
 
--><li title="{{l10n|item_infobox|hammerreq}}"><!--
  +
-->[[File:Hammer icon.png|16px|link=]] <!--
  +
-->{{percent|{{#iferror:{{#expr:{{#var:ii:hammerreq}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:hammerreq}}}}|{{#var:ii:hammerreq|0}}%}}}} <!--
 
-->{{note|small=y|{{l10n|item_infobox|hammerreq_note}}}}<!--
  +
--></li><!--
  +
--></ul><!--
  +
-->}}<!--
 
--><table class="stat"><!--
 
--><table class="stat"><!--
  +
-->{{#if:{{#var:ii:types}}|<!--
 
  +
--><tr><!--
 
--><th>{{l10n|item_infobox|th:type}}</th><!--
  +
--><td><div class="tags">{{#lstmap:{{#var:ii:types}}|/|@@@@|<esc><!--
  +
-->{{#vardefine:_typepage|{{#or:{{l10n|item_infobox|typepage:@@@@}}|{{tr|{{ucfirst:@@@@}}|link=y}}}}}}<!--
 
-->{{#vardefine:_typetext|{{#or:{{l10n|item_infobox|type:@@@@}}|{{tr|{{ucfirst:@@@@}}}}}}}}<!--
  +
-->{{nowrap|class=tag|{{ifexists|{{#var:_typepage}}|[[{{#var:_typepage}}|{{#var:_typetext}}]]|{{#var:_typetext}}}}}}<!--
  +
--></esc>|}}</div></td><!--
  +
--></tr><!--
  +
-->}}<!--
 
-->{{#if:{{#var:ii:useammo}}|<!--
 
-->{{#if:{{#var:ii:useammo}}|<!--
 
--><tr><!--
 
--><tr><!--
Строка 54: Строка 104:
 
--><th>{{l10n|item_infobox|th:baitpower}}</th><!--
 
--><th>{{l10n|item_infobox|th:baitpower}}</th><!--
 
--><td>{{percent|{{#var:ii:bait}}%}}</td><!--
 
--><td>{{percent|{{#var:ii:bait}}%}}</td><!--
  +
--></tr><!--
  +
-->}}<!--
  +
-->{{#if:{{#iferror:{{#ifexpr:{{#var:ii:fishing|0}}|y}}|y}}|<!-- display fishing power if it is greater than 0 or not a raw number
  +
--><tr><!--
 
--><th>{{l10n|item_infobox|th:fishingpower}}</th><!--
  +
--><td><!--
  +
-->{{percent|<!--
  +
-->{{#var:ii:fishing}}<!--
  +
-->{{#iferror:{{#expr:{{#var:ii:fishing}}+1}}||%}}<!-- append a percentage sign if ii:fishing is a raw number
  +
-->}}<!--
  +
--></td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 61: Строка 122:
 
--><td><!--
 
--><td><!--
 
-->{{#var:ii:damage}}<!--
 
-->{{#var:ii:damage}}<!--
-->{{#if:{{#var:ii:damagetype}}|<small>{{#if:{{l10n|item_infobox|damagetype:{{#var:ii:damagetype}}}}|{{l10n|item_infobox|damagetype:{{#var:ii:damagetype}}}}|{{#var:ii:damagetype}}}}</small>}}<!--
+
-->{{#if:{{#var:ii:damagetype}}|&#32;<span class="small-bold"><!--
  +
-->{{l10n|item_infobox|damagetype:format|$type$=<!--
  +
-->{{#or:{{l10n|item_infobox|damagetype:{{lc:{{#var:ii:damagetype}}}}}}|{{#var:ii:damagetype}}}}<!--
  +
-->}}<!--
  +
--></span>}}<!--
 
--></td><!--
 
--></td><!--
 
--></tr><!--
 
--></tr><!--
Строка 68: Строка 133:
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:knockback}}</th><!--
 
--><th>{{l10n|item_infobox|th:knockback}}</th><!--
//if input is pure number, wrap it with {{kb}}, else: leave it as-is.
+
//if input is pure number, wrap it with {{knockback}}, else: leave it as-is.
--><td>{{#iferror:{{#expr:1+{{#var:ii:knockback}}}}|{{#var:ii:knockback}}|{{kb|{{#var:ii:knockback}}}}}}</td><!--
+
--><td>{{#iferror:{{#expr:1+{{#var:ii:knockback}}}}|{{#var:ii:knockback}}|{{knockback|{{#var:ii:knockback}}|full=y}}}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 97: Строка 162:
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:placeable}}|<!--
 
-->{{#if:{{#var:ii:placeable}}|<!--
  +
--><tr><!--
{{#arraysearch:ii:types|block|0||<!-- don't display for blocks. ?
 
--><tr><!--
+
--><th>{{l10n|item_infobox|th:placeable}}</th><!--
  +
--><td>{{yes}} {{#if:{{#var:ii:width}}{{#var:ii:height}}|<span class="small-bold"><!--
--><th>{{l10n|item_infobox|th:placeable}}</th><!--
 
--><td>{{yes}} {{#if:{{#var:ii:width}}{{#var:ii:height}}|<small><!--
+
-->{{#ifeq:{{#if:{{#var:ii:width}}|y}}{{#if:{{#var:ii:height}}|y}}|y<!--
  +
-->|<!-- only one out of width/height exists
-->{{#if:{{#var:ii:width}}|{{l10n|item_infobox|wide|$width$={{#var:ii:width}}}}}}<!--
 
-->{{#switch: |{{#var:ii:width}}|{{#var:ii:height}}=|&nbsp;×&nbsp;}}<!--
+
-->{{#if:{{#var:ii:width}}|<!--
-->{{#if:{{#var:ii:height}}|{{l10n|item_infobox|high|$height$={{#var:ii:height}}}}}}<!--
+
-->{{l10n|item_infobox|wide|$width$={{#var:ii:width}}}}<!--
--></small>}}</td><!--
+
-->|<!--
  +
-->{{l10n|item_infobox|high|$height$={{#var:ii:height}}}}<!--
--></tr><!--
 
}}<!--
+
-->}}<!--
  +
-->|<!-- both exist
-->|{{#if:{{#var:ii:ammo}}||<!-- "place" will consume item, so only needed when not placeable. And not is ammo
 
  +
-->{{l10n|item_infobox|dimensions:format<!--
  +
-->|$wide$={{l10n|item_infobox|wide|$width$={{#var:ii:width}}}}<!--
  +
-->|$high$={{l10n|item_infobox|high|$height$={{#var:ii:height}}}}<!--
  +
-->}}<!--
  +
-->}}<!-- end of ifeq
  +
--></span>}}</td><!--
  +
--></tr><!--
  +
-->|{{#if:{{#lstind:ammunition|{{#var:ii:types}}|/}}||<!--
 
-->{{#if:{{#var:ii:consumable}}|<!--
 
-->{{#if:{{#var:ii:consumable}}|<!--
  +
// only display consumable if not placeable and not ammo
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:consumable}}</th><!--
 
--><th>{{l10n|item_infobox|th:consumable}}</th><!--
Строка 135: Строка 209:
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:cri}}</th><!--
 
--><th>{{l10n|item_infobox|th:cri}}</th><!--
  +
--><td><!--
--><td>{{#iferror:{{#expr:{{#var:ii:critical}}+1}}|{{#var:ii:critical}}|{{percent|{{#var:ii:critical}}%}}}}</td><!--
 
  +
-->{{percent|<!--
  +
-->{{#var:ii:critical}}<!--
  +
-->{{#iferror:{{#expr:{{#var:ii:critical}}+1}}||%}}<!-- append a percentage sign if ii:critical is a raw number
  +
-->}}<!--
  +
--></td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 141: Строка 220:
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:bodyslot}}</th><!--
 
--><th>{{l10n|item_infobox|th:bodyslot}}</th><!--
--><td>{{#vardefine:_t|{{l10n|item_infobox|bodyslot:{{lc:{{#var:ii:bodyslot}}}}}}}}{{#var:_t|{{#var:ii:bodyslot}}}}</td><!--
+
--><td>{{#or:{{l10n|item_infobox|bodyslot:{{lc:{{#var:ii:bodyslot}}}}}}|{{#var:ii:bodyslot}}}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 148: Строка 227:
 
--><th>{{l10n|item_infobox|th:usetime}}</th><!--
 
--><th>{{l10n|item_infobox|th:usetime}}</th><!--
 
//if input is pure number, add {{use time}}, else: leave it as-is.
 
//if input is pure number, add {{use time}}, else: leave it as-is.
--><td>{{#iferror:{{#expr:1+{{#var:ii:use}}}}|{{#var:ii:use}}|{{#var:ii:use}} <small>{{use time|{{#var:ii:use}}}}</small>}}</td><!--
+
--><td>{{#iferror:{{#expr:1+{{#var:ii:use}}}}|{{#var:ii:use}}|{{use time|{{#var:ii:use}}|full=y}}}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:velocity}}|<!--
 
-->{{#if:{{#var:ii:velocity}}|<!--
  +
-->{{#if:{{#var:ii:velocityMultiplier}}|<!-- ammo
--><tr><!--
 
--><th>{{l10n|item_infobox|th:velocity}}</th><!--
 
--><td>{{formatnum:{{#var:ii:velocity}}}}</td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idprojectile}}|<!--
 
-->{{#vardefine:_extraUpdates|{{getProjectileInfo|{{#var:ii:idprojectile}}|extraUpdates}}}}<!--
 
-->{{#ifexpr:{{#var:_extraUpdates}}>0 and {{#var:ii:velocity|0}}>0|<!--
 
 
--><tr><!--
 
--><tr><!--
--><th>{{l10n|item_infobox|th:effectiveVelocity}}</th><!--
+
--><th>{{l10n|item_infobox|th:basevelocity}}</th><!--
--><td>{{#expr:{{#var:ii:velocity}}*({{#var:_extraUpdates}}+1)}}</td><!-- note that since this formula does not include projectile velocity, it may be misleading. see [[Extra updates]] for details
+
--><td>{{#var:ii:velocity}}</td><!--
  +
--></tr><!--
  +
--><tr><!--
  +
--><th>{{l10n|item_infobox|th:tvm}}</th><!--
 
--><td>{{l10n|item_infobox|tvm|$value$={{#var:ii:velocityMultiplier}}}}</td><!--
  +
--></tr><!--
  +
-->|<!--
  +
--><tr><!--
  +
--><th>{{l10n|item_infobox|th:velocity}}</th><!--
  +
--><td><!--
  +
-->{{formatnum:{{#var:ii:velocity}}}}<!--
 
-->{{#ifexpr:{{#var:ii:extraUpdates|0}}>0|<!--
  +
-->{{#if:{{#var:ii:useammo}}|<!--
  +
--><small>&#32;{{l10n|item_infobox|velocityignoreammo}}</small><!--
  +
-->|<!--
  +
--><small>&#32;{{l10n|item_infobox|effective}}</small><!--
  +
-->}}<!--
  +
-->}}<!--
  +
--></td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 175: Строка 265:
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:tooltip}}</th><!--
 
--><th>{{l10n|item_infobox|th:tooltip}}</th><!--
--><td><i>{{#var:ii:tooltip}}</i></td><!-- Using apostrophes here can cause some tooltips to be bolded. Escape them with &#39;
+
--><td><i>{{#var:ii:tooltip}}</i></td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
  +
-->{{#if:{{isNumber|{{#var:ii:stack}}}}||<!-- if $stack is not a number (if it is, then it is displayed with {{stack}} at the top)
 
-->{{#if:{{#var:ii:stack}}|{{#iferror:{{#expr:{{#var:ii:stack}}>0}}|<!--
 
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:stack}}</th><!--
 
--><th>{{l10n|item_infobox|th:stack}}</th><!--
 
--><td>{{#var:ii:stack}}</td><!--
 
--><td>{{#var:ii:stack}}</td><!--
 
--></tr><!--
 
--></tr><!--
-->|}}}}<!--
+
-->}}<!--
 
-->{{#if:{{#var:ii:rare}}|<!--
 
-->{{#if:{{#var:ii:rare}}|<!--
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:rarity}}</th><!--
 
--><th>{{l10n|item_infobox|th:rarity}}</th><!--
  +
--><td>{{#var:ii:rare}}</td><!--
--><td>{{#iferror:{{#expr:{{#var:ii:rare}}+1}}|{{#switch:{{lc:{{#var:ii:rare}}}}|rainbow|q|quest={{rare|{{#var:ii:rare}}}}|#default={{#var:ii:rare}}}}|{{rare|{{#var:ii:rare}}}}}}</td><!--
 
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 206: Строка 295:
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:sacrifices}}</th><!--
 
--><th>{{l10n|item_infobox|th:sacrifices}}</th><!--
--><td>{{Journey|nolink=y|{{l10n|item_infobox|sacrifices|$amount$={{#var:ii:sacrifices}}}}}}</td><!--
+
--><td>{{journey|nolink=y|{{l10n|item_infobox|sacrifices|$amount$={{#var:ii:sacrifices}}}}}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
Строка 212: Строка 301:
 
--></div><!-- div.section.statistics
 
--></div><!-- div.section.statistics
   
-->{{#if:{{#var:ii:idbuff}}{{#var:ii:buff}}|<!--
+
-->{{#if:{{#var:ii:buffs}}|<!--
 
--><div class="section buff"><!--
 
--><div class="section buff"><!--
--><div class="title">{{l10n|item_infobox|{{#ifeq:{{lc:{{#var:ii:bufftype}}}}|debuff|debuffcreated|buffcreated}}}}</div><!--
+
--><div class="title">{{l10n|item_infobox|buffcreated|$buff_count$={{#lstcnt:{{#var:ii:buffs}}|}}}}</div><!--
--><table class="stat"><!--
+
-->{{#lstmap:{{#var:ii:buffs}}|₪|@@@@|<esc><table class="stat"><!--
 
--><tr><!--
 
--><tr><!--
--><th>{{l10n|item_infobox|{{#ifeq:{{lc:{{#var:ii:bufftype}}}}|debuff|th:debuff|th:buff}}}}</th><!--
+
--><th>{{l10n|item_infobox|th:buff}}</th><!--
-->{{#if:{{#var:ii:idbuff}}|<!--
+
-->{{#if:{{#var:ii:buff@@@@:id}}|<!--
--><td>{{buff|id={{#var:ii:mobilebuff}}{{#var:ii:idbuff}}|class=break}}</td><!--
+
--><td>{{buff|id={{#var:ii:buff@@@@:mobile}}{{#var:ii:buff@@@@:id}}|class=break}}</td><!--
 
-->|<!--
 
-->|<!--
--><td>{{item|{{#var:ii:bufflink|{{#var:ii:buff}}}}|{{#var:ii:buff}}|class=break}}</td><!--
+
--><td>{{item<!--
  +
-->|{{#var:ii:buff@@@@:link|{{#var:ii:buff@@@@:name}}}}<!--
  +
-->|{{tr|{{#var:ii:buff@@@@:name}}}}<!--
  +
-->|image={{#var:ii:buff@@@@:name}}.png<!--
  +
-->|class=break<!--
  +
-->}}</td><!--
 
-->}}<!--
 
-->}}<!--
 
--></tr><!--
 
--></tr><!--
-->{{#if:{{#var:ii:bufftip}}|<!--
+
-->{{#if:{{#var:ii:buff@@@@:tooltip}}|<!--
 
--><tr><!--
 
--><tr><!--
--><th>{{l10n|item_infobox|{{#ifeq:{{lc:{{#var:ii:bufftype}}}}|debuff|th:debufftip|th:bufftip}}}}</th><!--
+
--><th>{{l10n|item_infobox|th:bufftip}}</th><!--
--><td><i>{{#var:ii:bufftip}}</i></td><!--
+
--><td><i>{{#var:ii:buff@@@@:tooltip}}</i></td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{#var:ii:buffchance}}|<!--
+
-->{{#if:{{#var:ii:buff@@@@:chance}}|<!--
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:buffchance}}</th><!--
 
--><th>{{l10n|item_infobox|th:buffchance}}</th><!--
--><td><i>{{percent|{{#var:ii:buffchance}}}}</i></td><!--
+
--><td>{{percent|{{#var:ii:buff@@@@:chance}}}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{#var:ii:debuffchance}}|<!--
+
-->{{#if:{{#var:ii:buff@@@@:duration}}|<!--
 
--><tr><!--
 
--><tr><!--
--><th>{{l10n|item_infobox|th:debuffchance}}</th><!--
+
--><th>{{l10n|item_infobox|th:buffduration}}</th><!--
--><td>{{percent|{{#var:ii:debuffchance}}}}</td><!--
+
--><td>{{#iferror:{{#expr:1+{{#var:ii:buff@@@@:duration}}}}|<!-- if buffduration is not a raw number
  +
-->{{#var:ii:buff@@@@:duration}}<!-- then display it as-is
  +
-->|<!--
  +
-->{{duration|{{#var:ii:buff@@@@:duration}}}}<!-- else: format it with {{duration}}
  +
-->}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{#var:ii:buffduration}}|<!--
+
--></table></esc>|}}<!--
  +
--></div><!-- div.section.buff
  +
-->}}<!--
  +
-->{{#if:{{#var:ii:debuffs}}|<!--
  +
--><div class="section debuff"><!--
  +
--><div class="title">{{l10n|item_infobox|debuffcreated|$debuff_count$={{#lstcnt:{{#var:ii:debuffs}}|₪}}}}</div><!--
  +
-->{{#lstmap:{{#var:ii:debuffs}}|₪|@@@@|<esc><table class="stat"><!--
  +
--><tr><!--
  +
--><th>{{l10n|item_infobox|th:debuff}}</th><!--
  +
-->{{#if:{{#var:ii:debuff@@@@:id}}|<!--
  +
--><td>{{buff|id={{#var:ii:debuff@@@@:mobile}}{{#var:ii:debuff@@@@:id}}|class=break}}</td><!--
  +
-->|<!--
  +
--><td>{{item<!--
  +
-->|{{#var:ii:debuff@@@@:link|{{#var:ii:debuff@@@@:name}}}}<!--
  +
-->|{{tr|{{#var:ii:debuff@@@@:name}}}}<!--
  +
-->|class=break<!--
  +
-->}}</td><!--
  +
-->}}<!--
  +
--></tr><!--
  +
-->{{#if:{{#var:ii:debuff@@@@:tooltip}}|<!--
  +
--><tr><!--
  +
--><th>{{l10n|item_infobox|th:debufftip}}</th><!--
  +
--><td><i>{{#var:ii:debuff@@@@:tooltip}}</i></td><!--
  +
--></tr><!--
  +
-->}}<!--
  +
-->{{#if:{{#var:ii:debuff@@@@:chance}}|<!--
  +
--><tr><!--
  +
--><th>{{l10n|item_infobox|th:buffchance}}</th><!--
  +
--><td>{{percent|{{#var:ii:debuff@@@@:chance}}}}</td><!--
  +
--></tr><!--
  +
-->}}<!--
  +
-->{{#if:{{#var:ii:debuff@@@@:duration}}|<!--
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:buffduration}}</th><!--
 
--><th>{{l10n|item_infobox|th:buffduration}}</th><!--
--><td>{{#iferror:{{#expr:1+{{#var:ii:buffduration}}}}|{{#var:ii:buffduration}}|{{duration|{{#var:ii:buffduration}}}}}}</td><!--
+
--><td>{{#iferror:{{#expr:1+{{#var:ii:debuff@@@@:duration}}}}|<!-- if debuffduration is not a raw number
  +
-->{{#var:ii:debuff@@@@:duration}}<!-- then display it as-is
  +
-->|<!--
  +
-->{{duration|{{#var:ii:debuff@@@@:duration}}}}<!-- else: format it with {{duration}}
  +
-->}}</td><!--
 
--></tr><!--
 
--></tr><!--
 
-->}}<!--
 
-->}}<!--
--></table><!--
+
--></table></esc>|}}<!--
--></div><!-- div.section.buff
+
--></div><!-- div.section.debuff
 
-->}}<!--
 
-->}}<!--
   
Строка 263: Строка 396:
 
--><div class="section projectile"><!-- div.section.projectile
 
--><div class="section projectile"><!-- div.section.projectile
 
--><div class="title"><!--
 
--><div class="title"><!--
-->{{#arraysearch:ii:types|pet summon|0|<!--
+
-->{{#or:<!--
-->{{l10n|item_infobox|petsummoned}}<!--
+
--> {{#if:{{#lstind:pet summon|{{#var:ii:types}}|/}}|{{l10n|item_infobox|petsummoned}}}}<!--
-->|{{#arraysearch:ii:types|light pet|0|<!--
+
-->|{{#if:{{#lstind:light pet|{{#var:ii:types}}|/}}|{{l10n|item_infobox|lightpetsummoned}}}}<!--
-->{{l10n|item_infobox|lightpetsummoned}}<!--
+
-->|{{#if:{{#lstind:minion|{{#var:ii:types}}|/}}|{{l10n|item_infobox|minionsummoned}}}}<!--
-->|{{#arraysearch:ii:tags|minion|0|<!--
+
-->|{{#if:{{#lstind:sentry|{{#var:ii:types}}|/}}|{{l10n|item_infobox|sentrysummoned}}}}<!--
-->{{l10n|item_infobox|minionsummoned}}<!--
+
-->|{{l10n|item_infobox|projectilecreated}}<!--
-->|{{#arraysearch:ii:tags|sentry|0|<!--
+
-->}}<!--
-->{{l10n|item_infobox|sentrysummoned}}<!--
 
-->|<!--
 
-->{{l10n|item_infobox|projectilecreated}}<!--
 
-->}}}}}}}}<!--
 
 
--></div><!--
 
--></div><!--
--><ul class="{{#if:{{#var:ii:ext:projectileblock}}|block|inline}}"><!--
+
--><ul class="infobox-{{#if:{{#var:ii:ext:projectileblock}}|block|inline}}"><!--
-->{{#arraydefine:projectile_ids|{{#var:ii:idprojectile}}|,}}{{#arrayprint:projectile_ids||@@@@|<li><!--
+
-->{{#lstmap:{{#var:ii:idprojectile}}|,|@@@@|<esc><li><!--
--><div class="name">{{tr|{{getProjectileInfo|@@@@|name}}}}</div><!--
+
--><div class="name"><!--
  +
-->{{#vardefineecho:_pname|{{projectileNameFromId|@@@@}}}}<!-- {{projectileNameFromId}} is i18nready, so no {{tr}} here
--><div class="image">[[File:{{getProjectileInfo|@@@@|image}}|{{tr|{{getProjectileInfo|@@@@|name}}}}|link=]]</div><!--
 
--></li>}}<!--
+
--></div><!--
-->{{#if:{{#var:ii:ext:projectilename}}{{#var:ii:ext:projectileimage}}|<li><!--
+
--><div class="image">[[File:{{getProjectileInfo|@@@@|image}}|{{#var:_pname}}|link=]]</div><!--
--><div class="name">{{tr|{{#var:ii:ext:projectilename}}}}</div><!--
+
--></li></esc>|}}<!--
--><div class="image">[[File:{{#var:ii:ext:projectileimage|{{#var:ii:ext:projectilename}}.png}}||link=]]</div><!--
+
-->{{#if:{{#var:ii:ext:projectilename}}{{#var:ii:ext:projectileimage}}|<!--
--></li>}}<!--
+
--><li><!--
 
--><div class="name">{{tr|{{#var:ii:ext:projectilename}}}}</div><!--
 
--><div class="image">[[File:{{#var:ii:ext:projectileimage|{{#var:ii:ext:projectilename}}.png}}||link=]]</div><!--
  +
--></li><!--
  +
-->}}<!--
 
--></ul><!--
 
--></ul><!--
 
--></div><!-- div.section.projectile
 
--></div><!-- div.section.projectile
 
-->}}<!--
 
-->}}<!--
   
-->{{#if:{{#arraysize:ii:sounds}}|<!--
+
-->{{#if:{{#var:ii:sounds}}|<!--
 
--><div class="section statistics"><!--
 
--><div class="section statistics"><!--
 
--><div class="title">{{l10n|item_infobox|sounds}}</div><!--
 
--><div class="title">{{l10n|item_infobox|sounds}}</div><!--
 
--><table class="stat"><!--
 
--><table class="stat"><!--
-->{{#arrayprint:ii:sounds||@@@@|<!--
+
-->{{#listmap:|list={{#var:ii:sounds}}|insep=;|outsep=|fieldsep=:|token=$caption$, $soundfiles$|pattern=<!--
 
--><tr><!--
 
--><tr><!--
--><th>{{#explode:@@@@|@@}}</th><!-- "@@" is the delimiter between caption and sound file
+
--><th>$caption$</th><!--
-->{{#vardefine:ii:sounds|{{#explode:@@@@|@@|1}}}}<!--
 
 
--><td><!--
 
--><td><!--
-->{{#lstmap:{{#var:ii:sounds}}|,|%%%%|<esc><span style="margin-left:2px;">{{sound||{{trim|%%%%}}}}</span></esc>|}}<!-- print sounds
+
--><esc>{{#lstmap:$soundfiles$|,|%%%%|<!-- print sounds
  +
--><span style="margin-left:2px;">{{sound||{{trim|%%%%}}}}</span><!--
  +
-->|}}</esc><!--
 
--></td><!--
 
--></td><!--
 
--></tr><!--
 
--></tr><!--
Строка 305: Строка 439:
 
-->}}<!--
 
-->}}<!--
   
-->{{#ifeq:{{#var:ii:ext:showids}}|no||{{#if:{{#var:ii:id}}{{#var:ii:idbuff}}{{#var:ii:idtile}}{{#var:ii:idwall}}{{#var:ii:idmount}}{{#var:ii:idprojectile}}|<!--
+
-->{{#ifeq:{{#var:ii:ext:showids}}|no||{{#if:{{#var:ii:id}}{{#var:ii:idtile}}{{#var:ii:idwall}}{{#var:ii:idmount}}{{#var:ii:idbuff}}{{#var:ii:idprojectile}}|<!--
 
--><div class="section ids"><ul><!--
 
--><div class="section ids"><ul><!--
 
-->{{#if:{{#var:ii:id}}|<!--
 
-->{{#if:{{#var:ii:id}}|<!--
--><li>{{l10n|item_infobox|id:item}}'''{{#var:ii:ext:idshow|{{#var:ii:id}}}}''' {{eicons|{{#var:ii:name}}}}</li><!--
+
--><li>{{l10n|item_infobox|id:item}}<b>{{#var:ii:ext:idshow|{{#var:ii:id}}}}</b> {{eicons|errorcate=n|{{#var:ii:name}}}}</li><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idtile}}|<!--
 
-->{{#if:{{#var:ii:idtile}}|<!--
--><li>{{l10n|item_infobox|id:tile}}'''{{#var:ii:ext:idtileshow|{{#var:ii:idtile}} {{#if:{{#var:ii:idtilesub}}|({{#var:ii:idtilesub}})}}}}'''</li><!--
+
--><li>{{l10n|item_infobox|id:tile}}<b>{{#var:ii:ext:idtileshow|{{#var:ii:idtile}} {{#if:{{#var:ii:idtilesub}}|({{#var:ii:idtilesub}})}}}}</b></li><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idwall}}|<!--
 
-->{{#if:{{#var:ii:idwall}}|<!--
--><li>{{l10n|item_infobox|id:wall}}'''{{#var:ii:idwall}}'''</li><!--
+
--><li>{{l10n|item_infobox|id:wall}}<b>{{#var:ii:idwall}}</b></li><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idarmor}}|<!--
 
-->{{#if:{{#var:ii:idarmor}}|<!--
--><li>{{l10n|item_infobox|id:armor}}'''{{#var:ii:idarmor}}'''</li><!--
+
--><li>{{l10n|item_infobox|id:armor}}<b>{{#var:ii:idarmor}}</b></li><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idmount}}|<!--
 
-->{{#if:{{#var:ii:idmount}}|<!--
--><li>{{l10n|item_infobox|id:mount}}'''{{#var:ii:idmount}}'''</li><!--
+
--><li>{{l10n|item_infobox|id:mount}}<b>{{#var:ii:idmount}}</b></li><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idbuff}}|<!--
 
-->{{#if:{{#var:ii:idbuff}}|<!--
-->{{#if:{{#var:ii:mobilebuff}}|<!--
+
--><li>{{l10n|item_infobox|id:buff}}<b><!--
  +
-->{{#listmap:<!--
--><li>{{l10n|item_infobox|id:buff}}'''{{#var:ii:idbuff}}''' {{eicons|{{getBuffInfo|{{#var:ii:mobilebuff}}{{#var:ii:idbuff}}|page}}}}</li><!--
 
  +
-->|list={{#lstrm:₰₰|{{#var:ii:idbuff}}|₪|₪}}<!-- remove empty elements
-->|<!--
 
  +
-->|insep=₪|outsep={{l10n|comma|sep1}}<!--
--><li>{{l10n|item_infobox|id:buff}}'''{{#var:ii:ext:idbuffshow|{{#var:ii:idbuff}}}}'''</li><!--
 
  +
-->|fieldsep=₰|token=$mobile$, $id$, $idshow$<!-- split elements on ₰
-->}}<!--
 
  +
-->|pattern=<esc>{{#or:$idshow$|<!--
  +
-->$id$ {{eicons|errorcate=n|{{pagename2en|{{getBuffInfo|$mobile$$id$|page}}}}}}<!--
  +
-->}}</esc><!--
  +
-->}}<!--
  +
--></b></li><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:idprojectile}}|<!--
 
-->{{#if:{{#var:ii:idprojectile}}|<!--
-->{{#arraydefine:projectile_ids|{{#var:ii:idprojectile}}|,}}<!--
+
--><li>{{l10n|item_infobox|id:projectile}}<b>{{#lstsep:{{#var:ii:idprojectile}}|,|{{l10n|comma|sep1}}}}</b></li><!--
--><li>{{l10n|item_infobox|id:projectile}}'''{{#arrayprint:projectile_ids|,&#32;}}'''</li><!--
 
 
-->}}<!--
 
-->}}<!--
 
--></ul></div><!-- div.section.ids
 
--></ul></div><!-- div.section.ids
Строка 338: Строка 476:
 
--></div><!--END div.infobox
 
--></div><!--END div.infobox
   
  +
-->{{options/restore|item|for_item_infobox_infoboxView}}<!--
-->{{item/options|reset}}{{eicons/options|reset}}<!--
 
  +
-->{{eicons/options|reset}}<!--
   
 
--></includeonly><!--
 
--></includeonly><!--

Текущая версия от 10:24, 22 мая 2021

Internal subtemplate. Handles the output of the default "infobox" view of {{item infobox}}.