Entering TR HQ after Team Rocket has disbanded automatically completes any unfinished quests

This commit is contained in:
infinitefusion
2025-02-02 14:22:22 -05:00
parent 9d30b0e0fb
commit a62544e8d8
8 changed files with 80 additions and 64 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -851,7 +851,6 @@ def replaceFusionSpecies(pokemon, speciesToChange, newSpecies)
echoln currentBody echoln currentBody
echoln currentHead echoln currentHead
return if !should_update_body && !should_update_head return if !should_update_body && !should_update_head
newSpeciesBody = should_update_body ? newSpecies : currentBody newSpeciesBody = should_update_body ? newSpecies : currentBody
@@ -897,14 +896,22 @@ end
#@formatter:off #@formatter:off
def get_constellation_variable(pokemon) def get_constellation_variable(pokemon)
case pokemon case pokemon
when :IVYSAUR; return VAR_CONSTELLATION_IVYSAUR when :IVYSAUR;
when :WARTORTLE; return VAR_CONSTELLATION_WARTORTLE return VAR_CONSTELLATION_IVYSAUR
when :ARCANINE; return VAR_CONSTELLATION_ARCANINE when :WARTORTLE;
when :MACHOKE; return VAR_CONSTELLATION_MACHOKE return VAR_CONSTELLATION_WARTORTLE
when :RAPIDASH; return VAR_CONSTELLATION_RAPIDASH when :ARCANINE;
when :GYARADOS; return VAR_CONSTELLATION_GYARADOS return VAR_CONSTELLATION_ARCANINE
when :ARTICUNO; return VAR_CONSTELLATION_ARTICUNO when :MACHOKE;
when :MEW; return VAR_CONSTELLATION_MEW return VAR_CONSTELLATION_MACHOKE
when :RAPIDASH;
return VAR_CONSTELLATION_RAPIDASH
when :GYARADOS;
return VAR_CONSTELLATION_GYARADOS
when :ARTICUNO;
return VAR_CONSTELLATION_ARTICUNO
when :MEW;
return VAR_CONSTELLATION_MEW
# when :POLITOED; return VAR_CONSTELLATION_POLITOED # when :POLITOED; return VAR_CONSTELLATION_POLITOED
# when :URSARING; return VAR_CONSTELLATION_URSARING # when :URSARING; return VAR_CONSTELLATION_URSARING
# when :LUGIA; return VAR_CONSTELLATION_LUGIA # when :LUGIA; return VAR_CONSTELLATION_LUGIA
@@ -917,6 +924,7 @@ def get_constellation_variable(pokemon)
# when :ARCEUS; return VAR_CONSTELLATION_ARCEUS # when :ARCEUS; return VAR_CONSTELLATION_ARCEUS
end end
end end
#@formatter:on #@formatter:on
def promptCaughtPokemonAction(pokemon) def promptCaughtPokemonAction(pokemon)
@@ -1493,8 +1501,6 @@ def isPlayerFemale()
return pbGet(VAR_TRAINER_GENDER) == GENDER_FEMALE return pbGet(VAR_TRAINER_GENDER) == GENDER_FEMALE
end end
def optionsMenu(options = [], cmdIfCancel = -1, startingOption = 0) def optionsMenu(options = [], cmdIfCancel = -1, startingOption = 0)
cmdIfCancel = -1 if !cmdIfCancel cmdIfCancel = -1 if !cmdIfCancel
result = pbShowCommands(nil, options, cmdIfCancel, startingOption) result = pbShowCommands(nil, options, cmdIfCancel, startingOption)
@@ -1534,7 +1540,6 @@ QUEST_REWARDS = [
QuestReward.new(60, :MASTERBALL, 1, "This rare ball can catch any Pokémon. Don't waste it!", true), QuestReward.new(60, :MASTERBALL, 1, "This rare ball can catch any Pokémon. Don't waste it!", true),
] ]
def turnEventTowardsEvent(turning, turnedTowards) def turnEventTowardsEvent(turning, turnedTowards)
event_x = turnedTowards.x event_x = turnedTowards.x
event_y = turnedTowards.y event_y = turnedTowards.y
@@ -1563,7 +1568,6 @@ def turnPlayerTowardsEvent(event)
end end
end end
def displaySpriteWindowWithMessage(pif_sprite, message = "", x = 0, y = 0, z = 0) def displaySpriteWindowWithMessage(pif_sprite, message = "", x = 0, y = 0, z = 0)
spriteLoader = BattleSpriteLoader.new spriteLoader = BattleSpriteLoader.new
sprite_bitmap = spriteLoader.load_pif_sprite_directly(pif_sprite) sprite_bitmap = spriteLoader.load_pif_sprite_directly(pif_sprite)
@@ -1586,7 +1590,6 @@ def select_any_pokemon()
return pbChooseList(commands, 0, nil, 1) return pbChooseList(commands, 0, nil, 1)
end end
SWITCH_SS_ANNE_DEPARTED = 88 SWITCH_SS_ANNE_DEPARTED = 88
SWITCH_SNORLAX_GONE_ROUTE_12 = 110 SWITCH_SNORLAX_GONE_ROUTE_12 = 110
SWITCH_TELEPORT_NPC = 122 SWITCH_TELEPORT_NPC = 122
@@ -1641,7 +1644,6 @@ def fixMissedHMs()
end end
end end
def fixFinishedRocketQuests() def fixFinishedRocketQuests()
fix_broken_TR_quests() fix_broken_TR_quests()
@@ -1683,3 +1685,17 @@ end
end end
end end
end end
def failAllIncompleteRocketQuests()
for trainer_quest in $Trainer.quests
finishTRQuest("tr_cerulean_1", :FAILURE) if trainer_quest.id == "tr_cerulean_1" && !pbCompletedQuest?("tr_cerulean_1")
finishTRQuest("tr_cerulean_2", :FAILURE) if trainer_quest.id == "tr_cerulean_2" && !pbCompletedQuest?("tr_cerulean_2")
finishTRQuest("tr_cerulean_3", :FAILURE) if trainer_quest.id == "tr_cerulean_3" && !pbCompletedQuest?("tr_cerulean_3")
finishTRQuest("tr_cerulean_4", :FAILURE) if trainer_quest.id == "tr_cerulean_4" && !pbCompletedQuest?("tr_cerulean_4")
finishTRQuest("tr_celadon_1", :FAILURE) if trainer_quest.id == "tr_celadon_1" && !pbCompletedQuest?("tr_celadon_1")
finishTRQuest("tr_celadon_2", :FAILURE) if trainer_quest.id == "tr_celadon_2" && !pbCompletedQuest?("tr_celadon_2")
finishTRQuest("tr_celadon_3", :FAILURE) if trainer_quest.id == "tr_celadon_3" && !pbCompletedQuest?("tr_celadon_3")
finishTRQuest("tr_celadon_4", :FAILURE) if trainer_quest.id == "tr_celadon_4" && !pbCompletedQuest?("tr_celadon_4")
end
end

Binary file not shown.