Created and implemented GameData::Type

This commit is contained in:
Maruno17
2020-12-12 21:26:46 +00:00
parent c8790bafc9
commit bc13517cb7
50 changed files with 698 additions and 784 deletions

View File

@@ -271,7 +271,7 @@ def pbItemIconFile(item)
if !pbResolveBitmap(bitmapFileName) && itm.is_machine?
move = itm.move
type = GameData::Move.get(move).type
bitmapFileName = sprintf("Graphics/Icons/itemMachine%s",getConstantName(PBTypes,type)) rescue nil
bitmapFileName = sprintf("Graphics/Icons/itemMachine%s",type.to_s) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Icons/itemMachine%03d",type)
end

View File

@@ -358,7 +358,7 @@ end
# Returns true if there is a Pokémon with the given type in the player's party.
def pbHasType?(type)
type = getID(PBTypes,type)
type = GameData::Type.get(type).id
for pokemon in $Trainer.pokemonParty
return true if pokemon.hasType?(type)
end