mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
update 6.7
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
def get_constellation_variable(pokemon)
|
||||
case pokemon
|
||||
when :IVYSAUR;
|
||||
return VAR_CONSTELLATION_IVYSAUR
|
||||
when :WARTORTLE;
|
||||
return VAR_CONSTELLATION_WARTORTLE
|
||||
when :ARCANINE;
|
||||
return VAR_CONSTELLATION_ARCANINE
|
||||
when :MACHOKE;
|
||||
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 :URSARING; return VAR_CONSTELLATION_URSARING
|
||||
# when :LUGIA; return VAR_CONSTELLATION_LUGIA
|
||||
# when :HOOH; return VAR_CONSTELLATION_HOOH
|
||||
# when :CELEBI; return VAR_CONSTELLATION_CELEBI
|
||||
# when :SLAKING; return VAR_CONSTELLATION_SLAKING
|
||||
# when :JIRACHI; return VAR_CONSTELLATION_JIRACHI
|
||||
# when :TYRANTRUM; return VAR_CONSTELLATION_TYRANTRUM
|
||||
# when :SHARPEDO; return VAR_CONSTELLATION_SHARPEDO
|
||||
# when :ARCEUS; return VAR_CONSTELLATION_ARCEUS
|
||||
end
|
||||
end
|
||||
|
||||
def constellation_add_star(pokemon)
|
||||
star_variables = get_constellation_variable(pokemon)
|
||||
|
||||
pbSEPlay("GUI trainer card open", 80)
|
||||
nb_stars = pbGet(star_variables)
|
||||
pbSet(star_variables, nb_stars + 1)
|
||||
end
|
||||
|
||||
def clear_all_images()
|
||||
for i in 1..99
|
||||
# echoln i.to_s + " : " + $game_screen.pictures[i].name
|
||||
$game_screen.pictures[i].erase
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,148 @@
|
||||
KANTO_DARKNESS_STAGE_1 = [
|
||||
50, # Lavender town
|
||||
409, # Route 8
|
||||
351, # Route 9 (east)
|
||||
495, # Route 9 (west)
|
||||
154, # Route 10
|
||||
108, # Saffron city
|
||||
1, # Cerulean City
|
||||
387, # Cerulean City (race)
|
||||
106, # Route 4
|
||||
8, # Route 24
|
||||
9, # Route 25
|
||||
400, # Pokemon Tower
|
||||
401, # Pokemon Tower
|
||||
402, # Pokemon Tower
|
||||
403, # Pokemon Tower
|
||||
467, # Pokemon Tower
|
||||
468, # Pokemon Tower
|
||||
469, # Pokemon Tower
|
||||
159, # Route 12
|
||||
349, # Rock tunnel
|
||||
350, # Rock tunnel
|
||||
512, # Rock tunnel (outdoor)
|
||||
12, # Route 5
|
||||
|
||||
]
|
||||
KANTO_DARKNESS_STAGE_2 = [
|
||||
95, # Celadon city
|
||||
436, # Celadon city dept store (roof)
|
||||
143, # Route 23
|
||||
167, # Crimson city
|
||||
413, # Route 7
|
||||
438, # Route 16
|
||||
146, # Route 17
|
||||
106, # Route 4
|
||||
19, # Vermillion City
|
||||
36, # S.S. Anne deck
|
||||
16, # Route 6
|
||||
437, # Route 13
|
||||
155, # Route 11
|
||||
140, # Diglett cave
|
||||
398, # Diglett cave
|
||||
399, # Diglett cave
|
||||
]
|
||||
KANTO_DARKNESS_STAGE_3 = [
|
||||
472, # Fuchsia city
|
||||
445, # Safari Zone 1
|
||||
484, # Safari Zone 2
|
||||
485, # Safari Zone 3
|
||||
486, # Safari Zone 4
|
||||
487, # Safari Zone 5
|
||||
444, # Route 15
|
||||
440, # Route 14
|
||||
712, # Creepy house
|
||||
517, # Route 18
|
||||
57, # Route 19
|
||||
227, # Route 19 (underwater)
|
||||
56, # Route 19 (surf race)
|
||||
58, # Route 20
|
||||
480, # Route 20 underwater 1
|
||||
228, # Route 20 underwater 2
|
||||
98, # Cinnabar island
|
||||
58, # Route 21
|
||||
827, # Mt. Moon summit
|
||||
]
|
||||
KANTO_DARKNESS_STAGE_4 = KANTO_OUTDOOR_MAPS
|
||||
|
||||
def darknessEffectOnCurrentMap()
|
||||
return if !$game_switches
|
||||
return if !$game_switches[SWITCH_KANTO_DARKNESS]
|
||||
return darknessEffectOnMap($game_map.map_id)
|
||||
end
|
||||
|
||||
def darknessEffectOnMap(map_id)
|
||||
return if !$game_switches
|
||||
return if !$game_switches[SWITCH_KANTO_DARKNESS]
|
||||
return if !KANTO_OUTDOOR_MAPS.include?(map_id)
|
||||
dark_maps = []
|
||||
dark_maps += KANTO_DARKNESS_STAGE_1 if $game_switches[SWITCH_KANTO_DARKNESS_STAGE_1]
|
||||
dark_maps += KANTO_DARKNESS_STAGE_2 if $game_switches[SWITCH_KANTO_DARKNESS_STAGE_2]
|
||||
dark_maps += KANTO_DARKNESS_STAGE_3 if $game_switches[SWITCH_KANTO_DARKNESS_STAGE_3]
|
||||
dark_maps = KANTO_OUTDOOR_MAPS if $game_switches[SWITCH_KANTO_DARKNESS_STAGE_4]
|
||||
return dark_maps.include?(map_id)
|
||||
end
|
||||
|
||||
def apply_darkness()
|
||||
$PokemonTemp.darknessSprite = DarknessSprite.new
|
||||
darkness = $PokemonTemp.darknessSprite
|
||||
darkness.radius = 276
|
||||
while darkness.radius > 64
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdateSceneMap
|
||||
darkness.radius -= 4
|
||||
end
|
||||
$PokemonGlobal.flashUsed = false
|
||||
$PokemonTemp.darknessSprite.dispose
|
||||
Events.onMapSceneChange.trigger(self, $scene, true)
|
||||
end
|
||||
|
||||
def isInMtMoon()
|
||||
mt_moon_maps = [102, 103, 105, 496, 104]
|
||||
return mt_moon_maps.include?($game_map.map_id)
|
||||
end
|
||||
|
||||
def getMtMoonDirection()
|
||||
maps_east = [380, # Pewter city
|
||||
490, # Route 3
|
||||
303, # indigo plateau
|
||||
145, # Route 26
|
||||
147, # Route 27
|
||||
]
|
||||
maps_south = [
|
||||
8, # Route 24
|
||||
9, # Route 25
|
||||
143, # Route 23
|
||||
167, # Crimson city
|
||||
]
|
||||
maps_west = [
|
||||
106, # route 4
|
||||
1, # cerulean
|
||||
495, # route 9
|
||||
351, # route 9
|
||||
10 # cerulean cape
|
||||
]
|
||||
return 2 if maps_south.include?($game_map.map_id)
|
||||
return 4 if maps_west.include?($game_map.map_id)
|
||||
return 6 if maps_east.include?($game_map.map_id)
|
||||
return 8 # north (most maps)
|
||||
end
|
||||
|
||||
def getNextLunarFeatherHint()
|
||||
nb_feathers = pbGet(VAR_LUNAR_FEATHERS)
|
||||
case nb_feathers
|
||||
when 0
|
||||
return _INTL("Find the first feather in the northernmost dwelling in the port of exquisite sunsets...")
|
||||
when 1
|
||||
return _INTL("Amidst a nursery for Pokémon youngsters, the second feather hides, surrounded by innocence.")
|
||||
when 2
|
||||
return _INTL("Find the next one in the inn where water meets rest")
|
||||
when 3
|
||||
return _INTL("Find the next one inside the lone house in the city at the edge of civilization.")
|
||||
when 4
|
||||
return _INTL("The final feather lies back in the refuge for orphaned Pokémon...")
|
||||
else
|
||||
return _INTL("Lie in the bed... Bring me the feathers...")
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
#Eevee quest
|
||||
Events.onStepTaken+=proc {|sender,e|
|
||||
next if !$game_switches[173]
|
||||
next if !$game_switches[179] #If not outside of building
|
||||
$game_variables[102]+=1
|
||||
|
||||
if $game_variables[102] % 100 == 0 then
|
||||
$game_variables[101]+=1
|
||||
end
|
||||
|
||||
if $game_variables[102] >= 400 then
|
||||
if $game_variables[102] % 100 == 0 then
|
||||
Kernel.pbMessage(_INTL("Eevee is getting tired. You should head back soon!"))
|
||||
cry=pbResolveAudioSE(pbCryFile(133))
|
||||
pbSEPlay(cry,100,100)
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
def playMeloettaBandMusic()
|
||||
unlocked_members = []
|
||||
unlocked_members << :DRUM if $game_switches[SWITCH_BAND_DRUMMER]
|
||||
unlocked_members << :AGUITAR if $game_switches[SWITCH_BAND_ACOUSTIC_GUITAR]
|
||||
unlocked_members << :EGUITAR if $game_switches[SWITCH_BAND_ELECTRIC_GUITAR]
|
||||
unlocked_members << :FLUTE if $game_switches[SWITCH_BAND_FLUTE]
|
||||
unlocked_members << :HARP if $game_switches[SWITCH_BAND_HARP]
|
||||
|
||||
echoln unlocked_members
|
||||
echoln (unlocked_members & [:DRUM, :AGUITAR, :EGUITAR, :FLUTE, :HARP])
|
||||
|
||||
track = "band/band_1"
|
||||
if unlocked_members == [:DRUM, :AGUITAR, :EGUITAR, :FLUTE, :HARP]
|
||||
track = "band/band_full"
|
||||
else
|
||||
if unlocked_members.include?(:FLUTE)
|
||||
track = "band/band_5a"
|
||||
elsif unlocked_members.include?(:HARP)
|
||||
track = "band/band_5b"
|
||||
else
|
||||
if unlocked_members.include?(:EGUITAR) && unlocked_members.include?(:AGUITAR)
|
||||
track = "band/band_4"
|
||||
elsif unlocked_members.include?(:AGUITAR)
|
||||
track = "band/band_3a"
|
||||
elsif unlocked_members.include?(:EGUITAR)
|
||||
track = "band/band_3b"
|
||||
elsif unlocked_members.include?(:DRUM)
|
||||
track = "band/band_2"
|
||||
end
|
||||
end
|
||||
end
|
||||
echoln track
|
||||
pbBGMPlay(track)
|
||||
end
|
||||
|
||||
def apply_concert_lighting(light, duration = 1)
|
||||
tone = Tone.new(0, 0, 0)
|
||||
case light
|
||||
when :GUITAR_HIT
|
||||
tone = Tone.new(-50, -100, -50)
|
||||
when :VERSE_1
|
||||
tone = Tone.new(-90, -110, -50)
|
||||
when :VERSE_2_LIGHT
|
||||
tone = Tone.new(-40, -80, -30)
|
||||
when :VERSE_2_DIM
|
||||
tone = Tone.new(-60, -100, -50)
|
||||
when :CHORUS_1
|
||||
tone = Tone.new(0, -80, -50)
|
||||
when :CHORUS_2
|
||||
tone = Tone.new(0, -50, -80)
|
||||
when :CHORUS_3
|
||||
tone = Tone.new(0, -80, -80)
|
||||
when :CHORUS_END
|
||||
tone = Tone.new(-68, 0, -102)
|
||||
when :MELOETTA_1
|
||||
tone = Tone.new(-60, -50, 20)
|
||||
end
|
||||
$game_screen.start_tone_change(tone, duration)
|
||||
end
|
||||
|
||||
def isTuesdayNight()
|
||||
day = getDayOfTheWeek()
|
||||
hour = pbGetTimeNow().hour
|
||||
echoln hour
|
||||
return (day == :TUESDAY && hour >= 20) || (day == :WEDNESDAY && hour < 5)
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
def getBlackMarketOriginalTrainer
|
||||
randomTrainer = GameData::Trainer.list_all.values.sample
|
||||
return randomTrainer
|
||||
# trainer = NPCTrainer.new("", randomTrainer.id)
|
||||
# return trainer
|
||||
end
|
||||
|
||||
|
||||
198
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/QuestIcons.rb
Normal file
198
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/QuestIcons.rb
Normal file
@@ -0,0 +1,198 @@
|
||||
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
|
||||
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)
|
||||
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
|
||||
1154
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/QuestLogScript.rb
Normal file
1154
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/QuestLogScript.rb
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Rewards given by hotel questman after a certain nb. of completed quests
|
||||
#
|
||||
QUEST_REWARDS = [
|
||||
QuestReward.new(1, :HM08, 1, _INTL("This HM will allow you to illuminate dark caves and should help you to progress in your journey!")),
|
||||
QuestReward.new(5, :AMULETCOIN, 1, _INTL("This item will allows you to get twice the money in a battle if the Pokémon holding it took part in it!")),
|
||||
QuestReward.new(10, :LANTERN, 1, _INTL("This will allow you to illuminate caves without having to use a HM! Practical, isn't it?")),
|
||||
QuestReward.new(15, :LINKINGCORD, 3, _INTL("This strange cable triggers the evolution of Pokémon that typically evolve via trade. I know you'll put it to good use!")),
|
||||
QuestReward.new(20, :SLEEPINGBAG, 1, _INTL("This handy item will allow you to sleep anywhere you want. You won't even need hotels anymore!")),
|
||||
QuestReward.new(30, :MISTSTONE, 1, _INTL("This rare stone can evolve any Pokémon, regardless of their level or evolution method. Use it wisely!"), true),
|
||||
QuestReward.new(50, :GSBALL, 1, _INTL("This mysterious ball is rumored to be the key to call upon the protector of Ilex Forest. It's a precious relic.")),
|
||||
QuestReward.new(60, :MASTERBALL, 1, _INTL("This rare ball can catch any Pokémon. Don't waste it!"), true),
|
||||
]
|
||||
@@ -0,0 +1,32 @@
|
||||
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
|
||||
|
||||
def Kernel.setRocketPassword(variableNum)
|
||||
abilityIndex = rand(233)
|
||||
speciesIndex = rand(PBSpecies.maxValue - 1)
|
||||
|
||||
word1 = PBSpecies.getName(speciesIndex)
|
||||
word2 = GameData::Ability.get(abilityIndex).name
|
||||
password = _INTL("{1}'s {2}", word1, word2)
|
||||
pbSet(variableNum, password)
|
||||
end
|
||||
|
||||
def initialize_quest_points
|
||||
return if $Trainer.quest_points
|
||||
$Trainer.quest_points = get_completed_quests(false).length
|
||||
end
|
||||
|
||||
def player_has_quest_journal?
|
||||
return $PokemonBag.pbHasItem?(:DEVONSCOPE) || $PokemonBag.pbHasItem?(:NOTEBOOK)
|
||||
end
|
||||
150
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/Quests.rb
Normal file
150
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/Quests.rb
Normal file
@@ -0,0 +1,150 @@
|
||||
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", _INTL("Johto Pokémon"), _INTL("A traveler in the PokéMart wants you to show him a Pokémon native to the Johto region."), "traveler_johto", _INTL("Cerulean City"), HotelQuestColor),
|
||||
"pokemart_hoenn" => Quest.new("pokemart_hoenn", _INTL("Hoenn Pokémon"), _INTL("A traveler in the PokéMart you to show him a Pokémon native to the Hoenn region."), "traveler_hoenn", _INTL("Vermillion City"), HotelQuestColor),
|
||||
"pokemart_sinnoh" => Quest.new("pokemart_sinnoh", _INTL("Sinnoh Pokémon"), _INTL("A traveler in the Department Center wants you to show him a Pokémon native to the Sinnoh region."), "traveler_sinnoh", _INTL("Celadon City"), HotelQuestColor),
|
||||
"pokemart_unova" => Quest.new( "pokemart_unova", _INTL("Unova Pokémon"), _INTL("A traveler in the PokéMart wants you to show him a Pokémon native to the Unova region."), "traveler_unova", _INTL("Fuchsia City"), HotelQuestColor),
|
||||
"pokemart_kalos" => Quest.new("pokemart_kalos", _INTL("Kalos Pokémon"), _INTL("A traveler in the PokéMart wants you to show him a Pokémon native to the Kalos region."), "traveler_kalos", _INTL("Saffron City"), HotelQuestColor),
|
||||
"pokemart_alola" => Quest.new("pokemart_alola", _INTL("Alola Pokémon"), _INTL("A traveler in the PokéMart wants you to show him a Pokémon native to the Alola region."), "traveler_alola", _INTL("Cinnabar Island"), HotelQuestColor),
|
||||
|
||||
|
||||
#Pewter hotel
|
||||
"pewter_1" => Quest.new("pewter_1", _INTL("Mushroom Gathering"), _INTL("A lady in Pewter City wants you to bring her 3 TinyMushroom from Viridian Forest to make a stew."), "BW (74)", _INTL("Pewter City"), HotelQuestColor),
|
||||
"pewter_2" =>Quest.new("pewter_2", _INTL("Lost Medicine"), _INTL("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."), "BW (19)", _INTL("Pewter City"), HotelQuestColor),
|
||||
"pewter_3" =>Quest.new("pewter_3", _INTL("Bug Evolution "), _INTL("A Bug Catcher in Pewter City wants you to show him a fully-evolved Bug Pokémon."), "BWBugCatcher_male", _INTL("Pewter City"), HotelQuestColor),
|
||||
"pewter_field_1" => Quest.new("pewter_field_1", _INTL("Nectar garden"), _INTL("An old man wants you to bring differently colored flowers for the city's garden."), "BW (039)", _INTL("Pewter City"), FieldQuestColor),
|
||||
"pewter_field_2" => Quest.new("pewter_field_2", _INTL("I Choose You!"), _INTL("A Pikachu in the PokéMart has lost its official Pokémon League Hat. Find one and give it to the Pikachu!"), "YOUNGSTER_LeagueHat", _INTL("Pewter City"), FieldQuestColor),
|
||||
"pewter_field_3" => Quest.new("pewter_field_3", _INTL("Prehistoric Amber!"), _INTL("Meetup with a scientist in Viridian Forest to look for prehistoric amber."), "BW (82)", _INTL("Pewter City"), FieldQuestColor),
|
||||
|
||||
#Cerulean hotel
|
||||
"cerulean_1" => Quest.new("cerulean_1", _INTL("Playing Cupid"), _INTL("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"), "BW (18)", _INTL("Cerulean City"), HotelQuestColor),
|
||||
"cerulean_2" => Quest.new("cerulean_2", _INTL("Type Experts"), _INTL("Defeat all of the Type Experts scattered around the Kanto region ({1}/{2})",pbGet(VAR_TYPE_EXPERTS_BEATEN),TOTAL_NB_TYPE_EXPERTS), "expert-normal", _INTL("Cerulean City"), HotelQuestColor),
|
||||
|
||||
#Route 24
|
||||
"cerulean_field_1" => Quest.new("cerulean_field_1", _INTL("Field Research (Part 1)"), _INTL("Professor Oak's aide wants you to catch an Abra."), "BW (82)", _INTL("Route 24"), FieldQuestColor),
|
||||
"cerulean_field_2" => Quest.new("cerulean_field_2", _INTL("Field Research (Part 2)"), _INTL("Professor Oak's aide wants you to encounter every Pokémon on Route 24."), "BW (82)", _INTL("Route 24"), FieldQuestColor),
|
||||
"cerulean_field_3" => Quest.new("cerulean_field_3", _INTL("Field Research (Part 3)"), _INTL("Professor Oak's aide wants you to catch a Buneary using the Pokéradar."), "BW (82)", _INTL("Route 24"), FieldQuestColor),
|
||||
|
||||
#Vermillion City
|
||||
"vermillion_2" => Quest.new("vermillion_2", _INTL("Fishing for Sole"), _INTL("A fisherman wants you to fish up an old boot. Hook it up with the old rod in any body of water."), "BW (71)", _INTL("Cerulean City"), HotelQuestColor),
|
||||
"vermillion_1" => Quest.new("vermillion_1", _INTL("Unusual Types 1"), _INTL("A woman at the hotel wants you to show her a Water/Fire-type Pokémon"), "BW (58)", _INTL("Vermillion City"), HotelQuestColor),
|
||||
"vermillion_3" => Quest.new("vermillion_3", _INTL("Seafood Cocktail "), _INTL("Get some steamed Krabby legs from the S.S. Anne's kitchen and bring them back to the hotel before they get cold"), "BW (36)", _INTL("Vermillion City"), HotelQuestColor),
|
||||
"vermillion_field_1" => Quest.new("vermillion_field_1", _INTL("Building Materials "), _INTL("Get some wooden planks from Viridian City and some Bricks from Pewter City."), "BW (36)", _INTL("Vermillion City"), FieldQuestColor),
|
||||
"vermillion_field_2" => Quest.new("vermillion_field_2", _INTL("Waiter on the Water"), _INTL("The S.S. Anne waiter wants you to take restaurant orders while he went to get a replacement cake."), "BW (53)", _INTL("S.S. Anne"), FieldQuestColor),
|
||||
|
||||
#Celadon City
|
||||
"celadon_1" => Quest.new("celadon_1", _INTL("Sun or Moon"), _INTL("Show the Pokémon that Eevee evolves when exposed to a Moon or Sun stone to help the scientist with her research."), "BW (82)", _INTL("Celadon City"), HotelQuestColor),
|
||||
"celadon_2" => Quest.new("celadon_2", _INTL("For Whom the Bell Tolls"), _INTL("Ring Lavender Town's bell when the time is right to reveal its secret."), "BW (40)", _INTL("Lavender Town"), HotelQuestColor),
|
||||
"celadon_3" => Quest.new("celadon_3", _INTL("Hardboiled"), _INTL("A lady wants you to give her an egg to make an omelette.", "BW (24)"), _INTL("Celadon City"), HotelQuestColor),
|
||||
"celadon_field_1" => Quest.new("celadon_field_1", _INTL("A stroll with Eevee!"), _INTL("Walk Eevee around for a while until it gets tired."), "BW (37)", _INTL("Celadon City"), FieldQuestColor),
|
||||
|
||||
#Fuchsia City
|
||||
"fuchsia_1" => Quest.new("fuchsia_1", _INTL("Bicycle Race!"), _INTL("Go meet the Cyclist at the bottom of Route 17 and beat her time up the Cycling Road!"), "BW032", _INTL("Cycling Road"), HotelQuestColor),
|
||||
"fuchsia_2" => Quest.new("fuchsia_2", _INTL("Lost Pokémon!"), _INTL("Find the lost Chansey's trainer!"), "113", _INTL("Fuchsia City"), HotelQuestColor),
|
||||
"fuchsia_3" => Quest.new("fuchsia_3", _INTL("Cleaning up the Cycling Road"), _INTL("Get rid of all the Pokémon dirtying up the Cycling Road."), "BW (77)", _INTL("Fuchsia City"), HotelQuestColor),
|
||||
"fuchsia_4" => Quest.new("fuchsia_4", _INTL("Bitey Pokémon"), _INTL("A fisherman wants to know what is the sharp-toothed Pokémon that bit him in the Safari Zone's lake."), "BW (71)", _INTL("Fuchsia City"), HotelQuestColor),
|
||||
|
||||
#Crimson City
|
||||
"crimson_1" => Quest.new("crimson_1", _INTL("Shellfish Rescue"), _INTL("Put all the stranded Shellders back in the water on the route to Crimson City."), "BW (48)", _INTL("Crimson City"), HotelQuestColor),
|
||||
"crimson_2" => Quest.new("crimson_2", _INTL("Fourth Round Rumble"), _INTL("Defeat Jeanette and her high-level Bellsprout in a Pokémon Battle"), "BW024", _INTL("Crimson City"), HotelQuestColor),
|
||||
"crimson_3" => Quest.new("crimson_3", _INTL("Unusual Types 2"), _INTL("A woman at the hotel wants you to show her a Normal/Ghost-type Pokémon"), "BW (58)", _INTL("Crimson City"), HotelQuestColor),
|
||||
"crimson_4" => Quest.new("crimson_4", _INTL("The Top of the Waterfall"), _INTL("Someone wants you to go investigate the top of a waterfall near Crimson City"), "BW (28)", _INTL("Crimson City"), HotelQuestColor),
|
||||
|
||||
#Saffron City
|
||||
"saffron_1" => Quest.new("saffron_1", _INTL("Lost Puppies"), _INTL("Find all of the missing Growlithe in the routes around Saffron City."), "BW (73)", _INTL("Saffron City"), HotelQuestColor),
|
||||
"saffron_2" => Quest.new("saffron_2", _INTL("Invisible Pokémon"), _INTL("Find an invisible Pokémon in the eastern part of Saffron City."), "BW (57)", _INTL("Saffron City"), HotelQuestColor),
|
||||
"saffron_3" => Quest.new("saffron_3", _INTL("Bad to the Bone!"), _INTL("Find a Rare Bone using Rock Smash."), "BW (72)", _INTL("Saffron City"), HotelQuestColor),
|
||||
"saffron_field_1" => Quest.new("saffron_field_1", _INTL("Dancing Queen!"), _INTL("Dance with the Copycat Girl!"), "BW (24)", _INTL("Saffron City (nightclub)"), FieldQuestColor),
|
||||
|
||||
#Cinnabar Island
|
||||
"cinnabar_1" => Quest.new("cinnabar_1", _INTL("The transformation Pokémon"), _INTL("The scientist wants you to find some Quick Powder that can sometimes be found with wild Ditto in the mansion's basement."), "BW (82)", _INTL("Cinnabar Island"), HotelQuestColor),
|
||||
"cinnabar_2" => Quest.new("cinnabar_2", _INTL("Diamonds and Pearls"), _INTL("Find a Diamond Necklace to save the man's marriage."), "BW (71)", _INTL("Cinnabar Island"), HotelQuestColor),
|
||||
"cinnabar_3" => Quest.new("cinnabar_3", _INTL("Stolen artifact"), _INTL("Recover a stolen vase from a burglar in the Pokémon Mansion"), "BW (21)", _INTL("Cinnabar Island"), HotelQuestColor),
|
||||
|
||||
#Goldenrod City
|
||||
"goldenrod_1" => Quest.new( "goldenrod_1", _INTL("Safari Souvenir!"), _INTL("Bring back a souvenir from the Fuchsia City Safari Zone"), "BW (28)", _INTL("Goldenrod City"), HotelQuestColor),
|
||||
"goldenrod_2" => Quest.new("goldenrod_2", _INTL("The Cursed Forest"), _INTL("A child wants you to find a floating tree stump in Ilex Forest. What could she be talking about?"), "BW109", _INTL("Goldenrod City"), HotelQuestColor),
|
||||
|
||||
"goldenrod_police_1" => Quest.new("goldenrod_police_1", _INTL("Undercover police work!"), _INTL("Go see the police in Goldenrod City to help them with an important police operation."), "BW (80)", _INTL("Goldenrod City"), FieldQuestColor),
|
||||
"pinkan_police" => Quest.new("pinkan_police", _INTL("Pinkan Island!"), _INTL("Team Rocket is planning a heist on Pinkan Island. You joined forces with the police to stop them!"), "BW (80)", _INTL("Goldenrod City"), FieldQuestColor),
|
||||
|
||||
#Violet City
|
||||
"violet_1" => Quest.new("violet_1", _INTL("Defuse the Pinecones!"), _INTL("Get rid of all the Pineco on Route 31 and Route 30"), "BW (64)", _INTL("Violet City"), HotelQuestColor),
|
||||
"violet_2" => Quest.new("violet_2", _INTL("Find Slowpoke's Tail!"), _INTL("Find a SlowpokeTail in some flowers, somewhere around Violet City!"), "BW (19)", _INTL("Violet City"), HotelQuestColor),
|
||||
|
||||
#Blackthorn City
|
||||
"blackthorn_1" => Quest.new( "blackthorn_1", _INTL("Dragon Evolution"), _INTL("A Dragon Tamer in Blackthorn City wants you to show her a fully-evolved Dragon Pokémon."), "BW014", _INTL("Blackthorn City"), HotelQuestColor),
|
||||
"blackthorn_2" => Quest.new("blackthorn_2", _INTL("Sunken Treasure!"), _INTL("Find an old memorabilia on a sunken ship near Cinnabar Island."), "BW (28)", _INTL("Blackthorn City"), HotelQuestColor),
|
||||
"blackthorn_3" => Quest.new("blackthorn_3", _INTL("The Largest Carp"), _INTL("A fisherman wants you to fish up a Magikarp that's exceptionally high-level at Dragon's Den."), "BW (71)", _INTL("Blackthorn City"), HotelQuestColor),
|
||||
|
||||
#Ecruteak City
|
||||
"ecruteak_1" => Quest.new("ecruteak_1", _INTL("Ghost Evolution"), _INTL("A girl in Ecruteak City wants you to show her a fully-evolved Ghost Pokémon."), "BW014", _INTL("Ecruteak City"), HotelQuestColor),
|
||||
|
||||
#Kin Island
|
||||
"kin_1" => Quest.new("kin_1", _INTL("Banana Slamma!"), _INTL("Collect 30 bananas"), "BW059", _INTL("Kin Island"), HotelQuestColor),
|
||||
"kin_2" => Quest.new("kin_2", _INTL("Fallen Meteor"), _INTL("Investigate a crater near Bond Bridge."), "BW009", _INTL("Kin Island"), HotelQuestColor),
|
||||
"kin_field_1" => Quest.new("kin_field_1", _INTL("The rarest fish"), _INTL("A fisherman wants you to show him a Feebas. Apparently they can be fished around the Sevii Islands when it rains."), "BW056", _INTL("Kin Island"), FieldQuestColor),
|
||||
|
||||
"legendary_deoxys_1" => Quest.new("legendary_deoxys_1", _INTL("First Contact"), _INTL("Find the missing pieces of a fallen alien spaceship"), "BW (92)", _INTL("Bond Bridge"), LegendaryQuestColor),
|
||||
"legendary_deoxys_2" => Quest.new("legendary_deoxys_2", _INTL("First Contact (Part 2)"), _INTL("Ask the sailor at Cinnabar Island's harbour to take you to the uncharted island where the spaceship might be located"), "BW (92)", _INTL("Bond Bridge"), LegendaryQuestColor),
|
||||
|
||||
#Necrozma quest
|
||||
"legendary_necrozma_1" => Quest.new("legendary_necrozma_1", _INTL("Mysterious prisms"), _INTL("You found a pedestal with a mysterious prism on it. There seems to be room for more prisms."), "BW_Sabrina", _INTL("Pokémon Tower"), LegendaryQuestColor),
|
||||
"legendary_necrozma_2" => Quest.new("legendary_necrozma_2", _INTL("The long night (Part 1)"), _INTL("A mysterious darkness has shrouded some of the region. Meet Sabrina outside of Saffron City's western gate to investigate."), "BW_Sabrina", _INTL("Lavender Town"), LegendaryQuestColor),
|
||||
"legendary_necrozma_3" => Quest.new("legendary_necrozma_1", _INTL("The long night (Part 2)"), _INTL("The mysterious darkness has expended. Meet Sabrina on top of Celadon City's Dept. Store to figure out the source of the darkness."), "BW_Sabrina", _INTL("Route 7"), LegendaryQuestColor),
|
||||
"legendary_necrozma_4" => Quest.new("legendary_necrozma_4", _INTL("The long night (Part 3)"), _INTL("Fuchsia City appears to be unaffected by the darkness. Go investigate to see if you can find out more information."), "BW_Sabrina", _INTL("Celadon City"), LegendaryQuestColor),
|
||||
"legendary_necrozma_5" => Quest.new("legendary_necrozma_5", _INTL("The long night (Part 4)"), _INTL("The mysterious darkness has expended yet again and strange plants have appeared. Follow the plants to see where they lead."), "BW_koga", _INTL("Fuchsia City"), LegendaryQuestColor),
|
||||
"legendary_necrozma_6" => Quest.new("legendary_necrozma_6", _INTL("The long night (Part 5)"), _INTL("You found a strange fruit that appears to be related to the mysterious darkness. Go see professor Oak to have it analyzed."), "BW029", _INTL("Safari Zone"), LegendaryQuestColor),
|
||||
"legendary_necrozma_7" => Quest.new("legendary_necrozma_7", _INTL("The long night (Part 6)"), _INTL("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."), "BW-oak", _INTL("Pallet Town"), LegendaryQuestColor),
|
||||
|
||||
|
||||
"legendary_meloetta_1" => Quest.new("legendary_meloetta_1", _INTL("A legendary band (Part 1)"), _INTL("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..."), "BW107", _INTL("Saffron City"), LegendaryQuestColor),
|
||||
"legendary_meloetta_2" => Quest.new("legendary_meloetta_2", _INTL("A legendary band (Part 2)"), _INTL("The drummer from a legendary Pokéband wants you to find its former bandmates. The band manager talked about two former guitarists..."), "band_drummer", _INTL("Saffron City"), LegendaryQuestColor),
|
||||
"legendary_meloetta_3" => Quest.new("legendary_meloetta_3", _INTL("A legendary band (Part 3)"), _INTL("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."), "band_drummer", _INTL("Saffron City"), LegendaryQuestColor),
|
||||
"legendary_meloetta_4" => Quest.new("legendary_meloetta_4", _INTL("A legendary band (Part 4)"), _INTL("You assembled the full band! Come watch the show on Saturday night."), "BW117", _INTL("Saffron City"), LegendaryQuestColor),
|
||||
|
||||
"legendary_cresselia_1" => Quest.new(61, _INTL("Mysterious Lunar feathers"), _INTL("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..."), "lunarFeather", _INTL("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 102
|
||||
define_quest("route_102_rematch",:FIELD_QUEST,_INTL("Trainer Rematches"), _INTL("A lass you battled wants to switch up her team and rematch you!"),_INTL("Route 102"),"NPC_Hoenn_Lass")
|
||||
|
||||
#Route 116
|
||||
define_quest("route116_glasses",:FIELD_QUEST,_INTL("Lost glasses"), _INTL("A trainer has lost their glasses, help him find them!"),_INTL("Route 116"),"NPC_Hoenn_BugManiac")
|
||||
|
||||
#Route 104 (South)
|
||||
define_quest("route104_rivalWeather",:FIELD_QUEST,_INTL("Weather Watch"), _INTL("Help your rival with fieldwork and find a Pokémon that only appears when it's windy!"),_INTL("Route 104"),"rival")
|
||||
|
||||
#Petalburg woods
|
||||
define_quest("petalburgwoods_spores",:FIELD_QUEST,_INTL("Spores Harvest"), _INTL("A scientist has tasked you to collect 4 spore samples from the large mushrooms that can be found in the woods!"),_INTL("Petalburg Woods"),"NPC_Hoenn_Scientist")
|
||||
|
||||
#Route 104 (North)
|
||||
define_quest("route104_oricorio",:FIELD_QUEST,_INTL("Special Flowery Grass"), _INTL("Find an Oricorio in the flowery grass behind the flower shop."),_INTL("Route 104"),"NPC_Hoenn_AromaLady")
|
||||
define_quest("route104_oricorio_forms",:FIELD_QUEST,_INTL("Nectar Flowers"), _INTL("Find all 4 types of nectar flowers to transform Oricorio."),_INTL("Route 104"),"NPC_Hoenn_AromaLady")
|
||||
|
||||
#Route 115
|
||||
define_quest("route115_secretBase",:FIELD_QUEST,_INTL("Your Very Own Secret Base!"), _INTL("Talk to Aarune near his secret base to learn how to make your own."),_INTL("Route 115"),"NPC_Hoenn_AromaLady")
|
||||
|
||||
#Rustboro
|
||||
define_quest("rustboro_whismur",:FIELD_QUEST,_INTL("Volume Booster!"), _INTL("Find a Wingull to fuse with a Whismur to make it louder."),_INTL("Rustboro City"),"NPC_schoolgirl")
|
||||
@@ -0,0 +1,101 @@
|
||||
def validate_regirock_ice_puzzle(solution)
|
||||
for boulder_position in solution
|
||||
x = boulder_position[0]
|
||||
y = boulder_position[1]
|
||||
# echoln ""
|
||||
# echoln x.to_s + ", " + y.to_s
|
||||
# echoln $game_map.event_at_position(x,y)
|
||||
return false if !$game_map.event_at_position(x, y)
|
||||
end
|
||||
echoln "all boulders in place"
|
||||
return true
|
||||
end
|
||||
|
||||
def unpress_all_regirock_steel_switches()
|
||||
switch_ids = [75, 77, 76, 67, 74, 68, 73, 72, 70, 69]
|
||||
regi_map = 813
|
||||
switch_ids.each do |event_id|
|
||||
pbSetSelfSwitch(event_id, "A", false, regi_map)
|
||||
end
|
||||
end
|
||||
|
||||
def validate_regirock_steel_puzzle()
|
||||
expected_pressed_switches = [75, 77, 74, 68, 73, 69]
|
||||
expected_unpressed_switches = [76, 67, 72, 70]
|
||||
switch_ids = [75, 77, 76, 67,
|
||||
74, 68,
|
||||
73, 72, 70, 69]
|
||||
|
||||
pressed_switches = []
|
||||
unpressed_switches = []
|
||||
switch_ids.each do |switch_id|
|
||||
is_pressed = pbGetSelfSwitch(switch_id, "A")
|
||||
if is_pressed
|
||||
pressed_switches << switch_id
|
||||
else
|
||||
unpressed_switches << switch_id
|
||||
end
|
||||
end
|
||||
|
||||
for event_id in switch_ids
|
||||
is_pressed = pbGetSelfSwitch(event_id, "A")
|
||||
return false if !is_pressed && expected_pressed_switches.include?(event_id)
|
||||
return false if is_pressed && expected_unpressed_switches.include?(event_id)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
def registeel_ice_press_switch(letter)
|
||||
order = pbGet(VAR_REGI_PUZZLE_SWITCH_PRESSED)
|
||||
solution = "ssBSBGG" # GGSBBss"
|
||||
registeel_ice_reset_switches() if !order.is_a?(String)
|
||||
order << letter
|
||||
pbSet(VAR_REGI_PUZZLE_SWITCH_PRESSED, order)
|
||||
if order == solution
|
||||
echoln "OK"
|
||||
pbSEPlay("Evolution start", nil, 130)
|
||||
elsif order.length >= solution.length
|
||||
registeel_ice_reset_switches()
|
||||
end
|
||||
echoln order
|
||||
end
|
||||
|
||||
def registeel_ice_reset_switches()
|
||||
switches_events = [66, 78, 84, 85, 86, 87, 88]
|
||||
switches_events.each do |switch_id|
|
||||
pbSetSelfSwitch(switch_id, "A", false)
|
||||
echoln "reset" + switch_id.to_s
|
||||
end
|
||||
pbSet(VAR_REGI_PUZZLE_SWITCH_PRESSED, "")
|
||||
end
|
||||
|
||||
def regirock_steel_move_boulder()
|
||||
|
||||
switches_position = [
|
||||
[16, 21], [18, 21], [20, 21], [22, 21],
|
||||
[16, 23], [22, 23],
|
||||
[16, 25], [18, 25], [20, 25], [22, 25]
|
||||
]
|
||||
boulder_event = get_self
|
||||
old_x = boulder_event.x
|
||||
old_y = boulder_event.y
|
||||
stepped_off_switch = switches_position.find { |position| position[0] == old_x && position[1] == old_y }
|
||||
|
||||
pbPushThisBoulder()
|
||||
boulder_event = get_self
|
||||
|
||||
if stepped_off_switch
|
||||
switch_event = $game_map.get_event_at_position(old_x, old_y, [boulder_event.id])
|
||||
echoln switch_event.id if switch_event
|
||||
pbSEPlay("Entering Door", nil, 80)
|
||||
pbSetSelfSwitch(switch_event.id, "A", false) if switch_event
|
||||
end
|
||||
|
||||
stepped_on_switch = switches_position.find { |position| position[0] == boulder_event.x && position[1] == boulder_event.y }
|
||||
if stepped_on_switch
|
||||
switch_event = $game_map.get_event_at_position(boulder_event.x, boulder_event.y, [boulder_event.id])
|
||||
echoln switch_event.id if switch_event
|
||||
pbSEPlay("Entering Door")
|
||||
pbSetSelfSwitch(switch_event.id, "A", true) if switch_event
|
||||
end
|
||||
end
|
||||
380
Data/Scripts/052_InfiniteFusion/Gameplay/Quests/TRQuests.rb
Normal file
380
Data/Scripts/052_InfiniteFusion/Gameplay/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(_INTL("\\C[{1}]NEW MISSION: ",titleColor) + 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", _INTL("Creepy Crawlies"), _INTL("The Team Rocket Captain has tasked you with clearing the bug infestation in the temporary Rocket HQ in Cerulean City"), "rocket_petrel", _INTL("Cerulean City"), TRQuestColor),
|
||||
"tr_cerulean_2" => Quest.new("tr_cerulean_2", _INTL("No Fishing Zone"), _INTL("Intimidate the fishermen at Nugget Bridge until they leave the area."), "rocket_petrel", _INTL("Cerulean City"), TRQuestColor),
|
||||
"tr_cerulean_3" => Quest.new("tr_cerulean_3", _INTL("Disobedient Pokémon"), _INTL("Bring back the Pokémon given by the Team Rocket Captain fainted to teach it a lesson."), "rocket_petrel", _INTL("Cerulean City"), TRQuestColor),
|
||||
"tr_cerulean_4" => Quest.new("tr_cerulean_4", _INTL("Gran Theft Pokémon!"), _INTL("Follow Petrel and go steal a rare Pokémon from a young girl."), "rocket_petrel", _INTL("Cerulean City"), TRQuestColor),
|
||||
|
||||
"tr_celadon_1" => Quest.new("tr_celadon_1", _INTL("Supplying the new grunts"), _INTL("Catch 4 Pokémon with Rocket Balls in the outskirts of Celadon City."), "rocket_archer", _INTL("Celadon City"), TRQuestColor),
|
||||
"tr_celadon_2" => Quest.new("tr_celadon_2", _INTL("Interception!"), _INTL("Intercept the TMs shipment to the Celadon Store and pose as the delivery person to deliver fake TMs."), "rocket_archer", _INTL("Celadon City"), TRQuestColor),
|
||||
"tr_celadon_3" => Quest.new( "tr_celadon_3", _INTL("Pokémon Collector"), _INTL("Go meet a Pokémon collector on Route 22, near Viridian City and get his rare Pokémon."), "rocket_archer", _INTL("Celadon City"), TRQuestColor),
|
||||
"tr_celadon_4" => Quest.new("tr_celadon_4", _INTL("Operation Shutdown"), _INTL("The Team Rocket HQ is being raided! Regroup with the rest of the grunts in Goldenrod Tunnel!"), "rocket_archer", _INTL("Goldenrod City"), TRQuestColor),
|
||||
|
||||
"tr_pinkan" => Quest.new("tr_pinkan", _INTL("Pinkan Island!"), _INTL("Help Team Rocket with a heist on a Pokémon nature preserve!"), "rocket_archer", _INTL("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(_INTL("First off what does the legendary Pokémon look like?"))
|
||||
bodyTypes = { :BIRD => _INTL("A flying creature"), :BEAST => _INTL("A large beast"), :FISH => _INTL("An aquatic creature"), :UNKNOWN => _INTL("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(_INTL("You don't know? Have you even seen that Pokémon?"))
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("Hmm... You better have some more information."))
|
||||
uncertain_answers += 1
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("{1} that's also a legendary Pokémon? That sounds incredible! You have my attention.",bodyTypes.values[chosen_bodyType]))
|
||||
end
|
||||
|
||||
#question 2
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("Okay... What about its type?"))
|
||||
types = { :ELECTRIC => _INTL("Electric-type"), :FIRE => _INTL("Fire-type"), :WATER => _INTL("Water-Type"), :ICE => _INTL("Ice-type"), :UNKNOWN => _INTL("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(_INTL("So you don't know its type... Hmm..."))
|
||||
uncertain_answers += 1
|
||||
else
|
||||
if chosen_bodyType == bodyTypes.length - 1
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("Hmm... So it's an unknown creature that's {1}...",types.values[chosen_type]))
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("Hmm... {1} that's {2}.",bodyTypes.values[chosen_bodyType],types.values[chosen_type]))
|
||||
end
|
||||
susMeter = calculateSuspicionLevel(answers_so_far, uncertain_answers)
|
||||
if susMeter == 0
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("That sounds pretty exciting!"))
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("I've never heard of such a creature, but keep going."))
|
||||
end
|
||||
end
|
||||
|
||||
#question 3
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("So... Where was this legendary Pokémon sighted?"))
|
||||
locations = { :VIRIDIAN => _INTL("Near Viridian City"), :LAVENDER => _INTL("Near Lavender Town"), :CERULEAN => _INTL("Near Cerulean City"), :CINNABAR => _INTL("Near Cinnabar Island"), :UNKNOWN => _INTL("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(_INTL("Do you even know anything? This has been such a waste of time!"))
|
||||
return 100
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("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(_INTL("{1}, huh? Ah yes, that would make a lot of sense... How did I not think of this before?",locations.values[chosen_location]))
|
||||
else
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("Hmmm... {1}, really? That sounds pretty surprising to me.",locations.values[chosen_location]))
|
||||
end
|
||||
end
|
||||
|
||||
#question 4
|
||||
locations_formatted = { :VIRIDIAN => _INTL("Viridian City"), :LAVENDER => _INTL("Lavender Town"), :CERULEAN => _INTL("Cerulean City"), :CINNABAR => _INTL("Cinnabar Island"), :UNKNOWN => _INTL("that unknown location") }
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("And at what time of the day was that legendary Pokémon seen near {1} exactly?",locations_formatted.values[chosen_location]))
|
||||
time_of_day = { :DAWN => _INTL("At dawn"), :NOON => _INTL("At noon"), :AFTERNOON => _INTL("In the afternoon"), :SUNSET => _INTL("At sunset"), :NIGHT => _INTL("At night") }
|
||||
chosen_time = optionsMenu(time_of_day.values)
|
||||
pbCallBub(2, @event_id)
|
||||
pbMessage(_INTL("So it was seen near {1} {2}...",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(_INTL("... 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(_INTL("Oh, this is the Pokémon you got from the collector, right?"))
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage(_INTL("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(_INTL("You wanna sell me this {1}, is that right?",speciesName))
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage(_INTL("Hmm... Let's see..."))
|
||||
pbWait(10)
|
||||
value = calculate_pokemon_value(chosenPokemon)
|
||||
pbCallBub(2, event_id)
|
||||
if pbConfirmMessageSerious(_INTL("\\GI could give you ${1} for it. Do we have a deal?",value.to_s))
|
||||
payout = (value * 0.7).to_i
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage(_INTL("\\GExcellent. And of course, 30% goes to Team Rocket. So you get ${1}.",payout))
|
||||
$Trainer.money += payout
|
||||
$Trainer.remove_pokemon_at_index(pbGet(1))
|
||||
pbSEPlay("Mart buy item")
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage(_INTL("\\GPleasure doing business with you."))
|
||||
return true
|
||||
else
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage(_INTL("Stop wasting my time!"))
|
||||
end
|
||||
else
|
||||
pbCallBub(2, event_id)
|
||||
pbMessage(_INTL("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