Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace $effect_chance% with actual value #1024

Closed
Naramsim opened this issue Jan 29, 2024 · 2 comments · Fixed by #1031
Closed

Replace $effect_chance% with actual value #1024

Naramsim opened this issue Jan 29, 2024 · 2 comments · Fixed by #1031

Comments

@Naramsim
Copy link
Member

Part of our API serves text fields containing $effect_chance%.

Rendered field: https://pokeapi.co/api/v2/move/fire-punch .effect_entries[0].effect

Raw data: https://github.com/PokeAPI/pokeapi/blob/master/data/v2/csv/move_effect_prose.csv#L6

It would be awesome if we could replace the $effect_chance% with the actual chance of the move.

An example for fire-punch would be to use the value found in moves.csv for the column effect_chance (which is 10) and replace it in the effect description.

An even-more-interesting thing would be to create a function that we could use to substitute any $xxx% with the relative xxx attribute.

@Naramsim
Copy link
Member Author

Hi @simonorono , I'm pinging you since you already helped us in the past and modified the build.py file. If you have time and are willing to help us, could you review the issue and tell me what you think?

Many many thanks!

@GreatNovaDragon
Copy link
Contributor

I got pinged in this cause i raised #1020 , and my description makes it seem like its a fault of purely numbers.

Truly, its an issue because what the data csv call here "prose" just never get updated or in the case for the proses of Scarlet and Violet, never even get added. Libero (and protean) got an update in Scarlet and Violet that their effect only happens once per switch-in, a thing that is not reflected in their "prose"

For single source of truth numbers, i would recommend to make a list of strings that are like $effect_chance, maybe two lists, global for like 1/16th to 1/8th bufff and local to the move (to more easily sync the short and long effect).

I am not an API designer though, and dont know how or if this is feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants