Add pokemon form trigger conditions#1578
Conversation
Naramsim
left a comment
There was a problem hiding this comment.
Hi, can you merge the migrations into a single one?
Can you address the failing tests?
| 2231,peat-block,10,0,, | ||
| 2232,metal-alloy,10,0,, No newline at end of file | ||
| 2232,metal-alloy,10,0,, | ||
| 2559,clefablite,44,0,80, |
There was a problem hiding this comment.
Why start at 2559 instead of 2233?
| @@ -0,0 +1,224 @@ | |||
| pokemon_form_id,form_method_id,item_id,ability_id,move_id | |||
There was a problem hiding this comment.
Maybe some more descriptive names like trigger_item_id and so on?
| model = PokemonFormName | ||
| fields = ("name", "pokemon_name", "language") | ||
|
|
||
| class PokemonFormTriggerSerializer(serializers.ModelSerializer): |
There was a problem hiding this comment.
I do like form trigger as the name rather than form method, but whatever you choose we should make it consistent between these classes and the file.
|
The new update addresses the comments to fix the ID and naming issues. Migrations is merged into single file and prose csv file is added |
|
I'm loving the format and after checking a few pokemon things are looking good! This next part is a bit out of my expertise so I'll tag @Naramsim - would it be good to have this as a separate endpoint (like at pokeapi.co/api/v2/pokemon-form-trigger)? Maybe we could even have it list the pokemon forms that use that trigger (similar to a location area listing the encounters that linked it)? These suggestions may very well be something we handle in a separate PR and merge this one for now, but I thought I'd bring it up in case it was easy enough to work into this one. |
|
If @jemarq04 approves we can merge and have the endpoint added later on. |
|
what about some of the cosplay or stat based forms like pikachu https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_with_form_differences or minior core when hp below certain percent etc or weather like castform because iirc for these pokemon we do have dedicated entries after 10000 |
jemarq04
left a comment
There was a problem hiding this comment.
For a starting point this is great - we can work on the endpoint later.
As far as missing Pokemon forms, I think this is a good starting point and we'll add in missing data later.
Change description
Addressing issues #1549 by adding new form triggers fields in
/api/v2/pokemon-form/endpoints.Changes included:
PokemonFormMethodandPokemonFormConditionmodels to store how a form is activated,pokemon_form_methods.csvto define trigger types, andpokemon_form_conditions.csvto link forms to their trigger methods.items.csvAI coding assistance disclosure
I use AI assistant for formatting.
Contributor check list