Advertisement
Guest User

pokemon EV bulk

a guest
Feb 19th, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #inputs
  2. hp=351
  3. def1=226 #def stat where certain bulk needed for a calc, before applying mult
  4. def2=166 #other def stat, where you want to maximise bulk
  5. spent=144 #EVs already spent on attack stats and speed
  6. def1.mult=1 #assault vest(1.5)*boosting nature(1.1)*eviolite(1.5), etc
  7. def2.mult=1 #as above, but for def2
  8.  
  9. minbulk1=414*237 #needed HP*def bulk on def1 stat, from a relevant calc
  10.  
  11. #setup, do not touch :P
  12.  
  13. budget=0.25*(508-spent)
  14. max=0
  15. spend1=0
  16. spend2=0
  17. bulk1=0
  18. bulk2=0
  19.  
  20. #i is def1 spending, j is def2
  21. for (i in 0:min(budget,63))
  22. {
  23. for (j in 0:min(budget-i,63))
  24. {
  25. bulk1=(hp+budget-i-j)*floor(def1.mult*(def1+i))
  26. bulk2=(hp+budget-i-j)*floor(def2.mult*(def2+j))
  27. if (bulk2>max&bulk1>=minbulk1&(budget-i-j)<=63)
  28. {
  29. max=bulk2
  30. spend1=i
  31. spend2=j
  32. }
  33. }
  34. }
  35.  
  36. spend1 #stat points in def1
  37. spend2 #same for def2
  38. spend1*4 #Now converted to EVs. Put remainder in HP :)
  39. spend2*4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement