Template:Modes

来自Terraria Wiki
跳到导航 跳到搜索
Template-info.svg 文档 以下文档来自Template:Modes/doc。(编辑 | 历史

This template is to be used in {{npc infobox}} values where a distinction between Classic/Expert/Master Modes is needed.

Usage

{{ modes | <Classic value> | <Expert value> | <Master value> | expertonly = y/yes | wrap = n/no }}

First, second, and third unnamed parameters

Classic, Expert, and Master values. The named parameters | normal =, | expert =, and | master = can be used alternatively.

expertonly

Use this parameter if there is no Classic value (e.g. for Expert-exclusive NPCs). Named parameters are recommended in this case.

wrap

By default, the Expert and Master values are formatted in their characteristic styling via {{expert}} and {{master}}. Use this parameter to prevent that wrapping. This can be useful if the Expert and Master values contain parts that should not be formatted.

Examples

Code Result
{{npc infobox
| name = Modes example | imagealt = <nowiki/>

| damage = {{modes|1|2|3}}

<!-- don't wrap Expert/Master values with {{expert}} and {{master}} -->
| life = {{modes|wrap=no|4|5|6}}

<!-- Expert only, no Classic value -->
| defense = {{modes|expertonly=yes|8|9}}

<!-- the Classic value will be ignored -->
| knockback = {{modes|expertonly=yes|7%|8%|9%}}

<!-- named parameters -->
| money = {{modes|normal={{cc|10}}|expert={{cc|11}}|master={{cc|12}}}}
}}
Modes example
Classic mode icon.png 经典
Expert mode icon.png 专家
Master mode icon.png 大师
详细信息
类型
伤害123
最大生命值456
防御89
击退抗性8%9%
掉落
钱币10 CC11 CC12 CC