Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- New random battle generation idea.
- Pre-battle / pre-team generation:
- A number is generated as a total BST in a range of X-Y (probably around 2500-3500 to generate interesting teams).
- That value is used by both teams and ensure both teams will generated within a similar range of each other.
- startBST = random number in the range
- currentBST = startBST (currentBST is the running total as each mon's value is deducted)
- variable X (a global variable which influences the min/max spread for each generation) = 100 (tweak as appropriate)
- ------
- Pokemon 1 generation: (for both teams at the same time)
- Calculate the "average BST" for this mon, (variable A for this)
- A = currentBST/ 6 (number of mon left to generate)
- Pick a random mon who's BST = (A +/- X)
- deduct Pokemon 1's BST from the currentBST leaving the remainder for the other 5 mon.
- ------
- Pokemon 2 generation:
- Calculate the "average BST" for this mon,
- A = currentBST/ 5
- Pick a random mon who's BST = (A +/- X)
- deduct Pokemon 2's BST from the currentBST leaving the remainder for the other 5 mon.
- ------
- Repeat for the next 3 mon
- ------
- Final Pokemon generation:
- A = currentBST
- Pick a random mon whos BST is as close as possible to A whilst not exceeding it.
- ---------
- Generate movesets as normal and battle!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement