Template:InfoEnemy: Difference between revisions

From IdleOn MMO Wiki
No edit summary
Tag: Reverted
mNo edit summary
 
(56 intermediate revisions by 5 users not shown)
Line 16: Line 16:
   |RespawnTime=String
   |RespawnTime=String
   |Defence0=String
   |Defence0=String
  |CrystalEnemy=String
  |Card=Page
}}</noinclude><!--
}}</noinclude><!--


### Cargo Store ###
### Cargo Store ###
--><includeonly>
--><includeonly>{{#cargo_query:table=DefenseList|fields=DefenseVal, CrystalDefense|where=AttackVal="{{{attack|1}}}"|format=template|template=DefenseScaling/data|named args=yes|default=}}{{#ifeq:{{#sub:{{PAGENAME}}|0|7}}|Crystal||
{{#cargo_store:_table=Enemies
{{#cargo_store:_table=Enemies
   |Image=
   |Image={{PAGENAME}} Idle.gif
    <gallery>
      {{PAGENAME}} Idle.gif|Idle
      {{PAGENAME}} Walking.gif|Walking
      {{PAGENAME}} Death.gif|Death
    </gallery>
   |Attack={{{attack|}}}
   |Attack={{{attack|}}}
   |Accuracy5={{#iferror: {{#expr: ceil({{{defence|}}}*0.5)}} }}
   |Accuracy5={{#iferror: {{#expr: ceil({{{defence|}}}*0.5)}} }}
Line 40: Line 33:
   |EXP={{{exp|}}}
   |EXP={{{exp|}}}
   |RespawnTime={{{respawn|}}}
   |RespawnTime={{{respawn|}}}
   |Defence0={{{defence0|}}}
   |Defence0={{#var:NDef0|{{{defence0|1}}}}}
  |CrystalEnemy={{{crystalname|None}}}
}}}}<!--
  |Card={{PAGENAME}} Card
--><infobox>
}}<!--
<title>
--><div class="Infobox">
<default>{{PAGENAME}}</default>
<div class="Header">{{PAGENAME}}</div>
</title>
<div class="HeaderImage">[[file:{{PAGENAME}} Walking.gif]]</div>
    <panel>
<div class="SubHeader">Stats</div>
        <section>
<dl>
            <image>
<dt>Attack</dt>
                <default>
<dd>{{{attack}}}</dd>
                    {{#tag:gallery|
<dt>Health</dt>
                      {{#if:{{{idleonly|}}}|{{PAGENAME}} Idle.gif{{!}}Idle/Walking
<dd>{{{health}}}</dd>
                      |{{PAGENAME}} Idle.gif{{!}}Idle
<dt>Speed</dt>
                      {{PAGENAME}} Walking.gif{{!}}Walking}}
<dd>{{{speed}}}</dd>
                      {{PAGENAME}} Death.gif{{!}}Death
<dt>Experience</dt>
                    }}
<dd>{{{exp}}}</dd>
                </default>
</dl>
            </image>
<div class="SubHeader">Fighting</div>
        </section>
<dl>
    </panel>
{{#if: {{{defence|}}} |
    <header>Information</header>
<dt>Accuracy 5%</dt>
    <panel>
<dd>{{#expr: ceil({{{defence}}}*0.5)}}</dd>
        <section>
}}
<label>Monster Stats</label>
{{#if: {{{defence|}}} |
<group row-items="2">
<dt>Accuracy 100%</dt>
<data source="attack">
<dd>{{#expr: ceil({{{defence}}}*1.5)}}</dd>
<label>{{Icons|Attack Icon|17|text=Attack}}</label>
}}
                    <format>{{#ifeq:{{{attack|}}}|Variable|Variable|{{Numdisplay|{{{attack}}}}}}}</format>
<dt>Defence for 0</dt>
</data>
<dd>{{{defence0}}}</dd>
<data source="health">
</dl>
<label>{{Icons|HP Icon|18|text=Health}}</label>
<div class="SubHeader">Misc</div>
<format>{{#ifeq:{{{health|}}}|Variable|Variable|{{Numdisplay|{{{health}}}}}}}</format>
<dl>
</data>
{{#if: {{{type|}}} |
<data source="defence">
<dt>Type</dt>
<label>{{Icons|Accuracy Icon|15|text=5% Accuracy}}</label>
<dd>{{{type}}}</dd>
<format>{{#ifeq:{{{defence|}}}|Variable|Variable|{{Numdisplay|{{#expr: ceil({{{defence}}}*0.5)}}}}}}</format>
}}
</data>
<dt>Respawn</dt>
<data source="defence">
<dd>{{{respawn}}}</dd>
<label>100% Accuracy</label>
<dt>World</dt>
<format>{{#ifeq:{{{defence|}}}|Variable|Variable|{{Numdisplay|{{#expr: ceil({{{defence}}}*1.5)}}}}}}</format>
<dd>{{{world}}}</dd>
</data>
<dt>Area</dt>
<data source="exp">
<dd style="display:inline;">{{#invoke:Loops|parseLoop
<label>Experience</label>
|list1={{{area|}}}
<format>{{#ifeq:{{{exp|}}}|Variable|Variable|{{Numdisplay|{{{exp}}}}}}}</format>
|replaceString=[[Worlds#(1)|(1)]]
</data>
|delimiter=,
<data source="Ndefence0">
|returnDelimiter=
<label>Def for 0</label>
}}{{#if: {{{customarea|}}} | {{#if:{{{area|}}}|<br>}}{{{customarea}}}}}</dd>
                    <default>{{#ifeq:{{{attack|}}}|Variable|Variable|{{#invoke:NumberFormater|main|{{#var:NDef0}}|formattype=tooltip}}}}</default>
</dl>
</data>
{{#if: {{{crystalname|}}} |
<data source="respawn" layout="default">
<div class="SubHeader">[[{{{crystalname}}}]]</div>
<label>Respawn</label>
{{infoEnemy/crystalstats | attack={{{attack}}} | health={{{health}}} | defence={{{defence}}} | exp={{{exp}}}}}
                    <format>{{{respawn}}}</format>
}}
</data>
{{#if: {{{hascard|}}} | {{#cargo_query:tables=Cards
<data source="type" layout="default">
|fields=CardOrder=order, Category=category, Effect=effect, Bonus=bonus, DropChance=dropchance
<label>Type</label>
|where= Title LIKE "{{PAGENAME}}" OR Title LIKE "{{PAGENAME}} Card"
                    <format>{{{type}}} Monster[[Category:{{{type}}} Enemy]]</format>
|format=template
                </data>
|template=InfoCard/boxrow
<!--<data source="speed" layout="default">
|named args=yes
<label>Speed</label>
|default=
</data>-->
}}
</group>
</section>
<section>
<label>Crystal Stats</label>
<group name="CrystalSection" row-items="2">
<data source="crystalname">
<label>{{Icons|Attack Icon|17|text=Attack}}</label>
<format>{{Numdisplay|{{#expr:{{{attack}}}*2.5}}}}</format>
</data>
<data source="crystalname">
<label>{{Icons|HP Icon|18|text=Health}}</label>
<format>{{Numdisplay|{{#expr:{{{health}}}*15}}}}</format>
</data>
<data source="crystalname">
<label>{{Icons|Accuracy Icon|15|text=5% Accuracy}}</label>
<format>{{Numdisplay|{{#expr:{{{defence}}}*0.5*2.5}}}}</format>
</data>
<data source="crystalname">
<label>100% Accuracy</label>
<format>{{Numdisplay|{{#expr:{{{defence}}}*1.5*2.5}}}}</format>
</data>
<data source="crystalname">
<label>Experience</label>
<format>{{Numdisplay|{{#expr:{{{exp}}}*30}}}}</format>
</data>
<data source="crystalname">
<label>Def for 0</label>
                    <format>{{#invoke:NumberFormater|main|{{#var:CDef0}}|formattype=tooltip}}</format>
</data>
<data source="crystalname" layout="default">
<label>Name</label>
<format>[[{{{crystalname}}}]]</format>
</data>
</group>
</section>
</panel>
    <group name="CardSection">
        <header>Card Info</header>
        <data source="hascard">
<label>Card</label>
<format>{{CraftReq|{{PAGENAME}} Card|24px}}</format>
</data>
<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:bonus|title={{PAGENAME}} Card|count=1|mode = userformat|table = class="pi-horizontal-group",-, [[File:Star0.png|class=CardStar|link=]], [[File:Star1.png|class=CardStar|link=]], [[File:Star2.png|class=CardStar|link=]], [[File:Star3.png|class=CardStar|link=]], [[File:Star4.png|class=CardStar|link=]], [[File:Star5.png|class=CardStar|link=]]|tablerow=%%, <!-- Star1 -->²{#expr:%% * 2}², <!-- Star2 -->²{#expr:%% * 3}², <!-- Star3 -->²{#expr:%% * 4}², <!-- Star4 -->²{#expr:%% * 5}², <!-- Star5 -->²{#expr:%% * 6}²}}</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>
    <header>Location</header>
    <data source="world">
<label>World</label>
</data>
    <data source="area">
<label>Area</label>
<format>{{Areas|{{{area|}}}}}
        </format>
</data>
    <data source="customarea">
<label>Area</label>
</data>
</infobox>
<!--  Saving for backup I guess.
<!--  Saving for backup I guess.
{{#dpl:  
{{#dpl:  
Line 110: Line 173:
|format=,,
|format=,,
|allowcachedresults=true
|allowcachedresults=true
}}--> }}
}}-->
</div>
{{#invoke:EnemyNav|BuildNav|Type={{{type|Normal}}}|Enemy={{PAGENAME}}}}
{{#if:{{{prevenemy|}}}{{{nextenemy|}}}|{{EnemyNavigation|{{{prevenemy|}}}|{{{nextenemy|}}}}}}}
{{{notes|}}}
{{{notes|}}}
{{#seo:
{{#seo:
|image={{PAGENAME}}_Walking.gif
|image={{PAGENAME}}_Idle.gif
|description=Attack: {{{attack}}}
|description=Attack: {{{attack}}}
Health: {{{health}}}
Health: {{{health}}}
Line 122: Line 184:
Respawn: {{{respawn}}}
Respawn: {{{respawn}}}
World: {{{world}}}
World: {{{world}}}
}}
}}[[Category:Enemies]]</includeonly><noinclude><pre>
[[Category:Enemies]]</includeonly><noinclude><pre>
Usage:
Usage:
{{InfoEnemy
{{InfoEnemy
|attack=example
|attack=example
|health=example
|health=example
|speed=example
|defence=example (this defines the accuracy values required)
|defence=example (this defines the accuracy values required)
|defence0=example (How much defence is needed to not take damage)
|exp=example
|exp=example
|world=example
|world=example
|area=example
|area=example1, example2
|area2=example (optional)
|customarea={{Area|area1}}, Special Area
|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)
|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)
|notes=example (optional)
}}
}}
</pre>
</pre>[[Category:Infobox templates]]</noinclude>
[[Category:Infobox templates]]
</noinclude>
 
[[Category:Enemies]]

Latest revision as of 08:01, 27 July 2024

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

Usage:
{{InfoEnemy
|attack=example
|health=example
|defence=example (this defines the accuracy values required)
|exp=example
|world=example
|area=example1, example2
|customarea={{Area|area1}}, Special Area
|crystalname=example (e.g. Crystal Carrot for blunder hills)
|notes=example (optional)
}}