mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
battle tower stuff
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Data/Map786.rxdata
Normal file
BIN
Data/Map786.rxdata
Normal file
Binary file not shown.
BIN
Data/Map787.rxdata
Normal file
BIN
Data/Map787.rxdata
Normal file
Binary file not shown.
BIN
Data/Map789.rxdata
Normal file
BIN
Data/Map789.rxdata
Normal file
Binary file not shown.
Binary file not shown.
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -170,3 +172,17 @@ def createPokemon(species, level, iv, trainer)
|
||||
pkmn.calc_stats
|
||||
return pkmn
|
||||
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
|
||||
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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'] }
|
||||
|
||||
8
Data/Scripts/050_AddOns/PoliceQuest.rb
Normal file
8
Data/Scripts/050_AddOns/PoliceQuest.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
def getBlackMarketOriginalTrainer
|
||||
randomTrainer = GameData::Trainer.list_all.values.sample
|
||||
return randomTrainer
|
||||
# trainer = NPCTrainer.new("", randomTrainer.id)
|
||||
# return trainer
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.0 KiB |
@@ -1223,7 +1223,7 @@ Pokemon = B95H43,17
|
||||
#------------------
|
||||
|
||||
[YOUNGSTER,Joey]
|
||||
Pokemon = B19H20,17
|
||||
Pokemon = B19H19,17
|
||||
#----------------
|
||||
|
||||
[YOUNGSTER,Dan]
|
||||
|
||||
Reference in New Issue
Block a user