diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index 6f0ac9c74..2af9e8509 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Map001.rxdata b/Data/Map001.rxdata index 3abea0a48..0d6829703 100644 Binary files a/Data/Map001.rxdata and b/Data/Map001.rxdata differ diff --git a/Data/Map006.rxdata b/Data/Map006.rxdata index a9a52c6f0..6ff1e2aa2 100644 Binary files a/Data/Map006.rxdata and b/Data/Map006.rxdata differ diff --git a/Data/Map017.rxdata b/Data/Map017.rxdata index 2d6a46364..fd3eac8cb 100644 Binary files a/Data/Map017.rxdata and b/Data/Map017.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index fdb3d0436..63e537812 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index d96748d26..2ce5852d3 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -5,8 +5,8 @@ #==============================================================================# module Settings # The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format. - GAME_VERSION = '6.4.5' - GAME_VERSION_NUMBER = "6.4.5" + GAME_VERSION = '6.4.6' + GAME_VERSION_NUMBER = "6.4.6" LATEST_GAME_RELEASE = "6.4" POKERADAR_LIGHT_ANIMATION_RED_ID = 17 diff --git a/Data/Scripts/052_AddOns/GameplayUtils.rb b/Data/Scripts/052_AddOns/GameplayUtils.rb index 7f8d8ac9f..99740f82f 100644 --- a/Data/Scripts/052_AddOns/GameplayUtils.rb +++ b/Data/Scripts/052_AddOns/GameplayUtils.rb @@ -1640,3 +1640,46 @@ def fixMissedHMs() pbReceiveItem(:HM10) end end + + +def fixFinishedRocketQuests() + fix_broken_TR_quests() + + var_tr_missions_cerulean = 288 + + switch_tr_mission_cerulean_4 = 1116 + switch_tr_mission_celadon_1 = 1084 + switch_tr_mission_celadon_2 = 1086 + switch_tr_mission_celadon_3 = 1088 + switch_tr_mission_celadon_4 = 1110 + switch_pinkan_done = 1119 + + nb_cerulean_missions = pbGet(var_tr_missions_cerulean) + + finishTRQuest("tr_cerulean_1",:SUCCESS,true) if nb_cerulean_missions >= 1 && !pbCompletedQuest?("tr_cerulean_1") + echoln pbCompletedQuest?("tr_cerulean_1") + finishTRQuest("tr_cerulean_2",:SUCCESS,true) if nb_cerulean_missions >= 2 && !pbCompletedQuest?("tr_cerulean_2") + finishTRQuest("tr_cerulean_3",:SUCCESS,true) if nb_cerulean_missions >= 3 && !pbCompletedQuest?("tr_cerulean_3") + finishTRQuest("tr_cerulean_4",:SUCCESS,true) if $game_switches[switch_tr_mission_cerulean_4] && !pbCompletedQuest?("tr_cerulean_4") + + finishTRQuest("tr_celadon_1",:SUCCESS,true) if $game_switches[switch_tr_mission_celadon_1] && !pbCompletedQuest?("tr_celadon_1") + finishTRQuest("tr_celadon_2",:SUCCESS,true) if $game_switches[switch_tr_mission_celadon_2] && !pbCompletedQuest?("tr_celadon_2") + finishTRQuest("tr_celadon_3",:SUCCESS,true) if $game_switches[switch_tr_mission_celadon_3] && !pbCompletedQuest?("tr_celadon_3") + finishTRQuest("tr_celadon_4",:SUCCESS,true) if $game_switches[switch_tr_mission_celadon_4] && !pbCompletedQuest?("tr_celadon_4") + + finishTRQuest("tr_pinkan",:SUCCESS,true) if $game_switches[switch_pinkan_done] && !pbCompletedQuest?("tr_pinkan") +end + + def fix_broken_TR_quests() + for trainer_quest in $Trainer.quests + if trainer_quest.id ==0 #tr quests were all set to ID 0 instead of their real ID in v 6.4.0 + for rocket_quest_id in TR_QUESTS.keys + rocket_quest = TR_QUESTS[rocket_quest_id] + next if !rocket_quest + if trainer_quest.name == rocket_quest.name + trainer_quest.id = rocket_quest_id + end + end + end + end + end \ No newline at end of file diff --git a/Data/Scripts/052_AddOns/QuestLogScript.rb b/Data/Scripts/052_AddOns/QuestLogScript.rb index 8ed6577a7..bc0cefcc4 100644 --- a/Data/Scripts/052_AddOns/QuestLogScript.rb +++ b/Data/Scripts/052_AddOns/QuestLogScript.rb @@ -92,7 +92,7 @@ QUESTS = { #Cerulean hotel 3 => Quest.new(3, "Playing Cupid", "A boy in Cerulean City wants you bring a love letter to a Pokémon Breeder named Maude. She's probably somewhere in one of the routes near Cerulean City", QuestBranchHotels, "BW (18)", "Cerulean City", HotelQuestColor), 4 => Quest.new(4, "Fishing for Sole", "A fisherman wants you to fish up an old boot. Hook it up with the old rod in any body of water.", QuestBranchHotels, "BW (71)", "Cerulean City", HotelQuestColor), - 5 => Quest.new(5, "Johto Pokémon", "An traveler in the PokéMart wants you to show him a Pokémon native to the Johto region.", QuestBranchHotels, "traveler_johto", "Cerulean City", HotelQuestColor), + 5 => Quest.new(5, "Johto Pokémon", "A traveler in the PokéMart wants you to show him a Pokémon native to the Johto region.", QuestBranchHotels, "traveler_johto", "Cerulean City", HotelQuestColor), "cerulean_2" => Quest.new(5, "Type Experts", "Defeat all of the Type Experts scattered around the Kanto region (#{pbGet(VAR_TYPE_EXPERTS_BEATEN)}/#{TOTAL_NB_TYPE_EXPERTS})", QuestBranchHotels, "expert-normal", "Cerulean City", HotelQuestColor), #Route 24 @@ -267,6 +267,10 @@ end def pbSetQuest(id, completed) $Trainer.quests = [] if $Trainer.quests.class == NilClass for q in $Trainer.quests + echoln id + echoln q.id + echoln q.completed + echoln "----" q.completed = completed if q.id == id end end @@ -328,12 +332,26 @@ class Questlog @box = 0 @completed = [] @ongoing = [] + echoln "BEFORE:" + for trainer_quest in $Trainer.quests + echoln "id: #{trainer_quest.id} completed: #{trainer_quest.completed}" + end + echoln "----------" + + fix_broken_TR_quests() for q in $Trainer.quests @ongoing << q if !q.completed && @ongoing.include?(q) @completed << q if q.completed && @completed.include?(q) end + echoln "AFTER:" + + for trainer_quest in $Trainer.quests + echoln "id: #{trainer_quest.id} completed: #{trainer_quest.completed}" + end + for q in $Trainer.quests + echoln "#{q.id}: #{q.completed}" @ongoing << q if !q.completed @completed << q if q.completed end @@ -376,6 +394,7 @@ class Questlog pbUpdate end + def pbUpdate @frame = 0 loop do @@ -385,13 +404,13 @@ class Questlog if @scene == 0 break if Input.trigger?(Input::B) pbList(@sel_one) if Input.trigger?(Input::C) - pbSwitch(:DOWN) if Input.trigger?(Input::DOWN) + pbSwitch(:DOWN) if Input.press?(Input::DOWN) pbSwitch(:UP) if Input.trigger?(Input::UP) end if @scene == 1 pbMain if Input.trigger?(Input::B) - pbMove(:DOWN) if Input.trigger?(Input::DOWN) - pbMove(:UP) if Input.trigger?(Input::UP) + pbMove(:DOWN) if Input.press?(Input::DOWN) + pbMove(:UP) if Input.press?(Input::UP) pbLoad(0) if Input.trigger?(Input::C) pbArrows end @@ -640,7 +659,6 @@ class Questlog end def pbMove(dir) - pbWait(1) if dir == :DOWN return if @sel_two == @ongoing.size - 1 && @mode == 0 return if @sel_two == @completed.size - 1 && @mode == 1 @@ -743,10 +761,11 @@ class Questlog end end end + pbWait(4) end def pbList(id) - pbWait(1) + pbWait(2) @sel_two = 0 @page = 0 @scene = 1 diff --git a/Data/Scripts/052_AddOns/TRQuests.rb b/Data/Scripts/052_AddOns/TRQuests.rb index 82259f432..7d0b353a1 100644 --- a/Data/Scripts/052_AddOns/TRQuests.rb +++ b/Data/Scripts/052_AddOns/TRQuests.rb @@ -29,12 +29,9 @@ def acceptTRQuest(id, show_description = true) end def addRocketQuest(id) - echoln $Trainer.quests.length - $Trainer.quests = [] if $Trainer.quests.class == NilClass quest = TR_QUESTS[id] $Trainer.quests << quest if quest - echoln $Trainer.quests.length end def showNewTRMissionMessage(title, description, show_description) @@ -65,17 +62,17 @@ def finishTRQuest(id, status, silent = false) end TR_QUESTS = { - "tr_cerulean_1" => Quest.new(0, "Creepy Crawlies", "The Team Rocket Captain has tasked you with clearing the bug infestation in the temporary Rocket HQ in Cerulean City", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), - "tr_cerulean_2" => Quest.new(0, "No Fishing Zone", "Intimidate the fishermen at Nugget Bridge until they leave the area.", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), - "tr_cerulean_3" => Quest.new(0, "Disobedient Pokémon", "Bring back the Pokémon given by the Team Rocket Captain fainted to teach it a lesson.", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), - "tr_cerulean_4" => Quest.new(0, "Gran Theft Pokémon!", "Follow Petrel and go steal a rare Pokémon from a young girl.", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), + "tr_cerulean_1" => Quest.new("tr_cerulean_1", "Creepy Crawlies", "The Team Rocket Captain has tasked you with clearing the bug infestation in the temporary Rocket HQ in Cerulean City", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), + "tr_cerulean_2" => Quest.new("tr_cerulean_2", "No Fishing Zone", "Intimidate the fishermen at Nugget Bridge until they leave the area.", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), + "tr_cerulean_3" => Quest.new("tr_cerulean_3", "Disobedient Pokémon", "Bring back the Pokémon given by the Team Rocket Captain fainted to teach it a lesson.", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), + "tr_cerulean_4" => Quest.new("tr_cerulean_4", "Gran Theft Pokémon!", "Follow Petrel and go steal a rare Pokémon from a young girl.", QuestBranchRocket, "rocket_petrel", "Cerulean City", TRQuestColor), - "tr_celadon_1" => Quest.new(0, "Supplying the new grunts", "Catch 4 Pokémon with Rocket Balls in the outskirts of Celadon City.", QuestBranchRocket, "rocket_archer", "Celadon City", TRQuestColor), - "tr_celadon_2" => Quest.new(0, "Interception!", "Intercept the TMs shipment to the Celadon Store and pose as the delivery person to deliver fake TMs.", QuestBranchRocket, "rocket_archer", "Celadon City", TRQuestColor), - "tr_celadon_3" => Quest.new(0, "Pokémon Collector", "Go meet a Pokémon collector on Route 22, near Viridian City and get his rare Pokémon.", QuestBranchRocket, "rocket_archer", "Celadon City", TRQuestColor), - "tr_celadon_4" => Quest.new(0, "Operation Shutdown", "The Team Rocket HQ is being raided! Regroup with the rest of the grunts in Goldenrod Tunnel!", QuestBranchRocket, "rocket_archer", "Goldenrod City", TRQuestColor), + "tr_celadon_1" => Quest.new("tr_celadon_1", "Supplying the new grunts", "Catch 4 Pokémon with Rocket Balls in the outskirts of Celadon City.", QuestBranchRocket, "rocket_archer", "Celadon City", TRQuestColor), + "tr_celadon_2" => Quest.new("tr_celadon_2", "Interception!", "Intercept the TMs shipment to the Celadon Store and pose as the delivery person to deliver fake TMs.", QuestBranchRocket, "rocket_archer", "Celadon City", TRQuestColor), + "tr_celadon_3" => Quest.new( "tr_celadon_3", "Pokémon Collector", "Go meet a Pokémon collector on Route 22, near Viridian City and get his rare Pokémon.", QuestBranchRocket, "rocket_archer", "Celadon City", TRQuestColor), + "tr_celadon_4" => Quest.new("tr_celadon_4", "Operation Shutdown", "The Team Rocket HQ is being raided! Regroup with the rest of the grunts in Goldenrod Tunnel!", QuestBranchRocket, "rocket_archer", "Goldenrod City", TRQuestColor), - "tr_pinkan" => Quest.new(0, "Pinkan Island!", "Help Team Rocket with a heist on a Pokémon nature preserve!", QuestBranchRocket, "rocket_archer", "Goldenrod City", TRQuestColor), + "tr_pinkan" => Quest.new("tr_pinkan", "Pinkan Island!", "Help Team Rocket with a heist on a Pokémon nature preserve!", QuestBranchRocket, "rocket_archer", "Goldenrod City", TRQuestColor), } diff --git a/Data/System.rxdata b/Data/System.rxdata index 640d3789a..c01ee2a18 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ