|
|
| 第1行: |
第1行: |
| <includeonly><!-- | | <includeonly>{{#ifeq:{{lc:{{{dsv|}}}}}|false||<span style="display: none;">data-sort-value="{{#invoke:Calcsellprice|csp |
| | | |im = {{{1|}}} |
| // Define letter/symbol used for gold in current language
| | |bp = {{{srcprice|{{#expr:{{{2|0}}}}}}}} |
| -->{{#arraydefine:$lang_qp_gold|金}}<!--
| | |q = 0 |
| // Items that get autofilled by Infobox and therefore need to be autotranslated to fill in link
| | |pm = {{{pm|{{{prof_mult|{{{4|1}}}}}}}}} |
| // (other items are tested below, but the tested values should be image names which are same on all sites)
| | |ll = {{CONTENTLANG}} |
| -->{{ParseInputValues|code=qitem||
| | |fm = false <!-- format number? --> |
| ,Wine, 果酒,
| | }}"</span>}}<!-- |
| ,Juice, 果汁,
| | --><table class="no-wrap" style="text-align: left; margin: 0; padding: 0; border-spacing: 0; border: 0;"> |
| ,Jelly, 果酱,
| | {{#if:{{#pos:{{{hide|}}}|normal}}|| |
| ,Pickles, 腌菜,
| | {{#switch:{{{quality|all}}} |
| ,Roe, 鱼籽,
| | |normal|base|all|0 = |
| ,Aged Roe, 腌鱼籽,
| | <tr> |
| ,Caviar, 鱼籽酱,
| | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=0}}</td> |
| }}<!--
| | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp |
| // END of translation
| | |im = {{{1|}}} <!-- image --> |
| | | |bp = {{{srcprice|{{#expr:{{{2|0}}}}}}}} <!-- base price --> |
| // Get list of qualities. Set from quality/iridium/hide OR override for specific items if {{{auto}}}
| | |q = 0 <!-- normal quality --> |
| -->{{#arraydefine:$qpqual|{{ParseInputQuality|quality={{#if:{{{quality|}}}|{{{quality}}}|true}}|iridium={{{3|{{{iridium|}}}}}}|hide={{{hide|}}}}}}}<!--
| | |pm = {{{pm|{{{prof_mult|{{{4|1}}}}}}}}} <!-- profession multiplier --> |
| -->{{#if:{{{auto|}}} | | |ll = {{CONTENTLANG}} <!-- local language --> |
| | {{#switch:{{lc:{{{1|}}}}}
| | |fm = true <!-- format number? --> |
| |wine|pale ale|beer|mead= {{#arraydefine:$qpqual|Normal,Silver,Gold,Iridium}}
| | }} }} |
| |juice|jelly|pickles|honey|roe|caviar|aged roe= {{#arraydefine:$qpqual|Normal}}
| | </td> |
| }}}}<!--
| | </tr> |
| // Don't allow artisan bonus to ever be applied to coffee, oil. Done regardless of {{{auto}}}
| | }} }}{{#if:{{#pos:{{{hide|}}}|silver}}||{{#switch:{{lc:{{{1|}}}}} |
| -->{{#arraydefine:$qpmult| | | |juice|pickles|jelly|honey|oil|cave carrot|green tea|tea leaves= |
| {{#switch:{{lc:{{{1|}}}}}
| | |#default={{#switch:{{{quality|all}}} |
| |oil|coffee = 1
| | |silver|all|1 = |
| |#default = {{#iferror:{{#expr:{{{prof_mult}}}*1}}|1|{{{prof_mult}}}}}}}}}<!--
| | <tr> |
| // Set price to {{{2}}} or derive from srcprice if {{{auto}}}, srcprice is valid, and item name is recognized
| | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=1}}</td> |
| // (extra complication for roe: allow [color]_roe / [color]_aged_roe to be recognized) | | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp |
| -->{{#arraydefine:$qpprice
| | |im = {{{1|}}} <!-- image --> |
| |{{#ifexpr:{{#if:{{{auto|}}}|1|0}} and {{#if:{{{srcprice|}}}|1|0}} and {{#iferror:{{#expr:{{{srcprice}}}*1}}|0|1}}
| | |bp = {{{srcprice|{{#expr:{{{2|0}}}}}}}} <!-- base price --> |
| |{{#ifeq:{{lc:{{#sub:{{{1|}}}|-3|3}}}}|roe
| | |q = 1 <!-- silver quality --> |
| |{{#ifeq:{{lc:{{#sub:{{{1|}}}|-8|4}}}}|aged
| | |pm = {{{pm|{{{prof_mult|{{{4|1}}}}}}}}} <!-- profession multiplier --> |
| |{{#expr:2*trunc(30+trunc({{{srcprice}}})/2)}}{{#arraydefine:$qpqual|Normal}}
| | |ll = {{CONTENTLANG}} <!-- local language --> |
| |{{#expr:30+trunc({{{srcprice}}})/2}}{{#arraydefine:$qpqual|Normal}}}}
| | |fm = true <!-- format number? --> |
| |{{#switch:{{lc:{{{1|}}}}}|
| | }} }} |
| |wine = {{#expr:trunc({{{srcprice}}})*3}}
| | </td> |
| |juice = {{#expr:trunc({{{srcprice}}})*2.25}}
| | </tr> |
| |jelly
| | }} }} }}{{#if:{{#pos:{{{hide|}}}|gold}}||{{#switch:{{lc:{{{1|}}}}} |
| |pickles = {{#expr:trunc({{{srcprice}}})*2 + 50}}
| | |juice|pickles|jelly|honey|oil|cave carrot|green tea|tea leaves= |
| |honey = {{#expr:trunc({{{srcprice}}})*2 + 100}}
| | |#default={{#switch:{{{quality|all}}} |
| |roe = {{#expr:30+trunc({{{srcprice}}})/2}}
| | |gold|all|2 = |
| |caviar = 500
| | <tr> |
| |aged roe = {{#expr:2*trunc(30+trunc({{{srcprice}}})/2)}}
| | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=2}}</td> |
| |pale ale = 300
| | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp |
| |beer = 200
| | |im = {{{1|}}} <!-- image --> |
| |mead = 200
| | |bp = {{{srcprice|{{#expr:{{{2|0}}}}}}}} <!-- base price --> |
| |#default = {{{2|0}}}
| | |q = 2 <!-- gold quality --> |
| }}}}
| | |pm = {{{pm|{{{prof_mult|{{{4|1}}}}}}}}} <!-- profession multiplier --> |
| |{{{2|0}}}
| | |ll = {{CONTENTLANG}} <!-- local language --> |
| }}}}{{#arraydefine:$qplink|
| | |fm = true <!-- format number? --> |
| {{#ifeq:{{{link}}}|||
| | }} }} |
| {{#if:{{#if:{{{auto|}}}|{{ParseInputValues|code=qitem|{{{1|}}}|translate=true}}}}
| | </td> |
| |{{ParseInputValues|code=qitem|{{{1|}}}|translate=true}}
| | </tr> |
| |{{#ifeq:{{{link|}}}|1||{{{link|{{#ifeq:{{CONTENTLANG}}|en|{{{1|}}}}}}}}}}}}}}}}<!--
| | }} }} }}{{#if:{{#pos:{{{hide|}}}|iridium}}||{{#switch:{{lc:{{{1|}}}}} |
| // Display sort key (0 for text/non-numeric price so it doesn't mess up table)
| | |juice|pickles|jelly|honey|oil|cave carrot|green tea|tea leaves= |
| --><span data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true | | |#default={{#switch:{{{quality|all}}} |
| |{{#iferror:{{#expr:{{#arrayprint:$qpprice}}>0}}
| | |iridium|all|4 = |
| |0
| | <tr> |
| |{{#expr:trunc(({{#arrayprint:$qpmult}})*trunc({{#arrayprint:$qpprice}}))}}}}
| | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=4}}</td> |
| |{{{sortkey}}}}}}}"><!--
| | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp |
| // Start table and loop through each requested quality
| | |im = {{{1|}}} <!-- image --> |
| // Display icon using Quality template and calculate/display price-->
| | |bp = {{{srcprice|{{#expr:{{{2|0}}}}}}}} <!-- base price --> |
| {{{!}} class="no-wrap" style="border-spacing: 0;" | | |q = 4 <!-- iridium quality --> |
| {{#arrayprint:$qpqual||@qual@|<nowiki/>
| | |pm = {{{pm|{{{prof_mult|{{{4|1}}}}}}}}} <!-- profession multiplier --> |
| {{!}}-
| | |ll = {{CONTENTLANG}} <!-- local language --> |
| {{!}} {{Quality|{{{1|}}}|@qual@| size={{#if:{{{size|}}}|{{{size}}}|24}} |link={{#arrayprint:$qplink}} |alt={{#ifeq:{{{alt}}}|||{{#if:{{{alt|}}}|{{{alt}}}|{{#if:{{#arrayprint:$qplink}}|{{#arrayprint:$qplink}}|{{{1|}}}}}}}}}}}
| | |fm = true |
| {{!}} {{#iferror:{{#expr:{{#arrayprint:$qpprice}}>0}}
| | }} }} |
| |{{{2|}}}
| | </td> |
| |{{formatnum:{{#expr:
| | </tr> |
| trunc (trunc( ({{#arrayprint:$qpmult}}) * 10 *
| | }} }} }}</table></includeonly><noinclude>{{Englishdoc}}</noinclude> |
| trunc ( {{#switch:@qual@|Silver=1.25|Gold=1.5|Iridium=2|Normal|#default=1}} *
| |
| trunc({{#arrayprint:$qpprice}}) ) ) / 10)
| |
| }}}}{{#arrayprint:$lang_qp_gold}}
| |
| }}}} | |
| {{!}}}</span><!--
| |
| --></includeonly><noinclude>{{Englishdoc}}</noinclude>
| |