diff --git a/Data/Scripts/001_Technical/001_Debugging/002_DebugConsole.rb b/Data/Scripts/001_Technical/001_Debugging/002_DebugConsole.rb index 775afb84c..45884ec35 100644 --- a/Data/Scripts/001_Technical/001_Debugging/002_DebugConsole.rb +++ b/Data/Scripts/001_Technical/001_Debugging/002_DebugConsole.rb @@ -152,7 +152,7 @@ module Console # Text markup that turns text between them a certain color def markup_colors { - "`" => :cyan, '"' => :purple, "'" => :purple, "$" => :green, "~" => :red + "`" => :cyan, '"' => :purple, "==" => :purple, "$" => :green, "~" => :red } end diff --git a/Data/Scripts/001_Technical/005_PluginManager.rb b/Data/Scripts/001_Technical/005_PluginManager.rb index 234d0886a..2c2a56578 100644 --- a/Data/Scripts/001_Technical/005_PluginManager.rb +++ b/Data/Scripts/001_Technical/005_PluginManager.rb @@ -651,7 +651,7 @@ module PluginManager # try to run the code begin eval(code, TOPLEVEL_BINDING, fname) - Console.echoln_li "Loaded plugin: '#{name}' (ver. #{meta[:version]})" if !echoed_plugins.include?(name) + Console.echoln_li "Loaded plugin: ==#{name}== (ver. #{meta[:version]})" if !echoed_plugins.include?(name) echoed_plugins.push(name) rescue Exception # format error message to display self.pluginErrorMsg(name, sname) diff --git a/Data/Scripts/004_Game classes/009_Game_Player.rb b/Data/Scripts/004_Game classes/009_Game_Player.rb index 9bceb6e22..227cdc528 100644 --- a/Data/Scripts/004_Game classes/009_Game_Player.rb +++ b/Data/Scripts/004_Game classes/009_Game_Player.rb @@ -517,6 +517,7 @@ class Game_Player < Game_Character @pattern = p if !@lock_pattern @pattern_surf = p @bob_height = (p >= 2) ? 2 : 0 + @anime_count = 0 else @bob_height = 0 super diff --git a/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb b/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb index b9f937319..25696bcb9 100644 --- a/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb +++ b/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb @@ -741,7 +741,7 @@ class Battle::Move::RaiseTargetAttack1 < Battle::Move return false if damagingMove? failed = true targets.each do |b| - next if b.pbCanRaiseStatStage?(:ATTACK, user, self) + next if !b.pbCanRaiseStatStage?(:ATTACK, user, self) failed = false break end diff --git a/Data/Scripts/012_Overworld/007_Overworld_DayCare.rb b/Data/Scripts/012_Overworld/007_Overworld_DayCare.rb index 58b4dd7fb..a32cfc714 100644 --- a/Data/Scripts/012_Overworld/007_Overworld_DayCare.rb +++ b/Data/Scripts/012_Overworld/007_Overworld_DayCare.rb @@ -463,7 +463,7 @@ class DayCare day_care.reset_egg_counters end - def self.choose(text, choice_var) + def self.choose(message, choice_var) day_care = $PokemonGlobal.day_care case day_care.count when 0 @@ -474,13 +474,13 @@ class DayCare commands = [] indices = [] day_care.slots.each_with_index do |slot, i| - text = slot.choice_text - next if !text - commands.push(text) + choice_text = slot.choice_text + next if !choice_text + commands.push(choice_text) indices.push(i) end commands.push(_INTL("CANCEL")) - command = pbMessage(text, commands, commands.length) + command = pbMessage(message, commands, commands.length) $game_variables[choice_var] = (command == commands.length - 1) ? -1 : indices[command] end end diff --git a/Data/Scripts/013_Items/002_Item_Effects.rb b/Data/Scripts/013_Items/002_Item_Effects.rb index 94635e7d2..76989c02e 100644 --- a/Data/Scripts/013_Items/002_Item_Effects.rb +++ b/Data/Scripts/013_Items/002_Item_Effects.rb @@ -1210,7 +1210,7 @@ ItemHandlers::UseOnPokemon.add(:ROTOMCATALOG, proc { |item, qty, pkmn, scene| _INTL("Cancel") ] new_form = scene.pbShowCommands(_INTL("Which appliance would you like to order?"), - commands, pkmn.form) + choices, pkmn.form) if new_form == pkmn.form scene.pbDisplay(_INTL("It won't have any effect.")) next false diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb index 08b9a2da5..a2eb88e22 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb @@ -1009,7 +1009,7 @@ class Pokemon # @param value [Integer] a value that may be used by the evolution method # @return [Symbol, nil] the ID of the species to evolve into def check_evolution_by_event(value = 0) - return check_evolution_internal { |pkmn, new_species, method, parameter, value| + return check_evolution_internal { |pkmn, new_species, method, parameter| success = GameData::Evolution.get(method).call_event(pkmn, parameter, value) next (success) ? new_species : nil } diff --git a/Data/Scripts/016_UI/005_UI_Party.rb b/Data/Scripts/016_UI/005_UI_Party.rb index 89466a525..f5e59eeed 100644 --- a/Data/Scripts/016_UI/005_UI_Party.rb +++ b/Data/Scripts/016_UI/005_UI_Party.rb @@ -383,11 +383,11 @@ class PokemonPartyPanel < SpriteWrapper # Draw status status = -1 if @pokemon.fainted? - status = GameData::Status.count + status = GameData::Status.count - 1 elsif @pokemon.status != :NONE status = GameData::Status.get(@pokemon.status).icon_position elsif @pokemon.pokerusStage == 1 - status = GameData::Status.count + 1 + status = GameData::Status.count end if status >= 0 statusrect = Rect.new(0, 16 * status, 44, 16) diff --git a/Data/Scripts/016_UI/006_UI_Summary.rb b/Data/Scripts/016_UI/006_UI_Summary.rb index a9a55bf22..b6d957f68 100644 --- a/Data/Scripts/016_UI/006_UI_Summary.rb +++ b/Data/Scripts/016_UI/006_UI_Summary.rb @@ -314,11 +314,11 @@ class PokemonSummary_Scene # Show status/fainted/Pokérus infected icon status = -1 if @pokemon.fainted? - status = GameData::Status.count + status = GameData::Status.count - 1 elsif @pokemon.status != :NONE status = GameData::Status.get(@pokemon.status).icon_position elsif @pokemon.pokerusStage == 1 - status = GameData::Status.count + 1 + status = GameData::Status.count end if status >= 0 imagepos.push(["Graphics/Pictures/statuses", 124, 100, 0, 16 * status, 44, 16]) diff --git a/Data/Scripts/016_UI/016_UI_ReadyMenu.rb b/Data/Scripts/016_UI/016_UI_ReadyMenu.rb index cc878efce..3c3ad1918 100644 --- a/Data/Scripts/016_UI/016_UI_ReadyMenu.rb +++ b/Data/Scripts/016_UI/016_UI_ReadyMenu.rb @@ -305,8 +305,8 @@ def pbUseKeyItem :WATERFALL, :WHIRLPOOL] real_moves = [] moves.each do |move| - $player.pokemon_party.each_with_index do |pkmn, i| - next if !pkmn.hasMove?(move) + $player.party.each_with_index do |pkmn, i| + next if pkmn.egg? || !pkmn.hasMove?(move) real_moves.push([move, i]) if pbCanUseHiddenMove?(pkmn, move, false) end end diff --git a/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb b/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb index e67702065..9bbc595b8 100644 --- a/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb +++ b/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb @@ -56,9 +56,11 @@ def pbAddPokemon(pkmn, level = 1, see_form = true) species_name = pkmn.speciesName pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, species_name)) was_owned = $player.owned?(pkmn.species) + $player.pokedex.set_seen(pkmn.species) + $player.pokedex.set_owned(pkmn.species) $player.pokedex.register(pkmn) if see_form # Show Pokédex entry for new species if it hasn't been owned before - if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex + if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned && $player.has_pokedex pbMessage(_INTL("{1}'s data was added to the Pokédex.", species_name)) $player.pokedex.register_last_seen(pkmn) pbFadeOutIn { @@ -75,8 +77,9 @@ end def pbAddPokemonSilent(pkmn, level = 1, see_form = true) return false if !pkmn || pbBoxesFull? pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon) - $player.pokedex.register(pkmn) if see_form + $player.pokedex.set_seen(pkmn.species) $player.pokedex.set_owned(pkmn.species) + $player.pokedex.register(pkmn) if see_form pkmn.record_first_moves if $player.party_full? $PokemonStorage.pbStoreCaught(pkmn) @@ -95,9 +98,11 @@ def pbAddToParty(pkmn, level = 1, see_form = true) species_name = pkmn.speciesName pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, species_name)) was_owned = $player.owned?(pkmn.species) + $player.pokedex.set_seen(pkmn.species) + $player.pokedex.set_owned(pkmn.species) $player.pokedex.register(pkmn) if see_form # Show Pokédex entry for new species if it hasn't been owned before - if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex + if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned && $player.has_pokedex pbMessage(_INTL("{1}'s data was added to the Pokédex.", species_name)) $player.pokedex.register_last_seen(pkmn) pbFadeOutIn { @@ -133,10 +138,11 @@ def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon.\1", $player.name)) end was_owned = $player.owned?(pkmn.species) - $player.pokedex.register(pkmn) if see_form + $player.pokedex.set_seen(pkmn.species) $player.pokedex.set_owned(pkmn.species) + $player.pokedex.register(pkmn) if see_form # Show Pokédex entry for new species if it hasn't been owned before - if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex + if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned && $player.has_pokedex pbMessage(_INTL("The Pokémon's data was added to the Pokédex.")) $player.pokedex.register_last_seen(pkmn) pbFadeOutIn { diff --git a/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb b/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb index 74c3d1972..68dd87263 100644 --- a/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb +++ b/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb @@ -31,7 +31,10 @@ module Compiler ["pbEggGenerated?", "DayCare.egg_generated?"], ["pbDayCareGenerateEgg", "DayCare.collect_egg"], ["get_character(0)", "get_self"], - ["get_character(-1)", "get_player"] + ["get_character(-1)", "get_player"], + ["pbCheckAble", "$player.has_other_able_pokemon?"], + ["$PokemonTemp.lastbattle", "$game_temp.last_battle_record"], + ["calcStats", "calc_stats"] ] module_function @@ -905,12 +908,33 @@ module Compiler return ret end + # Splits the given code string into an array of parameters (all strings), + # using "," as the delimiter. It will not split in the middle of a string + # parameter. Used to extract parameters from a script call in an event. + def split_string_with_quotes(str) + ret = [] + new_str = "" + in_msg = false + str.scan(/./) do |s| + if s == "," && !in_msg + ret.push(new_str.strip) + new_str = "" + else + in_msg = !in_msg if s == "\"" + new_str += s + end + end + new_str.strip! + ret.push(new_str) if !new_str.empty? + return ret + end + def replace_old_battle_scripts(event, list, index) changed = false script = list[index].parameters[1] if script[/^\s*pbWildBattle\((.+)\)\s*$/] - battle_params = $1.split(",") - list[index].parameters[1] = sprintf("WildBattle.start(#{battle_params[0].strip}, #{battle_params[1].strip})") + battle_params = split_string_with_quotes($1) # Split on commas + list[index].parameters[1] = sprintf("WildBattle.start(#{battle_params[0]}, #{battle_params[1]})") old_indent = list[index].indent new_events = [] if battle_params[3] && battle_params[3][/false/] @@ -919,15 +943,15 @@ module Compiler if battle_params[4] && battle_params[4][/true/] push_script(new_events, "setBattleRule(\"canLose\")", old_indent) end - if battle_params[2] && battle_params[2].strip != "1" - push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[2].strip})", old_indent) + if battle_params[2] && battle_params[2] != "1" + push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[2]})", old_indent) end list[index, 0] = new_events if new_events.length > 0 changed = true elsif script[/^\s*pbDoubleWildBattle\((.+)\)\s*$/] - battle_params = $1.split(",") - pkmn1 = "#{battle_params[0].strip}, #{battle_params[1].strip}" - pkmn2 = "#{battle_params[2].strip}, #{battle_params[3].strip}" + battle_params = split_string_with_quotes($1) # Split on commas + pkmn1 = "#{battle_params[0]}, #{battle_params[1]}" + pkmn2 = "#{battle_params[2]}, #{battle_params[3]}" list[index].parameters[1] = sprintf("WildBattle.start(#{pkmn1}, #{pkmn2})") old_indent = list[index].indent new_events = [] @@ -937,16 +961,16 @@ module Compiler if battle_params[4] && battle_params[6][/true/] push_script(new_events, "setBattleRule(\"canLose\")", old_indent) end - if battle_params[2] && battle_params[4].strip != "1" - push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[4].strip})", old_indent) + if battle_params[2] && battle_params[4] != "1" + push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[4]})", old_indent) end list[index, 0] = new_events if new_events.length > 0 changed = true elsif script[/^\s*pbTripleWildBattle\((.+)\)\s*$/] - battle_params = $1.split(",") - pkmn1 = "#{battle_params[0].strip}, #{battle_params[1].strip}" - pkmn2 = "#{battle_params[2].strip}, #{battle_params[3].strip}" - pkmn3 = "#{battle_params[4].strip}, #{battle_params[5].strip}" + battle_params = split_string_with_quotes($1) # Split on commas + pkmn1 = "#{battle_params[0]}, #{battle_params[1]}" + pkmn2 = "#{battle_params[2]}, #{battle_params[3]}" + pkmn3 = "#{battle_params[4]}, #{battle_params[5]}" list[index].parameters[1] = sprintf("WildBattle.start(#{pkmn1}, #{pkmn2}, #{pkmn3})") old_indent = list[index].indent new_events = [] @@ -956,22 +980,26 @@ module Compiler if battle_params[4] && battle_params[8][/true/] push_script(new_events, "setBattleRule(\"canLose\")", old_indent) end - if battle_params[2] && battle_params[6].strip != "1" - push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[6].strip})", old_indent) + if battle_params[2] && battle_params[6] != "1" + push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[6]})", old_indent) end list[index, 0] = new_events if new_events.length > 0 changed = true elsif script[/^\s*pbTrainerBattle\((.+)\)\s*$/] - battle_params = $1.split(",") - trainer1 = "#{battle_params[0].strip}, #{battle_params[1].strip}" - trainer1 += ", #{battle_params[4].strip}" if battle_params[4] && battle_params[4].strip != "nil" + echoln "" + echoln $1 + battle_params = split_string_with_quotes($1) # Split on commas + echoln battle_params + trainer1 = "#{battle_params[0]}, #{battle_params[1]}" + trainer1 += ", #{battle_params[4]}" if battle_params[4] && battle_params[4] != "nil" list[index].parameters[1] = "TrainerBattle.start(#{trainer1})" old_indent = list[index].indent new_events = [] - if battle_params[2] && !battle_params[2].strip.empty? && battle_params[2].strip != "nil" - speech = battle_params[2].gsub(/^\s*_I\(\s*"\s*/, "") - speech.gsub!(/\"\s*\)\s*$/, "").strip - push_comment(new_events, "EndSpeech: #{speech}", old_indent) + if battle_params[2] && !battle_params[2].empty? && battle_params[2] != "nil" + echoln battle_params[2] + speech = battle_params[2].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "") + echoln speech + push_comment(new_events, "EndSpeech: #{speech.strip}", old_indent) end if battle_params[3] && battle_params[3][/true/] push_script(new_events, "setBattleRule(\"double\")", old_indent) @@ -979,69 +1007,64 @@ module Compiler if battle_params[5] && battle_params[5][/true/] push_script(new_events, "setBattleRule(\"canLose\")", old_indent) end - if battle_params[6] && battle_params[6].strip != "1" - push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[6].strip})", old_indent) + if battle_params[6] && battle_params[6] != "1" + push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[6]})", old_indent) end list[index, 0] = new_events if new_events.length > 0 changed = true elsif script[/^\s*pbDoubleTrainerBattle\((.+)\)\s*$/] - battle_params = $1.split(",") - trainer1 = "#{battle_params[0].strip}, #{battle_params[1].strip}" - trainer1 += ", #{battle_params[2].strip}" if battle_params[2] && battle_params[2].strip != "nil" - trainer2 = "#{battle_params[4].strip}, #{battle_params[5].strip}" - trainer2 += ", #{battle_params[6].strip}" if battle_params[6] && battle_params[6].strip != "nil" + battle_params = split_string_with_quotes($1) # Split on commas + trainer1 = "#{battle_params[0]}, #{battle_params[1]}" + trainer1 += ", #{battle_params[2]}" if battle_params[2] && battle_params[2] != "nil" + trainer2 = "#{battle_params[4]}, #{battle_params[5]}" + trainer2 += ", #{battle_params[6]}" if battle_params[6] && battle_params[6] != "nil" list[index].parameters[1] = "TrainerBattle.start(#{trainer1}, #{trainer2})" old_indent = list[index].indent new_events = [] - if battle_params[3] && !battle_params[3].strip.empty? && battle_params[3].strip != "nil" - speech = battle_params[3].gsub(/^\s*_I\(\s*"\s*/, "") - speech.gsub!(/\"\s*\)\s*$/, "").strip - push_comment(new_events, "EndSpeech1: #{speech}", old_indent) + if battle_params[3] && !battle_params[3].empty? && battle_params[3] != "nil" + speech = battle_params[3].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "") + push_comment(new_events, "EndSpeech1: #{speech.strip}", old_indent) end - if battle_params[7] && !battle_params[7].strip.empty? && battle_params[7].strip != "nil" - speech = battle_params[7].gsub(/^\s*_I\(\s*"\s*/, "") - speech.gsub!(/\"\s*\)\s*$/, "").strip - push_comment(new_events, "EndSpeech2: #{speech}", old_indent) + if battle_params[7] && !battle_params[7].empty? && battle_params[7] != "nil" + speech = battle_params[7].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "") + push_comment(new_events, "EndSpeech2: #{speech.strip}", old_indent) end if battle_params[8] && battle_params[8][/true/] push_script(new_events, "setBattleRule(\"canLose\")", old_indent) end - if battle_params[9] && battle_params[9].strip != "1" - push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[9].strip})", old_indent) + if battle_params[9] && battle_params[9] != "1" + push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[9]})", old_indent) end list[index, 0] = new_events if new_events.length > 0 changed = true elsif script[/^\s*pbTripleTrainerBattle\((.+)\)\s*$/] - battle_params = $1.split(",") - trainer1 = "#{battle_params[0].strip}, #{battle_params[1].strip}" - trainer1 += ", #{battle_params[2].strip}" if battle_params[2] && battle_params[2].strip != "nil" - trainer2 = "#{battle_params[4].strip}, #{battle_params[5].strip}" - trainer2 += ", #{battle_params[6].strip}" if battle_params[6] && battle_params[6].strip != "nil" - trainer3 = "#{battle_params[8].strip}, #{battle_params[9].strip}" - trainer3 += ", #{battle_params[10].strip}" if battle_params[10] && battle_params[10].strip != "nil" + battle_params = split_string_with_quotes($1) # Split on commas + trainer1 = "#{battle_params[0]}, #{battle_params[1]}" + trainer1 += ", #{battle_params[2]}" if battle_params[2] && battle_params[2] != "nil" + trainer2 = "#{battle_params[4]}, #{battle_params[5]}" + trainer2 += ", #{battle_params[6]}" if battle_params[6] && battle_params[6] != "nil" + trainer3 = "#{battle_params[8]}, #{battle_params[9]}" + trainer3 += ", #{battle_params[10]}" if battle_params[10] && battle_params[10] != "nil" list[index].parameters[1] = "TrainerBattle.start(#{trainer1}, #{trainer2}, #{trainer3})" old_indent = list[index].indent new_events = [] - if battle_params[3] && !battle_params[3].strip.empty? && battle_params[3].strip != "nil" - speech = battle_params[3].gsub(/^\s*_I\(\s*"\s*/, "") - speech.gsub!(/\"\s*\)\s*$/, "").strip - push_comment(new_events, "EndSpeech1: #{speech}", old_indent) + if battle_params[3] && !battle_params[3].empty? && battle_params[3] != "nil" + speech = battle_params[3].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "") + push_comment(new_events, "EndSpeech1: #{speech.strip}", old_indent) end - if battle_params[7] && !battle_params[7].strip.empty? && battle_params[7].strip != "nil" - speech = battle_params[7].gsub(/^\s*_I\(\s*"\s*/, "") - speech.gsub!(/\"\s*\)\s*$/, "").strip - push_comment(new_events, "EndSpeech2: #{speech}", old_indent) + if battle_params[7] && !battle_params[7].empty? && battle_params[7] != "nil" + speech = battle_params[7].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "") + push_comment(new_events, "EndSpeech2: #{speech.strip}", old_indent) end - if battle_params[7] && !battle_params[7].strip.empty? && battle_params[11].strip != "nil" - speech = battle_params[11].gsub(/^\s*_I\(\s*"\s*/, "") - speech.gsub!(/\"\s*\)\s*$/, "").strip - push_comment(new_events, "EndSpeech3: #{speech}", old_indent) + if battle_params[7] && !battle_params[7].empty? && battle_params[11] != "nil" + speech = battle_params[11].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "") + push_comment(new_events, "EndSpeech3: #{speech.strip}", old_indent) end if battle_params[12] && battle_params[12][/true/] push_script(new_events, "setBattleRule(\"canLose\")", old_indent) end - if battle_params[13] && battle_params[13].strip != "1" - push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[13].strip})", old_indent) + if battle_params[13] && battle_params[13] != "1" + push_script(new_events, "setBattleRule(\"outcome\", #{battle_params[13]})", old_indent) end list[index, 0] = new_events if new_events.length > 0 changed = true diff --git a/PBS/trainer_types.txt b/PBS/trainer_types.txt index d414097af..68e2e7280 100644 --- a/PBS/trainer_types.txt +++ b/PBS/trainer_types.txt @@ -314,88 +314,88 @@ Name = Gym Leader Gender = Male BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Misty] Name = Gym Leader Gender = Female BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Surge] Name = Gym Leader Gender = Male BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Erika] Name = Gym Leader Gender = Female BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Koga] Name = Gym Leader Gender = Male BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Sabrina] Name = Gym Leader Gender = Female BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Blaine] Name = Gym Leader Gender = Male BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [LEADER_Giovanni] Name = Gym Leader Gender = Male BaseMoney = 100 BattleBGM = Battle Gym Leader -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [ELITEFOUR_Lorelei] Name = Elite Four Gender = Female BaseMoney = 100 BattleBGM = Battle Elite -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [ELITEFOUR_Bruno] Name = Elite Four Gender = Male BaseMoney = 100 BattleBGM = Battle Elite -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [ELITEFOUR_Agatha] Name = Elite Four Gender = Female BaseMoney = 100 BattleBGM = Battle Elite -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [ELITEFOUR_Lance] Name = Elite Four Gender = Male BaseMoney = 100 BattleBGM = Battle Elite -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader #------------------------------- [CHAMPION] Name = Champion Gender = Male BaseMoney = 100 BattleBGM = Battle Champion -VictoryME = Battle victory leader +VictoryBGM = Battle victory leader diff --git a/README.md b/README.md index de285f6de..63ec72ee9 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# Pokémon Essentials +# Pokémon Essentials -Based on Essentials v19. +Based on Essentials v20. You can build your fangame on top of a fork of this repository. Doing so will let you update your fangame with improvements made to this repo as soon as they are made. ## Usage 1. Fork this repo. -2. Get a copy of Essentials v19 (a download link cannot be provided here). -3. Clone your forked repo into the Essentials v19 folder, replacing the existing files with the ones from the repo. +2. Get a copy of Essentials v20 (a download link cannot be provided here). +3. Clone your forked repo into the Essentials v20 folder, replacing the existing files with the ones from the repo. From here, you can edit this project to turn it into your fangame/develop mods. When this repo is updated, you can pull the changes to update your fork and get the updates into your fangame/modding environment.