Difference between revisions of "User:Trang Oul/Sandbox/Template:Class only"
< User:Trang Oul | Sandbox
Jump to navigation
Jump to search
(Created page with "<includeonly>{{#switch: {{{1|}}} | ama | Amazon = (Amazon Only) | sor | Sorceress = (Sorceress Only) | nec | Necromancer = (Necromancer Only) | pal | Paladin = (Paladin Only)...") |
|||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#switch: {{{1|}}} | + | <noinclude> |
| − | | ama | Amazon = (Amazon Only) | + | == Usage == |
| − | | sor | Sorceress = (Sorceress Only) | + | |
| + | <code><nowiki>{{Class only|class}}</nowiki></code> | ||
| + | |||
| + | == Parameters == | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Parameter | ||
| + | ! Description | ||
| + | ! Default | ||
| + | |- | ||
| + | | <code>1</code> (<code>class</code>) | ||
| + | | The class code or full class name. | ||
| + | | Empty; displays <code>(Class Only)</code>. | ||
| + | |} | ||
| + | |||
| + | == Behavior == | ||
| + | |||
| + | This template displays the class-restriction label corresponding to the specified Diablo II character class. | ||
| + | |||
| + | * '''Recognized class:''' Displays the corresponding predefined class-restriction label, matching the wording used in the game files. | ||
| + | * '''Unrecognized or missing class:''' Displays the generic <code>(Class Only)</code> label. | ||
| + | |||
| + | The following class codes and names are supported: | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Class code | ||
| + | ! Class name | ||
| + | |- | ||
| + | | <code>ama</code> | ||
| + | | Amazon | ||
| + | |- | ||
| + | | <code>sor</code> | ||
| + | | Sorceress | ||
| + | |- | ||
| + | | <code>nec</code> | ||
| + | | Necromancer | ||
| + | |- | ||
| + | | <code>pal</code> | ||
| + | | Paladin | ||
| + | |- | ||
| + | | <code>bar</code> | ||
| + | | Barbarian | ||
| + | |- | ||
| + | | <code>dru</code> | ||
| + | | Druid | ||
| + | |- | ||
| + | | <code>ass</code> | ||
| + | | Assassin | ||
| + | |- | ||
| + | | <code>war</code> | ||
| + | | Warlock | ||
| + | |} | ||
| + | |||
| + | == Examples == | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Input | ||
| + | ! Result | ||
| + | ! Description | ||
| + | |- | ||
| + | | <code><nowiki>{{Class only|ama}}</nowiki></code> | ||
| + | | {{User:Trang Oul/Sandbox/Template:Class only|ama}} | ||
| + | | Amazon class code. | ||
| + | |- | ||
| + | | <code><nowiki>{{Class only|Sorceress}}</nowiki></code> | ||
| + | | {{User:Trang Oul/Sandbox/Template:Class only|Sorceress}} | ||
| + | | Full class name. | ||
| + | |- | ||
| + | | <code><nowiki>{{Class only|war}}</nowiki></code> | ||
| + | | {{User:Trang Oul/Sandbox/Template:Class only|war}} | ||
| + | | Warlock class code. | ||
| + | |- | ||
| + | | <code><nowiki>{{Class only|unknown}}</nowiki></code> | ||
| + | | {{User:Trang Oul/Sandbox/Template:Class only|unknown}} | ||
| + | | Unrecognized class. | ||
| + | |- | ||
| + | | <code><nowiki>{{Class only}}</nowiki></code> | ||
| + | | {{User:Trang Oul/Sandbox/Template:Class only}} | ||
| + | | No class specified. | ||
| + | |} | ||
| + | </noinclude><includeonly>{{#switch: {{{1|}}} | ||
| + | | ama | Amazon = (Amazon Only) | ||
| + | | sor | Sorceress = (Sorceress Only) | ||
| nec | Necromancer = (Necromancer Only) | | nec | Necromancer = (Necromancer Only) | ||
| − | | pal | Paladin = (Paladin Only) | + | | pal | Paladin = (Paladin Only) |
| − | | bar | Barbarian = (Barbarian Only) | + | | bar | Barbarian = (Barbarian Only) |
| − | | dru | Druid = (Druid Only) | + | | dru | Druid = (Druid Only) |
| − | | ass | Assassin = (Assassin Only) | + | | ass | Assassin = (Assassin Only) |
| − | | war | Warlock = (Warlock Only) | + | | war | Warlock = (Warlock Only) |
| − | | #default = ( | + | | #default = (Class Only) |
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 20:36, 4 November 2026
Usage
{{Class only|class}}
Parameters
| Parameter | Description | Default |
|---|---|---|
1 (class)
|
The class code or full class name. | Empty; displays (Class Only).
|
Behavior
This template displays the class-restriction label corresponding to the specified Diablo II character class.
- Recognized class: Displays the corresponding predefined class-restriction label, matching the wording used in the game files.
- Unrecognized or missing class: Displays the generic
(Class Only)label.
The following class codes and names are supported:
| Class code | Class name |
|---|---|
ama
|
Amazon |
sor
|
Sorceress |
nec
|
Necromancer |
pal
|
Paladin |
bar
|
Barbarian |
dru
|
Druid |
ass
|
Assassin |
war
|
Warlock |
Examples
| Input | Result | Description |
|---|---|---|
{{Class only|ama}}
|
(Amazon Only) | Amazon class code. |
{{Class only|Sorceress}}
|
(Sorceress Only) | Full class name. |
{{Class only|war}}
|
(Warlock Only) | Warlock class code. |
{{Class only|unknown}}
|
(Class Only) | Unrecognized class. |
{{Class only}}
|
(Class Only) | No class specified. |