Template:InfoEnemy: Difference between revisions

From IdleOn MMO Wiki
No edit summary
Tag: Manual revert
mNo edit summary
Line 39: Line 39:
   |Card={{PAGENAME}} Card
   |Card={{PAGENAME}} Card
}}<!--
}}<!--
--><div class="Infobox">
--><infobox>
<div class="Header">{{PAGENAME}}</div>
<title source="title">
<div class="HeaderImage">[[file:{{PAGENAME}} Walking.gif]]</div>
<default>{{PAGENAME}}</default>
<div class="SubHeader">Stats</div>
</title>
<dl>
    <panel>
<dt>Attack</dt>
        <section>
<dd>{{{attack}}}</dd>
            <image>
<dt>Health</dt>
                <default>
<dd>{{{health}}}</dd>
                    {{#tag:gallery|
<dt>Speed</dt>
                      {{#if:{{{idleonly|}}}|{{PAGENAME}}} Idle.gif{{!}}Idle/Walking
<dd>{{{speed}}}</dd>
                      |{{PAGENAME}} Idle.gif{{!}}Idle
<dt>Experience</dt>
                      {{PAGENAME}} Walking.gif{{!}}Walking}}
<dd>{{{exp}}}</dd>
                      {{PAGENAME}} Death.gif{{!}}Death
</dl>
                    }}
<div class="SubHeader">Fighting</div>
                </default>
<dl>
            </image>
{{#if: {{{defence|}}} |
        </section>
<dt>Accuracy 5%</dt>
    </panel>
<dd>{{#expr: ceil({{{defence}}}*0.5)}}</dd>
    <header>Monster Stats</header>
}}
<data source="attack">
{{#if: {{{defence|}}} |
<label>Attack</label>
<dt>Accuracy 100%</dt>
</data>
<dd>{{#expr: ceil({{{defence}}}*1.5)}}</dd>
<data source="health">
}}
<label>Health</label>
<dt>Defence for 0</dt>
</data>
<dd>{{{defence0}}}</dd>
<data source="speed">
</dl>
<label>Speed</label>
<div class="SubHeader">Misc</div>
</data>
<dl>
<data source="exp">
{{#if: {{{type|}}} |
<label>Experience</label>
<dt>Type</dt>
</data>
<dd>{{{type}}}</dd>
    <header>Fighting Stats</header>
}}
<data source="defence">
<dt>Respawn</dt>
<label>Accuracy 5%</label>
<dd>{{{respawn}}}</dd>
        <format>{{#expr: ceil({{{defence}}}*0.5)}}</format>
<dt>World</dt>
</data>
<dd>{{{world}}}</dd>
<data source="defence">
<dt>Area</dt>
<label>Accuracy 100%</label>
<dd style="display:inline;">{{#invoke:Loops|parseLoop
        <format>{{#expr: ceil({{{defence}}}*1.5)}}</format>
|list1={{{area|}}}
</data>
|replaceString=[[Worlds#(1)|(1)]]
<data source="defence0">
|delimiter=,
<label>Def for 0</label>
|returnDelimiter=, 
</data>
}}{{#if: {{{customarea|}}} | {{#if:{{{area|}}}|<br>}}{{{customarea}}}}}</dd>
    <header>Misc</header>
</dl>
<data source="type">
{{#if: {{{crystalname|}}} |
<label>Type</label>
<div class="SubHeader">[[{{{crystalname}}}]]</div>
</data>
{{infoEnemy/crystalstats | attack={{{attack}}} | health={{{health}}} | defence={{{defence}}} | exp={{{exp}}}}}
    <data source="respawn">
}}
<label>Respawn</label>
{{#if: {{{hascard|}}} | {{#cargo_query:tables=Cards
</data>
|fields=CardOrder=order, Category=category, Effect=effect, Bonus=bonus, DropChance=dropchance
    <data source="world">
|where= Title LIKE "{{PAGENAME}}" OR Title LIKE "{{PAGENAME}} Card"
<label>World</label>
|format=template
</data>
|template=InfoCard/boxrow
    <data source="area">
|named args=yes
<label>Area</label>
|default=
        <format>{{#invoke:Loops|parseLoop|list1={{{area|}}}|replaceString=[[Worlds#(1)|(1)]]|delimiter=,|returnDelimiter=, }}{{#if: {{{customarea|}}} | {{#if:{{{area|}}}|<br>}}{{{customarea}}}}}</format>
}}
</data>
    <group name="CrystalSection">
        <header>{{{crystalname|}}}</header>
        <data source="attack">
            <label>Attack</label>
            <format>{{#expr:{{{attack}}}*2.5}}</format>
        </data>
        <data source="health">
            <label>Health</label>
            <format>{{#expr:{{{health}}}*15}}</format>
        </data>
        <data source="defence">
            <label>Accuracy 5%</label>
            <format>{{#expr:{{{defence}}}*0.5*2.5}}</format>
        </data>
        <data source="defence">
            <label>Accuracy 100%</label>
            <format>{{#expr:{{{defence}}}*1.5*2.5}}</format>
        </data>
        <data source="exp">
            <label>Experience</label>
            <format>{{#expr:{{{exp}}}*35}}</format>
        </data>
    </group>
    <group name="CardSection">
        <header>Card Bonus</header>
<data source="hascard">
<label>Effect</label>
<format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:effect|title={{PAGENAME}} Card|count=1|mode=inline|format=,}}</format>
</data>
<data source="hascard">
<format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:bonus:bonus:bonus:bonus:bonus|title={{PAGENAME}} Card|count=1|mode = userformat|table = class="pi-horizontal-group",-, Base, [[File:Star1.png|class=CardStar|link=]], [[File:Star2.png|class=CardStar|link=]], [[File:Star3.png|class=CardStar|link=]], [[File:Star4.png|class=CardStar|link=]]|tablerow=%%, <!-- Star1 -->²{#expr:%% * 2}², <!-- Star2 -->²{#expr:%% * 3}², <!-- Star3 -->²{#expr:%% * 4}², <!-- Star4 -->²{#expr:%% * 5}²}}</format>
</data>
<data source="hascard">
<label>Category</label>
<format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:category|title={{PAGENAME}} Card|count=1|mode=inline|format=,}}</format>
</data>
    <data source="hascard">
<label>Dropchance</label>
<format>{{Chancedisplay|{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:dropchance|title={{PAGENAME}} Card|count=1|mode=inline|format=,}}}}</format>
</data>
    </group>
</infobox>
<!--  Saving for backup I guess.
<!--  Saving for backup I guess.
{{#dpl:  
{{#dpl:  

Revision as of 22:03, 1 February 2023

This template defines the table "Enemies". View table.

Usage:
{{InfoEnemy
|attack=example
|health=example
|speed=example
|defence=example (this defines the accuracy values required)
|defence0=example (How much defence is needed to not take damage)
|exp=example
|world=example
|area=example
|area2=example (optional)
|area3=example (optional)
|crystal=yes (if you want to show the stats for the crystal enemy in the area
|crystalname=example (e.g. Crystal Carrot for blunder hills)
|hascard=yes
|prevenemy=example (previous monster for navigation)
|nextenemy=example (next monster for navigation)
|notes=example (optional)
}}