Removed all uses of ID numbers for species, some other code changes for abolishing ID numbers

This commit is contained in:
Maruno17
2021-06-16 22:42:20 +01:00
parent 8c67127f06
commit e9457a3ea8
22 changed files with 965 additions and 1750 deletions

View File

@@ -112,9 +112,8 @@ module NicknameChecker
name = name.upcase
return true if name == getName(species)
return false if @@names.values.include?(name)
GameData::Species.each do |species_data|
next if species_data.species == species || species_data.form != 0
return false if getName(species_data.id) == name
GameData::Species.each_species do |species_data|
return false if species_data.species != species && getName(species_data.id) == name
end
return true
end

View File

@@ -42,7 +42,7 @@ def pbRandomMove
loop do
move_id = keys[rand(keys.length)]
move = GameData::Move.get(move_id)
next if move.id_number > 384 || move.id == :SKETCH || move.id == :STRUGGLE
next if move.id == :SKETCH || move.id == :STRUGGLE
return move.id
end
end