class Object
Constants
- NATURES
- VALID_LEVELS
- VALID_NATURES
Public Instance Methods
header()
click to toggle source
# File lib/helpers/ascii_art.rb, line 3 def header ' _____ __ ______ __ __ __ / _/ | / / / ____/___ _/ /______ __/ /___ _/ /_____ ____ / / | | / / / / / __ `/ / ___/ / / / / __ `/ __/ __ \/ __/ _/ / | |/ / / /___/ /_/ / / /__/ /_/ / / /_/ / /_/ /_/ / / /___/ |___/ \____/\__,_/_/\___/\__,_/_/\__,_/\__/\____/_/ ⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⡏⠉⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿ ⣿⣿⣿⣿⣿⣿⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠉⠁⠀⣿ ⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠙⠿⠿⠿⠻⠿⠿⠟⠿⠛⠉⠀⠀⠀⠀⠀⣸⣿ ⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣴⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⢰⣹⡆⠀⠀⠀⠀⠀⠀⣭⣷⠀⠀⠀⠸⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠈⠉⠀⠀⠤⠄⠀⠀⠀⠉⠁⠀⠀⠀⠀⢿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⢾⣿⣷⠀⠀⠀⠀⡠⠤⢄⠀⠀⠀⠠⣿⣿⣷⠀⢸⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⡀⠉⠀⠀⠀⠀⠀⢄⠀⢀⠀⠀⠀⠀⠉⠉⠁⠀⠀⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿ This tool will calculate all the possible IVs of a Pokemon. Let\'s find out if you caught a good pokemon or not! ' end
run()
click to toggle source
# File lib/app.rb, line 12 def run Prompt.clear Prompt.logo name = Prompt.ask('What is the name of the Pokemon you would like to check?') pokemon = Pokemon.new(name) Prompt.say("Gathering Pokemon Data for #{pokemon.name}") begin pokemon.gather_pokedex_data rescue => e run else Prompt.say("Found Pokemon Data for #{pokemon.name}!") end pokemon.level = Prompt.ask("What is #{pokemon.name}'s Level? (1-100)", valid_responses: VALID_LEVELS).to_i pokemon.nature = Prompt.ask("What is #{pokemon.name}'s Nature?", valid_responses: VALID_NATURES) pokemon.hp = Prompt.ask("What is #{pokemon.name}'s HP Stat?").to_i pokemon.atk = Prompt.ask("What is #{pokemon.name}'s Attack Stat?").to_i pokemon.def = Prompt.ask("What is #{pokemon.name}'s Defense Stat?").to_i pokemon.spa = Prompt.ask("What is #{pokemon.name}'s Special Attack Stat?").to_i pokemon.spd = Prompt.ask("What is #{pokemon.name}'s Special Defense Stat?").to_i pokemon.spe = Prompt.ask("What is #{pokemon.name}'s Speed Stat?").to_i pokemon.check_ivs Prompt.result(pokemon.print_ivs) input = Prompt.ask("Would you like to look at another pokemon? (Y/n)") input.downcase == 'y' || input.downcase == 'yes' ? run : exit end