mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
updates to version 6.1
This commit is contained in:
@@ -242,6 +242,8 @@ def pbCanTripleBattle?
|
||||
return $PokemonGlobal.partner && $Trainer.able_pokemon_count >= 2
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Start a wild battle
|
||||
#===============================================================================
|
||||
@@ -257,6 +259,7 @@ def pbWildBattleCore(*args)
|
||||
$PokemonGlobal.nextBattleME = nil
|
||||
$PokemonGlobal.nextBattleCaptureME = nil
|
||||
$PokemonGlobal.nextBattleBack = nil
|
||||
$PokemonTemp.forced_alt_sprites=nil
|
||||
pbMEStop
|
||||
return 1 # Treat it as a win
|
||||
end
|
||||
@@ -331,6 +334,30 @@ def pbWildBattleCore(*args)
|
||||
return decision
|
||||
end
|
||||
|
||||
def pbWildDoubleBattleSpecific(pokemon1,pokemon2, outcomeVar=1, canRun=true, canLose=false)
|
||||
# Set some battle rules
|
||||
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
|
||||
setBattleRule("cannotRun") if !canRun
|
||||
setBattleRule("canLose") if canLose
|
||||
setBattleRule("double")
|
||||
# Perform the battle
|
||||
decision = pbWildBattleCore(pokemon1, pokemon2)
|
||||
return (decision!=2 && decision!=5)
|
||||
end
|
||||
|
||||
def pbWildBattleSpecific(pokemon, outcomeVar=1, canRun=true, canLose=false)
|
||||
# Set some battle rules
|
||||
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
|
||||
setBattleRule("cannotRun") if !canRun
|
||||
setBattleRule("canLose") if canLose
|
||||
# Perform the battle
|
||||
decision = pbWildBattleCore(pokemon)
|
||||
# Used by the Poké Radar to update/break the chain
|
||||
#Events.onWildBattleEnd.trigger(nil,species,level,decision)
|
||||
# Return false if the player lost or drew the battle, and true if any other result
|
||||
return (decision!=2 && decision!=5)
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Standard methods that start a wild battle of various sizes
|
||||
#===============================================================================
|
||||
@@ -423,6 +450,7 @@ def pbTrainerBattleCore(*args)
|
||||
$PokemonGlobal.nextBattleME = nil
|
||||
$PokemonGlobal.nextBattleCaptureME = nil
|
||||
$PokemonGlobal.nextBattleBack = nil
|
||||
$PokemonTemp.forced_alt_sprites=nil
|
||||
pbMEStop
|
||||
return ($Trainer.able_pokemon_count == 0) ? 0 : 1 # Treat it as undecided/a win
|
||||
end
|
||||
|
||||
@@ -112,6 +112,7 @@ def pbBattleAnimation(bgm=nil,battletype=0,foe=nil)
|
||||
$PokemonGlobal.nextBattleME = nil
|
||||
$PokemonGlobal.nextBattleCaptureME = nil
|
||||
$PokemonGlobal.nextBattleBack = nil
|
||||
$PokemonTemp.forced_alt_sprites=nil
|
||||
$PokemonEncounters.reset_step_count
|
||||
# Fade back to the overworld
|
||||
viewport.color = Color.new(0,0,0,255)
|
||||
|
||||
Reference in New Issue
Block a user