Difference between revisions of "Template:Apparel AP Calculation"

From RimWorld Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{#vardefine: effectiveArmor |{{#expr: {{{1|armor}}} - {{{2|ap}}}}} }}<!--
+
{{#vardefine: effectiveArmor |{{#expr: {{{1|armor}}} - {{{2|ap}}}}}}}<!--
  
 
-->{{#vardefine: effectiveArmor | 150 }} <!--
 
-->{{#vardefine: effectiveArmor | 150 }} <!--
Line 6: Line 6:
  
  
-->{{#expr: ({{#ifexpr: (100-{{#var: effectiveArmor}}) > 0 | {{#expr:100-{{#var: effectiveArmor}}}} | 0}}/100.0) + ({{#ifexpr: ({{#var: effectiveArmor}}/2.0) < (100.0-{{#var: effectiveArmor}}/2.0) | {{#expr:{{#var: effectiveArmor}}/2.0}} | {{#expr:100.0-{{#var: effectiveArmor}}/2.0}} }}/100)* 0.5}}
+
-->{{#expr:({{#ifexpr: (100-{{#var: effectiveArmor}}) > 0 | {{#expr:100-{{#var: effectiveArmor}}}} | 0}}/100.0) + ({{#ifexpr: ({{#var: effectiveArmor}}/2.0) < (100.0-{{#var: effectiveArmor}}/2.0) | {{#expr:{{#var: effectiveArmor}}/2.0}} | {{#expr:100.0-{{#var: effectiveArmor}}/2.0}} }}/100)* 0.5}}

Revision as of 05:22, 22 March 2021

0.125