Difference between revisions of "Template:Metrics/Speed"

From Team Fortress Wiki
Jump to: navigation, search
(Conga speed!)
(Finish purge of removing speeds related to movement-taunts)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#ifeq:{{lc:{{{A}}}}}|conga|50
+
<includeonly>{{#switch:{{lc:{{{A}}}}}
|{{#ifexpr:{{#ifeq:{{lc:{{{C}}}}}|demoman|1|0}}=1 and {{#ifeq:{{lc:{{{S}}}}}|shield|1|0}}=1
+
| #default= {{Min
|{{#expr:{{Metrics/Base speed|demoman_charge}}*
+
  |{{Metrics/Speed/{{ucfirst:{{{C}}}}}
{{#ifeq:{{lc:{{{M}}}}}|scotsman's skullcutter|.85|1}}*
+
    | W={{{W|}}}
{{#ifeq:{{lc:{{{A}}}}}|swim|{{Metrics/Speed factor|swim}}|1}}}}
+
    | A={{lc:{{{A}}}}}
|{{Min
+
    | P={{lc:{{{P}}}}}
|
+
    | S={{lc:{{{S}}}}}
{{#switch: {{lc:{{{C}}}}}
+
    | M={{lc:{{{M}}}}}
| scout    = {{Metrics/Speed/Scout    | W={{{W|}}} | A={{lc:{{{A}}}}} | P={{lc:{{{P}}}}} | S={{lc:{{{S}}}}} | B={{{B|0}}} }}
+
    | B={{{B|0}}}
| soldier  = {{Metrics/Speed/Soldier  | W={{{W|}}} | A={{lc:{{{A}}}}} | P={{lc:{{{P}}}}} | M={{lc:{{{M}}}}} | H={{{H|{{Metrics/Health|C=soldier}}}}} }}
+
     | H={{{H|{{#switch: {{lc:{{{C}}}}}  
| pyro    = {{Metrics/Speed/Pyro     | W={{{W|}}} | A={{lc:{{{A}}}}} | M={{lc:{{{M}}}}} }}
+
    | soldier = {{Metrics/Health|C=soldier}}
| demoman  = {{Metrics/Speed/Demoman  | W={{{W|}}} | A={{lc:{{{A}}}}} | M={{lc:{{{M}}}}} | H={{{H|0}}} }}
+
    | demoman = 0
| heavy    = {{Metrics/Speed/Heavy    | W={{{W|}}} | A={{lc:{{{A}}}}} | P={{lc:{{{P}}}}} | S={{lc:{{{S}}}}} | M={{lc:{{{M}}}}} | T={{lc:{{{T}}}}} }}
+
    }}}}}
| engineer = {{Metrics/Speed/Engineer | W={{{W|}}} | A={{lc:{{{A}}}}} | T={{lc:{{{T}}}}} }}
+
    | U={{{U|0}}}
| medic    = {{Metrics/Speed/Medic    | W={{{W|}}} | A={{lc:{{{A}}}}} | P={{lc:{{{P}}}}} | S={{lc:{{{S}}}}} | U={{{U|0}}} | T={{{T|0}}} }}
+
    | T={{lc:{{{T|0}}}}}
| sniper  = {{Metrics/Speed/Sniper  | W={{{W|}}} | A={{lc:{{{A}}}}} | P={{lc:{{{P}}}}} | T={{lc:{{{T}}}}} }}
+
    | D={{lc:{{{D}}}}}
| spy      = {{Metrics/Speed/Spy      | W={{{W|}}} | A={{lc:{{{A}}}}} | D={{lc:{{{D}}}}} }}
+
  }}
| 0
+
  |{{#ifeq:{{lc:{{{C}}}-{{{S}}}}}|demoman-shield|999999999|{{Metrics/Speed cap|{{lc:{{{A}}}}}}}}}
}}
+
}}}}</includeonly><noinclude>
|
 
{{Metrics/Speed cap|{{lc:{{{A}}}}}}}
 
}}}}}}<noinclude>
 
 
{{Template doc}}
 
{{Template doc}}
 
[[Category:Game mechanics|{{SUBPAGENAME}}]]
 
[[Category:Game mechanics|{{SUBPAGENAME}}]]

Latest revision as of 04:23, 22 January 2016

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

This template drops in a class's speed, modified by settings that determine what the class has equipped (where appropriate). The C argument is the only one required (unless dancing). The A argument indicates the action the player is taking, and other arguments and values depend on the class. The W argument, if defined, means the value returned is modified by being under the Disciplinary Action effect.

Template defaults to 0 if the C argument is unknown, to avoid causing downstream parsing failures if used in an equation.

Arguments

Argument Meaning
C Class name
A Action
W If under one of the following effects
P Primary weapon
S Secondary weapon
M Melee weapon
B Boost amount (Scout)
U ÜberCharge amount (Medic)
H Health (Soldier)
Heads taken (Demoman)
T Triggered ability (Heavy, Engineer, and Sniper)
Healing target's speed (Medic)
D Disguise (Spy)

Valid argument settings

C A W P S M B U H T D
scout

One of

  • omitted
  • back
  • crouch
  • swim
Defined for
effect active
baby face's blaster Positive real
0-100 inclusive
soldier cow mangler 5000 escape plan Positive integer
0-200 inclusive
pyro powerjack
demoman boots * shield haunted
scotsman's skullcutter
Positive integer
0-4 inclusive
heavy brass beast buffalo steak sandvich gloves of running urgently
eviction notice
deploy
engineer haul
medic overdose quick-fix Positive real
0-100 inclusive
Positive integer
0-520 inclusive
sniper huntsman aim
spy Class name

*; use to indicate Ali Baba's Wee Booties or the Bootlegger
† use to indicate the Chargin' Targe, Splendid Screen, or the Tide Turner
‡ use to indicate the Eyelander, the Horseless Headless Horsemann's Headtaker, or Nessie's Nine Iron


Sub-templates The speed values for each class are stored in sub-templates, due to overall complexity.