模板:Weapon DPS

出自【暗黑百科】DiabloWiki_凯恩之角

在2012年1月14日 (六) 10:05由菠萝橙 (讨论 | 贡献)所做的修订版本
跳转到: 导航, 搜索


目录

Usage

Include the following line to add the DPS calculation to a template. Remember, all the necessary parameters must be available.

Note: Use triple click to select the whole thing, it is long.

{{Weapon Dps|{{{item_damage_min|}}}|{{{item_damage_max|}}}|{{{item_damage_min_min|}}}|{{{item_damage_max_min|}}}|{{{item_damage_min_max|}}}|{{{item_damage_max_max|}}}|{{{item_speed|}}}|{{{item_speed_min|}}}|{{{item_speed_max|}}}|{{{item_holy_damage_min|}}}|{{{item_holy_damage_max|}}}|{{{item_fire_damage_min|}}}|{{{item_fire_damage_max|}}}|{{{item_cold_damage_min|}}}|{{{item_cold_damage_max|}}}|{{{item_lightning_damage_min|}}}|{{{item_lightning_damage_max|}}}|{{{item_poison_damage_min|}}}|{{{item_poison_damage_max|}}}|{{{item_arcane_damage_min|}}}|{{{item_arcane_damage_max|}}}|{{{item_property1|}}}|{{{item_property1_desc|}}}|{{{item_property2|}}}|{{{item_property2_desc|}}}|{{{item_property3|}}}|{{{item_property3_desc|}}}|{{{item_property4|}}}|{{{item_property4_desc|}}}|{{{item_property5|}}}|{{{item_property5_desc|}}}|{{{item_property6|}}}|{{{item_property6_desc|}}}|{{{item_property7|}}}|{{{item_property7_desc|}}} }}

Parameters

In order to keep the include generic but not gigantic (yeah, it's huge anyway) named parameters are not used. This means the order of parameters is very important. While the average editor will never care I have listed out the order below. This will be very useful to anyone trying to adjust/update the formulas. If you make any additions to the parameters used, add them to the list.

  1. item_damage_min
  2. item_damage_max
  3. item_damage_min_min
  4. item_damage_max_min
  5. item_damage_min_max
  6. item_damage_max_max
  7. item_speed
  8. item_speed_min
  9. item_speed_max
  10. item_holy_damage_min
  11. item_holy_damage_max
  12. item_fire_damage_min
  13. item_fire_damage_max
  14. item_cold_damage_min
  15. item_cold_damage_max
  16. item_lightning_damage_min
  17. item_lightning_damage_max
  18. item_poison_damage_min
  19. item_poison_damage_max
  20. item_arcane_damage_min
  21. item_arcane_damage_max
  22. item_property1
  23. item_property1_desc
  24. item_property2
  25. item_property2_desc
  26. item_property3
  27. item_property3_desc
  28. item_property4
  29. item_property4_desc
  30. item_property5
  31. item_property5_desc
  32. item_property6
  33. item_property6_desc
  34. item_property7
  35. item_property7_desc

Formulas

The formulas used to calculate are detailed below. If you introduce new formulas or adjust the existing ones please update the documentation.

Plus Damage Minimum (plusDamageMin) Calculation:

<Plus Holy Damage Min> + <Plus Fire Damage Min> + <Plus Cold Damage Min> + <Plus Lightning Damage Min> + <Plus Poison Damage Min> + <Plus Arcane Damage Min>

Plus Damage Maximum (plusDamageMax) Calculation:

<Plus Holy Damage Max> + <Plus Fire Damage Max> + <Plus Cold Damage Max> + <Plus Lightning Damage Max> + <Plus Poison Damage Max> + <Plus Arcane Damage Max>

Minimum DPS (dpsMin) Calculation

(<Damage Min Min|Damage Min|0> + <Plus Damage Min> + <Damage Max Min|Damage Max|0> + <Plus Damage Max>)/2 * <Weapon Speed Min|Weapon Speed|0>

Note: Rounded to 2 decimal places.
Maximum DPS (dpsMax) Calculation

(<Damage Min Max|Damage Min|0> + <Plus Damage Min> + <Damage Max Max|Damage Max|0> + <Plus Damage Max>)/2 * <Weapon Speed Max|Weapon Speed|0>

Note: Rounded to 2 decimal places.

Display

If their is a max and min DPS value they are both displayed separated by a hyphen ( - ), otherwise a single value is displayed.

Known Issues

Comments

In case anyone was wondering, the properties are included for possible future use. Right now everything used in the calculation comes from explicit parameters. However, it is possible to envision a template that pulls all pertinent adds from the properties without requiring that info to have its own parameter.

个人工具
分享到: 更多
名字空间
变换
动作
网站地图
暗黑破坏神 III
暗黑破坏神 II
暗黑破坏神
工具箱
编辑箱
关于暗黑百科