Template:InfoEnemy: Difference between revisions

From IdleOn MMO Wiki
imported>Kiokurashi
No edit summary
mNo edit summary
 
(106 intermediate revisions by 10 users not shown)
Line 16: Line 16:
   |RespawnTime=String
   |RespawnTime=String
   |Defence0=String
   |Defence0=String
  |CrystalName=String
  |hasCard=Boolean
}}</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={{PAGENAME}} Walking.gif
   |Image={{PAGENAME}} Idle.gif
   |Attack={{{attack|}}}
   |Attack={{{attack|}}}
   |Accuracy5={{#iferror: {{#expr: ceil({{{defence|}}}*0.5)}} }}
   |Accuracy5={{#iferror: {{#expr: ceil({{{defence|}}}*0.5)}} }}
Line 35: Line 33:
   |EXP={{{exp|}}}
   |EXP={{{exp|}}}
   |RespawnTime={{{respawn|}}}
   |RespawnTime={{{respawn|}}}
   |Defence0={{{defence0|}}}
   |Defence0={{#var:NDef0|{{{defence0|1}}}}}
  |CrystalName={{{crystalname|}}}
}}}}<!--
  |HasCard={{#ifeq:{{{hascard|}}}|yes|1|0}}
--><infobox>
}}
<title>
 
<default>{{PAGENAME}}</default>
{| class="Infobox"
</title>
|-
    <panel>
! colspan="2" class="Header" | {{PAGENAME}}
        <section>
|-
            <image>
| colspan="2" class="HeaderImage" | [[file:{{PAGENAME}} Walking.gif]]
                <default>
|-
                    {{#tag:gallery|
! colspan="2" class="SubHeader" | Stats
                      {{#if:{{{idleonly|}}}|{{PAGENAME}} Idle.gif{{!}}Idle/Walking
|-
                      |{{PAGENAME}} Idle.gif{{!}}Idle
! Attack
                      {{PAGENAME}} Walking.gif{{!}}Walking}}
| {{{attack}}}
                      {{PAGENAME}} Death.gif{{!}}Death
|-
                    }}
! Health
                </default>
| {{{health}}}
            </image>
|-
        </section>
! Speed
    </panel>
| {{{speed}}}
    <header>Information</header>
|-
    <panel>
! colspan="2" class="SubHeader" | Fighting
        <section>
|-
<label>Monster Stats</label>
{{#if: {{{defence|}}} |
<group row-items="2">
! Accuracy 5%
<data source="attack">
{{!}} {{#expr: ceil({{{defence}}}*0.5)}} }}
<label>{{Icons|Attack Icon|17|text=Attack}}</label>
|-
                    <format>{{#ifeq:{{{attack|}}}|Variable|Variable|{{Numdisplay|{{{attack}}}}}}}</format>
{{#if: {{{defence|}}} |
</data>
! Accuracy 100%
<data source="health">
{{!}} {{#expr: ceil({{{defence}}}*1.5)}} }}
<label>{{Icons|HP Icon|18|text=Health}}</label>
|-
<format>{{#ifeq:{{{health|}}}|Variable|Variable|{{Numdisplay|{{{health}}}}}}}</format>
! Defence for 0
</data>
| {{{defence0}}}
<data source="defence">
|-
<label>{{Icons|Accuracy Icon|15|text=5% Accuracy}}</label>
! colspan="2" class="SubHeader" | Misc
<format>{{#ifeq:{{{defence|}}}|Variable|Variable|{{Numdisplay|{{#expr: ceil({{{defence}}}*0.5)}}}}}}</format>
|-
</data>
{{#if: {{{type|}}} |
<data source="defence">
!Type
<label>100% Accuracy</label>
{{!}} {{{type}}}
<format>{{#ifeq:{{{defence|}}}|Variable|Variable|{{Numdisplay|{{#expr: ceil({{{defence}}}*1.5)}}}}}}</format>
}}
</data>
|-
<data source="exp">
! Respawn
<label>Experience</label>
| {{{respawn}}}
<format>{{#ifeq:{{{exp|}}}|Variable|Variable|{{Numdisplay|{{{exp}}}}}}}</format>
|-
</data>
! World
<data source="Ndefence0">
| {{{world}}}
<label>Def for 0</label>
|-
                    <default>{{#ifeq:{{{attack|}}}|Variable|Variable|{{#invoke:NumberFormater|main|{{#var:NDef0}}|formattype=tooltip}}}}</default>
!Area
</data>
|{{#vardefine:i|0}}
<data source="respawn" layout="default">
{{#while:
<label>Respawn</label>
| {{#if: {{#explode:{{{area|}}}|,|{{#var:i}}}} | true }}
                    <format>{{{respawn}}}</format>
| <nowiki />
</data>
{{#vardefine:areaE|{{#explode:{{{area|}}}|,|{{#var:i}}}}}}
<data source="type" layout="default">
{{#ifexpr:{{#var:i}}>0|, }}[[Worlds#{{#var:areaE}}|{{#var:areaE}}]]{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}
<label>Type</label>
}}{{#if: {{{customarea|}}} | {{#if:{{{area|}}}|<br>}}{{{customarea}}}}}
                    <format>{{{type}}} Monster[[Category:{{{type}}} Enemy]]</format>
|-
                </data>
{{#if: {{{crystalname|}}} |
<!--<data source="speed" layout="default">
! colspan="2" class="SubHeader" {{!}} [[{{{crystalname}}}]]
<label>Speed</label>
{{infoEnemy/crystalstats | attack={{{attack}}} | health={{{health}}} | defence={{{defence}}} | exp={{{exp}}}}}
</data>-->
}}
</group>
|-
</section>
{{#ifeq: {{{hascard|}}} | yes | {{#dpl:  
<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.
{{#dpl:  
|namespace=
|namespace=
|category=Cards
|category=Cards
Line 105: Line 173:
|format=,,
|format=,,
|allowcachedresults=true
|allowcachedresults=true
}} }}
}}-->
{{#invoke:EnemyNav|BuildNav|Type={{{type|Normal}}}|Enemy={{PAGENAME}}}}
{{{notes|}}}
{{#seo:
{{#seo:
|image={{PAGENAME}}_Walking.gif
|image={{PAGENAME}}_Idle.gif
|description=Attack: {{{attack}}}
|description=Attack: {{{attack}}}
Health: {{{health}}}
Health: {{{health}}}
Line 114: 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=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)
|crystalname=example (e.g. Crystal Carrot for blunder hills)
|crystal=yes (if you want to show the stats for the crystal enemy in the area
|notes=example (optional)
|crystalname=example (Crystal Carrot for blunder hills for example)
|hascard=yes
}}
}}
</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)
}}