Difference between revisions of "Template:Metrics/Health"

From Team Fortress Wiki
Jump to: navigation, search
m (New category,)
m (Uncrush this so it's readable.)
Line 1: Line 1:
{{#switch:{{lc:{{{C}}}}}
+
{{#switch: {{lc:{{{C}}}}}
|scout={{#expr:125+{{#switch:{{lc:{{{M}}}}}|sandman=-15|0}}+{{#switch:{{lc:{{{G}}}}}|special delivery=25|0}}}}
+
  | scout   = {{#expr:
|soldier=200
+
                125 +
|pyro=175
+
                {{#switch: {{lc:{{{M}}}}}
|demoman={{#expr:175+{{#switch:{{lc:{{{P}}}}}|ali baba's wee booties|bootlegger=25|0}}+{{#switch:{{lc:{{{M}}}}}|eyelander|horseless headless horsemann's headtaker|nessie's nine iron={{#expr:-25+{{#ifexpr:{{{H|0}}}>4|4|{{{H|0}}}}}*15}}|claidheamh mòr=-15|0}}}}
+
                  | sandman = -15
|heavy={{#expr:300+{{#switch:{{lc:{{{S}}}}}|dalokohs bar|fishcake=50|0}}+{{#switch:{{lc:{{{M}}}}}|warrior's spirit=-20|0}}}}
+
                  | 0
|engineer={{#expr:125+{{#switch:{{lc:{{{M}}}}}|gunslinger=25|0}}}}
+
                }} +
|medic={{#expr:150+{{#switch:{{lc:{{{M}}}}}|vita-saw=-10|0}}}}
+
                {{#switch: {{lc:{{{G}}}}}
|sniper={{#expr:125+{{#switch:{{lc:{{{S}}}}}|darwin's danger shield=25|0}}}}
+
                  | special delivery = 25
|spy={{#expr:125+{{#switch:{{lc:{{{M}}}}}|conniver's kunai=-65|big earner=-25|0}}}}
+
                  | 0
|0}}<noinclude>
+
                }}
 +
              }}
 +
 
 +
  | soldier = 200
 +
 
 +
  | pyro     = 175
 +
 
 +
  | demoman = {{#expr:
 +
                175 +
 +
                {{#switch: {{lc:{{{P}}}}}
 +
                  | ali baba's wee booties
 +
                  | bootlegger = 25
 +
                  | 0
 +
                }} +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | eyelander
 +
                  | horseless headless horsemann's headtaker
 +
                  | nessie's nine iron = {{#expr:
 +
                                            -25 + {{#ifexpr: {{{H|0}}} > 4 | 4 | {{{H|0}}} }} * 15
 +
                                          }}
 +
                  | claidheamh mòr     = -15
 +
                  | 0
 +
                }}
 +
              }}
 +
 
 +
  | heavy   = {{#expr:
 +
                300 +
 +
                {{#switch: {{lc:{{{S}}}}}
 +
                  | dalokohs bar
 +
                  | fishcake = 50
 +
                  | 0
 +
                }} +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | warrior's spirit = -20
 +
                  | 0
 +
                }}
 +
              }}
 +
 
 +
  | engineer = {{#expr:
 +
                125 +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | gunslinger = 25
 +
                  | 0
 +
                }}
 +
              }}
 +
 
 +
  | medic   = {{#expr:
 +
                150 +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | vita-saw = -10
 +
                  | 0
 +
                }}
 +
              }}
 +
 
 +
  | sniper   = {{#expr:
 +
                125 +
 +
                {{#switch: {{lc:{{{S}}}}}
 +
                  | darwin's danger shield = 25
 +
                  | 0
 +
                }}
 +
              }}
 +
 
 +
  | spy     = {{#expr:
 +
                125 +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | conniver's kunai = -65
 +
                  | big earner       = -25
 +
                  | 0
 +
                }}
 +
              }}
 +
  | 0
 +
}}<noinclude>
 
{{Template doc}}
 
{{Template doc}}
 
[[Category:Game mechanics]]
 
[[Category:Game mechanics]]
 
</noinclude>
 
</noinclude>

Revision as of 07:07, 6 March 2012

0

Template documentation [view] [edit] [history] [purge]

This template drops in a classes health, modified by settings that determine what the class has equipped (where appropriate). The C argument is the only one required, and other arguments and values depend on the class. Defaults to generating 0 if the C argument is unknown, to avoid causing downstream parsing failures, if used in a equation (such as Template:Math/Overheal).

Arguments

Argument Meaning
C Class name
P Primary weapon
S Secondary weapon
M Melee weapon
H Heads taken

Valid argument settings

C P S M H
scout sandman
soldier battalion's backup
pyro
demoman ali baba's wee booties
bootlegger
eyelander
horseless headless horsemann's headtaker
nessie's nine iron
Positive integer
heavy dalokohs bar
fishcake
engineer gunslinger
medic vita-saw
sniper
spy conniver's kunai
big earner