From Dark and Darker Wiki

m (Updated logic to sieve the array into three categories, which it then prints.)
No edit summary
 
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!--{{#arraydefine:all|{{Monster Data|{{{1}}}}}}}-->
<!--<div class="iconbox"><div class="rarity2 rounded relative">[[File:Bronze Ornate Chest.png|x70px|link=Bronze Ornate Chest-Crypts]]</div>[[Bronze Ornate Chest-Crypts]]</div>-->{{Iconbox|Bronze Ornate Chest-Crypts#HR|image=Bronze Ornate Chest.png|size=x60px|rarity=Elite}}
{{#arraydefine:all|Cave Troll,Cockatrice,Dire Wolf}}
{{#arraydefine:bosses}}
{{#arraydefine:minibosses}}
{{#arraydefine:monsters}}
<!-- Sieves the {{{1}}} array into the three types -->
{{#loop:i
    |0
    |{{#arraysize:all}}
    |{{#vardefine:current|{{ #arrayindex:all | {{ #var:i }}}}}}<!--
    If is Boss, add to bosses array
    -->{{#if:{{Monster Data|{{#var:current}}|Boss}}|<!--
        -->{{#arraydefine:bosses|{{#arrayprint:bosses}},{{#var:current}}}}|<!--
        If is not a Boss and is a Miniboss, add to the minibosses array
        -->{{#if:{{Monster Data|{{#var:current}}|MiniBoss}}|<!--
            -->{{#arraydefine:minibosses|{{#arrayprint:minibosses}},{{#var:current}}}}|<!--
            If neither Boss nor Miniboss, add to monsters array
            -->{{#arraydefine:monsters|{{#arrayprint:monsters}},{{#var:current}}}}}}}}
}}
==Bosses==
<ul>{{#loop: i
    |1
    |{{#expr:{{#arraysize:bosses}}-1}}
    |{{#vardefine:current|{{ #arrayindex:bosses | {{ #var:i }}}}}}<!--
    --><li>[[{{#var:current}}]]</li>
}}</ul>
==Mini Bosses==
<ul>{{#loop: i
    |1
    |{{#expr:{{#arraysize:minibosses}}-1}}
    |{{#vardefine:current|{{ #arrayindex:minibosses | {{ #var:i }}}}}}<!--
    --><li>[[{{#var:current}}]]</li>
}}</ul>
==Monsters==
<ul>{{#loop: i
    |1
    |{{#expr:{{#arraysize:monsters}}-1}}
    |{{#vardefine:current|{{ #arrayindex:monsters | {{ #var:i }}}}}}<!--
    --><li>[[{{#var:current}}]]</li>
}}</ul>

Latest revision as of 06:58, 22 September 2024