Fixed being able to bypass a caught mon being forced into the party, fixed Rotom Catalog, fixed incorrect writing of some enums to PBS files, fixed Jukebox's awareness of audio files, fixed bug when battle default weather is primordial, disabled path cache to add speed

This commit is contained in:
Maruno17
2024-01-01 20:35:28 +00:00
parent d5c7b8cc15
commit 8c5911e4a4
10 changed files with 17 additions and 13 deletions

View File

@@ -120,7 +120,7 @@ module Settings
# End of battle
#-----------------------------------------------------------------------------
# The Game Switch which, whie ON, prevents the player from losing money if
# The Game Switch which, while ON, prevents the player from losing money if
# they lose a battle (they can still gain money from trainers for winning).
NO_MONEY_LOSS = 33
# Whether party Pokémon check whether they can evolve after all battles

View File

@@ -732,6 +732,7 @@ class Battle
end
def pbEndPrimordialWeather
return if @field.weather == @field.defaultWeather
oldWeather = @field.weather
# End Primordial Sea, Desolate Land, Delta Stream
case @field.weather

View File

@@ -970,7 +970,7 @@ class Battle::Move::LowerTargetDefense1 < Battle::Move::TargetStatDownMove
end
#===============================================================================
# Decreases the target's Defense by 1 stage. Power is mutliplied by 1.5 if
# Decreases the target's Defense by 1 stage. Power is multiplied by 1.5 if
# Gravity is in effect. (Grav Apple)
#===============================================================================
class Battle::Move::LowerTargetDefense1PowersUpInGravity < Battle::Move::LowerTargetDefense1

View File

@@ -17,9 +17,10 @@ module Battle::CatchAndStoreMixin
_INTL("Send to a Box"),
_INTL("See {1}'s summary", pkmn.name),
_INTL("Check party")]
cmds.delete_at(1) if @sendToBoxes == 2
cmds.delete_at(1) if @sendToBoxes == 2 # Remove "Send to a Box" option
loop do
cmd = pbShowCommands(_INTL("Where do you want to send {1} to?", pkmn.name), cmds, 99)
next if cmd == 99 && @sendToBoxes == 2 # Can't cancel if must add to party
break if cmd == 99 # Cancelling = send to a Box
cmd += 1 if cmd >= 1 && @sendToBoxes == 2
case cmd

View File

@@ -1250,7 +1250,7 @@ ItemHandlers::UseOnPokemon.add(:ROTOMCATALOG, proc { |item, qty, pkmn, scene|
if new_form == pkmn.form
scene.pbDisplay(_INTL("It won't have any effect."))
next false
elsif new_form > 0 && new_form < choices.length - 1
elsif new_form >= 0 && new_form < choices.length - 1
pkmn.setForm(new_form) do
scene.pbRefresh
scene.pbDisplay(_INTL("{1} transformed!", pkmn.name))

View File

@@ -179,7 +179,7 @@ class Phone
else
contact = $PokemonGlobal.phone.get(false, args[1])
end
pbMessage(_INTL("\\me[Register phone]Registered {1} in the Pokégear!", contact.display_name) + "\\wtnp[60]")
pbMessage("\\me[Register phone]" + _INTL("Registered {1} in the Pokégear!", contact.display_name) + "\\wtnp[60]")
end
return ret
end
@@ -408,7 +408,7 @@ class Phone
end
def start_message(contact = nil)
pbMessage(_INTL("......\\wt[5] ......") + "\1")
pbMessage("......\\wt[5] ......\1")
end
def play(dialogue, contact)
@@ -439,7 +439,7 @@ class Phone
end
def end_message(contact = nil)
pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......") + "\1")
pbMessage(_INTL("Click!") + "\\wt[10]\n......\\wt[5] ......\1")
end
#===========================================================================

View File

@@ -106,10 +106,12 @@ class PokemonJukeboxScreen
pbPlayDecisionSE
files = []
Dir.chdir("Audio/BGM/") do
Dir.glob("*.ogg") { |f| files.push(f) }
Dir.glob("*.wav") { |f| files.push(f) }
Dir.glob("*.mid") { |f| files.push(f) }
Dir.glob("*.ogg") { |f| files.push(f) }
Dir.glob("*.mp3") { |f| files.push(f) }
Dir.glob("*.midi") { |f| files.push(f) }
Dir.glob("*.mid") { |f| files.push(f) }
Dir.glob("*.wma") { |f| files.push(f) }
end
files.map! { |f| File.basename(f, ".*") }
files.uniq!

View File

@@ -766,7 +766,7 @@ module Compiler
enumer = schema[2 + i - start]
case enumer
when Array
file.write((value.is_a?(Integer) && enumer[value].nil?) ? enumer[value] : value)
file.write((value.is_a?(Integer) && !enumer[value].nil?) ? enumer[value] : value)
when Symbol, String
if GameData.const_defined?(enumer.to_sym)
mod = GameData.const_get(enumer.to_sym)
@@ -792,7 +792,7 @@ module Compiler
enumer = schema[2 + i - start]
case enumer
when Array
file.write((value.is_a?(Integer) && enumer[value].nil?) ? enumer[value] : value)
file.write((value.is_a?(Integer) && !enumer[value].nil?) ? enumer[value] : value)
when Symbol, String
if !Kernel.const_defined?(enumer.to_sym) && GameData.const_defined?(enumer.to_sym)
mod = GameData.const_get(enumer.to_sym)

View File

@@ -309,7 +309,7 @@ module Compiler
end
def mapFilename(mapID)
return sprintf("Data/map%03d.rxdata", mapID)
return sprintf("Data/Map%03d.rxdata", mapID)
end
def getMap(mapID)

View File

@@ -80,7 +80,7 @@
// Index all accessible assets via their lower case path (emulates Windows
// case insensitivity).
//
// "pathCache": true,
"pathCache": false,
//==========================================================================
// Window size, scaling, rendering and frame rate.