RyanMillerC / poke-line

Minor Emacs mode to show buffer position using a Pokémon!
GNU General Public License v3.0
34 stars 2 forks source link

feature: Pokemon should be able to evolve as buffer is scrolled. #3

Closed progfolio closed 2 years ago

progfolio commented 4 years ago

This would involve reworking the data in poke-mode-types so that the evolution information (levels and evolved pokemon state) are stored with each pokemon. Assuming that, it would be cool to have a customizable function that calculates the current pokemon's level based off the current buffer position. Two that immediately spring to mind are overall percentage and absolute line number. e.g.

Charmander evolves at level 16 to Charmeleon, which evolves into Charizard at level 36. With absolute line numbers, we just consider the line number the current pokemon's level. With an overall percentage function we scale the position in the buffer so that bob is level 1 and eob is level 36.

RyanMillerC commented 4 years ago

This could be option! Would definitely require some rework for poke-mode-types as mentioned.

That Elisp file is generated by ./scripts/create_lookup_alist.sh and uses Pokémon data from another repo. That data would first need to be updated to include evolution level and evolution Pokémon name.

purcell commented 4 years ago

With #12, which introduces a poke-line-pokemon custom var, a bunch of custom behaviour could potentially be added by users, and I think this would be an example: while that var is currently just a string, if it were also allowed to be a function returning a string, then users could choose to return different types according to factors like the current buffer position.

progfolio commented 4 years ago

if it were also allowed to be a function returning a string, then users could choose to return different types according to factors like the current buffer position.

Could also obviate the need for #13 if we allow the pokeball to be a pseudo pokemon, too