33 lines
1.4 KiB
Plaintext
33 lines
1.4 KiB
Plaintext
This repo is the start of a high performant pokemon battle simulator.
|
||
I want you to implement the stat system of pokemon.
|
||
In the pokemon class, only save the values that are relevant to battle.
|
||
Make a PokemonInfo class that holds values not relevant to combat, but that can be used to calculate stats relevant to combat.
|
||
|
||
Combat:
|
||
Create fields for the HP, Attack, Defense, Sp. Atk, Sp. Def, Speed (max 20'000).
|
||
Create a value for friendship (max 255).
|
||
|
||
Info:
|
||
Each pokemon has its base stats that mirror the combat stats (HP, Attack, Defense, Sp. Atk, Sp. Def, Speed).
|
||
Create Effort Values (EV) that are like alternate values between 0-255 that mirror the combat stats .
|
||
There can only be 510 EV values max assigned in total.
|
||
Create Individual Values (IV) that are values between 0-31.
|
||
Implement pokemon natures
|
||
Create a stat formula for each generation.
|
||
|
||
Natures:
|
||
- Attack - Defense - Sp. Atk - Sp. Def - Speed
|
||
+ Attack Hardy Lonely Adamant Naughty Brave
|
||
+ Defense Bold Docile Impish Lax Relaxed
|
||
+ Sp. Atk Modest Mild Bashful Rash Quiet
|
||
+ Sp. Def Calm Gentle Careful Quirky Sassy
|
||
+ Speed Timid Hasty Jolly Naive Serious
|
||
|
||
formula for stats:
|
||
Generations I and II:
|
||
HP=⌊((Base+DV)×2+⌊⌈STATEXP⌉4⌋)×Level100⌋+Level+10
|
||
OtherStat=⌊((Base+DV)×2+⌊⌈STATEXP⌉4⌋)×Level100⌋+5
|
||
|
||
Generation III onward:
|
||
HP=⌊(2×Base+IV+⌊EV4⌋)×Level100⌋+Level+10
|
||
OtherStat=⌊(⌊(2×Base+IV+⌊EV4⌋)×Level100⌋+5)×Nature⌋ |