Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #inputs
- hp=351
- def1=226 #def stat where certain bulk needed for a calc, before applying mult
- def2=166 #other def stat, where you want to maximise bulk
- spent=144 #EVs already spent on attack stats and speed
- def1.mult=1 #assault vest(1.5)*boosting nature(1.1)*eviolite(1.5), etc
- def2.mult=1 #as above, but for def2
- minbulk1=414*237 #needed HP*def bulk on def1 stat, from a relevant calc
- #setup, do not touch :P
- budget=0.25*(508-spent)
- max=0
- spend1=0
- spend2=0
- bulk1=0
- bulk2=0
- #i is def1 spending, j is def2
- for (i in 0:min(budget,63))
- {
- for (j in 0:min(budget-i,63))
- {
- bulk1=(hp+budget-i-j)*floor(def1.mult*(def1+i))
- bulk2=(hp+budget-i-j)*floor(def2.mult*(def2+j))
- if (bulk2>max&bulk1>=minbulk1&(budget-i-j)<=63)
- {
- max=bulk2
- spend1=i
- spend2=j
- }
- }
- }
- spend1 #stat points in def1
- spend2 #same for def2
- spend1*4 #Now converted to EVs. Put remainder in HP :)
- spend2*4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement