mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Battle Factory improvements
This commit is contained in:
@@ -514,6 +514,8 @@ module Settings
|
||||
:FAIRY => [:TM45,:TM111,:TM96,:TM104] #ATTRACT DAZZLINGGLEAM MOONBLAST RECOVER
|
||||
}
|
||||
|
||||
EXCLUDE_FROM_RANDOM_SHOPS=[:RARECANDY]
|
||||
|
||||
end
|
||||
|
||||
# DO NOT EDIT THESE!
|
||||
|
||||
@@ -188,6 +188,8 @@ class PokeBattle_Battle
|
||||
when "2v1" then [2, 1]
|
||||
when "1v3" then [1, 3]
|
||||
when "1v2" then [1, 2]
|
||||
when "single" then [1, 1]
|
||||
when "1v1" then [1, 1]
|
||||
else default # Single, 1v1 (default)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -274,7 +274,23 @@ class PokemonLoadScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#todo
|
||||
def copyKeybindings
|
||||
#return
|
||||
keybinding_path = "Data/"
|
||||
keybinding_fileName="keybindings.mkxp1"
|
||||
|
||||
srcPath = keybinding_path+keybinding_fileName
|
||||
destPath = System.data_directory + keybinding_fileName
|
||||
if !File.file?(destPath)
|
||||
File.copy(srcPath,destPath)
|
||||
print("New default controls for controllers were copied. Please re-launch the game to enable them.")
|
||||
end
|
||||
end
|
||||
|
||||
def pbStartLoadScreen
|
||||
copyKeybindings()
|
||||
commands = []
|
||||
cmd_continue = -1
|
||||
cmd_new_game = -1
|
||||
|
||||
@@ -653,7 +653,7 @@ def replaceShopStockWithRandomized(stock)
|
||||
newStock = []
|
||||
for item in stock
|
||||
newItem =$PokemonGlobal.randomItemsHash[item]
|
||||
if newItem != nil && GameData::Item.get(newItem).price >0
|
||||
if newItem != nil && GameData::Item.get(newItem).price >0 && !Settings::EXCLUDE_FROM_RANDOM_SHOPS.include?(newItem)
|
||||
newStock << newItem
|
||||
else
|
||||
newStock << item
|
||||
|
||||
@@ -26,11 +26,19 @@ def pbGetBTTrainers(challengeID)
|
||||
end
|
||||
|
||||
def pbGetBTPokemon(challenge_id)
|
||||
customsOnly = !$game_switches[SWITCH_BATTLE_FACTORY_INCLUDE_ALL]
|
||||
if customsOnly
|
||||
return getCustomSpeciesList()
|
||||
end
|
||||
list=[]
|
||||
for i in 0..PBSpecies.maxValue
|
||||
list << i
|
||||
end
|
||||
return list
|
||||
|
||||
|
||||
|
||||
|
||||
# list=[]
|
||||
# while list.length <= target_size
|
||||
# list << generate_random_species(max_bst)
|
||||
|
||||
@@ -984,7 +984,6 @@ module Compiler
|
||||
slots.compact!
|
||||
slots.sort! { |a, b| (a[0] == b[0]) ? a[1].to_s <=> b[1].to_s : b[0] <=> a[0] }
|
||||
end
|
||||
p encounter_hash
|
||||
GameData::Encounter.register(encounter_hash)
|
||||
end
|
||||
# Raise an error if a map/version combo is used twice
|
||||
|
||||
@@ -90,6 +90,7 @@ SWITCH_FORCE_FUSE_NEXT_POKEMON=37
|
||||
SWITCH_FORCE_ALL_WILD_FUSIONS=828
|
||||
SWITCH_USED_AN_INCENSE=798
|
||||
SWITCH_FIRST_RIVAL_BATTLE=46
|
||||
SWITCH_BATTLE_FACTORY_INCLUDE_ALL = 775
|
||||
|
||||
|
||||
#############
|
||||
|
||||
Reference in New Issue
Block a user