Closed LAMaglan closed 3 months ago
Would need to include a list "type" as a (class) attribute in the Pokemon class
Will be fairly complicated, as there are many types: take into account type advantages, but also when there are multiple types for a given pokemon
Could represent type advantages as a nested dict:
type_advantages = {
"Normal": {
"Normal": 1.0,
"Fire": 1.0,
"Water": 1.0,
# ... other type matchups and their respective multipliers
},
"Fire": {
"Normal": 1.0,
"Fire": 0.5,
"Water": 2.0,
# ... other type matchups and their respective multipliers
.....
Have in own file, types.py
, which I then import to main.py
etc
Base nested dict on e.g. this chart: https://pokemondb.net/type
Or, instead of nested dict, have a csv file that load into python with pandas. More readable?
Include it as some sort of multiplier. Will need to take into account when either pokemon have multiple types