mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
release 6.2
This commit is contained in:
@@ -699,11 +699,11 @@ class PokeBattle_Battle
|
||||
@field.weather = :None
|
||||
pbDisplay("The heavy rain has lifted!")
|
||||
end
|
||||
when :StrongWinds
|
||||
if !pbCheckGlobalAbility(:DELTASTREAM)
|
||||
@field.weather = :None
|
||||
pbDisplay("The mysterious air current has dissipated!")
|
||||
end
|
||||
# when :StrongWinds
|
||||
# if !pbCheckGlobalAbility(:DELTASTREAM)
|
||||
# @field.weather = :None
|
||||
# pbDisplay("The mysterious air current has dissipated!")
|
||||
# end
|
||||
end
|
||||
if @field.weather!=oldWeather
|
||||
# Check for form changes caused by the weather changing
|
||||
|
||||
@@ -282,6 +282,8 @@ class PokeBattle_Battle
|
||||
pbStartBattleSendOut(sendOuts)
|
||||
# Weather announcement
|
||||
weather_data = GameData::BattleWeather.try_get(@field.weather)
|
||||
echoln @field.weather
|
||||
|
||||
pbCommonAnimation(weather_data.animation) if weather_data
|
||||
case @field.weather
|
||||
when :Sun then pbDisplay(_INTL("The sunlight is strong."))
|
||||
@@ -466,7 +468,7 @@ class PokeBattle_Battle
|
||||
@scene.pbWildBattleSuccess if !Settings::GAIN_EXP_FOR_CAPTURE
|
||||
end
|
||||
# Register captured Pokémon in the Pokédex, and store them
|
||||
pbRecordAndStoreCaughtPokemon
|
||||
#pbRecordAndStoreCaughtPokemon
|
||||
|
||||
isRematch = $game_switches[SWITCH_IS_REMATCH]
|
||||
begin
|
||||
@@ -504,13 +506,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
end
|
||||
end
|
||||
# Clean up battle stuff
|
||||
@scene.pbEndBattle(@decision)
|
||||
@battlers.each do |b|
|
||||
next if !b
|
||||
pbCancelChoice(b.index) # Restore unused items to Bag
|
||||
BattleHandlers.triggerAbilityOnSwitchOut(b.ability,b,true) if b.abilityActive?
|
||||
end
|
||||
|
||||
pbParty(0).each_with_index do |pkmn,i|
|
||||
next if !pkmn
|
||||
@peer.pbOnLeavingBattle(self,pkmn,@usedInBattle[0][i],true) # Reset form
|
||||
@@ -518,6 +514,16 @@ class PokeBattle_Battle
|
||||
pkmn.spriteform_head=nil
|
||||
pkmn.spriteform_body=nil
|
||||
end
|
||||
pbRecordAndStoreCaughtPokemon
|
||||
|
||||
# Clean up battle stuff
|
||||
@scene.pbEndBattle(@decision)
|
||||
@battlers.each do |b|
|
||||
next if !b
|
||||
pbCancelChoice(b.index) # Restore unused items to Bag
|
||||
BattleHandlers.triggerAbilityOnSwitchOut(b.ability,b,true) if b.abilityActive?
|
||||
end
|
||||
|
||||
return @decision
|
||||
end
|
||||
|
||||
|
||||
@@ -589,13 +589,13 @@ class PokemonBattlerSprite < RPG::Sprite
|
||||
@pkmn = pkmn
|
||||
@_iconBitmap.dispose if @_iconBitmap
|
||||
@_iconBitmap = GameData::Species.sprite_bitmap_from_pokemon(@pkmn, back)
|
||||
if @back
|
||||
@_iconBitmap.scale_bitmap(Settings::BACKRPSPRITE_SCALE)
|
||||
else
|
||||
@_iconBitmap.scale_bitmap(Settings::FRONTSPRITE_SCALE)
|
||||
end
|
||||
scale =Settings::FRONTSPRITE_SCALE
|
||||
scale = Settings::BACKRPSPRITE_SCALE if @back
|
||||
@_iconBitmap.scale_bitmap(scale)
|
||||
|
||||
self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil
|
||||
add_hat_to_bitmap(self.bitmap,pkmn.hat,pkmn.hat_x,pkmn.hat_y,scale,self.mirror) if self.bitmap && pkmn.hat
|
||||
|
||||
pbSetPosition
|
||||
end
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@ class PokeBattle_Scene
|
||||
sprite = IconSprite.new(x,y,viewport)
|
||||
if filename
|
||||
sprite.setBitmap(filename) rescue nil
|
||||
|
||||
end
|
||||
@sprites[id] = sprite
|
||||
return sprite
|
||||
|
||||
@@ -170,23 +170,39 @@ class PokeBattle_Scene
|
||||
end
|
||||
|
||||
def pbCreateTrainerBackSprite(idxTrainer, trainerType, numTrainers = 1)
|
||||
if idxTrainer == 0 # Player's sprite
|
||||
trainerFile = GameData::TrainerType.player_back_sprite_filename(trainerType)
|
||||
else
|
||||
# Partner trainer's sprite
|
||||
trainerFile = GameData::TrainerType.back_sprite_filename(trainerType)
|
||||
end
|
||||
spriteX, spriteY = PokeBattle_SceneConstants.pbTrainerPosition(0, idxTrainer, numTrainers)
|
||||
trainer = pbAddSprite("player_#{idxTrainer + 1}", spriteX, spriteY, trainerFile, @viewport)
|
||||
return if !trainer.bitmap
|
||||
# Alter position of sprite
|
||||
trainer.z = 30 + idxTrainer
|
||||
if trainer.bitmap.width > trainer.bitmap.height * 2
|
||||
trainer.src_rect.x = 0
|
||||
trainer.src_rect.width = trainer.bitmap.width / 5
|
||||
end
|
||||
trainer.ox = trainer.src_rect.width / 2
|
||||
trainer.oy = trainer.bitmap.height
|
||||
x = 100
|
||||
y = 410
|
||||
|
||||
sprite = IconSprite.new(x,y,@viewport)
|
||||
sprite.setBitmapDirectly(generate_front_trainer_sprite_bitmap())
|
||||
sprite.zoom_x=2
|
||||
sprite.zoom_y=2
|
||||
sprite.z=30 + idxTrainer
|
||||
|
||||
sprite.mirror =true
|
||||
@sprites["player_#{idxTrainer + 1}"] = sprite
|
||||
return sprite
|
||||
|
||||
#trainer = pbAddSprite("player_#{idxTrainer + 1}", spriteX, spriteY, trainerFile, @viewport)
|
||||
#
|
||||
# if idxTrainer == 0 # Player's sprite
|
||||
# #trainerFile = GameData::TrainerType.player_back_sprite_filename(trainerType)
|
||||
# trainerFile = generate_front_trainer_sprite_bitmap()
|
||||
# else
|
||||
# # Partner trainer's sprite
|
||||
# trainerFile = GameData::TrainerType.back_sprite_filename(trainerType)
|
||||
# end
|
||||
# spriteX, spriteY = PokeBattle_SceneConstants.pbTrainerPosition(0, idxTrainer, numTrainers)
|
||||
# trainer = pbAddSprite("player_#{idxTrainer + 1}", spriteX, spriteY, trainerFile, @viewport)
|
||||
# return if !trainer.bitmap
|
||||
# # Alter position of sprite
|
||||
# trainer.z = 30 + idxTrainer
|
||||
# if trainer.bitmap.width > trainer.bitmap.height * 2
|
||||
# trainer.src_rect.x = 0
|
||||
# trainer.src_rect.width = trainer.bitmap.width / 5
|
||||
# end
|
||||
# trainer.ox = trainer.src_rect.width / 2
|
||||
# trainer.oy = trainer.bitmap.height
|
||||
end
|
||||
|
||||
def pbCreateTrainerFrontSprite(idxTrainer, trainerType, numTrainers = 1, sprite_override = nil)
|
||||
|
||||
Reference in New Issue
Block a user