Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Counts how many Pokémon can learn a move, and how many of those Pokémon are the same type as the move.
- def pbTypeCount(move)
- learn = 0
- typelearn = 0
- movedata = GameData::Move.try_get(move)
- GameData::Species.each { |species|
- dummy = Pokemon.new(species,100)
- if dummy.compatible_with_move?(move)
- learn += 1
- typelearn += 1 if dummy.hasType?(movedata.type)
- end
- }
- string = "#{movedata.name} is learned by #{learn} Pokémon, #{typelearn} of which are #{movedata.type.downcase.capitalize}-type."
- pbMessage(string)
- Input.clipboard = string
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement