More WIP 5.1 stuff

This commit is contained in:
infinitefusion
2022-11-13 19:37:44 -05:00
parent 22fb1ac9a3
commit 4fcb68cba3
30 changed files with 108 additions and 12 deletions

View File

@@ -177,7 +177,7 @@ class PokeBattle_Battle
# For "1v2" names, the first number is for the player's side and the second
# number is for the opposing side.
def setBattleMode(mode)
default = $game_variables[242].is_a?(Array) ? $game_variables[242] : [1,1]
default = $game_variables[VAR_DEFAULT_BATTLE_TYPE].is_a?(Array) ? $game_variables[VAR_DEFAULT_BATTLE_TYPE] : [1,1]
@sideSizes =
case mode
when "triple", "3v3" then [3, 3]

View File

@@ -202,8 +202,13 @@ class PokeBattle_Battle
msg += _INTL("{1} sent out {2} and {3}!",t.full_name,
@battlers[sent[0]].name,@battlers[sent[1]].name)
when 3
msg += _INTL("{1} sent out {2}, {3} and {4}!",t.full_name,
@battlers[sent[0]].name,@battlers[sent[1]].name,@battlers[sent[2]].name)
if $PokemonTemp.battleRules["birdboss"]
msg += _INTL("{1} sent out Zapmolticuno!",t.full_name)
else
msg += _INTL("{1} sent out {2}, {3} and {4}!",t.full_name,
@battlers[sent[0]].name,@battlers[sent[1]].name,@battlers[sent[2]].name)
end
end
toSendOut.concat(sent)
end

View File

@@ -1,4 +1,5 @@
class PokeBattle_Animation
attr_writer :animDone
def initialize(sprites,viewport)
@sprites = sprites
@viewport = viewport

View File

@@ -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
#=============================================================================