mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 23:24:59 +00:00
update 6.7
This commit is contained in:
@@ -70,7 +70,10 @@ module PokeBattle_BattleCommon
|
||||
# Record a Shadow Pokémon's species as having been caught
|
||||
pbPlayer.pokedex.set_shadow_pokemon_owned(pkmn.species) if pkmn.shadowPokemon?
|
||||
# Store caught Pokémon
|
||||
promptCaughtPokemonAction(pkmn)
|
||||
|
||||
gave_away_pokemon = promptGiveToPartner(pkmn) if isPartneredWithAnyTrainer()
|
||||
|
||||
promptCaughtPokemonAction(pkmn) if !gave_away_pokemon
|
||||
if $game_switches[AUTOSAVE_CATCH_SWITCH]
|
||||
Kernel.tryAutosave()
|
||||
end
|
||||
@@ -84,8 +87,8 @@ module PokeBattle_BattleCommon
|
||||
# return pbStorePokemon(pokemon) if !$Trainer.party_full?
|
||||
#
|
||||
# while !pickedOption
|
||||
# command = pbMessage(_INTL("\\ts[]Your team is full!"),
|
||||
# [_INTL("Add to your party"), _INTL("Store to PC"),], 2)
|
||||
# command = pbMessage("\\ts[]Your team is full!"),
|
||||
# ["Add to your party", "Store to PC",], 2)
|
||||
# echoln ("command " + command.to_s)
|
||||
# case command
|
||||
# when 0 #SWAP
|
||||
|
||||
@@ -99,7 +99,9 @@ class PokeBattle_Battle
|
||||
end
|
||||
@scene = scene
|
||||
@peer = PokeBattle_BattlePeer.create
|
||||
@battleAI = PokeBattle_AI.new(self)
|
||||
@battleAI = Settings::REMOTE_BATTLES_CONTROL ? RemotePokeBattle_AI.new(self) : PokeBattle_AI.new(self)
|
||||
#TODO
|
||||
|
||||
@field = PokeBattle_ActiveField.new # Whole field (gravity/rooms)
|
||||
@sides = [PokeBattle_ActiveSide.new, # Player's side
|
||||
PokeBattle_ActiveSide.new] # Foe's side
|
||||
|
||||
@@ -55,10 +55,10 @@ class PokeBattle_Battle
|
||||
requireds[idxTrainer] += 1
|
||||
end
|
||||
# Compare the have values with the need values
|
||||
if requireds.length>sideCounts.length
|
||||
raise _INTL("Error: def pbGetOwnerIndexFromBattlerIndex gives invalid owner index ({1} for battle type {2}v{3}, trainers {4}v{5})",
|
||||
requireds.length-1,@sideSizes[0],@sideSizes[1],side1counts.length,side2counts.length)
|
||||
end
|
||||
# if requireds.length>sideCounts.length
|
||||
# raise "Error: def pbGetOwnerIndexFromBattlerIndex gives invalid owner index ({1} for battle type {2}v{3}, trainers {4}v{5}",
|
||||
# requireds.length-1,@sideSizes[0],@sideSizes[1],side1counts.length,side2counts.length)
|
||||
# end
|
||||
sideCounts.each_with_index do |_count,i|
|
||||
if !requireds[i] || requireds[i]==0
|
||||
raise _INTL("Player-side trainer {1} has no battler position for their Pokémon to go (trying {2}v{3} battle)",
|
||||
|
||||
@@ -179,7 +179,7 @@ class PokeBattle_Battle
|
||||
dontAnimate = true
|
||||
# debugInfo = "Levels: #{curLevel}->#{newLevel} | Exp: #{pkmn.exp}->#{expFinal} | gain: #{expGained}"
|
||||
# raise RuntimeError.new(
|
||||
# echoln _INTL("{1}'s new level is less than its\r\ncurrent level, which shouldn't happen.\r\n[Debug: {2}]",
|
||||
# echoln "{1}'s new level is less than its\r\ncurrent level, which shouldn't happen.\r\n[Debug: {2}]",
|
||||
# pkmn.name, debugInfo)
|
||||
pbDisplayPaused(_INTL("{1}'s growth rate has changed to '{2}''. Its level will be adjusted to reflect its current exp.", pkmn.name, pkmn.growth_rate.real_name))
|
||||
end
|
||||
|
||||
@@ -74,7 +74,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
# NOTE: Add your own Mega objects for particular NPC trainers here.
|
||||
# if pbGetOwnerFromBattlerIndex(idxBattler).trainer_type == :BUGCATCHER
|
||||
# return _INTL("Mega Net")
|
||||
# return "Mega Net"
|
||||
# end
|
||||
return _INTL("Mega Ring")
|
||||
end
|
||||
|
||||
@@ -57,13 +57,13 @@ class PokeBattle_Battle
|
||||
weather_data = GameData::BattleWeather.try_get(@field.weather)
|
||||
pbCommonAnimation(weather_data.animation) if weather_data
|
||||
case @field.weather
|
||||
# when :Sun then pbDisplay(_INTL("The sunlight is strong."))
|
||||
# when :Rain then pbDisplay(_INTL("Rain continues to fall."))
|
||||
# when :Sun then pbDisplay("The sunlight is strong.")
|
||||
# when :Rain then pbDisplay("Rain continues to fall.")
|
||||
when :Sandstorm then pbDisplay(_INTL("The sandstorm is raging."))
|
||||
when :Hail then pbDisplay(_INTL("The hail is crashing down."))
|
||||
# when :HarshSun then pbDisplay(_INTL("The sunlight is extremely harsh."))
|
||||
# when :HeavyRain then pbDisplay(_INTL("It is raining heavily."))
|
||||
# when :StrongWinds then pbDisplay(_INTL("The wind is strong."))
|
||||
# when :HarshSun then pbDisplay("The sunlight is extremely harsh.")
|
||||
# when :HeavyRain then pbDisplay("It is raining heavily.")
|
||||
# when :StrongWinds then pbDisplay("The wind is strong.")
|
||||
when :ShadowSky then pbDisplay(_INTL("The shadow sky continues."))
|
||||
end
|
||||
# Effects due to weather
|
||||
|
||||
Reference in New Issue
Block a user