Project Name:
Ability, Move, and Type Calculator
Software & Technologies Used:
-APIs
-CSS/SASS
-HTML
-JavaScript
-Lumen/Laravel
-VS Code
Client:
Self
Link:
Ability, Move, and Type CalculatorDescription:
A calculator that uses abilities, moves, and typings from Pokemon to return all relevant Pokemon to the selections.
There was a point in my life that I wanted to participate in Pokemon tournaments. One of the most important aspects of competing is building a team to help you achieve victory! When I tried to build my team, I found it a little tedious and clunky to find Pokemon that was suiting of my needs. There was an online tool that helps you find a Pokemon based on moves, but nothing for abilities. I kept having to resort to Bulbapedia to look up the ability, and individually checking the Pokemon to see if it knew the move I had in mind. So that's when inspiration struck.
In terms of build, it wasn't overly complex to conceive an idea. In theory, all I needed to do was make a few API calls, and then store results an array, then have Javascript automatically filter the array and delete all numbers that don't appear multiple times. However, when it went time to code, it wasn't as simple as that. I needed to ensure that it was filtering properly, so instead of storing the results in one array, I had to split it into multiple arrays. Then, I coded a check to see if there was anything in the arrays. If there wasn't, it would be considered inactive. With the active arrays left over, the script checks for common numbers between all of the active arrays and push one instance of that number to a new array for the rest of the code to reference and display the result.
One of the biggest challenges when creating this project was time. I'm no stranger to data entry, and I entered all of the data for the abilities manually. However, moves were more complex. The average number of moves a Pokemon can learn is 58. Thus, if we count regional forms, there would be over 63, 800 entries to enter!
The solution I came up with is a lot more time efficient. The Pokemon API is currently live and has all of the move information I would need already there for me! It may not be the best solution to rely on a secondary source, in case something goes wrong, but it's time efficient at least! All I needed to do was add a new value to my current table that references the PokeAPI number so it's easy to write and reference the API calls between the PokeAPI and my own.
After this was built and published, I got in a request to add typings to the calculator, which I found interesting. I had to expand my mind a bit and realize that everyone may not have the typings of Pokemon memorized. Even I struggle realizing that Galarian Ponyta or Hattrem are pure psychic and not fairies.
Thus, I went straight to work and implemented typings into the calculator; adding in 2 new variables to the initial code. It wasn't overly complex to implement them. I just needed to ensure I didn't break the rest of the code with adding in the new factors.
Thumbnail
When you make selections using the select lists, the calculator will return all applicable Pokemon and filter out all Pokemon that appear once (if two or more selections are made)
It doesn't matter if there's 2 results or 20, it will display them all. You can also filter out Pokemon that don't appear in Scarlet and Violet!
When there are no results, a message will display featuring Unown !
Thumbnail
Thumbnail
Thumbnail