diff --git a/Data/Actors.rxdata b/Data/Actors.rxdata index 7967a5432..41edc8e26 100644 Binary files a/Data/Actors.rxdata and b/Data/Actors.rxdata differ diff --git a/Data/Animations.rxdata b/Data/Animations.rxdata index 8e67182ba..826e1e8a6 100644 Binary files a/Data/Animations.rxdata and b/Data/Animations.rxdata differ diff --git a/Data/Armors.rxdata b/Data/Armors.rxdata index 2249bec14..901f2bb2b 100644 Binary files a/Data/Armors.rxdata and b/Data/Armors.rxdata differ diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index 6cdf20b29..99e66525b 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Enemies.rxdata b/Data/Enemies.rxdata index 004ee903d..be622f513 100644 Binary files a/Data/Enemies.rxdata and b/Data/Enemies.rxdata differ diff --git a/Data/Items.rxdata b/Data/Items.rxdata index 3e62ba6d2..fe767fa0b 100644 Binary files a/Data/Items.rxdata and b/Data/Items.rxdata differ diff --git a/Data/Map059.rxdata b/Data/Map059.rxdata index aa5a4511a..c7fb36c4c 100644 Binary files a/Data/Map059.rxdata and b/Data/Map059.rxdata differ diff --git a/Data/Map095.rxdata b/Data/Map095.rxdata index 202e1bd4b..92abc3449 100644 Binary files a/Data/Map095.rxdata and b/Data/Map095.rxdata differ diff --git a/Data/Map108.rxdata b/Data/Map108.rxdata index ffb14e9aa..3ab6701ba 100644 Binary files a/Data/Map108.rxdata and b/Data/Map108.rxdata differ diff --git a/Data/Map111.rxdata b/Data/Map111.rxdata index 7d9e64f51..2b07c5e3b 100644 Binary files a/Data/Map111.rxdata and b/Data/Map111.rxdata differ diff --git a/Data/Map171.rxdata b/Data/Map171.rxdata index ae8a73be6..7248d5cbd 100644 Binary files a/Data/Map171.rxdata and b/Data/Map171.rxdata differ diff --git a/Data/Map179.rxdata b/Data/Map179.rxdata index 0a9a1aae6..a1bb07f6f 100644 Binary files a/Data/Map179.rxdata and b/Data/Map179.rxdata differ diff --git a/Data/Map229.rxdata b/Data/Map229.rxdata index 8d072ff60..cd56a7427 100644 Binary files a/Data/Map229.rxdata and b/Data/Map229.rxdata differ diff --git a/Data/Map490.rxdata b/Data/Map490.rxdata index 84ff6e010..31b5e50e1 100644 Binary files a/Data/Map490.rxdata and b/Data/Map490.rxdata differ diff --git a/Data/Map559.rxdata b/Data/Map559.rxdata index 2d3915193..3e19fa80c 100644 Binary files a/Data/Map559.rxdata and b/Data/Map559.rxdata differ diff --git a/Data/Map697.rxdata b/Data/Map697.rxdata index ec74c9c99..26141b6f6 100644 Binary files a/Data/Map697.rxdata and b/Data/Map697.rxdata differ diff --git a/Data/Map704.rxdata b/Data/Map704.rxdata index 76759ed9a..d8ca8c24c 100644 Binary files a/Data/Map704.rxdata and b/Data/Map704.rxdata differ diff --git a/Data/Map734.rxdata b/Data/Map734.rxdata index 75ad68c96..de63376c3 100644 Binary files a/Data/Map734.rxdata and b/Data/Map734.rxdata differ diff --git a/Data/Map735.rxdata b/Data/Map735.rxdata index 5a9d78d6d..278c4376f 100644 Binary files a/Data/Map735.rxdata and b/Data/Map735.rxdata differ diff --git a/Data/Map737.rxdata b/Data/Map737.rxdata index 25e16437c..a52182a06 100644 Binary files a/Data/Map737.rxdata and b/Data/Map737.rxdata differ diff --git a/Data/Map738.rxdata b/Data/Map738.rxdata index 3cc8dd39d..d454052c5 100644 Binary files a/Data/Map738.rxdata and b/Data/Map738.rxdata differ diff --git a/Data/Map782.rxdata b/Data/Map782.rxdata index a424d19da..b7cafaf92 100644 Binary files a/Data/Map782.rxdata and b/Data/Map782.rxdata differ diff --git a/Data/Map786.rxdata b/Data/Map786.rxdata new file mode 100644 index 000000000..bd87464c3 Binary files /dev/null and b/Data/Map786.rxdata differ diff --git a/Data/Map787.rxdata b/Data/Map787.rxdata new file mode 100644 index 000000000..83832a194 Binary files /dev/null and b/Data/Map787.rxdata differ diff --git a/Data/Map789.rxdata b/Data/Map789.rxdata new file mode 100644 index 000000000..10b9c217a Binary files /dev/null and b/Data/Map789.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index ceac43068..6e22fd624 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb b/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb index 5039e653e..ca24cdc15 100644 --- a/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb +++ b/Data/Scripts/010_Data/002_PBS data/013_Trainer.rb @@ -59,6 +59,10 @@ module GameData return self::DATA[key] end + def list_all + return self::DATA + end + # @param tr_type [Symbol, String] # @param tr_name [String] # @param tr_version [Integer, nil] diff --git a/Data/Scripts/014_Pokemon/005_Pokemon_Owner.rb b/Data/Scripts/014_Pokemon/005_Pokemon_Owner.rb index e72b58f2d..59348b398 100644 --- a/Data/Scripts/014_Pokemon/005_Pokemon_Owner.rb +++ b/Data/Scripts/014_Pokemon/005_Pokemon_Owner.rb @@ -32,6 +32,11 @@ class Pokemon return new(trainer.id, trainer.name, trainer.gender, trainer.language) end + def self.new_from_trainer_data(trainer) + validate trainer => [GameData::Trainer] + return new(trainer.id, trainer.name, 2, 2) + end + # Returns an Owner object with a foreign ID. # @param name [String] owner name # @param gender [Integer] owner gender diff --git a/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/002_Challenge_Data.rb b/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/002_Challenge_Data.rb index 7a28a0b45..d6c56b10f 100644 --- a/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/002_Challenge_Data.rb +++ b/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/002_Challenge_Data.rb @@ -25,16 +25,20 @@ def pbGetBTTrainers(challengeID) return [] end -def pbGetBTPokemon(challenge_id) - customsOnly = !$game_switches[SWITCH_BATTLE_FACTORY_INCLUDE_ALL] - if customsOnly - return getCustomSpeciesList() - end +def listAllPokemon list=[] for i in 0..PBSpecies.maxValue list << i end return list +end + +def pbGetBTPokemon(challenge_id) + customsOnly = !$game_switches[SWITCH_BATTLE_FACTORY_INCLUDE_ALL] + if customsOnly + return getCustomSpeciesList() + end + return listAllPokemon @@ -106,12 +110,12 @@ def pbBattleChallengeGraphic(event) bttrainers = pbGetBTTrainers(pbBattleChallenge.currentChallenge) filename = GameData::TrainerType.charset_filename_brief((bttrainers[nextTrainer][0] rescue nil)) begin - filename = "NPC 01" if nil_or_empty?(filename) + filename = "NPCpbAddForeignPokemon 01" if nil_or_empty?(filename) bitmap = AnimatedBitmap.new("Graphics/Characters/" + filename) bitmap.dispose event.character_name = filename rescue - event.character_name = "NPC 01" + event.character_name = "BWClerk" end end diff --git a/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/003_Challenge_ChooseFoes.rb b/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/003_Challenge_ChooseFoes.rb index c65cf5bf7..6e37d8340 100644 --- a/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/003_Challenge_ChooseFoes.rb +++ b/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/003_Challenge_ChooseFoes.rb @@ -61,20 +61,22 @@ def pbGenerateBattleTrainer(idxTrainer, rules) if pokemonnumbers.length <= rules.ruleset.suggestedNumber for n in pokemonnumbers rndpoke = btpokemon[n] - pkmn = rndpoke.createPokemon(level, indvalues, opponent) + pkmn = rndpoke.createPokemon(rndpoke,level, indvalues, opponent) opponent.party.push(pkmn) end return opponent end # There are more possible Pokémon than there are spaces available in the # trainer's party; randomly choose Pokémon + # + minBst = pbGet(VAR_BATTLE_TOWER_MIN_BST) + maxBst = pbGet(VAR_BATTLE_TOWER_MAX_BST) loop do opponent.party.clear while opponent.party.length < rules.ruleset.suggestedNumber - rnd = pokemonnumbers[rand(pokemonnumbers.length)] - rndpoke = btpokemon[rnd] - pkmn = rndpoke.createPokemon(level, indvalues, opponent) - opponent.party.push(pkmn) + rndpoke = getRandomPokemonSpecies(btpokemon,minBst,maxBst) + + opponent.party.push(createPokemon(rndpoke,level, indvalues, nil)) end break if rules.ruleset.isValid?(opponent.party) end @@ -169,4 +171,18 @@ def createPokemon(species, level, iv, trainer) GameData::Stat.each_main { |s| pkmn.iv[s.id] = iv } pkmn.calc_stats return pkmn -end \ No newline at end of file +end + +#list is a list of dex numbers of possible choices +def getRandomPokemonSpecies(list=[],minBST=0,maxBST=1000) + if list == [] + list = listAllPokemon + end + bst=-1 + while (bst < minBST || bst > maxBST) + chosenPokemon = list.sample + bst = calcBaseStatsSum(chosenPokemon) + end + return chosenPokemon +end + diff --git a/Data/Scripts/018_Alternate battle modes/002_Battle Frontier rules/003_Challenge_EntryRestrictions.rb b/Data/Scripts/018_Alternate battle modes/002_Battle Frontier rules/003_Challenge_EntryRestrictions.rb index fc28b042d..137e38627 100644 --- a/Data/Scripts/018_Alternate battle modes/002_Battle Frontier rules/003_Challenge_EntryRestrictions.rb +++ b/Data/Scripts/018_Alternate battle modes/002_Battle Frontier rules/003_Challenge_EntryRestrictions.rb @@ -9,9 +9,14 @@ class StandardRestriction return true if [:TRUANT, :SLOWSTART].include?(a) end # Certain named species are not banned - return true if [:DRAGONITE, :SALAMENCE, :TYRANITAR].include?(pkmn.species) + return true if pkmn.isFusionOf(:DRAGONITE) + return true if pkmn.isFusionOf(:SALAMENCE) + return true if pkmn.isFusionOf(:TYRANITAR) + # Certain named species are banned - return false if [:WYNAUT, :WOBBUFFET].include?(pkmn.species) + return false if pkmn.isFusionOf(:WYNAUT) + return false if pkmn.isFusionOf(:WOBBUFFET) + # Species with total base stat 600 or more are banned bst = 0 pkmn.baseStats.each_value { |s| bst += s } diff --git a/Data/Scripts/020_Debug/003_Debug menus/005_Debug_PokemonCommands.rb b/Data/Scripts/020_Debug/003_Debug menus/005_Debug_PokemonCommands.rb index 7c837ec2d..69265121a 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/005_Debug_PokemonCommands.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/005_Debug_PokemonCommands.rb @@ -1006,7 +1006,7 @@ PokemonDebugMenuCommands.register("ownership", { when 0 # Make player's pkmn.owner = Pokemon::Owner.new_from_trainer($Trainer) when 1 # Set OT's name - pkmn.owner.name = pbEnterPlayerName(_INTL("{1}'s OT's name?", pkmn.name), 1, Settings::MAX_PLAYER_NAME_SIZE) + pkmn.owner.name = pbEnterPlayerName(_INTL("{1}'s OT's name?", pkmn.name), 1, Settings::MAX_PLAYER_NAME_SIZE+10) when 2 # Set OT's gender cmd2 = screen.pbShowCommands(_INTL("Set OT's gender."), [_INTL("Male"), _INTL("Female"), _INTL("Unknown")], pkmn.owner.gender) diff --git a/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb b/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb index 175b51858..937599121 100644 --- a/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb +++ b/Data/Scripts/025-Randomizer/randomizer gym leader edit.rb @@ -430,7 +430,6 @@ def getCustomSpeciesList(allowOnline=true) if speciesList.length <= 200 && allowOnline #try to get list from github - print "let's try it online bruh" online_list = list_online_custom_sprites return nil if !online_list species_id_list = [] diff --git a/Data/Scripts/049_Compatibility/Constants.rb b/Data/Scripts/049_Compatibility/Constants.rb index 341252364..8aabe3ed5 100644 --- a/Data/Scripts/049_Compatibility/Constants.rb +++ b/Data/Scripts/049_Compatibility/Constants.rb @@ -119,6 +119,10 @@ VAR_SHINY_HUE_OFFSET=275 VAR_CURRENT_HIDDEN_MAP = 226 VAR_FUSE_COUNTER = 126 +VAR_BATTLE_TOWER_MIN_BST = 257 +VAR_BATTLE_TOWER_MAX_BST = 258 + + #Randomizer VAR_RANDOMIZER_WILD_POKE_BST=197 VAR_RANDOMIZER_TRAINER_BST=195 diff --git a/Data/Scripts/050_AddOns/BattleLounge.rb b/Data/Scripts/050_AddOns/BattleLounge.rb index 2d53591e7..df722a8f2 100644 --- a/Data/Scripts/050_AddOns/BattleLounge.rb +++ b/Data/Scripts/050_AddOns/BattleLounge.rb @@ -96,7 +96,7 @@ def get_random_battle_lounge_egg_group end GENERIC_PRIZES_MULTI = [:HEARTSCALE, :HEARTSCALE,:HEARTSCALE,:HEARTSCALE,:HEARTSCALE, - :LEMONADE, :PERFECTBALL, :BOOSTBALL, + :LEMONADE, :PERFECTBALL, :TRADEBALL, :GENDERBALL, :ABILITYBALL, :VIRUSBALL, :SHINYBALL, :RARECANDY] GENERIC_PRIZES_SINGLE = [:RARECANDY, :RARECANDY, :PPUP, :EJECTBUTTON, :FOCUSBAND, :FOCUSSASH, :RESETURGE, :ABILITYURGE, :ITEMURGE, :ITEMDROP, :HPUP, :INCUBATOR, :LUCKYEGG] diff --git a/Data/Scripts/050_AddOns/HttpCalls.rb b/Data/Scripts/050_AddOns/HttpCalls.rb index 9808acd7e..f468588b2 100644 --- a/Data/Scripts/050_AddOns/HttpCalls.rb +++ b/Data/Scripts/050_AddOns/HttpCalls.rb @@ -53,8 +53,11 @@ end # repo = "Aegide/custom-fusion-sprites" # folder = "CustomBattlers" def list_online_custom_sprites - repo = "infinitefusion/sprites" - folder = "CustomBattlers" + # repo = "infinitefusion/sprites" + # folder = "CustomBattlers" + + repo = "Aegide/custom-fusion-sprites" + folder = "CustomBattlers" api_url = "https://api.github.com/repos/#{repo}/contents/#{folder}" response = HTTPLite.get(api_url) return HTTPLite::JSON.parse(response[:body]).map { |file| file['name'] } diff --git a/Data/Scripts/050_AddOns/PoliceQuest.rb b/Data/Scripts/050_AddOns/PoliceQuest.rb new file mode 100644 index 000000000..1609c36f3 --- /dev/null +++ b/Data/Scripts/050_AddOns/PoliceQuest.rb @@ -0,0 +1,8 @@ +def getBlackMarketOriginalTrainer + randomTrainer = GameData::Trainer.list_all.values.sample + return randomTrainer + # trainer = NPCTrainer.new("", randomTrainer.id) + # return trainer +end + + diff --git a/Data/Skills.rxdata b/Data/Skills.rxdata index 61cba7ea2..a45219f5e 100644 Binary files a/Data/Skills.rxdata and b/Data/Skills.rxdata differ diff --git a/Data/States.rxdata b/Data/States.rxdata index 0f9b4ae5d..868d49e59 100644 Binary files a/Data/States.rxdata and b/Data/States.rxdata differ diff --git a/Data/System.rxdata b/Data/System.rxdata index 61d10c768..130b38a5a 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/Tilesets.rxdata b/Data/Tilesets.rxdata index ec292660a..acaa59516 100644 Binary files a/Data/Tilesets.rxdata and b/Data/Tilesets.rxdata differ diff --git a/Data/Weapons.rxdata b/Data/Weapons.rxdata index d9bd35260..c7ea19a7a 100644 Binary files a/Data/Weapons.rxdata and b/Data/Weapons.rxdata differ diff --git a/Graphics/CustomBattlers/indexed/173/173.200.png b/Graphics/CustomBattlers/indexed/173/173.200.png deleted file mode 100644 index b1469d998..000000000 Binary files a/Graphics/CustomBattlers/indexed/173/173.200.png and /dev/null differ diff --git a/Graphics/CustomBattlers/indexed/187/187.50.png b/Graphics/CustomBattlers/indexed/187/187.50.png deleted file mode 100644 index edbdc3c65..000000000 Binary files a/Graphics/CustomBattlers/indexed/187/187.50.png and /dev/null differ diff --git a/Graphics/CustomBattlers/indexed/188/188.50.png b/Graphics/CustomBattlers/indexed/188/188.50.png deleted file mode 100644 index 86e6e84d6..000000000 Binary files a/Graphics/CustomBattlers/indexed/188/188.50.png and /dev/null differ diff --git a/Graphics/CustomBattlers/indexed/188/188.51.png b/Graphics/CustomBattlers/indexed/188/188.51.png deleted file mode 100644 index 5ee669dcd..000000000 Binary files a/Graphics/CustomBattlers/indexed/188/188.51.png and /dev/null differ diff --git a/Graphics/CustomBattlers/indexed/255/255.342.png b/Graphics/CustomBattlers/indexed/255/255.342.png deleted file mode 100644 index aceb7ee2f..000000000 Binary files a/Graphics/CustomBattlers/indexed/255/255.342.png and /dev/null differ diff --git a/Graphics/CustomBattlers/indexed/35/35.200.png b/Graphics/CustomBattlers/indexed/35/35.200.png deleted file mode 100644 index ee03606f4..000000000 Binary files a/Graphics/CustomBattlers/indexed/35/35.200.png and /dev/null differ diff --git a/PBS/trainers.txt b/PBS/trainers.txt index 0aa6f6650..c3b344bff 100644 --- a/PBS/trainers.txt +++ b/PBS/trainers.txt @@ -1223,7 +1223,7 @@ Pokemon = B95H43,17 #------------------ [YOUNGSTER,Joey] -Pokemon = B19H20,17 +Pokemon = B19H19,17 #---------------- [YOUNGSTER,Dan]