Difference between revisions of "Template:DPS From Attacks"

From RimWorld Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<!--
+
<noinclude>{{Delete|reason=Redundant with [[Template: True Melee DPS Calculator]]}}</noinclude><!--
 
-->{{#vardefine:attack1weight|{{#expr:{{{attack1dps|0}}} * (1+{{{attack1ap|0}}}/100) * {{{attack1chancefactor|1}}} }} }}<!--
 
-->{{#vardefine:attack1weight|{{#expr:{{{attack1dps|0}}} * (1+{{{attack1ap|0}}}/100) * {{{attack1chancefactor|1}}} }} }}<!--
 
-->{{#vardefine:attack2weight|{{#expr:{{{attack2dps|0}}} * (1+{{{attack2ap|0}}}/100) * {{{attack2chancefactor|1}}} }} }}<!--
 
-->{{#vardefine:attack2weight|{{#expr:{{{attack2dps|0}}} * (1+{{{attack2ap|0}}}/100) * {{{attack2chancefactor|1}}} }} }}<!--
Line 8: Line 8:
 
-->{{#vardefine:attack7weight|{{#expr:{{{attack7dps|0}}} * (1+{{{attack7ap|0}}}/100) * {{{attack7chancefactor|1}}} }} }}<!--
 
-->{{#vardefine:attack7weight|{{#expr:{{{attack7dps|0}}} * (1+{{{attack7ap|0}}}/100) * {{{attack7chancefactor|1}}} }} }}<!--
 
-->{{#vardefine:maxWeight|{{#ifexpr:{{#var:attack1weight}} > {{#var:attack2weight}} | {{#var:attack1weight}} | {{#var:attack2weight}}}}}}<!--
 
-->{{#vardefine:maxWeight|{{#ifexpr:{{#var:attack1weight}} > {{#var:attack2weight}} | {{#var:attack1weight}} | {{#var:attack2weight}}}}}}<!--
-->{{#ifexpr:{{#var:attack3weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|attack3weight}}}}<!--
+
-->{{#ifexpr:{{#var:attack3weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|{{#var:attack3weight}}}}}}<!--
-->{{#ifexpr:{{#var:attack4weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|attack4weight}}}}<!--
+
-->{{#ifexpr:{{#var:attack4weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|{{#var:attack4weight}}}}}}<!--
-->{{#ifexpr:{{#var:attack5weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|attack5weight}}}}<!--
+
-->{{#ifexpr:{{#var:attack5weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|{{#var:attack5weight}}}}}}<!--
-->{{#ifexpr:{{#var:attack6weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|attack6weight}}}}<!--
+
-->{{#ifexpr:{{#var:attack6weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|{{#var:attack6weight}}}}}}<!--
-->{{#ifexpr:{{#var:attack7weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|attack7weight}}}}<!--
+
-->{{#ifexpr:{{#var:attack7weight}} > {{#var:maxWeight}} | {{#vardefine:maxWeight|{{#var:attack7weight}}}}}}<!--
 
-->{{#vardefine:bestweight|{{#expr:{{#var:maxWeight}}*0.95}}}}<!--
 
-->{{#vardefine:bestweight|{{#expr:{{#var:maxWeight}}*0.95}}}}<!--
 
-->{{#vardefine:midweight|{{#expr:{{#var:maxWeight}}*0.25}}}}<!--
 
-->{{#vardefine:midweight|{{#expr:{{#var:maxWeight}}*0.25}}}}<!--
Line 27: Line 27:
 
-->{{#ifexpr:{{#var:attack7weight}}>={{#var:bestweight}} | {{#vardefine:bestdps|{{#expr:{{#var:bestdps}}+{{{attack7dps|0}}} }} }}{{#vardefine:bestcount|{{#expr:{{#var:bestcount}}+1 }} }} | {{#ifexpr:{{#var:attack7weight}}>={{#var:midweight}} | {{#vardefine:middps|{{#expr:{{#var:middps}}+{{{attack7dps|0}}} }} }}{{#vardefine:midcount|{{#expr:{{#var:midcount}}+1 }} }} }} }}<!--
 
-->{{#ifexpr:{{#var:attack7weight}}>={{#var:bestweight}} | {{#vardefine:bestdps|{{#expr:{{#var:bestdps}}+{{{attack7dps|0}}} }} }}{{#vardefine:bestcount|{{#expr:{{#var:bestcount}}+1 }} }} | {{#ifexpr:{{#var:attack7weight}}>={{#var:midweight}} | {{#vardefine:middps|{{#expr:{{#var:middps}}+{{{attack7dps|0}}} }} }}{{#vardefine:midcount|{{#expr:{{#var:midcount}}+1 }} }} }} }}<!--
 
-->{{#ifeq:{{#var:bestcount}}|0||{{#vardefine:bestdps|{{#expr:{{#var:bestdps}}/{{#var:bestcount}} }} }} }}<!--
 
-->{{#ifeq:{{#var:bestcount}}|0||{{#vardefine:bestdps|{{#expr:{{#var:bestdps}}/{{#var:bestcount}} }} }} }}<!--
-->{{#expr:0.62*{{#ifeq:{{#var:midcount}}|0| {{#var:bestdps}} | {{#expr:{{#bestdps}}*0.75 + {{#var:middps}}/{{#var:midcount}}*0.25}} }} }}
+
-->{{#expr:0.62*{{#ifeq:{{#var:midcount}}|0| {{#var:bestdps}} | {{#expr:{{#var:bestdps}}*0.75 + {{#var:middps}}/{{#var:midcount}}*0.25}} }} round 2 }}

Latest revision as of 21:56, 13 December 2024

0