mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Implemented GameData::Encounter, created new encounters.txt format, tweaked Vs animation filenames
This commit is contained in:
@@ -44,7 +44,7 @@ def pbBattleAnimation(bgm=nil,battletype=0,foe=nil)
|
||||
$PokemonTemp.encounterType==EncounterTypes::GoodRod ||
|
||||
$PokemonTemp.encounterType==EncounterTypes::SuperRod)
|
||||
location = 3
|
||||
elsif $PokemonEncounters.isCave?
|
||||
elsif $PokemonEncounters.has_cave_encounters?
|
||||
location = 2
|
||||
elsif !GameData::MapMetadata.exists?($game_map.map_id) ||
|
||||
!GameData::MapMetadata.get($game_map.map_id).outdoor_map
|
||||
@@ -112,7 +112,7 @@ def pbBattleAnimation(bgm=nil,battletype=0,foe=nil)
|
||||
$PokemonGlobal.nextBattleME = nil
|
||||
$PokemonGlobal.nextBattleCaptureME = nil
|
||||
$PokemonGlobal.nextBattleBack = nil
|
||||
$PokemonEncounters.clearStepCount
|
||||
$PokemonEncounters.reset_step_count
|
||||
# Fade back to the overworld
|
||||
viewport.color = Color.new(0,0,0,255)
|
||||
numFrames = Graphics.frame_rate*4/10 # 0.4 seconds, 16 frames
|
||||
@@ -134,10 +134,10 @@ def pbBattleAnimationOverride(viewport,battletype=0,foe=nil)
|
||||
tr_type = foe[0].trainer_type
|
||||
tr_type_id = GameData::TrainerType.get(tr_type).id_number
|
||||
if tr_type
|
||||
tbargraphic = sprintf("Graphics/Transitions/vsBar%s", tr_type.to_s) rescue nil
|
||||
tbargraphic = sprintf("Graphics/Transitions/vsBar%d", tr_type_id) if !pbResolveBitmap(tbargraphic)
|
||||
tgraphic = sprintf("Graphics/Transitions/vsTrainer%s", tr_type.to_s) rescue nil
|
||||
tgraphic = sprintf("Graphics/Transitions/vsTrainer%d", tr_type_id) if !pbResolveBitmap(tgraphic)
|
||||
tbargraphic = sprintf("Graphics/Transitions/vsBar_%s", tr_type.to_s) rescue nil
|
||||
tbargraphic = sprintf("Graphics/Transitions/vsBar_%d", tr_type_id) if !pbResolveBitmap(tbargraphic)
|
||||
tgraphic = sprintf("Graphics/Transitions/vsTrainer_%s", tr_type.to_s) rescue nil
|
||||
tgraphic = sprintf("Graphics/Transitions/vsTrainer_%d", tr_type_id) if !pbResolveBitmap(tgraphic)
|
||||
if pbResolveBitmap(tbargraphic) && pbResolveBitmap(tgraphic)
|
||||
player_tr_type = $Trainer.trainer_type
|
||||
player_tr_type_id = GameData::TrainerType.get(player_tr_type).id_number
|
||||
@@ -156,11 +156,11 @@ def pbBattleAnimationOverride(viewport,battletype=0,foe=nil)
|
||||
overlay = Sprite.new(viewport)
|
||||
overlay.bitmap = Bitmap.new(Graphics.width,Graphics.height)
|
||||
pbSetSystemFont(overlay.bitmap)
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar%s_%d", player_tr_type.to_s, outfit) rescue nil
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar%d_%d", player_tr_type_id, outfit) if !pbResolveBitmap(pbargraphic)
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar_%s_%d", player_tr_type.to_s, outfit) rescue nil
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar_%d_%d", player_tr_type_id, outfit) if !pbResolveBitmap(pbargraphic)
|
||||
if !pbResolveBitmap(pbargraphic)
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar%s", player_tr_type.to_s) rescue nil
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar%d", player_tr_type_id) if !pbResolveBitmap(pbargraphic)
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar_%s", player_tr_type.to_s) rescue nil
|
||||
pbargraphic = sprintf("Graphics/Transitions/vsBar_%d", player_tr_type_id) if !pbResolveBitmap(pbargraphic)
|
||||
end
|
||||
xoffset = ((Graphics.width/2)/10)*10
|
||||
bar1 = Sprite.new(viewplayer)
|
||||
@@ -197,11 +197,11 @@ def pbBattleAnimationOverride(viewport,battletype=0,foe=nil)
|
||||
bar1.bitmap = BitmapCache.load_bitmap(pbargraphic)
|
||||
bar2 = AnimatedPlane.new(viewopp)
|
||||
bar2.bitmap = BitmapCache.load_bitmap(tbargraphic)
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer%s_%d", player_tr_type.to_s, outfit) rescue nil
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer%d_%d", player_tr_type_id, outfit) if !pbResolveBitmap(pgraphic)
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer_%s_%d", player_tr_type.to_s, outfit) rescue nil
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer_%d_%d", player_tr_type_id, outfit) if !pbResolveBitmap(pgraphic)
|
||||
if !pbResolveBitmap(pgraphic)
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer%s", player_tr_type.to_s) rescue nil
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer%d", player_tr_type_id) if !pbResolveBitmap(pgraphic)
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer_%s", player_tr_type.to_s) rescue nil
|
||||
pgraphic = sprintf("Graphics/Transitions/vsTrainer_%d", player_tr_type_id) if !pbResolveBitmap(pgraphic)
|
||||
end
|
||||
player = Sprite.new(viewplayer)
|
||||
player.bitmap = BitmapCache.load_bitmap(pgraphic)
|
||||
|
||||
Reference in New Issue
Block a user