Advertisement
IcariumQA

check if lower rank spell dealing more damage than higher rank

Nov 6th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.48 KB | None | 0 0
  1. SELECT a.ID, a.SpellName0, a.SpellRank0, a.SpellLevel, a.BaseLevel, a.MaximumLevel
  2. , (IF(a.Effect1 = 2, a.EffectBasePoints1, 0)
  3. + IF(a.Effect2 = 2, a.EffectBasePoints2, 0)
  4. + IF(a.Effect3 = 2, a.EffectBasePoints3, 0)) AS EffectdamageSum
  5. , (IF(a.Effect1 = 2, a.EffectDieSides1, 0)
  6. + IF(a.Effect2 = 2, a.EffectDieSides2, 0)
  7. + IF(a.Effect3 = 2, a.EffectDieSides3, 0)) AS EffectDieSidedamageSum
  8.  
  9. , round(a.EffectRealPointsPerLevel1 + a.EffectRealPointsPerLevel2 + a.EffectRealPointsPerLevel3,1) AS realPerLevel
  10.  
  11. , (IF(a.Effect1 = 2, a.EffectBasePoints1 + a.EffectDieSides1 + (a.EffectRealPointsPerLevel1 * (LEAST(Greatest(a.MaximumLevel, a.BaseLevel),79) - a.BaseLevel)), 0)
  12. + IF(a.Effect2 = 2, a.EffectBasePoints2 + a.EffectDieSides2 + (a.EffectRealPointsPerLevel2 * (LEAST(Greatest(a.MaximumLevel, a.BaseLevel),79) - a.BaseLevel)), 0)
  13. + IF(a.Effect3 = 2, a.EffectBasePoints3 + a.EffectDieSides3 + (a.EffectRealPointsPerLevel3 * (LEAST(Greatest(a.MaximumLevel, a.BaseLevel),79) - a.BaseLevel)), 0)) AS TotaldamageSum
  14.  
  15. FROM spell a
  16. INNER JOIN spell_player_spells b ON a.SpellName0 = b.SpellName0
  17. WHERE (a.Effect1 = 2 OR a.Effect2 = 2 OR a.Effect3 = 2)
  18. AND a.SpellRank0 IN ('rank 1', 'rank 2', 'rank 3', 'rank 4', 'rank 5', 'rank 6', 'rank 7', 'rank 8', 'rank 9', 'rank 10', 'rank 11', 'rank 12', 'rank 13', 'rank 14', 'rank 15', 'rank 16', 'rank 17', 'rank 18')
  19. AND a.SpellLevel <= 79
  20. AND a.ID NOT IN (1001113)
  21. GROUP BY a.SpellRank0, a.SpellName0
  22. ORDER BY a.SpellName0, right(a.SpellRank0,2)
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement