Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. var iv = null
  2. if (attack !== null && defense !== null && stamina !== null) {
  3. iv = 100 * (attack + defense + stamina) / 45
  4. }
  5. var IvIcon = ''
  6. if (IvIcon === 0 || noPokeIVIcons) {
  7. var IvIconFontSize = Math.round(22 * (scale + 0.1))
  8. var ivClass = 'iv-icon under80'
  9. if (Math.round(iv) === 100) {
  10. ivClass = 'iv-icon iv100'
  11. } else if (Math.round(iv) >= 90) {
  12. ivClass = 'iv-icon over90'
  13. } else if (Math.round(iv) >= 90) {
  14. ivClass = 'iv-icon over80'
  15. } else if (Math.round(iv) >= 80) {
  16. ivClass = 'iv-icon over80'
  17. } else if (Math.round(iv) === 0) {
  18. ivClass = 'iv-icon iv0'
  19. }
  20. IvIcon = '<span class="' + ivClass + '" style="font-size: ' + IvIconFontSize + 'px;position:absolute;top:-5px;left:-' + IvIconFontSize + 'px;" >' + Math.round(iv) + '</span>'
  21. }
  22. var html = ''
  23. if (weather === 0 || noWeatherIcons) {
  24. html = '<img src="' + iconpath + 'pokemon_icon_' + pokemonIdStr + '_' + formStr + costume + '.png" style="width:' + scaledIconSizeWidth + 'px;height:auto;'
  25. if (iv === 100 && !noIvShadow) {
  26. html += 'filter:drop-shadow(0 0 10px red)drop-shadow(0 0 10px red);-webkit-filter:drop-shadow(0 0 10px red)drop-shadow(0 0 10px red);'
  27. }
  28. html += '"/>' +
  29. IvIcon // Only Show if its not empty.
  30. } else if (noWeatherIcons === false) {
  31. html = '<img src="' + iconpath + 'pokemon_icon_' + pokemonIdStr + '_' + formStr + costume + '.png" style="width:' + scaledIconSizeWidth + 'px;height:auto;'
  32. if (iv === 100 && !noIvShadow) {
  33. html += 'filter:drop-shadow(0 0 10px red)drop-shadow(0 0 10px red);-webkit-filter:drop-shadow(0 0 10px red)drop-shadow(0 0 10px red);'
  34. }
  35. html += '"/>' +
  36. IvIcon + // Only Show if its not empty.
  37. '<img src="static/weather/a-' + weather + '.png" style="width:' + scaledWeatherIconSizeWidth + 'px;height:auto;position:absolute;top:-' + scaledWeatherIconOffset + 'px;left:' + scaledWeatherIconSizeWidth + 'px;"/>'
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement