Template:InfoCard: Difference between revisions

From IdleOn MMO Wiki
No edit summary
mNo edit summary
Line 25: Line 25:
}}<!-- First takes dropchance parameter. If that's empty checks for cdc parameter. If that is empty then queries the Drop table for the value. Finally if all others fail, defaults to 999.0 so that there will be an obvious value to correct.
}}<!-- First takes dropchance parameter. If that's empty checks for cdc parameter. If that is empty then queries the Drop table for the value. Finally if all others fail, defaults to 999.0 so that there will be an obvious value to correct.


--><div class="Infobox">
--><infobox>
<div class="Header">{{{title|{{PAGENAME}}}}}</div>
<title source="title">
<div class="HeaderImage">[[file:{{PAGENAME}}.png]]</div>
<default>{{PAGENAME}}</default>
<div class="SubHeader">Card Notes</div>
</title>
<dl>
<image source="image">
<dt>Order</dt>
        <default>[[File:{{PAGENAME}}.png]]</default>
<dd>{{{order}}}</dd>
    </image>
</dl>
    <header>Card Bonus</header>
<div class="SubHeader">Bonuses</div>
<data source="effect">
<dl>
<label>Effect</label>
<dt>Effect</dt>
</data>
<dd>{{{effect}}}</dd>
    <group name="CardBonus" layout="horizontal">
<dt>Base</dt>
<data source="bonus">
<dd>{{{bonus}}}</dd>
<label>Base</label>
<dt>[[File:Star1.png|class=CardStar]]</dt>
</data>
<dd>{{#expr:{{{bonus}}}*2}}</dd>
<data source="bonus">
<dt>[[File:Star2.png|class=CardStar]]</dt>
<label>[[File:Star1.png|class=CardStar|link=]]</label>
<dd>{{#expr:{{{bonus}}}*3}}</dd>
<format>{{#expr:{{{bonus}}}*2}}</format>
<dt>[[File:Star3.png|class=CardStar]]</dt>
</data>
<dd>{{#expr:{{{bonus}}}*4}}</dd>
<data source="bonus">
<dt>[[File:Star4.png|class=CardStar]]</dt>
<label>[[File:Star2.png|class=CardStar|link=]]</label>
<dd>{{#expr:{{{bonus}}}*5}}</dd>
<format>{{#expr:{{{bonus}}}*3}}</format>
</dl>
</data>
<div class="SubHeader">Tier Requirements</div>
<data source="bonus">
<dl>
<label>[[File:Star3.png|class=CardStar|link=]]</label>
<dt>[[File:Star1.png|class=CardStar]]</dt>
<format>{{#expr:{{{bonus}}}*4}}</format>
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}) }}}}</dd>
</data>
<dt>[[File:Star2.png|class=CardStar]]</dt>
<data source="bonus">
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}*3) }}}}</dd>
<label>[[File:Star4.png|class=CardStar|link=]]</label>
<dt>[[File:Star3.png|class=CardStar]]</dt>
<format>{{#expr:{{{bonus}}}*5}}</format>
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}*5) }}}}</dd>
</data>
<dt>[[File:Star4.png|class=CardStar]]</dt>
</group>
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}*16) }}}}</dd>
    <header>Tier Requirements</header>
</dl>
    <group name="CardTier" layout="horizontal">
<div class="SubHeader">Other Details</div>
<data source="reqtier">
<dl>
<label>[[File:Star1.png|class=CardStar|link=]]</label>
<dt>Dropchance</dt>
<format>{{#expr: ceil({{{reqtier}}}) }}</format>
<dd>{{Chancedisplay|{{{dropchance|{{#invoke:LuaVar|var|name=Chance}}}}}}}</dd>
</data>
<dt>Category</dt>
<data source="reqtier">
<dd>[[Cards#{{{category}}}|{{{category}}}]]</dd>
<label>[[File:Star2.png|class=CardStar|link=]]</label>
<dt>Source</dt>
<format>{{#expr: ceil({{{reqtier}}}*3) }}</format>
<dd style="display:inline;">{{#invoke:LuaVar|var|name=Sources}}</dd>
</data>
</dl>
<data source="reqtier">
</div>{{#seo:
<label>[[File:Star3.png|class=CardStar|link=]]</label>
<format>{{#expr: ceil({{{reqtier}}}*5) }}</format>
</data>
<data source="reqtier">
<label>[[File:Star4.png|class=CardStar|link=]]</label>
<format>{{#expr: ceil({{{reqtier}}}*16) }}</format>
</data>
</group>
    <header>Other Details</header>
<data source="dropchance">
<label>Dropchance</label>
        <format>{{Chancedisplay|{{{dropchance|{{#invoke:LuaVar|var|name=Chance}}}}}}}</format>
</data>
    <data source="category">
<label>Category</label>
        <format>[[Cards#{{{category}}}|{{{category}}}]]</format>
</data>
    <data source="order">
<label>Order</label>
</data>
    <data source="source">
<label>Source</label>
        <default>{{#invoke:LuaVar|var|name=Sources}}</default>
</data>
</infobox>{{#seo:
|image={{PAGENAME}}.png
|image={{PAGENAME}}.png
|description=Category:&nbsp;{{{category}}}
|description=Category:&nbsp;{{{category}}}

Revision as of 05:03, 3 February 2023

This template defines the table "Cards". View table. Usage

{{InfoCard
|title=example
|order=example
|category=example
|effect=example
|bonus=example
|reqtier=Base requirement for increasing tiers (as listed in the code, which in some cases is 1.5)
|source=example
}}