mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Added def count to all GameData variants, and one that returns the number of species for Species, removed all uses of ID numbers for GameData::Status, made more use of GameData::X.keys
This commit is contained in:
@@ -68,8 +68,8 @@ class IntroEventScene < EventScene
|
||||
onUpdate.clear
|
||||
onCTrigger.clear
|
||||
# Play random cry
|
||||
species_keys = GameData::Species::DATA.keys
|
||||
species_data = GameData::Species.get(species_keys[rand(species_keys.length)])
|
||||
species_keys = GameData::Species.keys
|
||||
species_data = GameData::Species.get(species_keys.sample)
|
||||
Pokemon.play_cry(species_data.species, species_data.form)
|
||||
@pic.moveXY(0, 20, 0, 0) # Adds 20 ticks (1 second) pause
|
||||
pictureWait
|
||||
|
||||
@@ -374,15 +374,14 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
@overlaysprite.bitmap.blt(128,52,@hpbar.bitmap,hprect)
|
||||
end
|
||||
# Draw status
|
||||
status = 0
|
||||
status = -1
|
||||
if @pokemon.fainted?
|
||||
status = GameData::Status::DATA.keys.length / 2
|
||||
status = GameData::Status.count
|
||||
elsif @pokemon.status != :NONE
|
||||
status = GameData::Status.get(@pokemon.status).id_number
|
||||
status = GameData::Status.get(@pokemon.status).icon_position
|
||||
elsif @pokemon.pokerusStage == 1
|
||||
status = GameData::Status::DATA.keys.length / 2 + 1
|
||||
status = GameData::Status.count + 1
|
||||
end
|
||||
status -= 1
|
||||
if status >= 0
|
||||
statusrect = Rect.new(0,16*status,44,16)
|
||||
@overlaysprite.bitmap.blt(78,68,@statuses.bitmap,statusrect)
|
||||
@@ -751,7 +750,7 @@ class PokemonParty_Scene
|
||||
currentsel -= 1
|
||||
while currentsel > 0 && currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel]
|
||||
currentsel -= 1
|
||||
end
|
||||
end
|
||||
else
|
||||
begin
|
||||
currentsel -= 2
|
||||
|
||||
@@ -308,15 +308,14 @@ class PokemonSummary_Scene
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%s", @pokemon.poke_ball)
|
||||
imagepos.push([ballimage,14,60])
|
||||
# Show status/fainted/Pokérus infected icon
|
||||
status = 0
|
||||
status = -1
|
||||
if @pokemon.fainted?
|
||||
status = GameData::Status::DATA.keys.length / 2
|
||||
status = GameData::Status.count
|
||||
elsif @pokemon.status != :NONE
|
||||
status = GameData::Status.get(@pokemon.status).id_number
|
||||
status = GameData::Status.get(@pokemon.status).icon_position
|
||||
elsif @pokemon.pokerusStage == 1
|
||||
status = GameData::Status::DATA.keys.length / 2 + 1
|
||||
status = GameData::Status.count + 1
|
||||
end
|
||||
status -= 1
|
||||
if status >= 0
|
||||
imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user