Editing Template:True Melee DPS Calculator
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
− | !!! | + | !!! WARNING !!! |
− | |||
− | |||
The following variables are reused by [[Template:Weapon Quality Table/Melee/Row]]. If you change them here you probably have to change them there as well: | The following variables are reused by [[Template:Weapon Quality Table/Melee/Row]]. If you change them here you probably have to change them there as well: | ||
* {{#var:trueAP}} | * {{#var:trueAP}} | ||
Line 11: | Line 9: | ||
* {{#var:attack1SelectionChance}}, {{#var:attack2SelectionChance}}, {{#var:attack3SelectionChance}}, {{#var:attack4SelectionChance}} | * {{#var:attack1SelectionChance}}, {{#var:attack2SelectionChance}}, {{#var:attack3SelectionChance}}, {{#var:attack4SelectionChance}} | ||
− | + | VARIABLES | |
− | + | -->{{#vardefine:name | {{{1|{{PAGENAME}} }}} }}<!-- | |
− | -->{{#vardefine:name | + | -->{{#vardefine:material | {{{2|}}} }}<!-- |
− | --> | + | -->{{#vardefine:sharpFactor | {{Q|{{#var:material}}|Melee Sharp Damage Factor|1}} }}<!-- |
− | + | -->{{#vardefine:bluntFactor | {{Q|{{#var:material}}|Melee Blunt Damage Factor|1}} }}<!-- | |
− | + | -->{{#vardefine:cooldownFactor | {{Q|{{#var:material}}|Melee Cooldown Factor|1}} }}<!-- | |
− | }}<!-- | + | -->{{#vardefine:attack1Type | {{Q|{{#var:name}}|Attack 1 Type}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:attack2Type | {{Q|{{#var:name}}|Attack 2 Type}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:attack3Type | {{Q|{{#var:name}}|Attack 3 Type}} }}<!-- |
− | -->{{#vardefine: | + | -->{{#vardefine:attack4Type | {{Q|{{#var:name}}|Attack 4 Type}} }}<!-- |
− | -->{{#vardefine:attack1Type | + | -->{{#vardefine:attack5Type | {{Q|{{#var:name}}|Attack 5 Type}} }}<!-- |
− | -->{{#vardefine:attack2Type | + | -->{{#vardefine:attack6Type | {{Q|{{#var:name}}|Attack 6 Type}} }}<!-- |
− | -->{{#vardefine:attack3Type | + | -->{{#vardefine:qualityFactor | {{#switch: {{lc:{{{3|}}} }} |
− | -->{{#vardefine:attack4Type | + | | awful = 0.8 |
− | -->{{#vardefine: | + | | poor = 0.9 |
− | + | | normal = 1 | |
− | + | | good = 1.1 | |
− | -->{{#vardefine: | + | | excellent = 1.2 |
− | + | | masterwork = 1.45 | |
− | + | | legendary = 1.65 | |
− | + | | #default = 1 | |
− | -->{{#vardefine: | + | }} }}<!-- |
− | + | -->{{#vardefine: attack1InitialSelectionWeight|}}{{#vardefine: attack1SelectionCategory|}}{{#vardefine: attack2InitialSelectionWeight|}}{{#vardefine: attack2SelectionCategory|}}{{#vardefine: attack3InitialSelectionWeight|}}{{#vardefine: attack3SelectionCategory|}}{{#vardefine: attack4InitialSelectionWeight|}}{{#vardefine: attack4SelectionCategory|}}{{#vardefine: attack5InitialSelectionWeight|}}{{#vardefine: attack5SelectionCategory|}}{{#vardefine: attack6InitialSelectionWeight|}}{{#vardefine: attack6SelectionCategory|}}<!-- | |
− | | awful = | ||
− | | poor = | ||
− | | good = | ||
− | | | ||
− | |||
− | |||
− | |||
− | }}<!-- | ||
− | + | CALCULATIONS | |
− | + | Define the damage type of the 1st attack so it knows which mat stat to use for the damage multiplier. Needs updating if new damage types added. | |
− | -->{{# | + | -->{{#switch: {{#var:attack1Type}} |
− | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = | |
− | + | {{#vardefine:attack1Damage | {{#expr: {{Q|{{#var:name}}|Attack 1 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack1AP | {{#expr: {{Q|{{#var:name}}|Attack 1 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | | Blunt | Crush | Demolish | Poke = | |
− | + | {{#vardefine:attack1Damage | {{#expr: {{Q|{{#var:name}}|Attack 1 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack1AP | {{#expr: {{Q|{{#var:name}}|Attack 1 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack1Type}} }} | |
− | |||
− | |||
}}<!-- | }}<!-- | ||
− | + | -->{{#vardefine: attack1InitialSelectionWeight | {{#expr: {{#var:attack1Damage}} * (1 + ({{#var:attack1AP}}/100)) * {{Q|{{#var:name}}|Attack 1 Chance Factor|1}} / {{#vardefineecho:attack1Cooldown | ({{Q|{{#var:name}}|Attack 1 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }}<!-- | |
− | + | Define the damage type of the 2nd attack so it knows which mat stat to use for the damage multiplier. Needs updating if new damage types added. | |
− | -->{{#vardefine:attack1InitialSelectionWeight | | + | -->{{#if: {{#var:attack2Type}} | |
− | + | {{#switch: {{#var:attack2Type}} | |
− | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = | |
− | + | {{#vardefine:attack2Damage| {{#expr: {{Q|{{#var:name}}|Attack 2 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack2AP | {{#expr: {{Q|{{#var:name}}|Attack 2 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | -->{{# | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack2Damage| {{#expr: {{Q|{{#var:name}}|Attack 2 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack2AP | {{#expr: {{Q|{{#var:name}}|Attack 2 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack2Type}} }} | |
− | + | }} | |
− | + | {{#vardefine: attack2InitialSelectionWeight | {{#expr: {{#var:attack2Damage}} * (1 + ({{#var:attack2AP}}/100)) * {{Q|{{#var:name}}|Attack 2 Chance Factor|1}} / {{#vardefineecho:attack2Cooldown | ({{Q|{{#var:name}}|Attack 2 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | |
− | + | }}<!-- | |
− | + | Define the damage type of the 3rd attack so it knows which mat stat to use for the damage multiplier. Needs updating if new damage types added. | |
− | + | -->{{#if: {{#var:attack3Type}} | | |
− | + | {{#switch: {{#var:attack3Type}} | |
− | }} | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack3Damage| {{#expr: {{Q|{{#var:name}}|Attack 3 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack3AP | {{#expr: {{Q|{{#var:name}}|Attack 3 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack3Damage| {{#expr: {{Q|{{#var:name}}|Attack 3 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack3AP | {{#expr: {{Q|{{#var:name}}|Attack 3 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack3Type}} }} | |
− | + | }} | |
− | + | {{#vardefine: attack3InitialSelectionWeight | {{#expr: {{#var:attack3Damage}} * (1 + ({{#var:attack3AP}}/100)) * {{Q|{{#var:name}}|Attack 3 Chance Factor|1}} / {{#vardefineecho:attack3Cooldown | ({{Q|{{#var:name}}|Attack 3 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | |
− | + | }}<!-- | |
− | + | Define the damage type of the 4th attack so it knows which mat stat to use for the damage multiplier. Needs updating if new damage types added. | |
− | + | -->{{#if: {{#var:attack4Type}} | | |
− | + | {{#switch: {{#var:attack4Type}} | |
− | }} | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack4Damage| {{#expr: {{Q|{{#var:name}}|Attack 4 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack4AP | {{#expr: {{Q|{{#var:name}}|Attack 4 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack4Damage| {{#expr: {{Q|{{#var:name}}|Attack 4 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack4AP | {{#expr: {{Q|{{#var:name}}|Attack 4 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack4Type}} }} | |
− | + | }} | |
− | + | {{#vardefine: attack4InitialSelectionWeight | {{#expr: {{#var:attack4Damage}} * (1 + ({{#var:attack4AP}}/100)) * {{Q|{{#var:name}}|Attack 4 Chance Factor|1}} / {{#vardefineecho:attack4Cooldown | ({{Q|{{#var:name}}|Attack 4 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | |
− | + | }}<!-- | |
− | + | Define the damage type of the 5th attack so it knows which mat stat to use for the damage multiplier. Needs updating if new damage types added. | |
− | + | -->{{#if: {{#var:attack5Type}} | | |
− | + | {{#switch: {{#var:attack5Type}} | |
− | }} | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack5Damage| {{#expr: {{Q|{{#var:name}}|Attack 5 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack5AP | {{#expr: {{Q|{{#var:name}}|Attack 5 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
| Blunt | Crush | Demolish | Poke = | | Blunt | Crush | Demolish | Poke = | ||
− | + | {{#vardefine:attack5Damage| {{#expr: {{Q|{{#var:name}}|Attack 5 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | {{#vardefine:attack5AP | {{#expr: {{Q|{{#var:name}}|Attack 5 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | |
− | + | | #default = {{Error|Unrecognised Damage Type: {{#var:attack5Type}} }} | |
− | + | }} | |
− | + | {{#vardefine: attack5InitialSelectionWeight | {{#expr: {{#var:attack5Damage}} * (1 + ({{#var:attack5AP}}/100)) * {{Q|{{#var:name}}|Attack 5 Chance Factor|1}} / {{#vardefineecho:attack5Cooldown | ({{Q|{{#var:name}}|Attack 5 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | |
− | |||
− | |||
− | |||
− | |||
− | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
− | + | Define the damage type of the 6th attack so it knows which mat stat to use for the damage multiplier. Needs updating if new damage types added. | |
-->{{#if: {{#var:attack6Type}} | | -->{{#if: {{#var:attack6Type}} | | ||
− | + | {{#switch: {{#var:attack6Type}} | |
− | | {{#vardefine: | + | | Arrow | ArrowHighVelocity | Bite | Bomb | BombSuper | Bullet | Cut | RangedStab | Scratch | Stab | Thump | Toxic bite | Toxic scratch = |
− | + | {{#vardefine:attack6Damage| {{#expr: {{Q|{{#var:name}}|Attack 6 Damage}}*{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
− | + | {{#vardefine:attack6AP | {{#expr: {{Q|{{#var:name}}|Attack 6 AP}} *{{#var:qualityFactor}}*{{#var:sharpFactor}} }} }} | |
+ | | Blunt | Crush | Demolish | Poke = | ||
+ | {{#vardefine:attack6Damage| {{#expr: {{Q|{{#var:name}}|Attack 6 Damage}}*{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | ||
+ | {{#vardefine:attack6AP | {{#expr: {{Q|{{#var:name}}|Attack 6 AP}} *{{#var:qualityFactor}}*{{#var:bluntFactor}} }} }} | ||
+ | | #default = {{Error|Unrecognised Damage Type: {{#var:attack6Type}} }} | ||
+ | }} | ||
+ | {{#vardefine: attack6InitialSelectionWeight | {{#expr: {{#var:attack6Damage}} * (1 + ({{#var:attack6AP}}/100)) * {{Q|{{#var:name}}|Attack 6 Chance Factor|1}} / {{#vardefineecho:attack6Cooldown | ({{Q|{{#var:name}}|Attack 6 Cooldown}}*{{#var:cooldownFactor}}) }} round 1}} }} | ||
}}<!-- | }}<!-- | ||
− | + | Determine which attack has the highest weight to use as point of comparison for categorisation | |
− | -->{{#if: {{#var: | + | -->{{#vardefine: maxSelectionWeight | {{#ifexpr: {{#var:attack1InitialSelectionWeight}} > {{#var:attack2InitialSelectionWeight|0}} | {{#var:attack1InitialSelectionWeight}} | {{#var:attack2InitialSelectionWeight}} }} }}<!-- |
− | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack3InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack3InitialSelectionWeight}} }} }}<!-- | |
− | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack4InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack4InitialSelectionWeight}} }} }}<!-- | |
− | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack5InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack5InitialSelectionWeight}} }} }}<!-- | |
− | + | -->{{#ifexpr: {{#var:maxSelectionWeight}} < {{#var:attack6InitialSelectionWeight|0}} | {{#vardefine: maxSelectionWeight| {{#var:attack6InitialSelectionWeight}} }} }}<!-- | |
+ | Initialize vars for counting category sizes | ||
+ | -->{{#vardefine: numBestAttacks | 0}}{{#vardefine: numMidAttacks | 0}}<!-- | ||
+ | Categorize attack 1 relative to max | ||
+ | -->{{#ifexpr: {{#var:attack1InitialSelectionWeight}} > (0.95*{{#var:maxSelectionWeight}}) or {{#var:attack1InitialSelectionWeight}} = (0.95*{{#var:maxSelectionWeight}}) | {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}}}} {{#vardefine: attack1SelectionCategory | best }}| | ||
+ | {{#ifexpr: {{#var:attack1InitialSelectionWeight}} < (0.25*{{#var:maxSelectionWeight}}) | {{#vardefine: attack1SelectionCategory |worst}} | {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}}}} {{#vardefine: attack1SelectionCategory | mid }}}} }}<!-- | ||
+ | Categorize attack 2 relative to max | ||
+ | -->{{#if: {{#var:attack2Type}} | | ||
+ | {{#ifexpr: {{#var:attack2InitialSelectionWeight}} > (0.95*{{#var:maxSelectionWeight}}) or {{#var:attack2InitialSelectionWeight}} = (0.95*{{#var:maxSelectionWeight}}) | {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}}}} {{#vardefine: attack2SelectionCategory | best }}| | ||
+ | {{#ifexpr: {{#var:attack2InitialSelectionWeight}} < (0.25*{{#var:maxSelectionWeight}}) | {{#vardefine: attack2SelectionCategory |worst}} | {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}}}} {{#vardefine: attack2SelectionCategory | mid }}}} }} }}<!-- | ||
+ | Categorize attack 3 relative to max | ||
+ | -->{{#if: {{#var:attack3Type}} | | ||
+ | {{#ifexpr: {{#var:attack3InitialSelectionWeight}} > (0.95*{{#var:maxSelectionWeight}}) or {{#var:attack3InitialSelectionWeight}} = (0.95*{{#var:maxSelectionWeight}}) | {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}}}} {{#vardefine: attack3SelectionCategory | best }}| | ||
+ | {{#ifexpr: {{#var:attack3InitialSelectionWeight}} < (0.25*{{#var:maxSelectionWeight}}) | {{#vardefine: attack3SelectionCategory |worst}} | {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}}}} {{#vardefine: attack3SelectionCategory | mid }}}} }} }}<!-- | ||
+ | Categorize attack 4 relative to max | ||
+ | -->{{#if: {{#var:attack4Type}} | | ||
+ | {{#ifexpr: {{#var:attack4InitialSelectionWeight}} > (0.95*{{#var:maxSelectionWeight}}) or {{#var:attack4InitialSelectionWeight}} = (0.95*{{#var:maxSelectionWeight}}) | {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}}}} {{#vardefine: attack4SelectionCategory | best }}| | ||
+ | {{#ifexpr: {{#var:attack4InitialSelectionWeight}} < (0.25*{{#var:maxSelectionWeight}}) | {{#vardefine: attack4SelectionCategory |worst}} | {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}}}} {{#vardefine: attack4SelectionCategory | mid }}}} }} }}<!-- | ||
+ | Categorize attack 5 relative to max | ||
+ | -->{{#if: {{#var:attack5Type}} | | ||
+ | {{#ifexpr: {{#var:attack5InitialSelectionWeight}} > (0.95*{{#var:maxSelectionWeight}}) or {{#var:attack5InitialSelectionWeight}} = (0.95*{{#var:maxSelectionWeight}}) | {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}}}} {{#vardefine: attack5SelectionCategory | best }}| | ||
+ | {{#ifexpr: {{#var:attack5InitialSelectionWeight}} < (0.25*{{#var:maxSelectionWeight}}) | {{#vardefine: attack5SelectionCategory |worst}} | {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}}}} {{#vardefine: attack5SelectionCategory | mid }}}} }} }}<!-- | ||
+ | Categorize attack 6 relative to max | ||
+ | -->{{#if: {{#var:attack6Type}} | | ||
+ | {{#ifexpr: {{#var:attack6InitialSelectionWeight}} > (0.95*{{#var:maxSelectionWeight}}) or {{#var:attack6InitialSelectionWeight}} = (0.95*{{#var:maxSelectionWeight}}) | {{#vardefine: numBestAttacks | {{#expr: {{#var:numBestAttacks}}+1}}}} {{#vardefine: attack6SelectionCategory | best }}| | ||
+ | {{#ifexpr: {{#var:attack6InitialSelectionWeight}} < (0.25*{{#var:maxSelectionWeight}}) | {{#vardefine: attack6SelectionCategory |worst}} | {{#vardefine: numMidAttacks | {{#expr: {{#var:numMidAttacks}}+1}}}} {{#vardefine: attack6SelectionCategory | mid }}}} }} }}<!-- | ||
+ | Sometimes there is no mid category, in which case it controls 100% of the selection chance, instead of only 75% | ||
+ | -->{{#ifeq: {{#var:numMidAttacks}} | 0 | {{#vardefine:bestCategoryPercentage|1.00}} | {{#vardefine:bestCategoryPercentage|0.75}}}}<!-- | ||
+ | Define selection chances from category and number of attacks in category so we don't have to calc them twice and so they can be called. | ||
+ | -->{{#vardefine:attack1SelectionChance|{{#expr: {{#ifeq: {{#var:attack1SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}}) | {{#ifeq: {{#var:attack1SelectionCategory}} | mid | (0.25/{{#var:numMidAttacks}}) | 0}} }} }} }}<!-- | ||
+ | -->{{#vardefine:attack2SelectionChance|{{#expr: {{#ifeq: {{#var:attack2SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}}) | {{#ifeq: {{#var:attack2SelectionCategory}} | mid | (0.25/{{#var:numMidAttacks}}) | 0}} }} }} }}<!-- | ||
+ | -->{{#vardefine:attack3SelectionChance|{{#expr: {{#ifeq: {{#var:attack3SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}}) | {{#ifeq: {{#var:attack3SelectionCategory}} | mid | (0.25/{{#var:numMidAttacks}}) | 0}} }} }} }}<!-- | ||
+ | -->{{#vardefine:attack4SelectionChance|{{#expr: {{#ifeq: {{#var:attack4SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}}) | {{#ifeq: {{#var:attack4SelectionCategory}} | mid | (0.25/{{#var:numMidAttacks}}) | 0}} }} }} }}<!-- | ||
+ | -->{{#vardefine:attack5SelectionChance|{{#expr: {{#ifeq: {{#var:attack5SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}}) | {{#ifeq: {{#var:attack5SelectionCategory}} | mid | (0.25/{{#var:numMidAttacks}}) | 0}} }} }} }}<!-- | ||
+ | -->{{#vardefine:attack6SelectionChance|{{#expr: {{#ifeq: {{#var:attack6SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var:numBestAttacks}}) | {{#ifeq: {{#var:attack6SelectionCategory}} | mid | (0.25/{{#var:numMidAttacks}}) | 0}} }} }} }}<!-- | ||
+ | Calculate actual DPS | ||
+ | |||
+ | (bestDamage*bestSelectionWeight + midDamage*midSelectionWeight) / (bestCooldownTime*bestSelectionWeight + midCoolDownTime*midSelectionWeight) = DPS | ||
+ | |||
+ | |||
+ | |||
+ | -->{{#vardefine:weightedDamageTotal| {{#expr: {{#var:attack1Damage}} * {{#var:attack1SelectionChance}} }}}}{{#vardefine:weightedTimeTotal|{{#expr: {{#var:attack1Cooldown}} * {{#var:attack1SelectionChance}}}}}}<!-- | ||
+ | |||
+ | -->{{#if: {{#var:attack2Type}} | {{#vardefine:weightedDamageTotal| {{#expr: {{#var:weightedDamageTotal}} + ({{#var:attack2Damage}} * {{#var:attack2SelectionChance}}) }}}}{{#vardefine:weightedTimeTotal|{{#expr: {{#var:weightedTimeTotal}}+({{#var:attack2Cooldown}} * {{#var:attack2SelectionChance}})}}}} }}<!-- | ||
+ | |||
+ | -->{{#if: {{#var:attack3Type}} | {{#vardefine:weightedDamageTotal| {{#expr: {{#var:weightedDamageTotal}} + ({{#var:attack3Damage}} * {{#var:attack3SelectionChance}}) }}}}{{#vardefine:weightedTimeTotal|{{#expr: {{#var:weightedTimeTotal}}+({{#var:attack3Cooldown}} * {{#var:attack3SelectionChance}})}}}} }}<!-- | ||
+ | |||
+ | -->{{#if: {{#var:attack4Type}} | {{#vardefine:weightedDamageTotal| {{#expr: {{#var:weightedDamageTotal}} + ({{#var:attack4Damage}} * {{#var:attack4SelectionChance}}) }}}}{{#vardefine:weightedTimeTotal|{{#expr: {{#var:weightedTimeTotal}}+({{#var:attack4Cooldown}} * {{#var:attack4SelectionChance}})}}}} }}<!-- | ||
+ | |||
+ | -->{{#if: {{#var:attack5Type}} | {{#vardefine:weightedDamageTotal| {{#expr: {{#var:weightedDamageTotal}} + ({{#var:attack5Damage}} * {{#var:attack5SelectionChance}}) }}}}{{#vardefine:weightedTimeTotal|{{#expr: {{#var:weightedTimeTotal}}+({{#var:attack5Cooldown}} * {{#var:attack5SelectionChance}})}}}} }}<!-- | ||
+ | |||
+ | -->{{#if: {{#var:attack6Type}} | {{#vardefine:weightedDamageTotal| {{#expr: {{#var:weightedDamageTotal}} + ({{#var:attack6Damage}} * {{#var:attack6SelectionChance}}) }}}}{{#vardefine:weightedTimeTotal|{{#expr: {{#var:weightedTimeTotal}}+({{#var:attack6Cooldown}} * {{#var:attack6SelectionChance}})}}}} }}<!-- | ||
+ | |||
+ | -->{{#vardefine:trueDPS| {{#expr:{{#var:weightedDamageTotal}}/{{#var:weightedTimeTotal}} round 2}}}}<!-- | ||
+ | Calculate actual avg AP | ||
+ | -->{{#vardefine:trueAP| {{#expr: (({{#var:attack1AP}} * {{#var:attack1SelectionChance}})<!-- | ||
+ | |||
+ | -->{{#if: {{#var:attack2Type}}|+({{#var:attack2AP}} * {{#var:attack2SelectionChance}}) | ||
}}<!-- | }}<!-- | ||
− | + | ||
− | -->{{#if: {{#var: | + | -->{{#if: {{#var:attack3Type}}|+({{#var:attack3AP}} * {{#var:attack3SelectionChance}}) |
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
− | + | ||
− | -->{{#if: {{#var: | + | -->{{#if: {{#var:attack4Type}}|+({{#var:attack4AP}} * {{#var:attack4SelectionChance}}) |
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
− | + | ||
− | -->{{#if: {{#var: | + | -->{{#if: {{#var:attack5Type}}|+({{#var:attack5AP}} * {{#var:attack5SelectionChance}}) |
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | -->{{#if: {{#var:attack6Type}}|+({{#var:attack6AP}} * {{#var:attack6SelectionChance}}) | |
− | + | }}) | |
− | + | round 2}} | |
− | + | }}<!-- | |
− | |||
− | -->{{#if: {{#var:attack6Type }} | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | RETURNED VALUE | |
-->{{#var:trueDPS}}</includeonly><noinclude> | -->{{#var:trueDPS}}</includeonly><noinclude> | ||
+ | {{Recode|reason = Update to allow for adding weapon verb sets to pawn verb sets}} | ||
{{Documentation}} | {{Documentation}} | ||
− | |||
</noinclude> | </noinclude> |