mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
6.6 update
This commit is contained in:
8
Data/Scripts/052_InfiniteFusion/Quests/PoliceQuest.rb
Normal file
8
Data/Scripts/052_InfiniteFusion/Quests/PoliceQuest.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
def getBlackMarketOriginalTrainer
|
||||
randomTrainer = GameData::Trainer.list_all.values.sample
|
||||
return randomTrainer
|
||||
# trainer = NPCTrainer.new("", randomTrainer.id)
|
||||
# return trainer
|
||||
end
|
||||
|
||||
|
||||
201
Data/Scripts/052_InfiniteFusion/Quests/QuestIcons.rb
Normal file
201
Data/Scripts/052_InfiniteFusion/Quests/QuestIcons.rb
Normal file
@@ -0,0 +1,201 @@
|
||||
def setDialogIconOff(eventId=nil)
|
||||
eventId = @event_id if !eventId
|
||||
event = $game_map.events[eventId]
|
||||
event.setDialogIconManualOffValue(true)
|
||||
event.setTradeIconManualOffValue(true)
|
||||
end
|
||||
|
||||
def setDialogIconOn(eventId=nil)
|
||||
eventId = @event_id if !eventId
|
||||
event = $game_map.events[eventId]
|
||||
event.setDialogIconManualOffValue(false)
|
||||
event.setTradeIconManualOffValue(false)
|
||||
|
||||
end
|
||||
class Game_Event < Game_Character
|
||||
#set from analyzing the event's content at load
|
||||
attr_accessor :show_quest_icon
|
||||
attr_accessor :show_dialog_icon
|
||||
attr_accessor :show_trade_icon
|
||||
|
||||
#set manually from inside the event when triggered
|
||||
attr_accessor :quest_icon_manual_off
|
||||
attr_accessor :dialog_icon_manual_off
|
||||
attr_accessor :trade_icon_manual_off
|
||||
|
||||
QUEST_NPC_TRIGGER = "questNPC"
|
||||
MAPS_WITH_NO_ICONS = [] #Maps in which the game shouldn't try to look for quest icons(e.g. maps with a lot of events - mostly for possible performance issues)
|
||||
DIALOG_ICON_COMMENT_TRIGGER=["dialogIcon"]
|
||||
TRADE_ICON_COMMENT_TRIGGER=["tradeIcon"]
|
||||
|
||||
alias eventQuestIcon_init initialize
|
||||
def initialize(map_id, event, map=nil)
|
||||
eventQuestIcon_init(map_id, event, map)
|
||||
addQuestMarkersToSprite unless MAPS_WITH_NO_ICONS.include?($game_map.map_id)
|
||||
end
|
||||
|
||||
def setDialogIconManualOffValue(value)
|
||||
@dialog_icon_manual_off=value
|
||||
@show_dialog_icon = !@dialog_icon_manual_off
|
||||
end
|
||||
def setQuestIconManualOffValue(value)
|
||||
@quest_icon_manual_off=value
|
||||
@show_quest_icon = !@quest_icon_manual_off
|
||||
end
|
||||
def setTradeIconManualOffValue(value)
|
||||
@trade_icon_manual_off=value
|
||||
@show_trade_icon = !@trade_icon_manual_off
|
||||
end
|
||||
|
||||
def addQuestMarkersToSprite()
|
||||
@show_quest_icon = detectQuestSwitch(self) && !@quest_icon_manual_off
|
||||
@show_dialog_icon = detectDialogueIcon(self) && !@dialog_icon_manual_off
|
||||
@show_trade_icon = detectTradeIcon(self) && !@trade_icon_manual_off
|
||||
end
|
||||
|
||||
def detectDialogueIcon(event)
|
||||
return nil if !validateEventIsCompatibleWithIcons(event)
|
||||
page = pbGetActiveEventPage(event)
|
||||
first_command = page.list[0]
|
||||
return nil if !(first_command.code == 108 || first_command.code == 408)
|
||||
comments = first_command.parameters
|
||||
return comments.any? { |str| DIALOG_ICON_COMMENT_TRIGGER.include?(str) }
|
||||
end
|
||||
|
||||
def detectTradeIcon(event)
|
||||
return nil if !validateEventIsCompatibleWithIcons(event)
|
||||
page = pbGetActiveEventPage(event)
|
||||
first_command = page.list[0]
|
||||
return nil if !(first_command.code == 108 || first_command.code == 408)
|
||||
comments = first_command.parameters
|
||||
return comments.any? { |str| TRADE_ICON_COMMENT_TRIGGER.include?(str) }
|
||||
end
|
||||
|
||||
def detectQuestSwitch(event)
|
||||
return nil if !validateEventIsCompatibleWithIcons(event)
|
||||
name = event.name.clone
|
||||
match = name.match(/#{Regexp.escape(QUEST_NPC_TRIGGER)}\(([^)]+)\)/) # Capture anything inside parentheses
|
||||
return nil unless match
|
||||
quest_id = match[1]
|
||||
quest_id = quest_id.gsub(/^['"]|['"]$/, '') # Remove quotes if they exist
|
||||
echoln "MATCH"
|
||||
echoln quest_id
|
||||
return nil if isQuestAlreadyAccepted?(quest_id)
|
||||
|
||||
return quest_id
|
||||
end
|
||||
|
||||
def validateEventIsCompatibleWithIcons(event)
|
||||
return false if event.is_a?(Game_Player)
|
||||
return false if event.erased
|
||||
page = pbGetActiveEventPage(event)
|
||||
return false unless page
|
||||
return false if page.graphic.character_name.empty?
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Sprite_Character
|
||||
|
||||
DIALOGUE_ICON_NAME = "Graphics/Pictures/Quests/dialogIcon"
|
||||
QUEST_ICON_NAME = "Graphics/Pictures/Quests/questIcon"
|
||||
TRADE_ICON_NAME = "Graphics/Pictures/Quests/tradeIcon"
|
||||
|
||||
attr_accessor :questIcon
|
||||
alias questIcon_init initialize
|
||||
def initialize(viewport, character = nil, is_follower=nil)
|
||||
questIcon_init(viewport,character)
|
||||
if character.is_a?(Game_Event) && character.show_dialog_icon
|
||||
addQuestMarkerToSprite(:DIALOG_ICON)
|
||||
end
|
||||
if character.is_a?(Game_Event) && character.show_quest_icon
|
||||
addQuestMarkerToSprite(:QUEST_ICON)
|
||||
end
|
||||
if character.is_a?(Game_Event) && character.show_trade_icon
|
||||
addQuestMarkerToSprite(:TRADE_ICON)
|
||||
end
|
||||
#addQuestMarkersToSprite(character) unless MAPS_WITH_NO_ICONS.include?($game_map.map_id)
|
||||
end
|
||||
|
||||
|
||||
|
||||
# def addQuestMarkersToSprite(character)
|
||||
# quest_id = detectQuestSwitch(character)
|
||||
# if quest_id
|
||||
# addQuestMarkerToSprite(:QUEST_ICON)
|
||||
# else
|
||||
# addQuestMarkerToSprite(:DIALOG_ICON) if detectDialogueIcon(character)
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
alias questIcon_update update
|
||||
def update
|
||||
questIcon_update
|
||||
updateGameEvent if @character.is_a?(Game_Event)
|
||||
end
|
||||
|
||||
def updateGameEvent
|
||||
removeQuestIcon if !@character.show_dialog_icon && !@character.show_quest_icon && !@character.show_trade_icon
|
||||
positionQuestIndicator if @questIcon
|
||||
end
|
||||
|
||||
alias questIcon_dispose dispose
|
||||
def dispose
|
||||
questIcon_dispose
|
||||
removeQuestIcon
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
# Event name must contain questNPC(x) for a quest icon to be displayed
|
||||
# Where x is the quest ID
|
||||
# if the quest has not already been accepted, the quest marker will be shown
|
||||
|
||||
|
||||
|
||||
|
||||
#type: :QUEST_ICON, :DIALOG_ICON
|
||||
def addQuestMarkerToSprite(iconType)
|
||||
removeQuestIcon if @questIcon
|
||||
@questIcon = Sprite.new(@viewport)
|
||||
case iconType
|
||||
when :QUEST_ICON
|
||||
iconPath = QUEST_ICON_NAME
|
||||
when :DIALOG_ICON
|
||||
iconPath = DIALOGUE_ICON_NAME
|
||||
when :TRADE_ICON
|
||||
iconPath = TRADE_ICON_NAME
|
||||
end
|
||||
return if !iconPath
|
||||
@questIcon.bmp(iconPath)
|
||||
echoln @questIcon.bitmap
|
||||
positionQuestIndicator if @questIcon
|
||||
end
|
||||
|
||||
def positionQuestIndicator()
|
||||
return if !@questIcon
|
||||
return if !@questIcon.bitmap
|
||||
|
||||
y_offset =-70
|
||||
|
||||
@questIcon.ox = @questIcon.bitmap.width / 2.0
|
||||
@questIcon.oy = @questIcon.bitmap.height / 2.0
|
||||
|
||||
x_position = @character.screen_x
|
||||
y_position = @character.screen_y + y_offset
|
||||
@questIcon.x = x_position
|
||||
@questIcon.y = y_position
|
||||
@questIcon.z = 999
|
||||
end
|
||||
|
||||
def removeQuestIcon()
|
||||
@questIcon.dispose if @questIcon
|
||||
@questIcon = nil
|
||||
end
|
||||
|
||||
end
|
||||
1109
Data/Scripts/052_InfiniteFusion/Quests/QuestLogScript.rb
Normal file
1109
Data/Scripts/052_InfiniteFusion/Quests/QuestLogScript.rb
Normal file
File diff suppressed because it is too large
Load Diff
136
Data/Scripts/052_InfiniteFusion/Quests/Quests.rb
Normal file
136
Data/Scripts/052_InfiniteFusion/Quests/Quests.rb
Normal file
@@ -0,0 +1,136 @@
|
||||
def define_quest(quest_id,quest_type,quest_name,quest_description,quest_location,npc_sprite)
|
||||
case quest_type
|
||||
when :HOTEL_QUEST
|
||||
text_color = HotelQuestColor
|
||||
when :FIELD_QUEST
|
||||
text_color = FieldQuestColor
|
||||
when :LEGENDARY_QUEST
|
||||
text_color = LegendaryQuestColor
|
||||
when :ROCKET_QUEST
|
||||
text_color = TRQuestColor
|
||||
end
|
||||
new_quest = Quest.new(quest_id, quest_name, quest_description, npc_sprite, quest_location, quest_location, text_color)
|
||||
QUESTS[quest_id] = new_quest
|
||||
end
|
||||
|
||||
QUESTS = {
|
||||
#Pokemart
|
||||
"pokemart_johto" => Quest.new("pokemart_johto", "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),
|
||||
"pokemart_hoenn" => Quest.new("pokemart_hoenn", "Hoenn Pokémon", "A traveler in the PokéMart you to show him a Pokémon native to the Hoenn region.", QuestBranchHotels, "traveler_hoenn", "Vermillion City", HotelQuestColor),
|
||||
"pokemart_sinnoh" => Quest.new("pokemart_sinnoh", "Sinnoh Pokémon", "A traveler in the Department Center wants you to show him a Pokémon native to the Sinnoh region.", QuestBranchHotels, "traveler_sinnoh", "Celadon City", HotelQuestColor),
|
||||
"pokemart_unova" => Quest.new( "pokemart_unova", "Unova Pokémon", "A traveler in the PokéMart wants you to show him a Pokémon native to the Unova region.", QuestBranchHotels, "traveler_unova", "Fuchsia City", HotelQuestColor),
|
||||
"pokemart_kalos" => Quest.new("pokemart_kalos", "Kalos Pokémon", "A traveler in the PokéMart wants you to show him a Pokémon native to the Kalos region.", QuestBranchHotels, "traveler_kalos", "Saffron City", HotelQuestColor),
|
||||
"pokemart_alola" => Quest.new("pokemart_alola", "Alola Pokémon", "A traveler in the PokéMart wants you to show him a Pokémon native to the Alola region.", QuestBranchHotels, "traveler_alola", "Cinnabar Island", HotelQuestColor),
|
||||
|
||||
|
||||
#Pewter hotel
|
||||
"pewter_1" => Quest.new("pewter_1", "Mushroom Gathering", "A lady in Pewter City wants you to bring her 3 TinyMushroom from Viridian Forest to make a stew.", QuestBranchHotels, "BW (74)", "Pewter City", HotelQuestColor),
|
||||
"pewter_2" =>Quest.new("pewter_2", "Lost Medicine", "A youngster in Pewter City needs your help to find a lost Revive. He lost it by sitting on a bench somewhere in Pewter City.", QuestBranchHotels, "BW (19)", "Pewter City", HotelQuestColor),
|
||||
"pewter_3" =>Quest.new("pewter_3", "Bug Evolution ", "A Bug Catcher in Pewter City wants you to show him a fully-evolved Bug Pokémon.", QuestBranchHotels, "BWBugCatcher_male", "Pewter City", HotelQuestColor),
|
||||
"pewter_field_1" => Quest.new("pewter_field_1", "Nectar garden", "An old man wants you to bring differently colored flowers for the city's garden.", QuestBranchField, "BW (039)", "Pewter City", FieldQuestColor),
|
||||
"pewter_field_2" => Quest.new("pewter_field_2", "I Choose You!", "A Pikachu in the PokéMart has lost its official Pokémon League Hat. Find one and give it to the Pikachu!", QuestBranchField, "YOUNGSTER_LeagueHat", "Pewter City", FieldQuestColor),
|
||||
"pewter_field_3" => Quest.new("pewter_field_3", "Prehistoric Amber!", "Meetup with a scientist in Viridian Forest to look for prehistoric amber.", QuestBranchField, "BW (82)", "Pewter City", FieldQuestColor),
|
||||
|
||||
#Cerulean hotel
|
||||
"cerulean_1" => Quest.new("cerulean_1", "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),
|
||||
"cerulean_2" => Quest.new("cerulean_2", "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
|
||||
"cerulean_field_1" => Quest.new("cerulean_field_1", "Field Research (Part 1)", "Professor Oak's aide wants you to catch an Abra.", QuestBranchField, "BW (82)", "Route 24", FieldQuestColor),
|
||||
"cerulean_field_2" => Quest.new("cerulean_field_2", "Field Research (Part 2)", "Professor Oak's aide wants you to encounter every Pokémon on Route 24.", QuestBranchField, "BW (82)", "Route 24", FieldQuestColor),
|
||||
"cerulean_field_3" => Quest.new("cerulean_field_3", "Field Research (Part 3)", "Professor Oak's aide wants you to catch a Buneary using the Pokéradar.", QuestBranchField, "BW (82)", "Route 24", FieldQuestColor),
|
||||
|
||||
#Vermillion City
|
||||
"vermillion_2" => Quest.new("vermillion_2", "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),
|
||||
"vermillion_1" => Quest.new("vermillion_1", "Unusual Types 1", "A woman at the hotel wants you to show her a Water/Fire-type Pokémon", QuestBranchHotels, "BW (58)", "Vermillion City", HotelQuestColor),
|
||||
"vermillion_3" => Quest.new("vermillion_3", "Seafood Cocktail ", "Get some steamed Krabby legs from the S.S. Anne's kitchen and bring them back to the hotel before they get cold", QuestBranchHotels, "BW (36)", "Vermillion City", HotelQuestColor),
|
||||
"vermillion_field_1" => Quest.new("vermillion_field_1", "Building Materials ", "Get some wooden planks from Viridian City and some Bricks from Pewter City.", QuestBranchField, "BW (36)", "Vermillion City", FieldQuestColor),
|
||||
"vermillion_field_2" => Quest.new("vermillion_field_2", "Waiter on the Water", "The S.S. Anne waiter wants you to take restaurant orders while he went to get a replacement cake.", QuestBranchField, "BW (53)", "S.S. Anne", FieldQuestColor),
|
||||
|
||||
#Celadon City
|
||||
"celadon_1" => Quest.new("celadon_1", "Sun or Moon", "Show the Pokémon that Eevee evolves when exposed to a Moon or Sun stone to help the scientist with her research.", QuestBranchHotels, "BW (82)", "Celadon City", HotelQuestColor),
|
||||
"celadon_2" => Quest.new("celadon_2", "For Whom the Bell Tolls", "Ring Lavender Town's bell when the time is right to reveal its secret.", QuestBranchHotels, "BW (40)", "Lavender Town", HotelQuestColor),
|
||||
"celadon_3" => Quest.new("celadon_3", "Hardboiled", "A lady wants you to give her an egg to make an omelette.", QuestBranchHotels, "BW (24)", "Celadon City", HotelQuestColor),
|
||||
"celadon_field_1" => Quest.new("celadon_field_1", "A stroll with Eevee!", "Walk Eevee around for a while until it gets tired.", QuestBranchField, "BW (37)", "Celadon City", FieldQuestColor),
|
||||
|
||||
#Fuchsia City
|
||||
"fuchsia_1" => Quest.new("fuchsia_1", "Bicycle Race!", "Go meet the Cyclist at the bottom of Route 17 and beat her time up the Cycling Road!", QuestBranchHotels, "BW032", "Cycling Road", HotelQuestColor),
|
||||
"fuchsia_2" => Quest.new("fuchsia_2", "Lost Pokémon!", "Find the lost Chansey's trainer!", QuestBranchHotels, "113", "Fuchsia City", HotelQuestColor),
|
||||
"fuchsia_3" => Quest.new("fuchsia_3", "Cleaning up the Cycling Road", "Get rid of all the Pokémon dirtying up the Cycling Road.", QuestBranchHotels, "BW (77)", "Fuchsia City", HotelQuestColor),
|
||||
"fuchsia_4" => Quest.new("fuchsia_4", "Bitey Pokémon", "A fisherman wants to know what is the sharp-toothed Pokémon that bit him in the Safari Zone's lake.", QuestBranchHotels, "BW (71)", "Fuchsia City", HotelQuestColor),
|
||||
|
||||
#Crimson City
|
||||
"crimson_1" => Quest.new("crimson_1", "Shellfish Rescue", "Put all the stranded Shellders back in the water on the route to Crimson City.", QuestBranchHotels, "BW (48)", "Crimson City", HotelQuestColor),
|
||||
"crimson_2" => Quest.new("crimson_2", "Fourth Round Rumble", "Defeat Jeanette and her high-level Bellsprout in a Pokémon Battle", QuestBranchHotels, "BW024", "Crimson City", HotelQuestColor),
|
||||
"crimson_3" => Quest.new("crimson_3", "Unusual Types 2", "A woman at the hotel wants you to show her a Normal/Ghost-type Pokémon", QuestBranchHotels, "BW (58)", "Crimson City", HotelQuestColor),
|
||||
"crimson_4" => Quest.new("crimson_4", "The Top of the Waterfall", "Someone wants you to go investigate the top of a waterfall near Crimson City", QuestBranchHotels, "BW (28)", "Crimson City", HotelQuestColor),
|
||||
|
||||
#Saffron City
|
||||
"saffron_1" => Quest.new("saffron_1", "Lost Puppies", "Find all of the missing Growlithe in the routes around Saffron City.", QuestBranchHotels, "BW (73)", "Saffron City", HotelQuestColor),
|
||||
"saffron_2" => Quest.new("saffron_2", "Invisible Pokémon", "Find an invisible Pokémon in the eastern part of Saffron City.", QuestBranchHotels, "BW (57)", "Saffron City", HotelQuestColor),
|
||||
"saffron_3" => Quest.new("saffron_3", "Bad to the Bone!", "Find a Rare Bone using Rock Smash.", QuestBranchHotels, "BW (72)", "Saffron City", HotelQuestColor),
|
||||
"saffron_field_1" => Quest.new("saffron_field_1", "Dancing Queen!", "Dance with the Copycat Girl!", QuestBranchField, "BW (24)", "Saffron City (nightclub)", FieldQuestColor),
|
||||
|
||||
#Cinnabar Island
|
||||
"cinnabar_1" => Quest.new("cinnabar_1", "The transformation Pokémon", "The scientist wants you to find some Quick Powder that can sometimes be found with wild Ditto in the mansion's basement.", QuestBranchHotels, "BW (82)", "Cinnabar Island", HotelQuestColor),
|
||||
"cinnabar_2" => Quest.new("cinnabar_2", "Diamonds and Pearls", "Find a Diamond Necklace to save the man's marriage.", QuestBranchHotels, "BW (71)", "Cinnabar Island", HotelQuestColor),
|
||||
"cinnabar_3" => Quest.new("cinnabar_3", "Stolen artifact", "Recover a stolen vase from a burglar in the Pokémon Mansion", QuestBranchHotels, "BW (21)", "Cinnabar Island", HotelQuestColor),
|
||||
|
||||
#Goldenrod City
|
||||
"goldenrod_1" => Quest.new( "goldenrod_1", "Safari Souvenir!", "Bring back a souvenir from the Fuchsia City Safari Zone", QuestBranchHotels, "BW (28)", "Goldenrod City", HotelQuestColor),
|
||||
"goldenrod_2" => Quest.new("goldenrod_2", "The Cursed Forest", "A child wants you to find a floating tree stump in Ilex Forest. What could she be talking about?", QuestBranchHotels, "BW109", "Goldenrod City", HotelQuestColor),
|
||||
|
||||
"goldenrod_police_1" => Quest.new("goldenrod_police_1", "Undercover police work!", "Go see the police in Goldenrod City to help them with an important police operation.", QuestBranchField, "BW (80)", "Goldenrod City", FieldQuestColor),
|
||||
"pinkan_police" => Quest.new("pinkan_police", "Pinkan Island!", "Team Rocket is planning a heist on Pinkan Island. You joined forces with the police to stop them!", QuestBranchField, "BW (80)", "Goldenrod City", FieldQuestColor),
|
||||
|
||||
#Violet City
|
||||
"violet_1" => Quest.new("violet_1", "Defuse the Pinecones!", "Get rid of all the Pineco on Route 31 and Route 30", QuestBranchHotels, "BW (64)", "Violet City", HotelQuestColor),
|
||||
"violet_2" => Quest.new("violet_2", "Find Slowpoke's Tail!", "Find a SlowpokeTail in some flowers, somewhere around Violet City!", QuestBranchHotels, "BW (19)", "Violet City", HotelQuestColor),
|
||||
|
||||
#Blackthorn City
|
||||
"blackthorn_1" => Quest.new( "blackthorn_1", "Dragon Evolution", "A Dragon Tamer in Blackthorn City wants you to show her a fully-evolved Dragon Pokémon.", QuestBranchHotels, "BW014", "Blackthorn City", HotelQuestColor),
|
||||
"blackthorn_2" => Quest.new("blackthorn_2", "Sunken Treasure!", "Find an old memorabilia on a sunken ship near Cinnabar Island.", QuestBranchHotels, "BW (28)", "Blackthorn City", HotelQuestColor),
|
||||
"blackthorn_3" => Quest.new("blackthorn_3", "The Largest Carp", "A fisherman wants you to fish up a Magikarp that's exceptionally high-level at Dragon's Den.", QuestBranchHotels, "BW (71)", "Blackthorn City", HotelQuestColor),
|
||||
|
||||
#Ecruteak City
|
||||
"ecruteak_1" => Quest.new("ecruteak_1", "Ghost Evolution", "A girl in Ecruteak City wants you to show her a fully-evolved Ghost Pokémon.", QuestBranchHotels, "BW014", "Ecruteak City", HotelQuestColor),
|
||||
|
||||
#Kin Island
|
||||
"kin_1" => Quest.new("kin_1", "Banana Slamma!", "Collect 30 bananas", QuestBranchHotels, "BW059", "Kin Island", HotelQuestColor),
|
||||
"kin_2" => Quest.new("kin_2", "Fallen Meteor", "Investigate a crater near Bond Bridge.", QuestBranchHotels, "BW009", "Kin Island", HotelQuestColor),
|
||||
"kin_field_1" => Quest.new("kin_field_1", "The rarest fish", "A fisherman wants you to show him a Feebas. Apparently they can be fished around the Sevii Islands when it rains.", QuestBranchField, "BW056", "Kin Island", FieldQuestColor),
|
||||
|
||||
"legendary_deoxys_1" => Quest.new("legendary_deoxys_1", "First Contact", "Find the missing pieces of a fallen alien spaceship", QuestBranchHotels, "BW (92)", "Bond Bridge", LegendaryQuestColor),
|
||||
"legendary_deoxys_2" => Quest.new("legendary_deoxys_2", "First Contact (Part 2)", "Ask the sailor at Cinnabar Island's harbour to take you to the uncharted island where the spaceship might be located", QuestBranchHotels, "BW (92)", "Bond Bridge", LegendaryQuestColor),
|
||||
|
||||
#Necrozma quest
|
||||
"legendary_necrozma_1" => Quest.new("legendary_necrozma_1", "Mysterious prisms", "You found a pedestal with a mysterious prism on it. There seems to be room for more prisms.", QuestBranchLegendary, "BW_Sabrina", "Pokémon Tower", LegendaryQuestColor),
|
||||
"legendary_necrozma_2" => Quest.new("legendary_necrozma_2", "The long night (Part 1)", "A mysterious darkness has shrouded some of the region. Meet Sabrina outside of Saffron City's western gate to investigate.", QuestBranchLegendary, "BW_Sabrina", "Lavender Town", LegendaryQuestColor),
|
||||
"legendary_necrozma_3" => Quest.new("legendary_necrozma_1", "The long night (Part 2)", "The mysterious darkness has expended. Meet Sabrina on top of Celadon City's Dept. Store to figure out the source of the darkness.", QuestBranchLegendary, "BW_Sabrina", "Route 7", LegendaryQuestColor),
|
||||
"legendary_necrozma_4" => Quest.new("legendary_necrozma_4", "The long night (Part 3)", "Fuchsia City appears to be unaffected by the darkness. Go investigate to see if you can find out more information.", QuestBranchLegendary, "BW_Sabrina", "Celadon City", LegendaryQuestColor),
|
||||
"legendary_necrozma_5" => Quest.new("legendary_necrozma_5", "The long night (Part 4)", "The mysterious darkness has expended yet again and strange plants have appeared. Follow the plants to see where they lead.", QuestBranchLegendary, "BW_koga", "Fuchsia City", LegendaryQuestColor),
|
||||
"legendary_necrozma_6" => Quest.new("legendary_necrozma_6", "The long night (Part 5)", "You found a strange fruit that appears to be related to the mysterious darkness. Go see professor Oak to have it analyzed.", QuestBranchLegendary, "BW029", "Safari Zone", LegendaryQuestColor),
|
||||
"legendary_necrozma_7" => Quest.new("legendary_necrozma_7", "The long night (Part 6)", "The strange plant you found appears to glow in the mysterious darkness that now covers the entire region. Try to follow the glow to find out the source of the disturbance.", QuestBranchLegendary, "BW-oak", "Pallet Town", LegendaryQuestColor),
|
||||
|
||||
|
||||
"legendary_meloetta_1" => Quest.new("legendary_meloetta_1", "A legendary band (Part 1)", "The singer of a band in Saffron City wants you to help them recruit a drummer. They think they've heard some drumming around Crimson City...", QuestBranchLegendary, "BW107", "Saffron City", LegendaryQuestColor),
|
||||
"legendary_meloetta_2" => Quest.new("legendary_meloetta_2", "A legendary band (Part 2)", "The drummer from a legendary Pokéband wants you to find its former bandmates. The band manager talked about two former guitarists...", QuestBranchLegendary, "band_drummer", "Saffron City", LegendaryQuestColor),
|
||||
"legendary_meloetta_3" => Quest.new("legendary_meloetta_3", "A legendary band (Part 3)", "The drummer from a legendary Pokéband wants you to find its former bandmates. There are rumors about strange music that was heard around the region.", QuestBranchLegendary, "band_drummer", "Saffron City", LegendaryQuestColor),
|
||||
"legendary_meloetta_4" => Quest.new("legendary_meloetta_4", "A legendary band (Part 4)", "You assembled the full band! Come watch the show on Saturday night.", QuestBranchLegendary, "BW117", "Saffron City", LegendaryQuestColor),
|
||||
|
||||
"legendary_cresselia_1" => Quest.new(61, "Mysterious Lunar feathers", "A mysterious entity asked you to collect Lunar Feathers for them. It said that they will come at night to tell you where to look. Whoever that may be...", QuestBranchLegendary, "lunarFeather", "Lavender Town", LegendaryQuestColor),
|
||||
#removed
|
||||
#11 => Quest.new(11, "Powering the Lighthouse", "Catch some Voltorb to power up the lighthouse", QuestBranchHotels, "BW (43)", "Vermillion City", HotelQuestColor),
|
||||
}
|
||||
|
||||
###################
|
||||
# HOENN QUESTS ##
|
||||
# ################
|
||||
|
||||
#Route 116
|
||||
define_quest("route116_glasses",:FIELD_QUEST,"Lost glasses", "A trainer has lost their glasses, help him find them!","Route 116","NPC_Hoenn_BugManiac")
|
||||
define_quest("petalburgwoods_spores",:FIELD_QUEST,"Spores harvest", "A scientist has tasked you to collect 4 spore samples from the large mushrooms that can be found imn the woods!","Petalburg Woods","NPC_Hoenn_Scientist")
|
||||
|
||||
|
||||
|
||||
|
||||
380
Data/Scripts/052_InfiniteFusion/Quests/TRQuests.rb
Normal file
380
Data/Scripts/052_InfiniteFusion/Quests/TRQuests.rb
Normal file
@@ -0,0 +1,380 @@
|
||||
|
||||
def isWearingTeamRocketOutfit()
|
||||
return false if !$game_switches[SWITCH_JOINED_TEAM_ROCKET]
|
||||
return (isWearingClothes(CLOTHES_TEAM_ROCKET_MALE) || isWearingClothes(CLOTHES_TEAM_ROCKET_FEMALE)) && isWearingHat(HAT_TEAM_ROCKET)
|
||||
end
|
||||
|
||||
def isWearingFavoriteOutfit()
|
||||
favorites = {
|
||||
hat: $Trainer.favorite_hat,
|
||||
hat2: $Trainer.favorite_hat2,
|
||||
clothes: $Trainer.favorite_clothes
|
||||
}
|
||||
favorites.select! { |item, favorite| !favorite.nil? }
|
||||
return false if favorites.empty?
|
||||
return favorites.all? do |item, favorite|
|
||||
case item
|
||||
when :hat
|
||||
$Trainer.hat == favorite
|
||||
when :hat2
|
||||
$Trainer.hat2 == favorite
|
||||
when :clothes
|
||||
$Trainer.clothes == favorite
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def obtainRocketOutfit()
|
||||
Kernel.pbReceiveItem(:ROCKETUNIFORM)
|
||||
gender = pbGet(VAR_TRAINER_GENDER)
|
||||
if gender == GENDER_MALE
|
||||
obtainClothes(CLOTHES_TEAM_ROCKET_MALE)
|
||||
obtainHat(HAT_TEAM_ROCKET)
|
||||
$Trainer.unlocked_clothes << CLOTHES_TEAM_ROCKET_FEMALE
|
||||
else
|
||||
obtainClothes(CLOTHES_TEAM_ROCKET_FEMALE)
|
||||
obtainHat(HAT_TEAM_ROCKET)
|
||||
$Trainer.unlocked_clothes << CLOTHES_TEAM_ROCKET_MALE
|
||||
end
|
||||
#$PokemonBag.pbStoreItem(:ROCKETUNIFORM,1)
|
||||
end
|
||||
|
||||
def acceptTRQuest(id, show_description = true)
|
||||
return if isQuestAlreadyAccepted?(id)
|
||||
|
||||
title = TR_QUESTS[id].name
|
||||
description = TR_QUESTS[id].desc
|
||||
showNewTRMissionMessage(title, description, show_description)
|
||||
addRocketQuest(id)
|
||||
end
|
||||
|
||||
def addRocketQuest(id)
|
||||
$Trainer.quests = [] if $Trainer.quests.class == NilClass
|
||||
quest = TR_QUESTS[id]
|
||||
$Trainer.quests << quest if quest
|
||||
end
|
||||
|
||||
def showNewTRMissionMessage(title, description, show_description)
|
||||
titleColor = 2
|
||||
textColor = 2
|
||||
pbMEPlay("rocketQuest", 80, 110)
|
||||
|
||||
pbCallBub(3)
|
||||
Kernel.pbMessage("\\C[#{titleColor}]NEW MISSION: " + title)
|
||||
if show_description
|
||||
pbCallBub(3)
|
||||
Kernel.pbMessage("\\C[#{textColor}]" + description)
|
||||
end
|
||||
end
|
||||
|
||||
#status = :SUCCESS, :FAILURE
|
||||
def finishTRQuest(id, status, silent = false)
|
||||
return if pbCompletedQuest?(id)
|
||||
pbMEPlay("Register phone") if status == :SUCCESS && !silent
|
||||
pbMEPlay("Voltorb Flip Game Over") if status == :FAILURE && !silent
|
||||
Kernel.pbMessage("\\C[2]Mission completed!") if status == :SUCCESS && !silent
|
||||
Kernel.pbMessage("\\C[2]Mission Failed...") if status == :FAILURE && !silent
|
||||
|
||||
$game_variables[VAR_KARMA] -= 5 # karma
|
||||
$game_variables[VAR_NB_ROCKET_MISSIONS] += 1 #nb. quests completed
|
||||
|
||||
pbSetQuest(id, true)
|
||||
end
|
||||
|
||||
TR_QUESTS = {
|
||||
"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("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("tr_pinkan", "Pinkan Island!", "Help Team Rocket with a heist on a Pokémon nature preserve!", QuestBranchRocket, "rocket_archer", "Goldenrod City", TRQuestColor),
|
||||
|
||||
}
|
||||
|
||||
def calculateSuspicionLevel(answersSoFar, uncertain_answers)
|
||||
echoln answersSoFar
|
||||
|
||||
believable_answers = [
|
||||
[:BIRD, :ICE, :CINNABAR, :DAWN], #articuno
|
||||
[:BIRD, :ELECTRIC, :LAVENDER, :AFTERNOON], #zapdos
|
||||
[:BIRD, :FIRE, :CINNABAR, :SUNSET], #moltres
|
||||
[:BEAST, :ELECTRIC, :CERULEAN, :NIGHT], #raikou
|
||||
[:BEAST, :ELECTRIC, :LAVENDER, :NIGHT], #raikou
|
||||
[:BEAST, :FIRE, :VIRIDIAN, :NOON], #entei
|
||||
[:BEAST, :FIRE, :VIRIDIAN, :SUNSET], #entei
|
||||
[:BEAST, :WATER, :CERULEAN, :DAWN], #suicune
|
||||
[:BEAST, :WATER, :CERULEAN, :NIGHT], #suicune
|
||||
[:FISH, :WATER, :CERULEAN, :NIGHT], #suicune
|
||||
[:FISH, :WATER, :CERULEAN, :DAWN] #suicune
|
||||
]
|
||||
|
||||
min_suspicion_score = Float::INFINITY
|
||||
|
||||
# Iterate over each believable answer
|
||||
believable_answers.each do |believable_answer|
|
||||
suspicion_score = 0
|
||||
length_to_check = [answersSoFar.length, believable_answer.length].min
|
||||
|
||||
# Compare answersSoFar with believable_answer up to the current length
|
||||
length_to_check.times do |i|
|
||||
suspicion_score += 1 unless answersSoFar[i] == believable_answer[i]
|
||||
end
|
||||
|
||||
# Track the minimum suspicion score found
|
||||
min_suspicion_score = [min_suspicion_score, suspicion_score].min
|
||||
end
|
||||
min_suspicion_score += min_suspicion_score if uncertain_answers > 1
|
||||
echoln "suspicion score: #{min_suspicion_score}"
|
||||
return min_suspicion_score
|
||||
end
|
||||
|
||||
##### Gameplay stuff
|
||||
|
||||
def legendaryQuestioning()
|
||||
uncertain_answers = 0
|
||||
answers_so_far = []
|
||||
|
||||
#question 1
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("First off what does the legendary Pokémon look like?")
|
||||
bodyTypes = { :BIRD => "A flying creature", :BEAST => "A large beast", :FISH => "An aquatic creature", :UNKNOWN => "I don't know..." }
|
||||
chosen_bodyType = optionsMenu(bodyTypes.values)
|
||||
answers_so_far << bodyTypes.keys[chosen_bodyType]
|
||||
if chosen_bodyType == bodyTypes.length - 1
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("You don't know? Have you even seen that Pokémon?")
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("Hmm... You better have some more information.")
|
||||
uncertain_answers += 1
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("#{bodyTypes.values[chosen_bodyType]} that's also a legendary Pokémon? That sounds incredible! You have my attention.")
|
||||
end
|
||||
|
||||
#question 2
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("Okay... What about its type?")
|
||||
types = { :ELECTRIC => "Electric-type", :FIRE => "Fire-type", :WATER => "Water-Type", :ICE => "Ice-type", :UNKNOWN => "I don't know..." }
|
||||
chosen_type = optionsMenu(types.values)
|
||||
answers_so_far << types.keys[chosen_type]
|
||||
|
||||
if chosen_type == types.length - 1
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("So you don't know its type... Hmm...")
|
||||
uncertain_answers += 1
|
||||
else
|
||||
if chosen_bodyType == bodyTypes.length - 1
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("Hmm... So it's an unknown creature that's #{types.values[chosen_type]}...")
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("Hmm... #{bodyTypes.values[chosen_bodyType]} that's #{types.values[chosen_type]}.")
|
||||
end
|
||||
susMeter = calculateSuspicionLevel(answers_so_far, uncertain_answers)
|
||||
if susMeter == 0
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("That sounds pretty exciting!")
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("I've never heard of such a creature, but keep going.")
|
||||
end
|
||||
end
|
||||
|
||||
#question 3
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("So... Where was this legendary Pokémon sighted?")
|
||||
locations = { :VIRIDIAN => "Near Viridian City", :LAVENDER => "Near Lavender Town", :CERULEAN => "Near Cerulean City", :CINNABAR => "Near Cinnabar Island", :UNKNOWN => "I don't know" }
|
||||
chosen_location = optionsMenu(locations.values)
|
||||
if chosen_location == locations.length - 1
|
||||
uncertain_answers += 1
|
||||
if uncertain_answers == 3
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("Do you even know anything? This has been such a waste of time!")
|
||||
return 100
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("How can you not know where it was sighted? Do you know how unhelpful this is to me?")
|
||||
uncertain_answers += 1
|
||||
end
|
||||
else
|
||||
answers_so_far << locations.keys[chosen_location]
|
||||
susMeter = calculateSuspicionLevel(answers_so_far, uncertain_answers)
|
||||
if susMeter == 0
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("#{locations.values[chosen_location]}, huh? Ah yes, that would make a lot of sense... How did I not think of this before?")
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("Hmmm... #{locations.values[chosen_location]}, really? That sounds pretty surprising to me.")
|
||||
end
|
||||
end
|
||||
|
||||
#question 4
|
||||
locations_formatted = { :VIRIDIAN => "Viridian City", :LAVENDER => "Lavender Town", :CERULEAN => "Cerulean City", :CINNABAR => "Cinnabar Island", :UNKNOWN => "that unknown location" }
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("And at what time of the day was that legendary Pokémon seen near #{locations_formatted.values[chosen_location]} exactly?")
|
||||
time_of_day = { :DAWN => "At dawn", :NOON => "At noon", :AFTERNOON => "In the afternoon", :SUNSET => "At sunset", :NIGHT => "At night" }
|
||||
chosen_time = optionsMenu(time_of_day.values)
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage("So it was seen near #{locations_formatted.values[chosen_location]} #{time_of_day.values[chosen_time].downcase}...")
|
||||
answers_so_far << time_of_day.keys[chosen_time]
|
||||
return calculateSuspicionLevel(answers_so_far, uncertain_answers)
|
||||
end
|
||||
|
||||
def sellPokemon(event_id)
|
||||
if $Trainer.party.length <= 1
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("... Wait, I can't take your only Pokémon!")
|
||||
return false
|
||||
end
|
||||
pbChoosePokemon(1, 2,
|
||||
proc { |poke|
|
||||
!poke.egg?
|
||||
})
|
||||
chosenIndex = pbGet(1)
|
||||
chosenPokemon = $Trainer.party[chosenIndex]
|
||||
|
||||
exotic_pokemon_id = pbGet(VAR_EXOTIC_POKEMON_ID)
|
||||
if chosenPokemon.personalID == exotic_pokemon_id
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("Oh, this is the Pokémon you got from the collector, right?")
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("Yeah, I can't take that one. The collector blabbed to the police so it's too risky.")
|
||||
return false
|
||||
end
|
||||
|
||||
speciesName = GameData::Species.get(chosenPokemon.species).real_name
|
||||
pbCallBub(2, event_id)
|
||||
if pbConfirmMessageSerious("You wanna sell me this #{speciesName}, is that right?")
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("Hmm... Let's see...")
|
||||
pbWait(10)
|
||||
value = calculate_pokemon_value(chosenPokemon)
|
||||
pbCallBub(2, event_id)
|
||||
if pbConfirmMessageSerious("\\GI could give you $#{value.to_s} for it. Do we have a deal?")
|
||||
payout = (value * 0.7).to_i
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("\\GExcellent. And of course, 30% goes to Team Rocket. So you get $#{payout}.")
|
||||
$Trainer.money += payout
|
||||
$Trainer.remove_pokemon_at_index(pbGet(1))
|
||||
pbSEPlay("Mart buy item")
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("\\GPleasure doing business with you.")
|
||||
return true
|
||||
else
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("Stop wasting my time!")
|
||||
end
|
||||
else
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage("Stop wasting my time!")
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def calculate_pokemon_value(pokemon)
|
||||
# Attribute weights adjusted further for lower-level Pokémon
|
||||
catch_rate_weight = 0.5
|
||||
level_weight = 0.2
|
||||
stats_weight = 0.3
|
||||
|
||||
# Constants for the price range
|
||||
min_price = 100
|
||||
max_price = 20000
|
||||
foreign_pokemon_bonus = 3000
|
||||
fused_bonus = 1000
|
||||
# Baseline minimum values for scaling
|
||||
min_catch_rate = 3 # Legendary catch rate
|
||||
min_level = 1 # Minimum level for a Pokémon
|
||||
min_base_stats = 180 # Approximate minimum total stats (e.g., Sunkern)
|
||||
|
||||
# Attribute maximums
|
||||
max_catch_rate = 255 # Easy catch rate Pokémon like Magikarp
|
||||
max_level = 100
|
||||
max_base_stats = 720 # Maximum base stat total (e.g., Arceus)
|
||||
|
||||
# Normalize values based on actual ranges
|
||||
normalized_catch_rate = (max_catch_rate - pokemon.species_data.catch_rate).to_f / (max_catch_rate - min_catch_rate)
|
||||
normalized_level = (pokemon.level - min_level).to_f / (max_level - min_level)
|
||||
normalized_stats = (calcBaseStatsSum(pokemon.species) - min_base_stats).to_f / (max_base_stats - min_base_stats)
|
||||
|
||||
# Apply weights to each component
|
||||
weighted_catch_rate = normalized_catch_rate * catch_rate_weight
|
||||
weighted_level = normalized_level * level_weight
|
||||
weighted_stats = normalized_stats * stats_weight
|
||||
|
||||
# Calculate the total score and scale to price range with a reduced scaling factor
|
||||
total_score = weighted_catch_rate + weighted_level + weighted_stats
|
||||
price = min_price + (total_score * (max_price - min_price) * 0.4) # Lower scaling factor
|
||||
|
||||
# Add foreign Pokémon bonus if applicable
|
||||
is_foreign = !(isKantoPokemon(pokemon.species) || isJohtoPokemon(pokemon.species))
|
||||
price += foreign_pokemon_bonus if is_foreign
|
||||
price += fused_bonus if isSpeciesFusion(pokemon.species)
|
||||
|
||||
price.to_i # Convert to an integer value
|
||||
end
|
||||
|
||||
def updatePinkanBerryDisplay()
|
||||
return if !isOnPinkanIsland()
|
||||
berry_image_width=25
|
||||
|
||||
clear_all_images()
|
||||
pbSEPlay("GUI storage pick up", 80, 100)
|
||||
nbPinkanBerries = $PokemonBag.pbQuantity(:PINKANBERRY)
|
||||
for i in 1..nbPinkanBerries
|
||||
x_pos=i*berry_image_width
|
||||
y_pos=0
|
||||
$game_screen.pictures[i].show("pinkanberryui",0,x_pos,y_pos)
|
||||
end
|
||||
end
|
||||
|
||||
PINKAN_ISLAND_MAP = 51
|
||||
PINKAN_ISLAND_START_ROCKET = [11,25]
|
||||
PINKAN_ISLAND_START_POLICE = [20,55]
|
||||
def pinkanIslandWarpToStart()
|
||||
$game_temp.player_new_map_id = PINKAN_ISLAND_MAP
|
||||
if $game_switches[SWITCH_PINKAN_SIDE_ROCKET]
|
||||
$game_temp.player_new_x = PINKAN_ISLAND_START_ROCKET[0]
|
||||
$game_temp.player_new_y = PINKAN_ISLAND_START_ROCKET[1]
|
||||
else
|
||||
$game_temp.player_new_x = PINKAN_ISLAND_START_POLICE[0]
|
||||
$game_temp.player_new_y = PINKAN_ISLAND_START_POLICE[1]
|
||||
end
|
||||
$scene.transfer_player if $scene.is_a?(Scene_Map)
|
||||
$game_map.refresh
|
||||
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
||||
$scene.reset_map(true)
|
||||
end
|
||||
|
||||
def isOnPinkanIsland()
|
||||
return Settings::PINKAN_ISLAND_MAPS.include?($game_map.map_id)
|
||||
end
|
||||
|
||||
def pinkanAddAllCaughtPinkanPokemon()
|
||||
for pokemon in $Trainer.party
|
||||
pbStorePokemon(pokemon)
|
||||
end
|
||||
end
|
||||
|
||||
def resetPinkanIsland()
|
||||
$game_switches[SWITCH_BLOCK_PINKAN_WHISTLE]=false
|
||||
$game_switches[SWITCH_LEAVING_PINKAN_ISLAND]=false
|
||||
$game_switches[SWITCH_PINKAN_SIDE_POLICE]=false
|
||||
$game_switches[SWITCH_PINKAN_SIDE_ROCKET]=false
|
||||
$game_switches[SWITCH_PINKAN_FINISHED]=false
|
||||
|
||||
for map_id in Settings::PINKAN_ISLAND_MAPS
|
||||
map = $MapFactory.getMap(map_id,false)
|
||||
for event in map.events.values
|
||||
$game_self_switches[[map_id, event.id, "A"]] = false
|
||||
$game_self_switches[[map_id, event.id, "B"]] = false
|
||||
$game_self_switches[[map_id, event.id, "C"]] = false
|
||||
$game_self_switches[[map_id, event.id, "D"]] = false
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user