Difference between revisions of "Template:Metrics/Health"

From Team Fortress Wiki
Jump to: navigation, search
(Template with all the various possible health values for classes)
(Removed old logic for the Darwin's Danger Shield)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch: {{lc:{{{class}}}}}
+
{{#switch: {{lc:{{{C}}}}}
| scout    = {{#expr: 125
+
  | scout    = {{#expr:
                    + {{#switch: {{lc:{{{melee}}}}} | sandman = -15 | 0 }}
+
                {{Metrics/Base health|scout}} +
                    + {{#switch: {{lc:{{{set}}}}} | special delivery = 25 | 0 }}
+
                {{#switch: {{lc:{{{M}}}}}
            }}
+
                  | sandman = -15
| soldier  = 200
+
                  | 0
| pyro     = 175
+
                }}
| demoman  = {{#expr: 175
+
              }}
                    + {{#switch: {{lc:{{{secondary}}}}} | ali baba's wee booties | bootlegger = 25 | 0 }}  
+
  | soldier  = {{#expr:
                    + {{#switch: {{lc:{{{melee}}}}}  
+
                {{Metrics/Base health|soldier}} +
                        | eyelander | hhhh | horseless headless horsemann's headtaker | nessie's nine iron = {{#expr:  
+
                {{#switch: {{lc:{{{S}}}}}
                              -25 + {{#ifexpr: {{{heads|0}}} > 4 | 4 | {{{heads|0}}} }} * 15
+
                  | battalion's backup = 20
                          }}
+
                  | 0
                        | claidheamh mòr = -15 | 0 }}
+
                }}
            }}
+
                }}
| heavy    = {{#expr: 300
+
  | pyro    = {{Metrics/Base health|pyro}}
                    + {{#switch: {{lc:{{{secondary}}}}} | dalokohs bar | fishcake = 50 | 0 }}
+
  | demoman  = {{#expr:
                    + {{#switch: {{lc:{{{melee}}}}} | warrior's spirit = -20 | 0 }}
+
                {{Metrics/Base health|demoman}} +
            }}
+
                {{#switch: {{lc:{{{P}}}}}
| engineer = {{#expr: 125
+
                  | ali baba's wee booties
                    + {{#switch: {{lc:{{{melee}}}}} | gunslinger = 25 | 0 }}
+
                  | bootlegger = 25
            }}
+
                  | 0
| medic    = {{#expr: 150
+
                }} +
                    + {{#switch: {{lc:{{{melee}}}}} | vita-saw = -10 | 0 }}
+
                {{#switch: {{lc:{{{M}}}}}
            }}
+
                  | eyelander
| sniper  = {{#expr: 125
+
                  | horseless headless horsemann's headtaker
                    + {{#switch: {{lc:{{{secondary}}}}} | darwin's danger shield = 25 | 0 }}
+
                  | nessie's nine iron = {{#expr:
            }}
+
                                            -25 + {{#ifexpr: {{{H|0}}} > 4 | 4 | {{{H|0}}} }} * 15
| spy      = {{#expr: 125
+
                                          }}
                    + {{#switch: {{lc:{{{melee}}}}} | conniver's kunai = -65 | big earner = -25 | 0 }}
+
                  | 0
            }}
+
                }}
| 0
+
              }}
 +
  | heavy    = {{#expr:
 +
                {{Metrics/Base health|heavy}} +
 +
                {{#switch: {{lc:{{{S}}}}}
 +
                  | dalokohs bar
 +
                  | fishcake = 50
 +
                  | 0
 +
                }}
 +
              }}
 +
  | engineer = {{#expr:
 +
                {{Metrics/Base health|engineer}} +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | gunslinger = 25
 +
                  | 0
 +
                }}
 +
              }}
 +
  | medic    = {{#expr:
 +
                {{Metrics/Base health|medic}} +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | vita-saw = -10
 +
                  | 0
 +
                }}
 +
              }}
 +
  | sniper  = {{Metrics/Base health|sniper}}
 +
  | spy      = {{#expr:
 +
                {{Metrics/Base health|spy}} +
 +
                {{#switch: {{lc:{{{M}}}}}
 +
                  | conniver's kunai = -55
 +
                  | big earner       = -25
 +
                  | 0
 +
                }}
 +
              }}
 +
  | 0
 
}}<noinclude>
 
}}<noinclude>
 
{{Template doc}}
 
{{Template doc}}
[[Category:Templates|{{PAGENAME}}]]
+
[[Category:Game mechanics|{{SUBPAGENAME}}]]
</noinclude>
 

Latest revision as of 00:17, 26 October 2017

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