mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-25 07:46:06 +00:00
More WIP 5.1 stuff
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class PokeBattle_Animation
|
||||
attr_writer :animDone
|
||||
def initialize(sprites,viewport)
|
||||
@sprites = sprites
|
||||
@viewport = viewport
|
||||
|
||||
@@ -293,15 +293,25 @@ class PokeBattle_Scene
|
||||
faintAnim = BattlerFaintAnimation.new(@sprites,@viewport,battler.index,@battle)
|
||||
dataBoxAnim = DataBoxDisappearAnimation.new(@sprites,@viewport,battler.index)
|
||||
loop do
|
||||
faintAnim.update
|
||||
if !showFaintingAnimation(battler)
|
||||
faintAnim.animDone = true
|
||||
else
|
||||
faintAnim.update
|
||||
end
|
||||
dataBoxAnim.update
|
||||
pbUpdate
|
||||
break if faintAnim.animDone? && dataBoxAnim.animDone?
|
||||
end
|
||||
faintAnim.dispose
|
||||
faintAnim.dispose if !$PokemonTemp.battleRules["birdboss"].nil?
|
||||
dataBoxAnim.dispose
|
||||
end
|
||||
|
||||
def showFaintingAnimation(battler)
|
||||
return true if !battler.opposes?
|
||||
return false if $game_switches[SWITCH_BIRDBOSS_BATTLE] && battler.battle.pbAbleCount(1) > 0
|
||||
return true
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Animates throwing a Poké Ball at a Pokémon in an attempt to catch it
|
||||
#=============================================================================
|
||||
|
||||
Reference in New Issue
Block a user