Advertisement
nutter666

Rand Team Gen Idea

Dec 28th, 2014
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. New random battle generation idea.
  2.  
  3. Pre-battle / pre-team generation:
  4. A number is generated as a total BST in a range of X-Y (probably around 2500-3500 to generate interesting teams).
  5. That value is used by both teams and ensure both teams will generated within a similar range of each other.
  6.  
  7. startBST = random number in the range
  8. currentBST = startBST (currentBST is the running total as each mon's value is deducted)
  9.  
  10. variable X (a global variable which influences the min/max spread for each generation) = 100 (tweak as appropriate)
  11. ------
  12. Pokemon 1 generation: (for both teams at the same time)
  13.  
  14. Calculate the "average BST" for this mon, (variable A for this)
  15. A = currentBST/ 6 (number of mon left to generate)
  16.  
  17. Pick a random mon who's BST = (A +/- X)
  18.  
  19. deduct Pokemon 1's BST from the currentBST leaving the remainder for the other 5 mon.
  20.  
  21. ------
  22. Pokemon 2 generation:
  23.  
  24. Calculate the "average BST" for this mon,
  25. A = currentBST/ 5
  26.  
  27. Pick a random mon who's BST = (A +/- X)
  28.  
  29. deduct Pokemon 2's BST from the currentBST leaving the remainder for the other 5 mon.
  30. ------
  31.  
  32. Repeat for the next 3 mon
  33.  
  34. ------
  35. Final Pokemon generation:
  36.  
  37. A = currentBST
  38. Pick a random mon whos BST is as close as possible to A whilst not exceeding it.
  39.  
  40. ---------
  41.  
  42. Generate movesets as normal and battle!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement