Template:InfoEnemy: Difference between revisions

From IdleOn MMO Wiki
imported>Blackwolfe
No edit summary
mNo edit summary
 
(149 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<includeonly>
<noinclude><!--
<div class="infobox">
 
<table><th class="header">{{{title|{{PAGENAME}}}}}</th></table>
### Cargo Declare ###
<div class="infobox-image">[[File:{{PAGENAME}} Walking.gif]]</div>
-->{{#cargo_declare:_table=Enemies
<div style="font-size: 80%; font-style: italic; text-align: center;">{{{caption|}}}</div>
  |Image=File
<table>
  |Attack=String
    <th class="subheader" colspan="2">Stats</th>
  |Accuracy5=String
    </tr>
  |Accuracy100=String
    <th>Attack</th>
  |Health=String
    <td>{{{attack}}}</td>
  |Defence=String
    </tr>
  |Speed=String
    <th>Health</th>
  |World=String
    <td>{{{health}}}</td>
  |Areas=List (,) of String
    </tr>
  |SpecialAreas=List (,) of Wikitext
    <th>Move Speed</th>
  |EXP=String
    <td>{{{speed}}}</td>
  |RespawnTime=String
    </tr>
  |Defence0=String
    <th class="subheader" colspan="2">Fighting</th>
}}</noinclude><!--
    </tr>
 
    {{#if: {{{defence|}}}|<th>Accuracy 5%</th>
### Cargo Store ###
    <td>{{#expr:{{{defence}}}*0.5}}</td>
--><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||
    </tr>}}
{{#cargo_store:_table=Enemies
    {{#if: {{{defence|}}}|<th>Accuracy 100%</th>
  |Image={{PAGENAME}} Idle.gif
    <td>{{#expr:{{{defence}}}*1.5}}</td>
  |Attack={{{attack|}}}
    </tr>}}
  |Accuracy5={{#iferror: {{#expr: ceil({{{defence|}}}*0.5)}} }}
    <th>Defence for 0</th>
  |Accuracy100={{#iferror: {{#expr: ceil({{{defence|}}}*1.5)}} }}
    <td>{{{defence0}}}</td>
  |Health={{{health|}}}
    </tr>
  |Defence={{{defence|}}}
    </tr>
  |Speed={{{speed|}}}
    <th class="subheader" colspan="2">Misc</th>
  |World={{{world|}}}
    </tr>
  |Areas={{{area|}}}
    <th>Experience</th>
  |SpecialAreas={{{customarea|}}}
    <td>{{{exp}}}</td>
  |EXP={{{exp|}}}
    </tr>
  |RespawnTime={{{respawn|}}}
    <th>Respawn Time</th>
  |Defence0={{#var:NDef0|{{{defence0|1}}}}}
    <td>{{{respawn}}}</td>
}}}}<!--
    </tr>
--><infobox>
     <th class="subheader" colspan="2">Location</th>
<title>
    </tr>
<default>{{PAGENAME}}</default>
    <th>World</th>
</title>
    <td>{{{world}}}</td>
    <panel>
    </tr>
        <section>
    <th style="border-radius: 0 0 0 0.4em">Area</th>
            <image>
    <td>[[Worlds#{{{area}}}|{{{area}}}]]</td></tr>
                <default>
    {{#ifeq: {{{crystal}}}|yes|<th class="subheader" colspan="2">[[{{{crystalname}}}]]</th></tr>
                    {{#tag:gallery|
    {{infoEnemy/crystalstats|attack={{{attack}}}|health={{{health}}}|defence={{{defence}}}|exp={{{exp}}}}}
                      {{#if:{{{idleonly|}}}|{{PAGENAME}} Idle.gif{{!}}Idle/Walking
     }}</tr>
                      |{{PAGENAME}} Idle.gif{{!}}Idle
     {{#ifeq: {{{hascard}}}|yes|{{#dpl:  
                      {{PAGENAME}} Walking.gif{{!}}Walking}}
                      {{PAGENAME}} Death.gif{{!}}Death
                    }}
                </default>
            </image>
        </section>
    </panel>
    <header>Information</header>
    <panel>
        <section>
<label>Monster Stats</label>
<group row-items="2">
<data source="attack">
<label>{{Icons|Attack Icon|17|text=Attack}}</label>
                    <format>{{#ifeq:{{{attack|}}}|Variable|Variable|{{Numdisplay|{{{attack}}}}}}}</format>
</data>
<data source="health">
<label>{{Icons|HP Icon|18|text=Health}}</label>
<format>{{#ifeq:{{{health|}}}|Variable|Variable|{{Numdisplay|{{{health}}}}}}}</format>
</data>
<data source="defence">
<label>{{Icons|Accuracy Icon|15|text=5% Accuracy}}</label>
<format>{{#ifeq:{{{defence|}}}|Variable|Variable|{{Numdisplay|{{#expr: ceil({{{defence}}}*0.5)}}}}}}</format>
</data>
<data source="defence">
<label>100% Accuracy</label>
<format>{{#ifeq:{{{defence|}}}|Variable|Variable|{{Numdisplay|{{#expr: ceil({{{defence}}}*1.5)}}}}}}</format>
</data>
<data source="exp">
<label>Experience</label>
<format>{{#ifeq:{{{exp|}}}|Variable|Variable|{{Numdisplay|{{{exp}}}}}}}</format>
</data>
<data source="Ndefence0">
<label>Def for 0</label>
                    <default>{{#ifeq:{{{attack|}}}|Variable|Variable|{{#invoke:NumberFormater|main|{{#var:NDef0}}|formattype=tooltip}}}}</default>
</data>
<data source="respawn" layout="default">
<label>Respawn</label>
                    <format>{{{respawn}}}</format>
</data>
<data source="type" layout="default">
<label>Type</label>
                    <format>{{{type}}} Monster[[Category:{{{type}}} Enemy]]</format>
                </data>
<!--<data source="speed" layout="default">
<label>Speed</label>
</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.
{{#dpl:  
|namespace=
|namespace=
|category=Cards
|category=Cards
|uses=Template:InfoCard
|uses=Template:InfoCard
|include={InfoCard}/boxrow
|include={infoCard}/boxrow
|includematch=*{{PAGENAME}}*
|titlematch={{PAGENAME}} Card
|format=,,
|format=,,
|allowcachedresults=true
|allowcachedresults=true
}}}}
}}-->
</table>
{{#invoke:EnemyNav|BuildNav|Type={{{type|Normal}}}|Enemy={{PAGENAME}}}}
</div>
{{{notes|}}}
{{#switch: {{PAGENAME}}
{{#seo:
|Baba Yaga = [[File:Backarrow.png|15px]][[Bosses]]
|image={{PAGENAME}}_Idle.gif
|Dr Defecaus = [[File:Backarrow.png|15px]][[Bosses]]
|description=Attack: {{{attack}}}
|#default =[[File:Backarrow.png|15px]][[Bestiary]]}}
Health: {{{health}}}
[[Category:Enemies]]
{{#if:{{{defence|}}}|Acc for 5%: {{#expr: {{{defence}}}*0.5}}}}
</includeonly>
{{#if:{{{defence|}}}|Acc for 100%: {{#expr: {{{defence}}}*1.5}}}}
 
Respawn: {{{respawn}}}
<noinclude><pre>
World: {{{world}}}
}}[[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
|crystal=yes (if you want to show the stats for the crystal enemy in the area
|customarea={{Area|area1}}, Special Area
|crystalname=example (Crystal Carrot for blunder hills for example)
|crystalname=example (e.g. Crystal Carrot for blunder hills)
|hascard=yes
|notes=example (optional)
}}
}}
</pre>
</pre>[[Category:Infobox templates]]</noinclude>
[[Category:Infobox templates]]
</noinclude>

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)
}}