Difference between revisions of "Template:Apparel AP Calculation"

From RimWorld Wiki
Jump to navigation Jump to search
(Previous edits break existing usecase because there are times where the result will be 2 or below. You can't change this piecemeal. If you want to change the standard, you'll have to change all of the uses of it at once, all the way otherwise issues like this will reoccur)
 
(4 intermediate revisions by 2 users not shown)
Line 15: Line 15:
  
 
{{#if: {{{armor4|}}} | * (({{#ifexpr: (100-{{#var: effectiveArmor4}}) > 0 | {{#expr:100-{{#var: effectiveArmor4}}}} | 0}}/100.0) + ({{#ifexpr: ({{#var: effectiveArmor4}}/2.0) < (100.0-{{#var: effectiveArmor4}}/2.0) | {{#expr:{{#var: effectiveArmor4}}/2.0}} | {{#expr:100.0-{{#var: effectiveArmor4}}/2.0}} }}/100)* 0.5) }}
 
{{#if: {{{armor4|}}} | * (({{#ifexpr: (100-{{#var: effectiveArmor4}}) > 0 | {{#expr:100-{{#var: effectiveArmor4}}}} | 0}}/100.0) + ({{#ifexpr: ({{#var: effectiveArmor4}}/2.0) < (100.0-{{#var: effectiveArmor4}}/2.0) | {{#expr:{{#var: effectiveArmor4}}/2.0}} | {{#expr:100.0-{{#var: effectiveArmor4}}/2.0}} }}/100)* 0.5) }}
}}
+
}}<noinclude>{{Documentation wanted}}</noinclude>

Latest revision as of 23:21, 1 November 2024

       100