Template:Battle: Difference between revisions
No edit summary |
|||
| (22 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{| class=mw-collapsible cellpadding="3" style="margin-left:1%; white-space:nowrap; width:{{{width|69}}}%; max-width:100%; background-color:# | <includeonly>{| class="mw-collapsible {{#ifeq:{{{col|}}}|true|mw-collapsed|}}"cellpadding="3" style="margin-left:{{{margin|1}}}%; white-space:nowrap; width:{{{width|69}}}%; max-width:100%; background-color:#E8F8FF; border-radius:7px" | ||
| colspan=3 style="border-radius: 7px; background-color:# | | colspan=3 style="border-radius: 7px; background-color:#C2E8FF; border:2px solid #E8F8FF" | '''{{{1}}}''' | ||
|- | |- | ||
{{{2}}} | {{{2}}} | ||
|} | |}</includeonly><noinclude> | ||
This template is a wrapper for [[Template:BattleLine]] to create battle scripts for routes. Here's an example of how it's implemented: | |||
<pre>{{Battle|Goomba Trio| | |||
{{BattleLine|Mario|Jump x2 on the Goomba}} | |||
{{BattleLine|Goombella|Headbonk x2 on the Paragoomba|right 1}} | |||
{{BattleLine|Spiky Goomba|Superguard}} | |||
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}} | |||
{{BattleLine|Level Up|'''BP → 6'''}} | |||
}}</pre> | |||
{{Battle|Goomba Trio| | |||
{{BattleLine|Mario|Jump x2 on the Goomba}} | |||
{{BattleLine|Goombella|Headbonk x2 on the Paragoomba|right 1}} | |||
{{BattleLine|Spiky Goomba|Superguard}} | |||
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}} | |||
{{BattleLine|Level Up|'''BP → 6'''}} | |||
}} | |||
The following BattleLine first parameters have custom colored backgrounds: | |||
*Mario | |||
*Goombella | |||
*Koops | |||
*Flurrie | |||
*Yoshi | |||
*Vivian | |||
*Bobbery | |||
*Ms. Mowz | |||
*Partner | |||
*Level Up | |||
*Note (see below) | |||
All other entries will appear with a blue bubble (use this for the enemy). | |||
=== Notes === | |||
You can add a note to the battle by setting the first parameter of BattleLine to '''Note'''. | |||
<pre>{{Battle|Hooktail| | |||
{{BattleLine|Mario|Power Bounce x21}} | |||
{{BattleLine|Note|''Pick the top option (Mario takes 5 HP damage)''}} | |||
{{BattleLine|Mario|Power Bounce x10}} | |||
}}</pre> | |||
{{Battle|Hooktail| | |||
{{BattleLine|Mario|Power Bounce x21}} | |||
{{BattleLine|Note|''Pick the top option (Mario takes 5 HP damage)''}} | |||
{{BattleLine|Mario|Power Bounce x10}} | |||
}} | |||
=== Auto-collapse === | |||
If you add '''col=true''' as a parameter in the Battle template, the table will be collapsed by default. This is useful if you want to list multiple battle strategies without taking up a lot of the page. | |||
<pre>{{Battle|Blue Slime|col=true| | |||
{{BattleLine|Note|''This battle table is collapsed by default''}} | |||
}} | |||
{{Battle|Sephiroth|col=true| | |||
{{BattleLine|Note|''This one is too''}} | |||
}} | |||
{{Battle|Shining Pom|col=true| | |||
{{BattleLine|Note|''You can really fit a lot of battles...''}} | |||
}} | |||
{{Battle|Shadow Teddie|col=true| | |||
{{BattleLine|Note|''...on the page when they're collapsed''}} | |||
}}</pre> | |||
{{Battle|Blue Slime|col=true| | |||
{{BattleLine|Note|''This battle table is collapsed by default''}} | |||
}} | |||
{{Battle|Sephiroth|col=true| | |||
{{BattleLine|Note|''This one is too''}} | |||
}} | |||
{{Battle|Shining Pom|col=true| | |||
{{BattleLine|Note|''You can really fit a lot of battles...''}} | |||
}} | |||
{{Battle|Shadow Teddie|col=true| | |||
{{BattleLine|Note|''...on the page when they're collapsed''}} | |||
}} | |||
=== Other Parameters === | |||
You can adjust the default width and left margin for unique use cases using '''width''' and '''margin'''. These values are percentages of the page width. | |||
The default values are width=69 and margin=1, so the template terminates 70% of the way across the page (assuming its content doesn't force it to expand beyond that). | |||
<pre>{{Battle|Goomba|width=30|margin=0| | |||
{{BattleLine|Mario|Jump x2}} | |||
}}</pre> | |||
{{Battle|Goomba|width=30|margin=0| | |||
{{BattleLine|Mario|Jump x2}} | |||
}} | |||
</noinclude> | |||
Latest revision as of 14:30, 16 November 2026
This template is a wrapper for Template:BattleLine to create battle scripts for routes. Here's an example of how it's implemented:
{{Battle|Goomba Trio|
{{BattleLine|Mario|Jump x2 on the Goomba}}
{{BattleLine|Goombella|Headbonk x2 on the Paragoomba|right 1}}
{{BattleLine|Spiky Goomba|Superguard}}
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}}
{{BattleLine|Level Up|'''BP → 6'''}}
}}
| Goomba Trio | ||
| Mario | Jump x2 on the Goomba | |
| Goombella | Headbonk x2 on the Paragoomba | right 1 |
| Spiky Goomba | Superguard | |
| Mario | Failed Hammer | full hammer if missed superguard |
| Level Up | BP → 6 | |
The following BattleLine first parameters have custom colored backgrounds:
- Mario
- Goombella
- Koops
- Flurrie
- Yoshi
- Vivian
- Bobbery
- Ms. Mowz
- Partner
- Level Up
- Note (see below)
All other entries will appear with a blue bubble (use this for the enemy).
Notes
You can add a note to the battle by setting the first parameter of BattleLine to Note.
{{Battle|Hooktail|
{{BattleLine|Mario|Power Bounce x21}}
{{BattleLine|Note|''Pick the top option (Mario takes 5 HP damage)''}}
{{BattleLine|Mario|Power Bounce x10}}
}}
| Hooktail | ||
| Mario | Power Bounce x21 | |
| Pick the top option (Mario takes 5 HP damage) | ||
| Mario | Power Bounce x10 | |
Auto-collapse
If you add col=true as a parameter in the Battle template, the table will be collapsed by default. This is useful if you want to list multiple battle strategies without taking up a lot of the page.
{{Battle|Blue Slime|col=true|
{{BattleLine|Note|''This battle table is collapsed by default''}}
}}
{{Battle|Sephiroth|col=true|
{{BattleLine|Note|''This one is too''}}
}}
{{Battle|Shining Pom|col=true|
{{BattleLine|Note|''You can really fit a lot of battles...''}}
}}
{{Battle|Shadow Teddie|col=true|
{{BattleLine|Note|''...on the page when they're collapsed''}}
}}
| Blue Slime | ||
| This battle table is collapsed by default | ||
| Sephiroth | ||
| This one is too | ||
| Shining Pom | ||
| You can really fit a lot of battles... | ||
| Shadow Teddie | ||
| ...on the page when they're collapsed | ||
Other Parameters
You can adjust the default width and left margin for unique use cases using width and margin. These values are percentages of the page width.
The default values are width=69 and margin=1, so the template terminates 70% of the way across the page (assuming its content doesn't force it to expand beyond that).
{{Battle|Goomba|width=30|margin=0|
{{BattleLine|Mario|Jump x2}}
}}
| Goomba | ||
| Mario | Jump x2 | |