Ability Cooldown: Difference between revisions

Calculation: change calculation to dynamically pull frmo itemdata like the pages for range / duration. also changed the items around because Diviner's Kevlar no longer gives cooldown reduction
Calculation: clean up {{#replace: {{ItemData|...}}}} to just use DataProp instead
 
Line 19: Line 19:


'''Example:'''
'''Example:'''
With '''{{ItemData|{{#vardefineecho: Item1|Superior Cooldown}}|CooldownReduction}}''' from {{ItemIcon|{{#var: Item1}}}} and '''{{ItemData|{{#vardefineecho: Item2|Spellslinger}}|CooldownReduction}}''' from {{ItemIcon|{{#var: Item2}}}}:
With '''{{DataProp|{{#vardefineecho: Item1|Superior Cooldown}}|CooldownReduction}}%''' from {{ItemIcon|{{#var: Item1}}}} and '''{{DataProp|{{#vardefineecho: Item2|Spellslinger}}|CooldownReduction}}%''' from {{ItemIcon|{{#var: Item2}}}}:
# Convert percentages to decimals: {{ItemData|{{#var: Item1}}|CooldownReduction}} to {{#vardefineecho: Item1Duration|{{#expr: {{#replace: {{ItemData|{{#var: Item1}}|CooldownReduction}}|%|}} / 100}}}} and {{ItemData|{{#var: Item2}}|CooldownReduction}} to {{#vardefineecho: Item2Duration|{{#expr: {{#replace: {{ItemData|{{#var: Item2}}|CooldownReduction}}|%|}} / 100}}}}.
# Convert percentages to decimals: {{DataProp|{{#var: Item1}}|CooldownReduction}}% to {{#vardefineecho: Item1Duration|{{#expr: {{DataProp|{{#var: Item1}}|CooldownReduction}} / 100}}}} and {{DataProp|{{#var: Item2}}|CooldownReduction}}% to {{#vardefineecho: Item2Duration|{{#expr: {{DataProp|{{#var: Item2}}|CooldownReduction}} / 100}}}}.
# Subtract from 1: (1 - {{#var: Item1Duration}}) = '''{{#expr: 1 - {{#var: Item1Duration}}}}''' and (1 - {{#var: Item2Duration}}) = '''{{#expr: 1 - {{#var: Item2Duration}}}}'''.
# Subtract from 1: (1 - {{#var: Item1Duration}}) = '''{{#expr: 1 - {{#var: Item1Duration}}}}''' and (1 - {{#var: Item2Duration}}) = '''{{#expr: 1 - {{#var: Item2Duration}}}}'''.
# Multiply the remainders: {{#expr: 1 - {{#var: Item1Duration}}}} × {{#expr: 1 - {{#var: Item2Duration}}}} = '''{{#vardefineecho: CombinedItemDuration|{{#expr: (1 - {{#var: Item1Duration}}) * (1 - {{#var: Item2Duration}}) round 4}}}}'''.
# Multiply the remainders: {{#expr: 1 - {{#var: Item1Duration}}}} × {{#expr: 1 - {{#var: Item2Duration}}}} = '''{{#vardefineecho: CombinedItemDuration|{{#expr: (1 - {{#var: Item1Duration}}) * (1 - {{#var: Item2Duration}}) round 4}}}}'''.