diff --git a/Data/Scripts/021_Compiler/006_Compiler_MapsAndEvents.rb b/Data/Scripts/021_Compiler/006_Compiler_MapsAndEvents.rb index 22d9885ef..a65ee27f5 100644 --- a/Data/Scripts/021_Compiler/006_Compiler_MapsAndEvents.rb +++ b/Data/Scripts/021_Compiler/006_Compiler_MapsAndEvents.rb @@ -20,7 +20,7 @@ module Compiler ["pbCanStore?", "$bag.can_add?"], ["pbStoreItem", "$bag.add"], ["pbStoreAllOrNone", "$bag.add_all"], - ["$Trainer", "$player"], + ["$player", "$player"], ["$SaveVersion", "$save_engine_version"], ["$game_version", "$save_game_version"], ["$MapFactory", "$map_factory"], diff --git a/Data/Scripts/998_InfiniteFusion/01_Migration/020_UI_PokeMart.rb b/Data/Scripts/998_InfiniteFusion/01_Migration/020_UI_PokeMart.rb index ca146f723..95bdd10a7 100644 --- a/Data/Scripts/998_InfiniteFusion/01_Migration/020_UI_PokeMart.rb +++ b/Data/Scripts/998_InfiniteFusion/01_Migration/020_UI_PokeMart.rb @@ -3,7 +3,7 @@ #=============================================================================== class PokemonMartAdapter def getMoney - return $Trainer.money + return $player.money end def getMoneyString @@ -11,7 +11,7 @@ class PokemonMartAdapter end def setMoney(value) - $Trainer.money = value + $player.money = value end def getInventory diff --git a/Data/Scripts/998_InfiniteFusion/Fusion/Fusing.rb b/Data/Scripts/998_InfiniteFusion/Fusion/Fusing.rb index 67dabe82b..57a56ff5a 100644 --- a/Data/Scripts/998_InfiniteFusion/Fusion/Fusing.rb +++ b/Data/Scripts/998_InfiniteFusion/Fusion/Fusing.rb @@ -1,6 +1,6 @@ def getPokemonPositionInParty(pokemon) - for i in 0..$Trainer.party.length - if $Trainer.party[i] == pokemon + for i in 0..$player.party.length + if $player.party[i] == pokemon return i end end @@ -15,11 +15,11 @@ def pbDNASplicing(pokemon, scene, item = :DNASPLICERS) dexNumber = pokemon.species_data.id_number if (pokemon.species_data.id_number <= NB_POKEMON) if pokemon.fused != nil - if $Trainer.party.length >= 6 + if $player.party.length >= 6 scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.", pokemon.name)) return false else - $Trainer.party[$Trainer.party.length] = pokemon.fused + $player.party[$player.party.length] = pokemon.fused pokemon.fused = nil pokemon.form = 0 scene.pbHardRefresh @@ -29,7 +29,7 @@ def pbDNASplicing(pokemon, scene, item = :DNASPLICERS) else chosen = scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?")) if chosen >= 0 - poke2 = $Trainer.party[chosen] + poke2 = $player.party[chosen] if (poke2.species_data.id_number <= NB_POKEMON) && poke2 != pokemon # check if fainted @@ -152,13 +152,13 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil) bodyPoke = getBasePokemonID(pokemon.species_data.id_number, true) headPoke = getBasePokemonID(pokemon.species_data.id_number, false) - if (pokemon.foreign?($Trainer)) # && !canunfuse + if (pokemon.foreign?($player)) # && !canunfuse scene.pbDisplay(_INTL("You can't unfuse a Pokémon obtained in a trade!")) return false else if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be unfused?", pokemon.name)) keepInParty = 0 - if $Trainer.party.length >= 6 && !pcPosition + if $player.party.length >= 6 && !pcPosition message = "Your party is full! Keep which Pokémon in party?" message = "Your party is full! Keep which Pokémon in party? The other will be released." if isOnPinkanIsland() @@ -249,7 +249,7 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil) poke2.debug_shiny = false end - if $Trainer.party.length >= 6 + if $player.party.length >= 6 if (keepInParty == 0) if isOnPinkanIsland() scene.pbDisplay(_INTL("{1} was released.", poke2.name)) @@ -289,10 +289,10 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil) end # On ajoute les poke au pokedex - $Trainer.pokedex.set_seen(poke1.species) - $Trainer.pokedex.set_owned(poke1.species) - $Trainer.pokedex.set_seen(poke2.species) - $Trainer.pokedex.set_owned(poke2.species) + $player.pokedex.set_seen(poke1.species) + $player.pokedex.set_owned(poke1.species) + $player.pokedex.set_seen(poke2.species) + $player.pokedex.set_owned(poke2.species) pokemon.species = poke1.species pokemon.level = poke1.level diff --git a/Data/Scripts/998_InfiniteFusion/Fusion/fusion_utils.rb b/Data/Scripts/998_InfiniteFusion/Fusion/fusion_utils.rb index b3a24995a..bed398b60 100644 --- a/Data/Scripts/998_InfiniteFusion/Fusion/fusion_utils.rb +++ b/Data/Scripts/998_InfiniteFusion/Fusion/fusion_utils.rb @@ -326,9 +326,9 @@ def addNewTripleFusion(pokemon1, pokemon2, pokemon3, level = 1) pokemon = TripleFusion.new(pokemon1, pokemon2, pokemon3, level) pokemon.calc_stats - pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, pokemon.name)) + pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, pokemon.name)) pbNicknameAndStore(pokemon) - #$Trainer.pokedex.register(pokemon) + #$player.pokedex.register(pokemon) return true end diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/FusionUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/FusionUtils.rb index bcfc838e5..df0e086f5 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/FusionUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/FusionUtils.rb @@ -1,5 +1,5 @@ def has_species_or_fusion?(species, form = -1) - return $Trainer.pokemon_party.any? { |p| p && p.isSpecies?(species) || p.isFusionOf(species) } + return $player.pokemon_party.any? { |p| p && p.isSpecies?(species) || p.isFusionOf(species) } end # frozen_string_literal: true diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GameplayUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GameplayUtils.rb index 70a870f5f..8e68f4a34 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GameplayUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GameplayUtils.rb @@ -54,7 +54,7 @@ def isOutdoor() end def qmarkMaskCheck() - if $Trainer.seen_qmarks_sprite + if $player.seen_qmarks_sprite unless hasHat?(HAT_QMARKS) obtainHat(HAT_QMARKS) obtainClothes(CLOTHES_GLITCH) @@ -77,7 +77,7 @@ def giveJigglypuffScribbles(possible_versions = [1,2,3,4]) return if !scribbles_id if !hasHat?(scribbles_id) - $Trainer.unlocked_hats << scribbles_id + $player.unlocked_hats << scribbles_id end putOnHat(scribbles_id,true,true) end @@ -481,7 +481,7 @@ def Kernel.setRocketPassword(variableNum) end def obtainBadgeMessage(badgeName) - Kernel.pbMessage(_INTL("\\me[Badge get]{1} obtained the {2}!", $Trainer.name, badgeName)) + Kernel.pbMessage(_INTL("\\me[Badge get]{1} obtained the {2}!", $player.name, badgeName)) end diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GraphicsUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GraphicsUtils.rb index fddde7f56..0a2695b57 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GraphicsUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/GraphicsUtils.rb @@ -26,7 +26,7 @@ end def playPokeFluteAnimation - # return if $Trainer.outfit != 0 + # return if $player.outfit != 0 # $game_player.setDefaultCharName("players/pokeflute", 0, false) # Graphics.update # Input.update @@ -34,7 +34,7 @@ def playPokeFluteAnimation end def restoreDefaultCharacterSprite(charset_number = 0) - meta = GameData::Metadata.get_player($Trainer.character_ID) + meta = GameData::Metadata.get_player($player.character_ID) $game_player.setDefaultCharName(nil, 0, false) $game_player.character_name = meta[1] Graphics.update diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/MenuUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/MenuUtils.rb index 7ed9b253e..f85fe56dd 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/MenuUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/MenuUtils.rb @@ -58,25 +58,25 @@ def purchaseDyeKitMenu(hats_kit_price=0,clothes_kit_price=0) choice = optionsMenu(commands,commands.length) case commands[choice] when command_hats - if $Trainer.money < hats_kit_price + if $player.money < hats_kit_price pbCallBub(2,@event_id) pbMessage("Oh, you don't have enough money...") return end pbMessage("\\G\\PN purchased the dye kit.") - $Trainer.money -= hats_kit_price + $player.money -= hats_kit_price pbSEPlay("SlotsCoin") Kernel.pbReceiveItem(:HATSDYEKIT) pbCallBub(2,@event_id) pbMessage("\\GHere you go! Have fun dyeing your hats!") when command_clothes - if $Trainer.money < clothes_kit_price + if $player.money < clothes_kit_price pbCallBub(2,@event_id) pbMessage("Oh, you don't have enough money...") return end pbMessage("\\G\\PN purchased the dye kit.") - $Trainer.money -= clothes_kit_price + $player.money -= clothes_kit_price pbSEPlay("SlotsCoin") Kernel.pbReceiveItem(:CLOTHESDYEKIT) pbCallBub(2,@event_id) @@ -89,7 +89,7 @@ end def promptCaughtPokemonAction(pokemon) pickedOption = false - return pbStorePokemon(pokemon) if !$Trainer.party_full? + return pbStorePokemon(pokemon) if !$player.party_full? return promptKeepOrRelease(pokemon) if isOnPinkanIsland() && !$game_switches[SWITCH_PINKAN_FINISHED] while !pickedOption command = pbMessage(_INTL("\\ts[]Your team is full!"), @@ -137,13 +137,13 @@ def swapCaughtPokemon(caughtPokemon) }) index = pbGet(1) return false if index == -1 - $PokemonStorage.pbStoreCaught($Trainer.party[index]) + $PokemonStorage.pbStoreCaught($player.party[index]) pbRemovePokemonAt(index) pbStorePokemon(caughtPokemon) - tmp = $Trainer.party[index] - $Trainer.party[index] = $Trainer.party[-1] - $Trainer.party[-1] = tmp + tmp = $player.party[index] + $player.party[index] = $player.party[-1] + $player.party[-1] = tmp return true end @@ -155,13 +155,13 @@ def swapReleaseCaughtPokemon(caughtPokemon) }) index = pbGet(1) return false if index == -1 - releasedPokemon = $Trainer.party[index] + releasedPokemon = $player.party[index] pbMessage("#{releasedPokemon.name} was released.") pbRemovePokemonAt(index) pbStorePokemon(caughtPokemon) - tmp = $Trainer.party[index] - $Trainer.party[index] = $Trainer.party[-1] - $Trainer.party[-1] = tmp + tmp = $player.party[index] + $player.party[index] = $player.party[-1] + $player.party[-1] = tmp return true end \ No newline at end of file diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/OutfitUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/OutfitUtils.rb index a76bb93d8..faa05933b 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/OutfitUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/OutfitUtils.rb @@ -1,44 +1,44 @@ # frozen_string_literal: true def unlock_easter_egg_hats() - if $Trainer.name == "Ash" - $Trainer.hat = HAT_ASH - $Trainer.unlock_hat(HAT_ASH) + if $player.name == "Ash" + $player.hat = HAT_ASH + $player.unlock_hat(HAT_ASH) end - if $Trainer.name == "Frogman" - $Trainer.hat = HAT_FROG - $Trainer.unlock_hat(HAT_FROG) + if $player.name == "Frogman" + $player.hat = HAT_FROG + $player.unlock_hat(HAT_FROG) end end def setupStartingOutfit() - $Trainer.hat = nil - $Trainer.clothes = STARTING_OUTFIT + $player.hat = nil + $player.clothes = STARTING_OUTFIT unlock_easter_egg_hats() gender = pbGet(VAR_TRAINER_GENDER) if gender == GENDER_FEMALE - $Trainer.unlock_clothes(DEFAULT_OUTFIT_FEMALE, true) - $Trainer.unlock_hat(DEFAULT_OUTFIT_FEMALE, true) - $Trainer.hair = "3_" + DEFAULT_OUTFIT_FEMALE if !$Trainer.hair # when migrating old savefiles + $player.unlock_clothes(DEFAULT_OUTFIT_FEMALE, true) + $player.unlock_hat(DEFAULT_OUTFIT_FEMALE, true) + $player.hair = "3_" + DEFAULT_OUTFIT_FEMALE if !$player.hair # when migrating old savefiles elsif gender == GENDER_MALE - $Trainer.unlock_clothes(DEFAULT_OUTFIT_MALE, true) - $Trainer.unlock_hat(DEFAULT_OUTFIT_MALE, true) + $player.unlock_clothes(DEFAULT_OUTFIT_MALE, true) + $player.unlock_hat(DEFAULT_OUTFIT_MALE, true) - echoln $Trainer.hair - $Trainer.hair = ("3_" + DEFAULT_OUTFIT_MALE) if !$Trainer.hair # when migrating old savefiles - echoln $Trainer.hair + echoln $player.hair + $player.hair = ("3_" + DEFAULT_OUTFIT_MALE) if !$player.hair # when migrating old savefiles + echoln $player.hair end - $Trainer.unlock_hair(DEFAULT_OUTFIT_MALE, true) - $Trainer.unlock_hair(DEFAULT_OUTFIT_FEMALE, true) - $Trainer.unlock_clothes(STARTING_OUTFIT, true) + $player.unlock_hair(DEFAULT_OUTFIT_MALE, true) + $player.unlock_hair(DEFAULT_OUTFIT_FEMALE, true) + $player.unlock_clothes(STARTING_OUTFIT, true) end def give_date_specific_hats() current_date = Time.new # Christmas if (current_date.day == 24 || current_date.day == 25) && current_date.month == 12 - if !$Trainer.unlocked_hats.include?(HAT_SANTA) + if !$player.unlocked_hats.include?(HAT_SANTA) pbCallBub(2, @event_id, true) pbMessage("Hi! We're giving out a special hat today for the holidays season. Enjoy!") obtainHat(HAT_SANTA) @@ -47,7 +47,7 @@ def give_date_specific_hats() # April's fool if (current_date.day == 1 && current_date.month == 4) - if !$Trainer.unlocked_hats.include?(HAT_CLOWN) + if !$player.unlocked_hats.include?(HAT_CLOWN) pbCallBub(2, @event_id, true) pbMessage("Hi! We're giving out this fun accessory for this special day. Enjoy!") obtainHat(HAT_CLOWN) diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/PokemonUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/PokemonUtils.rb index 67214e851..7cf6826c7 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/PokemonUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/PokemonUtils.rb @@ -21,8 +21,8 @@ end def changeSpeciesSpecific(pokemon, newSpecies) pokemon.species = newSpecies - $Trainer.pokedex.set_seen(newSpecies) - $Trainer.pokedex.set_owned(newSpecies) + $player.pokedex.set_seen(newSpecies) + $player.pokedex.set_owned(newSpecies) end @@ -163,8 +163,8 @@ def changeOricorioForm(pokemon, form = nil) body_number = getDexNumberForSpecies(body_id) newForm = pokemon.isFusion? ? getSpeciesIdForFusion(head_number, body_number) : head_id - $Trainer.pokedex.set_seen(newForm) - $Trainer.pokedex.set_owned(newForm) + $player.pokedex.set_seen(newForm) + $player.pokedex.set_owned(newForm) pokemon.species = newForm return true @@ -182,7 +182,7 @@ def changeOricorioFlower(form = 1) $PokemonGlobal.stepcount += 1 end end - return if !($Trainer.has_species_or_fusion?(:ORICORIO_1) || $Trainer.has_species_or_fusion?(:ORICORIO_2) || $Trainer.has_species_or_fusion?(:ORICORIO_3) || $Trainer.has_species_or_fusion?(:ORICORIO_4)) + return if !($player.has_species_or_fusion?(:ORICORIO_1) || $player.has_species_or_fusion?(:ORICORIO_2) || $player.has_species_or_fusion?(:ORICORIO_3) || $player.has_species_or_fusion?(:ORICORIO_4)) message = "" form_name = "" if form == 1 @@ -210,7 +210,7 @@ def changeOricorioFlower(form = 1) Kernel.isPartPokemon(poke, :ORICORIO_4)) }) if (pbGet(1) != -1) - poke = $Trainer.party[pbGet(1)] + poke = $player.party[pbGet(1)] if changeOricorioForm(poke, form) pbMessage(_INTL("{1} switched to the {2} style", poke.name, form_name)) pbSet(1, poke.name) @@ -231,17 +231,17 @@ def oricorioEventPickFlower(flower_color) $game_switches[SWITCH_ORICORIO_QUEST_PINK] = true pbMessage(_INTL("It's a flower with pink nectar.")) pbSEPlay("MiningAllFound") - pbMessage(_INTL("{1} picked some of the pink flowers.", $Trainer.name)) + pbMessage(_INTL("{1} picked some of the pink flowers.", $player.name)) elsif flower_color == :RED && quest_progression == 1 $game_switches[SWITCH_ORICORIO_QUEST_RED] = true pbMessage(_INTL("It's a flower with red nectar.")) pbSEPlay("MiningAllFound") - pbMessage(_INTL("{1} picked some of the red flowers.", $Trainer.name)) + pbMessage(_INTL("{1} picked some of the red flowers.", $player.name)) elsif flower_color == :BLUE && quest_progression == 2 $game_switches[SWITCH_ORICORIO_QUEST_BLUE] = true pbMessage(_INTL("It's a flower with blue nectar.")) pbSEPlay("MiningAllFound") - pbMessage(_INTL("{1} picked some of the blue flowers.", $Trainer.name)) + pbMessage(_INTL("{1} picked some of the blue flowers.", $player.name)) end end \ No newline at end of file diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/RepairUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/RepairUtils.rb index a5f036465..e4c16f044 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/RepairUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/RepairUtils.rb @@ -74,7 +74,7 @@ def fixFinishedRocketQuests() end def fix_broken_TR_quests() - for trainer_quest in $Trainer.quests + for trainer_quest in $player.quests if trainer_quest.id == 0 # tr quests were all set to ID 0 instead of their real ID in v 6.4.0 for rocket_quest_id in TR_QUESTS.keys rocket_quest = TR_QUESTS[rocket_quest_id] @@ -88,7 +88,7 @@ def fix_broken_TR_quests() end def failAllIncompleteRocketQuests() - for trainer_quest in $Trainer.quests + for trainer_quest in $player.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") diff --git a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/SystemUtils.rb b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/SystemUtils.rb index 4f5b81cb4..bf69131f1 100644 --- a/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/SystemUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Gameplay/Utils/SystemUtils.rb @@ -24,9 +24,9 @@ end # Get difficulty for displaying in-game def getDisplayDifficulty - if $game_switches[SWITCH_GAME_DIFFICULTY_EASY] || $Trainer.lowest_difficulty <= 0 + if $game_switches[SWITCH_GAME_DIFFICULTY_EASY] || $player.lowest_difficulty <= 0 return getDisplayDifficultyFromIndex(0) - elsif $Trainer.lowest_difficulty <= 1 + elsif $player.lowest_difficulty <= 1 return getDisplayDifficultyFromIndex(1) elsif $game_switches[SWITCH_GAME_DIFFICULTY_HARD] return getDisplayDifficultyFromIndex(2) @@ -81,7 +81,7 @@ end def setDifficulty(index) - $Trainer.selected_difficulty = index + $player.selected_difficulty = index case index when 0 # EASY $game_switches[SWITCH_GAME_DIFFICULTY_EASY] = true diff --git a/Data/Scripts/998_InfiniteFusion/InfiniteFusionSettings.rb b/Data/Scripts/998_InfiniteFusion/InfiniteFusionSettings.rb index 88e752978..298beebb9 100644 --- a/Data/Scripts/998_InfiniteFusion/InfiniteFusionSettings.rb +++ b/Data/Scripts/998_InfiniteFusion/InfiniteFusionSettings.rb @@ -334,7 +334,7 @@ module Settings # The names of the Pokédex lists, in the order they are defined in the PBS # file "regionaldexes.txt". The last name is for the National Dex and is added # onto the end of this array (remember that you don't need to use it). This - # array's order is also the order of $Trainer.pokedex.unlocked_dexes, which + # array's order is also the order of $player.pokedex.unlocked_dexes, which # records which Dexes have been unlocked (the first is unlocked by default). # If an entry is just a name, then the region map shown in the Area page while # viewing that Dex list will be the region map of the region the player is diff --git a/Data/Scripts/998_InfiniteFusion/Items/New HMs.rb b/Data/Scripts/998_InfiniteFusion/Items/New HMs.rb index 729fdfa14..ce0c07a4c 100644 --- a/Data/Scripts/998_InfiniteFusion/Items/New HMs.rb +++ b/Data/Scripts/998_InfiniteFusion/Items/New HMs.rb @@ -103,7 +103,7 @@ HiddenMoveHandlers::UseMove.add(:MORNINGSUN,proc{|move,pokemon| pbFadeOutIn(99999){ pbSkipTime(9) newTime = pbGetTimeNow.strftime("%I:%M %p") - Kernel.pbMessage(_INTL("{1} waited until morning...",$Trainer.name)) + Kernel.pbMessage(_INTL("{1} waited until morning...",$player.name)) Kernel.pbMessage(_INTL("The time is now {1}",newTime)) $game_screen.weather(:None,0,0) $game_map.refresh @@ -126,7 +126,7 @@ HiddenMoveHandlers::UseMove.add(:MOONLIGHT,proc{|move,pokemon| pbFadeOutIn(99999){ pbSkipTime(21) newTime = pbGetTimeNow.strftime("%I:%M %p") - Kernel.pbMessage(_INTL("{1} waited until night...",$Trainer.name)) + Kernel.pbMessage(_INTL("{1} waited until night...",$player.name)) Kernel.pbMessage(_INTL("The time is now {1}",newTime)) $game_screen.weather(:None,0,0) $game_map.refresh diff --git a/Data/Scripts/998_InfiniteFusion/Items/New Items effects.rb b/Data/Scripts/998_InfiniteFusion/Items/New Items effects.rb index 8c1cd60c5..1fedd24bc 100644 --- a/Data/Scripts/998_InfiniteFusion/Items/New Items effects.rb +++ b/Data/Scripts/998_InfiniteFusion/Items/New Items effects.rb @@ -12,7 +12,7 @@ ItemHandlers::UseFromBag.add(:LANTERN, proc { |item| }) ItemHandlers::UseInField.add(:LANTERN, proc { |item| - Kernel.pbMessage(_INTL("#{$Trainer.name} used the lantern.")) + Kernel.pbMessage(_INTL("#{$player.name} used the lantern.")) if useLantern() next 1 else @@ -56,7 +56,7 @@ ItemHandlers::UseInField.add(:TELEPORTER, proc { |item| def useTeleporter() if HiddenMoveHandlers.triggerCanUseMove(:TELEPORT, 0, true) - Kernel.pbMessage(_INTL("Teleport to where?", $Trainer.name)) + Kernel.pbMessage(_INTL("Teleport to where?", $player.name)) ret = pbBetterRegionMap(-1, true, true) return false unless ret ############################################### @@ -74,7 +74,7 @@ def useTeleporter() if !$PokemonTemp.flydata return false else - Kernel.pbMessage(_INTL("{1} used the teleporter!", $Trainer.name)) + Kernel.pbMessage(_INTL("{1} used the teleporter!", $player.name)) pbFadeOutIn(99999) { Kernel.pbCancelVehicles $game_temp.player_new_map_id = $PokemonTemp.flydata[0] @@ -285,7 +285,7 @@ def useSleepingBag() pbSet(UnrealTime::EXTRA_SECONDS, currentSecondsValue + timeAdded) pbSEPlay("Sleep", 100) pbFadeOutIn { - Kernel.pbMessage(_INTL("{1} slept for a while...", $Trainer.name)) + Kernel.pbMessage(_INTL("{1} slept for a while...", $player.name)) } time = pbGetTimeNow.strftime("%I:%M %p") newDay = getDayOfTheWeek() @@ -384,31 +384,31 @@ def useFavoriteOutfit() switchToFavoriteOutfit() elsif options[choice] == cmd_mark_favorite pbSEPlay("shiny", 80, 100) - $Trainer.favorite_clothes= $Trainer.clothes - $Trainer.favorite_hat = $Trainer.hat - $Trainer.favorite_hat2=$Trainer.hat2 + $player.favorite_clothes= $player.clothes + $player.favorite_hat = $player.hat + $player.favorite_hat2=$player.hat2 pbMessage(_INTL("Your favorite outfit was updated!")) end end def switchToFavoriteOutfit() - if !$Trainer.favorite_clothes && !$Trainer.favorite_hat && !$Trainer.favorite_hat2 + if !$player.favorite_clothes && !$player.favorite_hat && !$player.favorite_hat2 pbMessage(_INTL("You can mark clothes and hats as your favorites in the outfits menu and use this to quickly switch to them!")) return 0 end if isWearingFavoriteOutfit() if (Kernel.pbConfirmMessage("Remove your favorite outfit?")) - last_worn_clothes_is_favorite = $Trainer.last_worn_outfit == $Trainer.favorite_clothes - last_worn_hat_is_favorite = $Trainer.last_worn_hat == $Trainer.favorite_hat - last_worn_hat2_is_favorite = $Trainer.last_worn_hat2 == $Trainer.favorite_hat2 + last_worn_clothes_is_favorite = $player.last_worn_outfit == $player.favorite_clothes + last_worn_hat_is_favorite = $player.last_worn_hat == $player.favorite_hat + last_worn_hat2_is_favorite = $player.last_worn_hat2 == $player.favorite_hat2 if (last_worn_clothes_is_favorite && last_worn_hat_is_favorite && last_worn_hat2_is_favorite) - $Trainer.last_worn_outfit = getDefaultClothes() + $player.last_worn_outfit = getDefaultClothes() end playOutfitChangeAnimation() - putOnClothes($Trainer.last_worn_outfit, true) #if $Trainer.favorite_clothes - putOnHat($Trainer.last_worn_hat, true,false) #if $Trainer.favorite_hat - putOnHat($Trainer.last_worn_hat2, true,true) #if $Trainer.favorite_hat2 + putOnClothes($player.last_worn_outfit, true) #if $player.favorite_clothes + putOnHat($player.last_worn_hat, true,false) #if $player.favorite_hat + putOnHat($player.last_worn_hat2, true,true) #if $player.favorite_hat2 else return 0 @@ -416,12 +416,12 @@ def switchToFavoriteOutfit() else if (Kernel.pbConfirmMessage("Put on your favorite outfit?")) - echoln "favorite clothes: #{$Trainer.favorite_clothes}, favorite hat: #{$Trainer.favorite_hat}, favorite hat2: #{$Trainer.favorite_hat2}" + echoln "favorite clothes: #{$player.favorite_clothes}, favorite hat: #{$player.favorite_hat}, favorite hat2: #{$player.favorite_hat2}" playOutfitChangeAnimation() - putOnClothes($Trainer.favorite_clothes, true) if $Trainer.favorite_clothes - putOnHat($Trainer.favorite_hat, true, false) if $Trainer.favorite_hat - putOnHat($Trainer.favorite_hat2, true, true) if $Trainer.favorite_hat2 + putOnClothes($player.favorite_clothes, true) if $player.favorite_clothes + putOnHat($player.favorite_hat, true, false) if $player.favorite_hat + putOnHat($player.favorite_hat2, true, true) if $player.favorite_hat2 else return 0 end @@ -432,12 +432,12 @@ def useRocketUniform() return 0 if !$game_switches[SWITCH_JOINED_TEAM_ROCKET] if isWearingTeamRocketOutfit() if (Kernel.pbConfirmMessage("Remove the Team Rocket uniform?")) - if ($Trainer.last_worn_outfit == CLOTHES_TEAM_ROCKET_MALE || $Trainer.last_worn_outfit == CLOTHES_TEAM_ROCKET_FEMALE) && $Trainer.last_worn_hat == HAT_TEAM_ROCKET - $Trainer.last_worn_outfit = getDefaultClothes() + if ($player.last_worn_outfit == CLOTHES_TEAM_ROCKET_MALE || $player.last_worn_outfit == CLOTHES_TEAM_ROCKET_FEMALE) && $player.last_worn_hat == HAT_TEAM_ROCKET + $player.last_worn_outfit = getDefaultClothes() end playOutfitChangeAnimation() - putOnClothes($Trainer.last_worn_outfit, true) - putOnHat($Trainer.last_worn_hat, true) + putOnClothes($player.last_worn_outfit, true) + putOnHat($player.last_worn_hat, true) else return 0 end @@ -600,10 +600,10 @@ end def useSplicerFromField(item) scene = PokemonParty_Scene.new - scene.pbStartScene($Trainer.party, "Select a Pokémon") - screen = PokemonPartyScreen.new(scene, $Trainer.party) + scene.pbStartScene($player.party, "Select a Pokémon") + screen = PokemonPartyScreen.new(scene, $player.party) chosen = screen.pbChoosePokemon("Select a Pokémon") - pokemon = $Trainer.party[chosen] + pokemon = $player.party[chosen] fusion_success = pbDNASplicing(pokemon, scene, item) screen.pbEndScene scene.dispose @@ -686,11 +686,11 @@ ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene| # def pbDNASplicing(pokemon, scene, supersplicers = false, superSplicer = false) # if (pokemon.species <= NB_POKEMON) # if pokemon.fused != nil -# if $Trainer.party.length >= 6 +# if $player.party.length >= 6 # scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.", pokemon.name)) # return false # else -# $Trainer.party[$Trainer.party.length] = pokemon.fused +# $player.party[$player.party.length] = pokemon.fused # pokemon.fused = nil # pokemon.form = 0 # scene.pbHardRefresh @@ -700,7 +700,7 @@ ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene| # else # chosen = scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?")) # if chosen >= 0 -# poke2 = $Trainer.party[chosen] +# poke2 = $player.party[chosen] # if (poke2.species <= NB_POKEMON) && poke2 != pokemon # #check if fainted # if pokemon.hp == 0 || poke2.hp == 0 @@ -735,7 +735,7 @@ ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene| # #pcPosition [x,x] : unfusing from pc # # # -# if (pokemon.obtain_method == 2 || pokemon.ot != $Trainer.name) # && !canunfuse +# if (pokemon.obtain_method == 2 || pokemon.ot != $player.name) # && !canunfuse # scene.pbDisplay(_INTL("You can't unfuse a Pokémon obtained in a trade!")) # return false # else @@ -743,7 +743,7 @@ ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene| # if pokemon.species > (NB_POKEMON * NB_POKEMON) + NB_POKEMON #triple fusion # scene.pbDisplay(_INTL("{1} cannot be unfused.", pokemon.name)) # return false -# elsif $Trainer.party.length >= 6 && !pcPosition +# elsif $player.party.length >= 6 && !pcPosition # scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.", pokemon.name)) # return false # else @@ -771,8 +771,8 @@ ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene| # poke2.exp = exp_head # end # -# #poke1 = PokeBattle_Pokemon.new(bodyPoke, lev, $Trainer) -# #poke2 = PokeBattle_Pokemon.new(headPoke, lev, $Trainer) +# #poke1 = PokeBattle_Pokemon.new(bodyPoke, lev, $player) +# #poke2 = PokeBattle_Pokemon.new(headPoke, lev, $player) # # if pcPosition == nil # box = pcPosition[0] @@ -782,10 +782,10 @@ ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene| # Kernel.pbAddPokemonSilent(poke2, poke2.level) # end # #On ajoute l'autre dans le pokedex aussi -# $Trainer.seen[poke1.species] = true -# $Trainer.owned[poke1.species] = true -# $Trainer.seen[poke2.species] = true -# $Trainer.owned[poke2.species] = true +# $player.seen[poke1.species] = true +# $player.owned[poke1.species] = true +# $player.seen[poke2.species] = true +# $player.owned[poke2.species] = true # # pokemon.species = poke1.species # pokemon.level = poke1.level diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/LayeredClothes.rb b/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/LayeredClothes.rb index 8336fe8cc..6645bc560 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/LayeredClothes.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/LayeredClothes.rb @@ -62,32 +62,32 @@ def get_current_outfit_position(currentOutfit_id, available_outfits) end def setHairColor(hue_shift) - $Trainer.hair_color = hue_shift + $player.hair_color = hue_shift refreshPlayerOutfit() end def shiftHatColor(incr,secondary_hat=false) if secondary_hat - $Trainer.hat2_color = 0 if !$Trainer.hat2_color - $Trainer.hat2_color += incr + $player.hat2_color = 0 if !$player.hat2_color + $player.hat2_color += incr else - $Trainer.hat_color = 0 if !$Trainer.hat_color - $Trainer.hat_color += incr + $player.hat_color = 0 if !$player.hat_color + $player.hat_color += incr end refreshPlayerOutfit() end def shiftClothesColor(incr) - $Trainer.clothes_color = 0 if !$Trainer.clothes_color - $Trainer.clothes_color += incr + $player.clothes_color = 0 if !$player.clothes_color + $player.clothes_color += incr refreshPlayerOutfit() end def shiftHairColor(incr) - $Trainer.hair_color = 0 if !$Trainer.hair_color - $Trainer.hair_color += incr - echoln "Hair color: #{$Trainer.hair_color}" + $player.hair_color = 0 if !$player.hair_color + $player.hair_color += incr + echoln "Hair color: #{$player.hair_color}" refreshPlayerOutfit() end @@ -101,11 +101,11 @@ def pbLoadOutfitBitmap(outfitFileName) end def setOutfit(outfit_id) - $Trainer.clothes = outfit_id + $player.clothes = outfit_id end def setHat(hat_id) - $Trainer.hat = hat_id + $player.hat = hat_id end def getEasterEggHeldItem() @@ -134,7 +134,7 @@ end def getCurrentPokeball(allowEasterEgg=true) otherItem = getEasterEggHeldItem() if allowEasterEgg return otherItem if otherItem - firstPokemon = $Trainer.party[0] + firstPokemon = $player.party[0] return firstPokemon.poke_ball if firstPokemon return nil end @@ -152,19 +152,19 @@ def generate_front_trainer_sprite_bitmap(allowEasterEgg=true, pokeball = nil, skin_tone_id = nil, hair_color = nil, hat_color = nil, clothes_color = nil, hat2_color = nil) - clothes_id = $Trainer.clothes if !clothes_id - hat_id = $Trainer.hat if !hat_id - hat2_id = $Trainer.hat2 if !hat2_id + clothes_id = $player.clothes if !clothes_id + hat_id = $player.hat if !hat_id + hat2_id = $player.hat2 if !hat2_id - hair_id = $Trainer.hair if !hair_id - skin_tone_id = $Trainer.skin_tone if !skin_tone_id - hair_color = $Trainer.hair_color if !hair_color - hat_color = $Trainer.hat_color if !hat_color - hat2_color = $Trainer.hat2_color if !hat2_color - clothes_color = $Trainer.clothes_color if !clothes_color + hair_id = $player.hair if !hair_id + skin_tone_id = $player.skin_tone if !skin_tone_id + hair_color = $player.hair_color if !hair_color + hat_color = $player.hat_color if !hat_color + hat2_color = $player.hat2_color if !hat2_color + clothes_color = $player.clothes_color if !clothes_color - hairFilename = getTrainerSpriteHairFilename(hair_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_HAIR_FOLDER + "/hair_trainer_{1}", $Trainer.hair) - outfitFilename = getTrainerSpriteOutfitFilename(clothes_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_CLOTHES_FOLDER + "/clothes_trainer_{1}", $Trainer.clothes) + hairFilename = getTrainerSpriteHairFilename(hair_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_HAIR_FOLDER + "/hair_trainer_{1}", $player.hair) + outfitFilename = getTrainerSpriteOutfitFilename(clothes_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_CLOTHES_FOLDER + "/clothes_trainer_{1}", $player.clothes) hatFilename = getTrainerSpriteHatFilename(hat_id) hat2Filename = getTrainerSpriteHatFilename(hat2_id) diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitSelector.rb b/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitSelector.rb index ae694a8c1..48a6a6058 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitSelector.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitSelector.rb @@ -134,39 +134,39 @@ class OutfitSelector end def changeToNextClothes(incr,all_unlocked=false) - $Trainer.unlocked_clothes = [] if !$Trainer.unlocked_clothes + $player.unlocked_clothes = [] if !$player.unlocked_clothes - currentOutfit = $Trainer.clothes + currentOutfit = $player.clothes currentOutfit = 0 if !currentOutfit - nextOutfit = selectNextOutfit(currentOutfit, incr, @clothes_list, [], false,nil,$Trainer.unlocked_clothes,all_unlocked) - $Trainer.clothes = nextOutfit - $Trainer.clothes_color = 0 - echoln $Trainer.clothes + nextOutfit = selectNextOutfit(currentOutfit, incr, @clothes_list, [], false,nil,$player.unlocked_clothes,all_unlocked) + $player.clothes = nextOutfit + $player.clothes_color = 0 + echoln $player.clothes end def changeToNextHat(incr,all_unlocked=false) - $Trainer.unlocked_hats = [] if !$Trainer.unlocked_hats + $player.unlocked_hats = [] if !$player.unlocked_hats - currentHat = $Trainer.hat + currentHat = $player.hat currentHat = 0 if !currentHat - nextOutfit = selectNextOutfit(currentHat, incr, @hats_list, [], true, "hat",$Trainer.unlocked_hats,all_unlocked) - $Trainer.hat = nextOutfit - $Trainer.hat_color = 0 - echoln $Trainer.hat + nextOutfit = selectNextOutfit(currentHat, incr, @hats_list, [], true, "hat",$player.unlocked_hats,all_unlocked) + $player.hat = nextOutfit + $player.hat_color = 0 + echoln $player.hat end def changeToNextHairstyle(incr,all_unlocked=false) - $Trainer.unlocked_hairstyles = [] if !$Trainer.unlocked_hairstyles + $player.unlocked_hairstyles = [] if !$player.unlocked_hairstyles - currentHair = $Trainer.hair + currentHair = $player.hair currentHair = 0 if !currentHair - nextOutfit = selectNextOutfit(currentHair, incr, @hairstyles_list, ["a", "b", "c", "d"], true,nil,$Trainer.unlocked_hairstyles,all_unlocked) - $Trainer.hair_color = 0 - $Trainer.hair = nextOutfit - echoln $Trainer.hair + nextOutfit = selectNextOutfit(currentHair, incr, @hairstyles_list, ["a", "b", "c", "d"], true,nil,$player.unlocked_hairstyles,all_unlocked) + $player.hair_color = 0 + $player.hair = nextOutfit + echoln $player.hair end diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitsSearch.rb b/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitsSearch.rb index e637c9e7b..3c2ecfac5 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitsSearch.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/001_OutfitsMain/OutfitsSearch.rb @@ -6,7 +6,7 @@ def search_clothes(matching_tags = [], only_unlocked = false) full_data_list = $PokemonGlobal.clothes_data existing_files_list = selector.parse_clothes_folder() - unlocked_list = $Trainer.unlocked_clothes + unlocked_list = $player.unlocked_clothes return search_outfits_by_tag(full_data_list, matching_tags, existing_files_list, unlocked_list, only_unlocked) end @@ -16,14 +16,14 @@ def filter_clothes(filter_tags = [], only_unlocked = false) full_data_list = $PokemonGlobal.hats_data existing_files_list = selector.parse_hats_folder() - unlocked_list = $Trainer.unlocked_hats + unlocked_list = $player.unlocked_hats return filter_outfits_by_tag(full_data_list, filter_tags, existing_files_list, unlocked_list, only_unlocked) end def filter_clothes_only_not_owned(clothes_ids_list) filtered_list = [] clothes_ids_list.each do|clothe_id| - filtered_list << clothe_id if !$Trainer.unlocked_clothes.include?(clothe_id) + filtered_list << clothe_id if !$player.unlocked_clothes.include?(clothe_id) end return filtered_list end @@ -31,7 +31,7 @@ end def filter_clothes_only_owned(clothes_ids_list) filtered_list = [] clothes_ids_list.each do|clothe_id| - filtered_list << clothe_id if $Trainer.unlocked_clothes.include?(clothe_id) + filtered_list << clothe_id if $player.unlocked_clothes.include?(clothe_id) end return filtered_list end @@ -45,7 +45,7 @@ def search_hats(matching_tags = [],excluding_tags=[], only_unlocked = false) full_data_list = $PokemonGlobal.hats_data existing_files_list = selector.parse_hats_folder() - unlocked_list = $Trainer.unlocked_hats + unlocked_list = $player.unlocked_hats return search_outfits_by_tag(full_data_list, matching_tags, existing_files_list, unlocked_list, only_unlocked,excluding_tags) end @@ -55,14 +55,14 @@ def filter_hats(filter_tags = [], only_unlocked = false) full_data_list = $PokemonGlobal.hats_data existing_files_list = selector.parse_hats_folder() - unlocked_list = $Trainer.unlocked_hats + unlocked_list = $player.unlocked_hats return filter_outfits_by_tag(full_data_list, filter_tags, existing_files_list, unlocked_list, only_unlocked) end def filter_hats_only_not_owned(hats_ids_list) filtered_list = [] hats_ids_list.each do|hat_id| - filtered_list << hat_id if !$Trainer.unlocked_hats.include?(hat_id) + filtered_list << hat_id if !$player.unlocked_hats.include?(hat_id) end return filtered_list end @@ -70,7 +70,7 @@ end def filter_hats_only_owned(hats_ids_list) filtered_list = [] hats_ids_list.each do|hat_id| - filtered_list << hat_id if $Trainer.unlocked_hats.include?(hat_id) + filtered_list << hat_id if $player.unlocked_hats.include?(hat_id) end return filtered_list end diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/CharacterSelectMenuPresenter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/CharacterSelectMenuPresenter.rb index af9d9ff22..b858f4e65 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/CharacterSelectMenuPresenter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/CharacterSelectMenuPresenter.rb @@ -114,8 +114,8 @@ class CharacterSelectMenuPresenter applyGender(@gender) echoln @age pbSet(VAR_TRAINER_AGE, @age) - $Trainer.skin_tone = @skinTone - $Trainer.name = @name + $player.skin_tone = @skinTone + $player.name = @name end def getOptionIndex(option_name) @@ -201,7 +201,7 @@ class CharacterSelectMenuPresenter @skinTone += incr @skinTone = MIN_SKIN_COLOR if @skinTone > MAX_SKIN_COLOR @skinTone = MAX_SKIN_COLOR if @skinTone < MIN_SKIN_COLOR - $Trainer.skin_tone = @skinTone + $player.skin_tone = @skinTone label = SKIN_COLOR_IDS[@skinTone - 1] @view.displayText(SKIN_TEXT_ID, label, current_index) end @@ -219,7 +219,7 @@ class CharacterSelectMenuPresenter applyHairEasterEggs() hairColorId = HAIR_COLOR_IDS[@hairColor] hairId = hairColorId.to_s + "_" + @hairstyle.to_s - $Trainer.hair = hairId + $player.hair = hairId end def applyHairEasterEggs() @@ -236,9 +236,9 @@ class CharacterSelectMenuPresenter outfitId = get_outfit_id_from_index(gender_index) @hairstyle = outfitId applyHair() - #$Trainer.hair = outfitId - $Trainer.clothes = outfitId - $Trainer.hat = outfitId + #$player.hair = outfitId + $player.clothes = outfitId + $player.hat = outfitId end def get_outfit_id_from_index(gender_index) diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/LayeredClothes_Menus.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/LayeredClothes_Menus.rb index e937a59fd..c5c056fb2 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/LayeredClothes_Menus.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/LayeredClothes_Menus.rb @@ -11,7 +11,7 @@ end def selectHairstyle(all_unlocked = false) selector = OutfitSelector.new display_outfit_preview() - hat = $Trainer.hat + hat = $player.hat commands = ["Next style", "Previous style", "Toggle hat", "Back"] previous_input = 0 # To enable turning the common event that lets you turn around while in the dialog box @@ -29,10 +29,10 @@ def selectHairstyle(all_unlocked = false) display_outfit_preview() when 2 #Toggle hat pbSEPlay("GUI storage put down", 80, 100) - if hat == $Trainer.hat - $Trainer.hat = nil + if hat == $player.hat + $player.hat = nil else - $Trainer.hat = hat + $player.hat = hat end display_outfit_preview() else @@ -40,11 +40,11 @@ def selectHairstyle(all_unlocked = false) end end hide_outfit_preview() - $Trainer.hat = hat + $player.hat = hat end def swapToNextHairVersion() - split_hair = getSplitHairFilenameAndVersionFromID($Trainer.hair) + split_hair = getSplitHairFilenameAndVersionFromID($player.hair) hair_version = split_hair[0] hair_style = split_hair[1] current_version = hair_version @@ -53,16 +53,16 @@ def swapToNextHairVersion() lastVersion = findLastHairVersion(hair_style) newVersion = lastVersion if newVersion <= 0 newVersion = 1 if newVersion > lastVersion - $Trainer.hair = getFullHairId(hair_style,newVersion) + $player.hair = getFullHairId(hair_style,newVersion) end def selectHairColor - original_color = $Trainer.hair_color - original_hair = $Trainer.hair + original_color = $player.hair_color + original_hair = $player.hair $game_switches[SWITCH_SELECTING_CLOTHES]=true $game_map.update display_outfit_preview() - hat = $Trainer.hat + hat = $player.hat commands = ["Swap base color", "Shift up", "Shift down", "Toggle hat", "Remove dye", "Confirm", "Never Mind"] previous_input = 0 @@ -87,28 +87,28 @@ def selectHairColor ret = true when 3 #Toggle hat pbSEPlay("GUI storage put down", 80, 100) - if hat == $Trainer.hat - $Trainer.hat = nil + if hat == $player.hat + $player.hat = nil else - $Trainer.hat = hat + $player.hat = hat end display_outfit_preview() when 4 #Reset pbSEPlay("GUI storage put down", 80, 100) - $Trainer.hair_color = 0 + $player.hair_color = 0 display_outfit_preview() ret = false when 5 #Confirm break else - $Trainer.hair_color = original_color - $Trainer.hair = original_hair + $player.hair_color = original_color + $player.hair = original_hair ret = false break end end hide_outfit_preview() - $Trainer.hat = hat + $player.hat = hat $game_switches[SWITCH_SELECTING_CLOTHES]=false $game_map.update return ret @@ -116,7 +116,7 @@ def selectHairColor end def selectHatColor(secondary_hat=false) - original_color = secondary_hat ? $Trainer.hat2_color : $Trainer.hat_color + original_color = secondary_hat ? $player.hat2_color : $player.hat_color display_outfit_preview() commands = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"] previous_input = 0 @@ -136,16 +136,16 @@ def selectHatColor(secondary_hat=false) ret = true when 2 #Reset pbSEPlay("GUI storage put down", 80, 100) - $Trainer.hat_color = 0 if !secondary_hat - $Trainer.hat2_color = 0 if secondary_hat + $player.hat_color = 0 if !secondary_hat + $player.hat2_color = 0 if secondary_hat display_outfit_preview refreshPlayerOutfit ret = false when 3 #Confirm break else - $Trainer.hat_color = original_color if !secondary_hat - $Trainer.hat2_color = original_color if secondary_hat + $player.hat_color = original_color if !secondary_hat + $player.hat2_color = original_color if secondary_hat ret = false break end @@ -156,7 +156,7 @@ def selectHatColor(secondary_hat=false) end def selectClothesColor - original_color = $Trainer.clothes_color + original_color = $player.clothes_color display_outfit_preview() commands = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"] previous_input = 0 @@ -177,14 +177,14 @@ def selectClothesColor ret = true when 2 #Reset pbSEPlay("GUI storage pick up", 80, 100) - $Trainer.clothes_color = 0 + $player.clothes_color = 0 display_outfit_preview() refreshPlayerOutfit() ret = false when 3 #Confirm break else - $Trainer.clothes_color = original_color + $player.clothes_color = original_color ret = false break end @@ -213,7 +213,7 @@ def selectHat(all_unlocked = false) display_outfit_preview() when 2 #REMOVE HAT playOutfitRemovedAnimation() - $Trainer.hat = nil + $player.hat = nil selector.display_outfit_preview() else break @@ -250,7 +250,7 @@ def selectClothes(all_unlocked = false) when 2 #REMOVE CLOTHES break if !$DEBUG playOutfitRemovedAnimation() - $Trainer.clothes = nil + $player.clothes = nil display_outfit_preview() else break diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/PokemonHatScreenPresenter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/PokemonHatScreenPresenter.rb index 9c8a85b7f..a6a603d37 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/PokemonHatScreenPresenter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/PokemonHatScreenPresenter.rb @@ -47,8 +47,8 @@ class PokemonHatPresenter loop do Graphics.update Input.update - @hat_id = selector.selectNextOutfit(@hat_id, 1, selector.hats_list, [], false, "hat",$Trainer.unlocked_hats,false) if Input.trigger?(Input::RIGHT) - @hat_id = selector.selectNextOutfit(@hat_id, -1, selector.hats_list, [], false, "hat",$Trainer.unlocked_hats,false) if Input.trigger?(Input::LEFT) + @hat_id = selector.selectNextOutfit(@hat_id, 1, selector.hats_list, [], false, "hat",$player.unlocked_hats,false) if Input.trigger?(Input::RIGHT) + @hat_id = selector.selectNextOutfit(@hat_id, -1, selector.hats_list, [], false, "hat",$player.unlocked_hats,false) if Input.trigger?(Input::LEFT) break if Input.trigger?(Input::USE) return false if Input.trigger?(Input::BACK) @view.update() diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/TrainerClothesPreview.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/TrainerClothesPreview.rb index 1f0c0eb18..b8a23b517 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/TrainerClothesPreview.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/TrainerClothesPreview.rb @@ -29,15 +29,15 @@ class TrainerClothesPreview end def resetOutfits() - @clothes = $Trainer.clothes - @hat = $Trainer.hat - @hat2 = $Trainer.hat2 - @hair = $Trainer.hair - @skin_tone = $Trainer.skin_tone - @hair_color = $Trainer.hair_color - @hat_color = $Trainer.hat_color - @hat2_color = $Trainer.hat2_color - @clothes_color = $Trainer.clothes_color + @clothes = $player.clothes + @hat = $player.hat + @hat2 = $player.hat2 + @hair = $player.hair + @skin_tone = $player.skin_tone + @hair_color = $player.hair_color + @hat_color = $player.hat_color + @hat2_color = $player.hat2_color + @clothes_color = $player.clothes_color end def show() diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/0_OutfitsMartAdapter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/0_OutfitsMartAdapter.rb index 8ae856d56..158c79363 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/0_OutfitsMartAdapter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/0_OutfitsMartAdapter.rb @@ -19,8 +19,8 @@ class OutfitsMartAdapter < PokemonMartAdapter @worn_clothes = get_current_clothes() @isShop = isShop @version = nil - $Trainer.dyed_hats = {} if !$Trainer.dyed_hats - $Trainer.dyed_clothes = {} if !$Trainer.dyed_clothes + $player.dyed_hats = {} if !$player.dyed_hats + $player.dyed_clothes = {} if !$player.dyed_clothes #todo: refactor to get the list from the first search when # setting the stock instead of searching twice diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesMartAdapter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesMartAdapter.rb index c28c2bc01..a9da22700 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesMartAdapter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesMartAdapter.rb @@ -3,9 +3,9 @@ class ClothesMartAdapter < OutfitsMartAdapter DEFAULT_NAME = "[unknown]" DEFAULT_DESCRIPTION = "A piece of clothing that trainers can wear." def toggleEvent(item) - if !isShop? && $Trainer.clothes_color != 0 + if !isShop? && $player.clothes_color != 0 if pbConfirmMessage(_INTL("Would you like to remove the dye?")) - $Trainer.clothes_color = 0 + $player.clothes_color = 0 end end end @@ -41,7 +41,7 @@ class ClothesMartAdapter < OutfitsMartAdapter def updateTrainerPreview(item, previewWindow) return if !item previewWindow.clothes = item.id - $Trainer.clothes = item.id + $player.clothes = item.id set_dye_color(item,previewWindow) pbRefreshSceneMap @@ -50,26 +50,26 @@ class ClothesMartAdapter < OutfitsMartAdapter def get_dye_color(item_id) return 0 if isShop? - $Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes - if $Trainer.dyed_clothes.include?(item_id) - return $Trainer.dyed_clothes[item_id] + $player.dyed_clothes= {} if ! $player.dyed_clothes + if $player.dyed_clothes.include?(item_id) + return $player.dyed_clothes[item_id] end return 0 end def set_dye_color(item,previewWindow) if !isShop? - $Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes - if $Trainer.dyed_clothes.include?(item.id) - dye_color = $Trainer.dyed_clothes[item.id] - $Trainer.clothes_color = dye_color + $player.dyed_clothes= {} if ! $player.dyed_clothes + if $player.dyed_clothes.include?(item.id) + dye_color = $player.dyed_clothes[item.id] + $player.clothes_color = dye_color previewWindow.clothes_color = dye_color else - $Trainer.clothes_color=0 + $player.clothes_color=0 previewWindow.clothes_color=0 end else - $Trainer.clothes_color=0 + $player.clothes_color=0 previewWindow.clothes_color=0 end end @@ -82,16 +82,16 @@ class ClothesMartAdapter < OutfitsMartAdapter end def get_current_clothes() - return $Trainer.clothes + return $player.clothes end def player_changed_clothes?() - $Trainer.clothes != @worn_clothes + $player.clothes != @worn_clothes end def putOnSelectedOutfit() - putOnClothes($Trainer.clothes) - @worn_clothes = $Trainer.clothes + putOnClothes($player.clothes) + @worn_clothes = $player.clothes end def putOnOutfit(item) @@ -100,12 +100,12 @@ class ClothesMartAdapter < OutfitsMartAdapter end def reset_player_clothes() - $Trainer.clothes = @worn_clothes - $Trainer.clothes_color = $Trainer.dyed_clothes[@worn_clothes] if $Trainer.dyed_clothes && $Trainer.dyed_clothes[@worn_clothes] + $player.clothes = @worn_clothes + $player.clothes_color = $player.dyed_clothes[@worn_clothes] if $player.dyed_clothes && $player.dyed_clothes[@worn_clothes] end def get_unlocked_items_list() - return $Trainer.unlocked_clothes + return $player.unlocked_clothes end def isWornItem?(item) diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShop.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShop.rb index fa7d5d72b..a9de9f51e 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShop.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShop.rb @@ -61,10 +61,10 @@ def hatShop(outfits_list = [], free=false, customMessage=nil) end def hairShop(outfits_list = [],free=false, customMessage=nil) - currentHair = getSimplifiedHairIdFromFullID($Trainer.hair) + currentHair = getSimplifiedHairIdFromFullID($player.hair) stock = [:SWAP_COLOR] #always add current hairstyle as first option (in case the player just wants to swap the color) - stock << get_hair_by_id(currentHair) if $Trainer.hair + stock << get_hair_by_id(currentHair) if $player.hair outfits_list.each { |outfit_id| next if outfit_id == currentHair outfit = get_hair_by_id(outfit_id) @@ -74,15 +74,15 @@ def hairShop(outfits_list = [],free=false, customMessage=nil) end def switchHatsPosition() - hat1 = $Trainer.hat - hat2 = $Trainer.hat2 - hat1_color = $Trainer.hat_color - hat2_color = $Trainer.hat2_color + hat1 = $player.hat + hat2 = $player.hat2 + hat1_color = $player.hat_color + hat2_color = $player.hat2_color - $Trainer.hat = hat2 - $Trainer.hat2 = hat1 - $Trainer.hat_color = hat1_color - $Trainer.hat_color = hat2_color + $player.hat = hat2 + $player.hat2 = hat1 + $player.hat_color = hat1_color + $player.hat_color = hat2_color pbSEPlay("GUI naming tab swap start") end @@ -108,7 +108,7 @@ end def changeClothesMenu() stock = [] - $Trainer.unlocked_clothes.each { |outfit_id| + $player.unlocked_clothes.each { |outfit_id| outfit = get_clothes_by_id(outfit_id) stock << outfit if outfit } @@ -117,7 +117,7 @@ end def changeHatMenu(is_secondary_hat = false) stock = [] - $Trainer.unlocked_hats.each { |outfit_id| + $player.unlocked_hats.each { |outfit_id| outfit = get_hat_by_id(outfit_id) stock << outfit if outfit } diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter.rb index 2956bdde5..361e7db80 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter.rb @@ -15,7 +15,7 @@ class ClothesShopPresenter < PokemonMartScreen def dyeClothes() - original_color = $Trainer.clothes_color + original_color = $player.clothes_color options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"] previous_input = 0 ret = false @@ -33,12 +33,12 @@ class ClothesShopPresenter < PokemonMartScreen ret = true when 2 #Reset pbSEPlay("GUI storage pick up", 80, 100) - $Trainer.clothes_color = 0 + $player.clothes_color = 0 ret = false when 3 #Confirm break else - $Trainer.clothes_color = original_color + $player.clothes_color = original_color ret = false break end @@ -60,7 +60,7 @@ class ClothesShopPresenter < PokemonMartScreen if options[choice] == cmd_wear putOnClothes(item,false) - $Trainer.clothes_color = @adapter.get_dye_color(item.id) + $player.clothes_color = @adapter.get_dye_color(item.id) return true elsif options[choice] == cmd_dye dyeClothes() diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter_HatsMenu.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter_HatsMenu.rb index 6ef657f5e..4eb61d38c 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter_HatsMenu.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/ClothesShopPresenter_HatsMenu.rb @@ -9,31 +9,31 @@ class ClothesShopPresenter < PokemonMartScreen def wearAsHat1(item) @adapter.set_secondary_hat(false) putOnClothes(item) - $Trainer.set_hat_color(@adapter.get_dye_color(item.id),false) + $player.set_hat_color(@adapter.get_dye_color(item.id),false) end def wearAsHat2(item) @adapter.set_secondary_hat(true) putOnClothes(item) - $Trainer.set_hat_color(@adapter.get_dye_color(item.id),true) + $player.set_hat_color(@adapter.get_dye_color(item.id),true) end def removeDye(item) if pbConfirm(_INTL("Are you sure you want to remove the dye from the {1}?", item.name)) - $Trainer.set_hat_color(0,@adapter.is_secondary_hat) + $player.set_hat_color(0,@adapter.is_secondary_hat) end end def swapHats() - echoln "hat 1: #{$Trainer.hat}" - echoln "hat 2: #{$Trainer.hat2}" + echoln "hat 1: #{$player.hat}" + echoln "hat 2: #{$player.hat2}" - $Trainer.hat, $Trainer.hat2 = $Trainer.hat2, $Trainer.hat + $player.hat, $player.hat2 = $player.hat2, $player.hat pbSEPlay("GUI naming tab swap start") - new_selected_hat = @adapter.is_secondary_hat ? $Trainer.hat2 : $Trainer.hat - echoln "hat 1: #{$Trainer.hat}" - echoln "hat 2: #{$Trainer.hat2}" + new_selected_hat = @adapter.is_secondary_hat ? $player.hat2 : $player.hat + echoln "hat 1: #{$player.hat}" + echoln "hat 2: #{$player.hat2}" echoln "new selected hat: #{new_selected_hat}" @scene.select_specific_item(new_selected_hat,true) @@ -69,18 +69,18 @@ class ClothesShopPresenter < PokemonMartScreen def putOnHats() - @adapter.worn_clothes = $Trainer.hat - @adapter.worn_clothes2 = $Trainer.hat2 + @adapter.worn_clothes = $player.hat + @adapter.worn_clothes2 = $player.hat2 - putOnHat($Trainer.hat,true,false) - putOnHat($Trainer.hat2,true,true) + putOnHat($player.hat,true,false) + putOnHat($player.hat2,true,true) playOutfitChangeAnimation() pbMessage(_INTL("You put on the hat(s)!\\wtnp[30]")) end def dyeOptions(secondary_hat=false,item) - original_color = secondary_hat ? $Trainer.hat2_color : $Trainer.hat_color + original_color = secondary_hat ? $player.hat2_color : $player.hat_color options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"] previous_input = 0 while (true) @@ -97,14 +97,14 @@ class ClothesShopPresenter < PokemonMartScreen ret = true when 2 #Reset pbSEPlay("GUI storage put down", 80, 100) - $Trainer.hat_color = 0 if !secondary_hat - $Trainer.hat2_color = 0 if secondary_hat + $player.hat_color = 0 if !secondary_hat + $player.hat2_color = 0 if secondary_hat ret = false when 3 #Confirm break else - $Trainer.hat_color = original_color if !secondary_hat - $Trainer.hat2_color = original_color if secondary_hat + $player.hat_color = original_color if !secondary_hat + $player.hat2_color = original_color if secondary_hat ret = false break end @@ -117,8 +117,8 @@ class ClothesShopPresenter < PokemonMartScreen def confirmPutClothes(item) if @adapter.is_a?(HatsMartAdapter) putOnHats() - $Trainer.hat_color = @adapter.get_dye_color($Trainer.hat) - $Trainer.hat2_color = @adapter.get_dye_color($Trainer.hat2) + $player.hat_color = @adapter.get_dye_color($player.hat) + $player.hat2_color = @adapter.get_dye_color($player.hat2) else putOnClothes(item,false) end diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HairMartAdapter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HairMartAdapter.rb index 70ae193fa..3bc3aa373 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HairMartAdapter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HairMartAdapter.rb @@ -8,9 +8,9 @@ class HairMartAdapter < OutfitsMartAdapter super @version = getCurrentHairVersion().to_i - @worn_hair = $Trainer.hair - @worn_hat = $Trainer.hat - @worn_hat2 = $Trainer.hat2 + @worn_hair = $player.hair + @worn_hat = $player.hat + @worn_hat2 = $player.hat2 @hat_visible = false @removable = true @@ -34,7 +34,7 @@ class HairMartAdapter < OutfitsMartAdapter end def player_changed_clothes?() - $Trainer.hairstyle != @worn_hair + $player.hairstyle != @worn_hair end #player can't "own" hairstyles @@ -85,7 +85,7 @@ class HairMartAdapter < OutfitsMartAdapter def getCurrentHairVersion() begin - return getSplitHairFilenameAndVersionFromID($Trainer.hair)[0] + return getSplitHairFilenameAndVersionFromID($player.hair)[0] rescue return 1 end @@ -96,7 +96,7 @@ class HairMartAdapter < OutfitsMartAdapter end def getName(item) - echoln $Trainer.hair + echoln $player.hair return item.id end @@ -121,12 +121,12 @@ class HairMartAdapter < OutfitsMartAdapter previewWindow.hat = displayed_hat previewWindow.hat2 = displayed_hat2 - $Trainer.hat = displayed_hat - $Trainer.hat2 = displayed_hat2 + $player.hat = displayed_hat + $player.hat2 = displayed_hat2 itemId = getCurrentHairId(item.id) previewWindow.hair = itemId - $Trainer.hair = itemId + $player.hair = itemId pbRefreshSceneMap previewWindow.updatePreview() end @@ -139,7 +139,7 @@ class HairMartAdapter < OutfitsMartAdapter end def get_current_clothes() - return $Trainer.hair + return $player.hair end def putOnOutfit(item) @@ -152,19 +152,19 @@ class HairMartAdapter < OutfitsMartAdapter # can change hair color for free if not changing the style if getVersionFromFullID(@worn_hair) != @version worn_id = getSimplifiedHairIdFromFullID(@worn_hair) - if getSimplifiedHairIdFromFullID($Trainer.hair) == worn_id + if getSimplifiedHairIdFromFullID($player.hair) == worn_id @worn_hair = getFullHairId(worn_id,@version) end end - $Trainer.hair = @worn_hair - $Trainer.hat = @worn_hat - $Trainer.hat2 = @worn_hat2 + $player.hair = @worn_hair + $player.hat = @worn_hat + $player.hat2 = @worn_hat2 end def get_unlocked_items_list() - return $Trainer.unlocked_hairstyles + return $player.unlocked_hairstyles end diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatShopView.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatShopView.rb index 4f18be497..b61ca02d7 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatShopView.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatShopView.rb @@ -27,7 +27,7 @@ class HatShopView < ClothesShopView def switchItemVersion(itemwindow) @adapter.switchVersion(itemwindow.item, 1) - new_selected_hat = @adapter.is_secondary_hat ? $Trainer.hat2 : $Trainer.hat + new_selected_hat = @adapter.is_secondary_hat ? $player.hat2 : $player.hat select_specific_item(new_selected_hat,true) updateTrainerPreview() end @@ -39,7 +39,7 @@ class HatShopView < ClothesShopView end def handleHatlessLayerIcons(selected_item) - other_hat = @adapter.is_secondary_hat ? $Trainer.hat : $Trainer.hat2 + other_hat = @adapter.is_secondary_hat ? $player.hat : $player.hat2 if !selected_item.is_a?(Hat) if @adapter.is_secondary_hat @sprites["wornHat_layer2"].bitmap=nil @@ -59,12 +59,12 @@ class HatShopView < ClothesShopView def displayLayerIcons(selected_item=nil) handleHatlessLayerIcons(selected_item) - hat1Filename = getOverworldHatFilename($Trainer.hat) - hat2Filename = getOverworldHatFilename($Trainer.hat2) + hat1Filename = getOverworldHatFilename($player.hat) + hat2Filename = getOverworldHatFilename($player.hat2) - hat_color_shift = $Trainer.dyed_hats[$Trainer.hat] - hat2_color_shift = $Trainer.dyed_hats[$Trainer.hat2] + hat_color_shift = $player.dyed_hats[$player.hat] + hat2_color_shift = $player.dyed_hats[$player.hat2] hatBitmapWrapper = AnimatedBitmap.new(hat1Filename, hat_color_shift) if pbResolveBitmap(hat1Filename) hat2BitmapWrapper = AnimatedBitmap.new(hat2Filename, hat2_color_shift) if pbResolveBitmap(hat2Filename) diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatsMartAdapter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatsMartAdapter.rb index 30b3e249f..a90d30c7a 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatsMartAdapter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/clothesShop/HatsMartAdapter.rb @@ -7,22 +7,22 @@ class HatsMartAdapter < OutfitsMartAdapter def initialize(stock = nil, isShop = nil, isSecondaryHat = false) super(stock,isShop,isSecondaryHat) - @worn_clothes = $Trainer.hat - @worn_clothes2 = $Trainer.hat2 + @worn_clothes = $player.hat + @worn_clothes2 = $player.hat2 @second_hat_visible = true end #Used in shops only def toggleSecondHat() @second_hat_visible = !@second_hat_visible - $Trainer.hat2 = @second_hat_visible ? @worn_clothes2 : nil + $player.hat2 = @second_hat_visible ? @worn_clothes2 : nil end def toggleEvent(item) if isShop? toggleSecondHat else - $Trainer.set_hat(nil,@is_secondary_hat) + $player.set_hat(nil,@is_secondary_hat) @worn_clothes = nil end end @@ -72,8 +72,8 @@ class HatsMartAdapter < OutfitsMartAdapter def updateTrainerPreview(item, previewWindow) if item.is_a?(Outfit) - hat1 = @is_secondary_hat ? get_hat_by_id($Trainer.hat) : item - hat2 = @is_secondary_hat ? item : get_hat_by_id($Trainer.hat2) + hat1 = @is_secondary_hat ? get_hat_by_id($player.hat) : item + hat2 = @is_secondary_hat ? item : get_hat_by_id($player.hat2) previewWindow.set_hat(hat1.id,false) if hat1 previewWindow.set_hat(hat2.id,true) if hat2 @@ -81,18 +81,18 @@ class HatsMartAdapter < OutfitsMartAdapter hat1_color=0 hat2_color=0 - hat1_color = $Trainer.dyed_hats[hat1.id] if hat1 && $Trainer.dyed_hats.include?(hat1.id) - hat2_color = $Trainer.dyed_hats[hat2.id] if hat2 && $Trainer.dyed_hats.include?(hat2.id) + hat1_color = $player.dyed_hats[hat1.id] if hat1 && $player.dyed_hats.include?(hat1.id) + hat2_color = $player.dyed_hats[hat2.id] if hat2 && $player.dyed_hats.include?(hat2.id) previewWindow.hat_color = hat1_color previewWindow.hat2_color = hat2_color - $Trainer.hat = hat1&.id - $Trainer.hat2 = hat2&.id - $Trainer.hat_color = hat1_color - $Trainer.hat2_color = hat2_color + $player.hat = hat1&.id + $player.hat2 = hat2&.id + $player.hat_color = hat1_color + $player.hat2_color = hat2_color else - $Trainer.set_hat(nil,@is_secondary_hat) + $player.set_hat(nil,@is_secondary_hat) previewWindow.set_hat(nil,@is_secondary_hat) end @@ -104,9 +104,9 @@ class HatsMartAdapter < OutfitsMartAdapter def get_dye_color(item_id) return if !item_id return 0 if isShop? - $Trainer.dyed_hats= {} if ! $Trainer.dyed_hats - if $Trainer.dyed_hats.include?(item_id) - return $Trainer.dyed_hats[item_id] + $player.dyed_hats= {} if ! $player.dyed_hats + if $player.dyed_hats.include?(item_id) + return $player.dyed_hats[item_id] end return 0 end @@ -117,7 +117,7 @@ class HatsMartAdapter < OutfitsMartAdapter if !isShop? else - $Trainer.set_hat_color(0,is_secondary_hat) + $player.set_hat_color(0,is_secondary_hat) previewWindow.hat_color=0 end end @@ -125,23 +125,23 @@ class HatsMartAdapter < OutfitsMartAdapter # def set_dye_color(item,previewWindow,is_secondary_hat=false) # return if !item # if !isShop? - # $Trainer.dyed_hats= {} if !$Trainer.dyed_hats + # $player.dyed_hats= {} if !$player.dyed_hats # # echoln item.id - # echoln $Trainer.dyed_hats.include?(item.id) - # echoln $Trainer.dyed_hats[item.id] + # echoln $player.dyed_hats.include?(item.id) + # echoln $player.dyed_hats[item.id] # - # if $Trainer.dyed_hats.include?(item.id) - # dye_color = $Trainer.dyed_hats[item.id] - # $Trainer.set_hat_color(dye_color,is_secondary_hat) + # if $player.dyed_hats.include?(item.id) + # dye_color = $player.dyed_hats[item.id] + # $player.set_hat_color(dye_color,is_secondary_hat) # previewWindow.hat_color = dye_color # else - # $Trainer.set_hat_color(0,is_secondary_hat) + # $player.set_hat_color(0,is_secondary_hat) # previewWindow.hat_color=0 # end - # #echoln $Trainer.dyed_hats + # #echoln $player.dyed_hats # else - # $Trainer.set_hat_color(0,is_secondary_hat) + # $player.set_hat_color(0,is_secondary_hat) # previewWindow.hat_color=0 # end # end @@ -156,22 +156,22 @@ class HatsMartAdapter < OutfitsMartAdapter end def get_current_clothes() - return $Trainer.hat(@is_secondary_hat) + return $player.hat(@is_secondary_hat) end def player_changed_clothes?() - echoln("Trainer hat: #{$Trainer.hat}, Worn hat: #{@worn_clothes}") - echoln("Trainer hat2: #{$Trainer.hat2}, Worn hat2: #{@worn_clothes2}") - $Trainer.hat != @worn_clothes || $Trainer.hat2 != @worn_clothes2 + echoln("Trainer hat: #{$player.hat}, Worn hat: #{@worn_clothes}") + echoln("Trainer hat2: #{$player.hat2}, Worn hat2: #{@worn_clothes2}") + $player.hat != @worn_clothes || $player.hat2 != @worn_clothes2 end def putOnSelectedOutfit() - putOnHat($Trainer.hat,true,false) if $Trainer.hat - putOnHat($Trainer.hat2,true,true) if $Trainer.hat2 + putOnHat($player.hat,true,false) if $player.hat + putOnHat($player.hat2,true,true) if $player.hat2 - @worn_clothes = $Trainer.hat - @worn_clothes2 = $Trainer.hat2 + @worn_clothes = $player.hat + @worn_clothes2 = $player.hat2 playOutfitChangeAnimation() pbMessage(_INTL("You put on the hat(s)!\\wtnp[30]")) @@ -184,15 +184,15 @@ class HatsMartAdapter < OutfitsMartAdapter end def reset_player_clothes() - $Trainer.set_hat(@worn_clothes,false) - $Trainer.set_hat(@worn_clothes2,true) + $player.set_hat(@worn_clothes,false) + $player.set_hat(@worn_clothes2,true) - $Trainer.set_hat_color($Trainer.dyed_hats[@worn_clothes],false) if $Trainer.dyed_hats && $Trainer.dyed_hats[@worn_clothes] - $Trainer.set_hat_color($Trainer.dyed_hats[@worn_clothes2],true) if $Trainer.dyed_hats && $Trainer.dyed_hats[@worn_clothes2] + $player.set_hat_color($player.dyed_hats[@worn_clothes],false) if $player.dyed_hats && $player.dyed_hats[@worn_clothes] + $player.set_hat_color($player.dyed_hats[@worn_clothes2],true) if $player.dyed_hats && $player.dyed_hats[@worn_clothes2] end def get_unlocked_items_list() - return $Trainer.unlocked_hats + return $player.unlocked_hats end def getSpecialItemCaption(specialType) @@ -220,7 +220,7 @@ class HatsMartAdapter < OutfitsMartAdapter end def getSpecialItemDescription(specialType) - hair_situation = !$Trainer.hair || getSimplifiedHairIdFromFullID($Trainer.hair) == HAIR_BALD ? "bald head" : "fabulous hair" + hair_situation = !$player.hair || getSimplifiedHairIdFromFullID($player.hair) == HAIR_BALD ? "bald head" : "fabulous hair" return "Go without a hat and show off your #{hair_situation}!" end diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/UI/hairMenu/HairstyleSelectionMenuPresenter.rb b/Data/Scripts/998_InfiniteFusion/Outfits/UI/hairMenu/HairstyleSelectionMenuPresenter.rb index 47b2e6e3a..6c8effa2d 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/UI/hairMenu/HairstyleSelectionMenuPresenter.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/UI/hairMenu/HairstyleSelectionMenuPresenter.rb @@ -16,14 +16,14 @@ class HairstyleSelectionMenuPresenter def initialize(view) @view = view - @hairstyle_full_id = $Trainer.hair + @hairstyle_full_id = $player.hair hairstyle_split = getSplitHairFilenameAndVersionFromID(@hairstyle_full_id) @hairstyle = hairstyle_split[0] if hairstyle_split[0] @hair_version = hairstyle_split[1] if hairstyle_split[1] - @hairColor = $Trainer.hair_color + @hairColor = $player.hair_color - @available_styles= $Trainer.unlocked_hairstyles + @available_styles= $player.unlocked_hairstyles @selected_hairstyle_index = 0 echoln @available_styles @@ -74,8 +74,8 @@ class HairstyleSelectionMenuPresenter def applyAllSelectedValues - $Trainer.hair = getFullHairId(@hairstyle,@hair_version) - $Trainer.hair_color = @hairColor + $player.hair = getFullHairId(@hairstyle,@hair_version) + $player.hair_color = @hairColor end def getOptionIndex(option_name) @@ -182,6 +182,6 @@ class HairstyleSelectionMenuPresenter hairstyle = @hairstyle hair_version =@hair_version hairId = getFullHairId(hairstyle,hair_version) - $Trainer.hair = hairId + $player.hair = hairId end end diff --git a/Data/Scripts/998_InfiniteFusion/Outfits/utils/OutfitsGameplayUtils.rb b/Data/Scripts/998_InfiniteFusion/Outfits/utils/OutfitsGameplayUtils.rb index fe932d08b..40d71ac2c 100644 --- a/Data/Scripts/998_InfiniteFusion/Outfits/utils/OutfitsGameplayUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Outfits/utils/OutfitsGameplayUtils.rb @@ -13,7 +13,7 @@ def obtainHat(outfit_id,secondary=false) pbMessage(_INTL("The hat #{outfit_id} is invalid.")) return end - $Trainer.unlocked_hats << outfit_id if !$Trainer.unlocked_hats.include?(outfit_id) + $player.unlocked_hats << outfit_id if !$player.unlocked_hats.include?(outfit_id) obtainOutfitMessage(outfit) if pbConfirmMessage("Would you like to put it on right now?") putOnHat(outfit_id, false, false) if !secondary @@ -31,7 +31,7 @@ def obtainClothes(outfit_id) return end return if !outfit - $Trainer.unlocked_clothes << outfit_id if !$Trainer.unlocked_clothes.include?(outfit_id) + $player.unlocked_clothes << outfit_id if !$player.unlocked_clothes.include?(outfit_id) obtainOutfitMessage(outfit) if pbConfirmMessage("Would you like to put it on right now?") putOnClothes(outfit_id) @@ -50,16 +50,16 @@ def obtainNewHairstyle(full_outfit_id) end def putOnClothes(outfit_id, silent = false) - $Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes - $Trainer.last_worn_outfit = $Trainer.clothes + $player.dyed_clothes= {} if ! $player.dyed_clothes + $player.last_worn_outfit = $player.clothes outfit = get_clothes_by_id(outfit_id) - $Trainer.clothes = outfit_id + $player.clothes = outfit_id - dye_color = $Trainer.dyed_clothes[outfit_id] + dye_color = $player.dyed_clothes[outfit_id] if dye_color - $Trainer.clothes_color = dye_color + $player.clothes_color = dye_color else - $Trainer.clothes_color = nil + $player.clothes_color = nil end $game_map.update @@ -68,19 +68,19 @@ def putOnClothes(outfit_id, silent = false) end def putOnHat(outfit_id, silent = false, is_secondary=false) - $Trainer.dyed_hats= {} if ! $Trainer.dyed_hats - $Trainer.set_last_worn_hat($Trainer.hat,is_secondary) + $player.dyed_hats= {} if ! $player.dyed_hats + $player.set_last_worn_hat($player.hat,is_secondary) outfit = get_hat_by_id(outfit_id) - $Trainer.set_hat(outfit_id,is_secondary) + $player.set_hat(outfit_id,is_secondary) - dye_color = $Trainer.dyed_hats[outfit_id] + dye_color = $player.dyed_hats[outfit_id] if dye_color - $Trainer.hat_color = dye_color if !is_secondary - $Trainer.hat2_color = dye_color if is_secondary + $player.hat_color = dye_color if !is_secondary + $player.hat2_color = dye_color if is_secondary else - $Trainer.hat_color = nil if !is_secondary - $Trainer.hat2_color = nil if is_secondary + $player.hat_color = nil if !is_secondary + $player.hat2_color = nil if is_secondary end $game_map.refreshPlayerOutfit() @@ -91,7 +91,7 @@ end def putOnHairFullId(full_outfit_id) outfit_id = getSplitHairFilenameAndVersionFromID(full_outfit_id)[1] outfit = get_hair_by_id(outfit_id) - $Trainer.hair = full_outfit_id + $player.hair = full_outfit_id $game_map.update refreshPlayerOutfit() putOnOutfitMessage(outfit) @@ -101,7 +101,7 @@ def putOnHair(outfit_id, version) full_id = getFullHairId(outfit_id, version) putOnHairFullId(full_id) #outfit = get_hair_by_id(outfit_id) - #$Trainer.hair = + #$player.hair = #putOnOutfitMessage(outfit) end @@ -173,15 +173,15 @@ def findLastHairVersion(hairId) end def isWearingClothes(outfitId) - return $Trainer.clothes == outfitId + return $player.clothes == outfitId end def isWearingHat(outfitId) - return $Trainer.hat == outfitId || $Trainer.hat2 == outfitId + return $player.hat == outfitId || $player.hat2 == outfitId end def isWearingHairstyle(outfitId, version = nil) - current_hair_split_id = getSplitHairFilenameAndVersionFromID($Trainer.hair) + current_hair_split_id = getSplitHairFilenameAndVersionFromID($player.hair) current_id = current_hair_split_id.length >= 1 ? current_hair_split_id[1] : nil current_version = current_hair_split_id[0] if version @@ -209,11 +209,11 @@ def getDefaultClothes() end def hasClothes?(outfit_id) - return $Trainer.unlocked_clothes.include?(outfit_id) + return $player.unlocked_clothes.include?(outfit_id) end def hasHat?(outfit_id) - return $Trainer.unlocked_hats.include?(outfit_id) + return $player.unlocked_hats.include?(outfit_id) end def getOutfitForPokemon(pokemonSpecies) @@ -249,16 +249,16 @@ def getOutfitForPokemon(pokemonSpecies) end def hatUnlocked?(hatId) - return $Trainer.unlocked_hats.include?(hatId) + return $player.unlocked_hats.include?(hatId) end def export_current_outfit() - skinTone = $Trainer.skin_tone ? $Trainer.skin_tone : 0 - hat = $Trainer.hat ? $Trainer.hat : "nil" - hair_color = $Trainer.hair_color || 0 - clothes_color = $Trainer.clothes_color || 0 - hat_color = $Trainer.hat_color || 0 - exportedString = "TrainerAppearance.new(#{skinTone},\"#{hat}\",\"#{$Trainer.clothes}\",\"#{$Trainer.hair}\",#{hair_color},#{clothes_color},#{hat_color})" + skinTone = $player.skin_tone ? $player.skin_tone : 0 + hat = $player.hat ? $player.hat : "nil" + hair_color = $player.hair_color || 0 + clothes_color = $player.clothes_color || 0 + hat_color = $player.hat_color || 0 + exportedString = "TrainerAppearance.new(#{skinTone},\"#{hat}\",\"#{$player.clothes}\",\"#{$player.hair}\",#{hair_color},#{clothes_color},#{hat_color})" Input.clipboard = exportedString end @@ -287,30 +287,30 @@ def setEventAppearance(event_id, trainerAppearance) end def getPlayerAppearance() - return TrainerAppearance.new($Trainer.skin_tone,$Trainer.hat,$Trainer.clothes, $Trainer.hair, - $Trainer.hair_color, $Trainer.clothes_color, $Trainer.hat_color) + return TrainerAppearance.new($player.skin_tone,$player.hat,$player.clothes, $player.hair, + $player.hair_color, $player.clothes_color, $player.hat_color) end def randomizePlayerOutfitUnlocked() - $Trainer.hat = $Trainer.unlocked_hats.sample - $Trainer.hat2 = $Trainer.unlocked_hats.sample - $Trainer.clothes = $Trainer.unlocked_clothes.sample + $player.hat = $player.unlocked_hats.sample + $player.hat2 = $player.unlocked_hats.sample + $player.clothes = $player.unlocked_clothes.sample dye_hat = rand(2)==0 dye_hat2 = rand(2)==0 dye_clothes = rand(2)==0 dye_hair = rand(2)==0 - $Trainer.hat2 = nil if rand(3)==0 + $player.hat2 = nil if rand(3)==0 - $Trainer.hat_color = dye_hat ? rand(255) : 0 - $Trainer.hat2_color = dye_hat2 ? rand(255) : 0 + $player.hat_color = dye_hat ? rand(255) : 0 + $player.hat2_color = dye_hat2 ? rand(255) : 0 - $Trainer.clothes_color = dye_clothes ? rand(255) : 0 - $Trainer.hair_color = dye_hair ? rand(255) : 0 + $player.clothes_color = dye_clothes ? rand(255) : 0 + $player.hair_color = dye_hair ? rand(255) : 0 hair_id = $PokemonGlobal.hairstyles_data.keys.sample hair_color = [1,2,3,4].sample - $Trainer.hair = getFullHairId(hair_id,hair_color) + $player.hair = getFullHairId(hair_id,hair_color) end @@ -389,21 +389,21 @@ def get_random_appearance() end def randomizePlayerOutfit() - $Trainer.hat = $PokemonGlobal.hats_data.keys.sample - $Trainer.hat2 = $PokemonGlobal.hats_data.keys.sample - $Trainer.hat2 = nil if(rand(3)==0) + $player.hat = $PokemonGlobal.hats_data.keys.sample + $player.hat2 = $PokemonGlobal.hats_data.keys.sample + $player.hat2 = nil if(rand(3)==0) - $Trainer.clothes = $PokemonGlobal.clothes_data.keys.sample - $Trainer.hat_color = rand(2)==0 ? rand(255) : 0 - $Trainer.hat2_color = rand(2)==0 ? rand(255) : 0 + $player.clothes = $PokemonGlobal.clothes_data.keys.sample + $player.hat_color = rand(2)==0 ? rand(255) : 0 + $player.hat2_color = rand(2)==0 ? rand(255) : 0 - $Trainer.clothes_color = rand(2)==0 ? rand(255) : 0 - $Trainer.hair_color = rand(2)==0 ? rand(255) : 0 + $player.clothes_color = rand(2)==0 ? rand(255) : 0 + $player.hair_color = rand(2)==0 ? rand(255) : 0 hair_id = $PokemonGlobal.hairstyles_data.keys.sample hair_color = [1,2,3,4].sample - $Trainer.skin_tone = [1,2,3,4,5,6].sample - $Trainer.hair = getFullHairId(hair_id,hair_color) + $player.skin_tone = [1,2,3,4,5,6].sample + $player.hair = getFullHairId(hair_id,hair_color) end diff --git a/Data/Scripts/998_InfiniteFusion/Player/PlayerAddons.rb b/Data/Scripts/998_InfiniteFusion/Player/PlayerAddons.rb index 775109d2a..bc7c856b7 100644 --- a/Data/Scripts/998_InfiniteFusion/Player/PlayerAddons.rb +++ b/Data/Scripts/998_InfiniteFusion/Player/PlayerAddons.rb @@ -137,8 +137,8 @@ class Player < Trainer def clothes_color=(value) @clothes_color = value - $Trainer.dyed_clothes = {} if !$Trainer.dyed_clothes - $Trainer.dyed_clothes[@clothes] = value if value + $player.dyed_clothes = {} if !$player.dyed_clothes + $player.dyed_clothes[@clothes] = value if value refreshPlayerOutfit() end @@ -148,25 +148,25 @@ class Player < Trainer else @hat_color = value end - $Trainer.dyed_hats = {} if !$Trainer.dyed_hats + $player.dyed_hats = {} if !$player.dyed_hats worn_hat = is_secondary ? @hat2 : @hat - $Trainer.dyed_hats[worn_hat] = value if value + $player.dyed_hats[worn_hat] = value if value refreshPlayerOutfit() end def hat_color=(value) @hat_color = value - $Trainer.dyed_hats = {} if !$Trainer.dyed_hats + $player.dyed_hats = {} if !$player.dyed_hats worn_hat = @hat - $Trainer.dyed_hats[worn_hat] = value if value + $player.dyed_hats[worn_hat] = value if value refreshPlayerOutfit() end def hat2_color=(value) @hat2_color = value - $Trainer.dyed_hats = {} if !$Trainer.dyed_hats + $player.dyed_hats = {} if !$player.dyed_hats worn_hat = @hat2 - $Trainer.dyed_hats[worn_hat] = value if value + $player.dyed_hats[worn_hat] = value if value refreshPlayerOutfit() end @@ -218,7 +218,7 @@ class Player < Trainer outfit_preview = PictureWindow.new(filepath) outfit_preview.x = Graphics.width / 4 musicEffect = "Key item get" - pbMessage(_INTL("{1} obtained \\C[{2}]{3}\\C[0]!\\me[{4}]", $Trainer.name, color, name, musicEffect)) + pbMessage(_INTL("{1} obtained \\C[{2}]{3}\\C[0]!\\me[{4}]", $player.name, color, name, musicEffect)) outfit_preview.dispose end diff --git a/Data/Scripts/998_InfiniteFusion/Showdown/ShowdownUtils.rb b/Data/Scripts/998_InfiniteFusion/Showdown/ShowdownUtils.rb index 637de9534..b5f5afd47 100644 --- a/Data/Scripts/998_InfiniteFusion/Showdown/ShowdownUtils.rb +++ b/Data/Scripts/998_InfiniteFusion/Showdown/ShowdownUtils.rb @@ -80,7 +80,7 @@ end def exportTeamForShowdown() message = "" - for pokemon in $Trainer.party + for pokemon in $player.party message << exportFusedPokemonForShowdown(pokemon) message << "\n" end