mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
triple battles lounge
This commit is contained in:
@@ -22,6 +22,15 @@ module Settings
|
|||||||
|
|
||||||
BACKSPRITE_POSITION_OFFSET = 20
|
BACKSPRITE_POSITION_OFFSET = 20
|
||||||
|
|
||||||
|
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
|
||||||
|
VAR_1_PLACEHOLDER_SPECIES = :DIALGA
|
||||||
|
VAR_2_PLACEHOLDER_SPECIES = :PALKIA
|
||||||
|
VAR_3_PLACEHOLDER_SPECIES = :GIRATINA
|
||||||
|
|
||||||
|
RIVAL_STARTER_PLACEHOLDER_VARIABLE = 250
|
||||||
|
|
||||||
|
OVERRIDE_BATTLE_LEVEL_SWITCH = 785
|
||||||
|
OVERRIDE_BATTLE_LEVEL_VALUE_VAR =240
|
||||||
|
|
||||||
# The generation that the battle system follows. Used throughout the battle
|
# The generation that the battle system follows. Used throughout the battle
|
||||||
# scripts, and also by some other settings which are used in and out of battle
|
# scripts, and also by some other settings which are used in and out of battle
|
||||||
|
|||||||
@@ -97,9 +97,26 @@ module GameData
|
|||||||
return pbGetMessageFromHash(MessageTypes::TrainerLoseText, @real_lose_text)
|
return pbGetMessageFromHash(MessageTypes::TrainerLoseText, @real_lose_text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def replace_species_with_placeholder(species)
|
||||||
|
case species
|
||||||
|
when Settings::RIVAL_STARTER_PLACEHOLDER_SPECIES
|
||||||
|
return pbGet(Settings::RIVAL_STARTER_PLACEHOLDER_VARIABLE)
|
||||||
|
when Settings::VAR_1_PLACEHOLDER_SPECIES
|
||||||
|
return pbGet(1)
|
||||||
|
when Settings::VAR_2_PLACEHOLDER_SPECIES
|
||||||
|
return pbGet(2)
|
||||||
|
when Settings::VAR_3_PLACEHOLDER_SPECIES
|
||||||
|
return pbGet(3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a battle-ready version of a trainer's data.
|
# Creates a battle-ready version of a trainer's data.
|
||||||
# @return [Array] all information about a trainer in a usable form
|
# @return [Array] all information about a trainer in a usable form
|
||||||
def to_trainer
|
def to_trainer
|
||||||
|
placeholder_species = [Settings::RIVAL_STARTER_PLACEHOLDER_SPECIES,
|
||||||
|
Settings::VAR_1_PLACEHOLDER_SPECIES,
|
||||||
|
Settings::VAR_2_PLACEHOLDER_SPECIES,
|
||||||
|
Settings::VAR_3_PLACEHOLDER_SPECIES]
|
||||||
# Determine trainer's name
|
# Determine trainer's name
|
||||||
tr_name = self.name
|
tr_name = self.name
|
||||||
Settings::RIVAL_NAMES.each do |rival|
|
Settings::RIVAL_NAMES.each do |rival|
|
||||||
@@ -114,8 +131,22 @@ module GameData
|
|||||||
trainer.lose_text = self.lose_text
|
trainer.lose_text = self.lose_text
|
||||||
# Create each Pokémon owned by the trainer
|
# Create each Pokémon owned by the trainer
|
||||||
@pokemon.each do |pkmn_data|
|
@pokemon.each do |pkmn_data|
|
||||||
|
|
||||||
|
#infinite fusion edit
|
||||||
species = GameData::Species.get(pkmn_data[:species]).species
|
species = GameData::Species.get(pkmn_data[:species]).species
|
||||||
pkmn = Pokemon.new(species, pkmn_data[:level], trainer, false)
|
if placeholder_species.include?(species)
|
||||||
|
species = replace_species_with_placeholder(species)
|
||||||
|
end
|
||||||
|
level =pkmn_data[:level]
|
||||||
|
if $game_switches[Settings::OVERRIDE_BATTLE_LEVEL_SWITCH]
|
||||||
|
override_level = $game_variables[Settings::OVERRIDE_BATTLE_LEVEL_VALUE_VAR]
|
||||||
|
if override_level.is_a?(Integer)
|
||||||
|
level =override_level
|
||||||
|
end
|
||||||
|
end
|
||||||
|
####
|
||||||
|
pkmn = Pokemon.new(species, level, trainer, false)
|
||||||
|
|
||||||
trainer.party.push(pkmn)
|
trainer.party.push(pkmn)
|
||||||
# Set Pokémon's properties if defined
|
# Set Pokémon's properties if defined
|
||||||
if pkmn_data[:form]
|
if pkmn_data[:form]
|
||||||
|
|||||||
@@ -379,6 +379,17 @@ def pbTrainerBattleCore(*args)
|
|||||||
trainer = pbLoadTrainer(arg[0],arg[1],arg[2])
|
trainer = pbLoadTrainer(arg[0],arg[1],arg[2])
|
||||||
pbMissingTrainer(arg[0],arg[1],arg[2]) if !trainer
|
pbMissingTrainer(arg[0],arg[1],arg[2]) if !trainer
|
||||||
return 0 if !trainer
|
return 0 if !trainer
|
||||||
|
|
||||||
|
#infinite fusion edit
|
||||||
|
name_override = arg[4]
|
||||||
|
type_override = arg[5]
|
||||||
|
if type_override != nil
|
||||||
|
trainer.trainer_type = type_override
|
||||||
|
end
|
||||||
|
if name_override != nil
|
||||||
|
trainer.name = name_override
|
||||||
|
end
|
||||||
|
#####
|
||||||
Events.onTrainerPartyLoad.trigger(nil,trainer)
|
Events.onTrainerPartyLoad.trigger(nil,trainer)
|
||||||
foeTrainers.push(trainer)
|
foeTrainers.push(trainer)
|
||||||
foePartyStarts.push(foeParty.length)
|
foePartyStarts.push(foeParty.length)
|
||||||
@@ -448,7 +459,10 @@ end
|
|||||||
# multiple trainer events spot the player at once. The extra code in this method
|
# multiple trainer events spot the player at once. The extra code in this method
|
||||||
# deals with that case and can cause a double trainer battle instead.
|
# deals with that case and can cause a double trainer battle instead.
|
||||||
def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
|
def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
|
||||||
doubleBattle=false, trainerPartyID=0, canLose=false, outcomeVar=1)
|
doubleBattle=false, trainerPartyID=0, canLose=false, outcomeVar=1,
|
||||||
|
name_override=nil,trainer_type_overide=nil)
|
||||||
|
#level override applies to every pokemon
|
||||||
|
|
||||||
# If there is another NPC trainer who spotted the player at the same time, and
|
# If there is another NPC trainer who spotted the player at the same time, and
|
||||||
# it is possible to have a double battle (the player has 2+ able Pokémon or
|
# it is possible to have a double battle (the player has 2+ able Pokémon or
|
||||||
# has a partner trainer), then record this first NPC trainer into
|
# has a partner trainer), then record this first NPC trainer into
|
||||||
@@ -491,7 +505,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
|
|||||||
[trainerID,trainerName,trainerPartyID,endSpeech]
|
[trainerID,trainerName,trainerPartyID,endSpeech]
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
decision = pbTrainerBattleCore([trainerID,trainerName,trainerPartyID,endSpeech])
|
decision = pbTrainerBattleCore([trainerID,trainerName,trainerPartyID,endSpeech,name_override,trainer_type_overide])
|
||||||
end
|
end
|
||||||
# Finish off the recorded waiting trainer, because they have now been battled
|
# Finish off the recorded waiting trainer, because they have now been battled
|
||||||
if decision==1 && $PokemonTemp.waitingTrainer # Win
|
if decision==1 && $PokemonTemp.waitingTrainer # Win
|
||||||
|
|||||||
@@ -43,13 +43,33 @@ class Trainer
|
|||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
def trainer_type_name; return GameData::TrainerType.get(@trainer_type).name; end
|
def trainer_type_name
|
||||||
def base_money; return GameData::TrainerType.get(@trainer_type).base_money; end
|
return GameData::TrainerType.get(@trainer_type).name;
|
||||||
def gender; return GameData::TrainerType.get(@trainer_type).gender; end
|
end
|
||||||
def male?; return GameData::TrainerType.get(@trainer_type).male?; end
|
|
||||||
def female?; return GameData::TrainerType.get(@trainer_type).female?; end
|
def base_money
|
||||||
def skill_level; return GameData::TrainerType.get(@trainer_type).skill_level; end
|
return GameData::TrainerType.get(@trainer_type).base_money;
|
||||||
def skill_code; return GameData::TrainerType.get(@trainer_type).skill_code; end
|
end
|
||||||
|
|
||||||
|
def gender
|
||||||
|
return GameData::TrainerType.get(@trainer_type).gender;
|
||||||
|
end
|
||||||
|
|
||||||
|
def male?
|
||||||
|
return GameData::TrainerType.get(@trainer_type).male?;
|
||||||
|
end
|
||||||
|
|
||||||
|
def female?
|
||||||
|
return GameData::TrainerType.get(@trainer_type).female?;
|
||||||
|
end
|
||||||
|
|
||||||
|
def skill_level
|
||||||
|
return GameData::TrainerType.get(@trainer_type).skill_level;
|
||||||
|
end
|
||||||
|
|
||||||
|
def skill_code
|
||||||
|
return GameData::TrainerType.get(@trainer_type).skill_code;
|
||||||
|
end
|
||||||
|
|
||||||
def has_skill_code?(code)
|
def has_skill_code?(code)
|
||||||
c = skill_code
|
c = skill_code
|
||||||
@@ -82,6 +102,17 @@ class Trainer
|
|||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def
|
||||||
|
highest_level_pokemon_in_party
|
||||||
|
max_level = 0
|
||||||
|
for pokemon in @party
|
||||||
|
if pokemon.level > max_level
|
||||||
|
max_level = pokemon.level
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return max_level
|
||||||
|
end
|
||||||
|
|
||||||
def party_full?
|
def party_full?
|
||||||
return party_count >= Settings::MAX_PARTY_SIZE
|
return party_count >= Settings::MAX_PARTY_SIZE
|
||||||
end
|
end
|
||||||
@@ -172,10 +203,10 @@ class Trainer
|
|||||||
|
|
||||||
def initialize(name, trainer_type)
|
def initialize(name, trainer_type)
|
||||||
@trainer_type = GameData::TrainerType.get(trainer_type).id
|
@trainer_type = GameData::TrainerType.get(trainer_type).id
|
||||||
@name = name
|
@name = name
|
||||||
@id = rand(2 ** 16) | rand(2 ** 16) << 16
|
@id = rand(2 ** 16) | rand(2 ** 16) << 16
|
||||||
@language = pbGetLanguage
|
@language = pbGetLanguage
|
||||||
@party = []
|
@party = []
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -188,7 +219,7 @@ class NPCTrainer < Trainer
|
|||||||
|
|
||||||
def initialize(name, trainer_type)
|
def initialize(name, trainer_type)
|
||||||
super
|
super
|
||||||
@items = []
|
@items = []
|
||||||
@lose_text = nil
|
@lose_text = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ module PBTrainers
|
|||||||
COOLTRAINER_F = 36
|
COOLTRAINER_F = 36
|
||||||
YOUNGSTER = 37
|
YOUNGSTER = 37
|
||||||
LASS = 38
|
LASS = 38
|
||||||
POKEMONRANGER_M =
|
POKEMONRANGER_M =39
|
||||||
POKEMONRANGER_F = 40
|
POKEMONRANGER_F = 40
|
||||||
PSYCHIC_M = 41
|
PSYCHIC_M = 41
|
||||||
PSYCHIC_F = 42
|
PSYCHIC_F = 42
|
||||||
SWIMMER_M = 43
|
SWIMMER_M = 43
|
||||||
@@ -93,8 +93,8 @@ module PBTrainers
|
|||||||
POKEMONTRAINER_LeafB = 88
|
POKEMONTRAINER_LeafB = 88
|
||||||
POKEMONTRAINER_LeafG = 89
|
POKEMONTRAINER_LeafG = 89
|
||||||
POKEMONTRAINER_LeafY = 90
|
POKEMONTRAINER_LeafY = 90
|
||||||
COOLTRAINER_M = 91
|
COOLTRAINER_M2 = 91
|
||||||
COOLTRAINER_F = 92
|
COOLTRAINER_F2 = 92
|
||||||
ROBOT = 93
|
ROBOT = 93
|
||||||
FARMER = 94
|
FARMER = 94
|
||||||
PYROMANIAC = 95
|
PYROMANIAC = 95
|
||||||
|
|||||||
127
Data/Scripts/050_AddOns/BattleLounge.rb
Normal file
127
Data/Scripts/050_AddOns/BattleLounge.rb
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
def get_opponent_level
|
||||||
|
return $Trainer.highest_level_pokemon_in_party
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_egg_group_from_id(id)
|
||||||
|
case id
|
||||||
|
when 0 ;return nil
|
||||||
|
when 1;return :Monster
|
||||||
|
when 2;return :Water1
|
||||||
|
when 3;return :Bug
|
||||||
|
when 4;return :Flying
|
||||||
|
when 5;return :Field
|
||||||
|
when 6;return :Fairy
|
||||||
|
when 7;return :Grass
|
||||||
|
when 8;return :Humanlike
|
||||||
|
when 9;return :Water3
|
||||||
|
when 10;return :Mineral
|
||||||
|
when 11;return :Amorphous
|
||||||
|
when 12;return :Water2
|
||||||
|
when 13;return :Ditto
|
||||||
|
when 14;return :Dragon
|
||||||
|
when 15;return :Undiscovered
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_egg_group_name(id)
|
||||||
|
case id
|
||||||
|
when 0 ;return nil
|
||||||
|
when 1;return "Monster Pokémon"
|
||||||
|
when 2;return :"Water Pokémon"
|
||||||
|
when 3;return :"Bug Pokémon"
|
||||||
|
when 4;return :"Bird Pokémon"
|
||||||
|
when 5;return :"Land Pokémon"
|
||||||
|
when 6;return :"Cute Pokémon"
|
||||||
|
when 7;return :"Plant Pokémon"
|
||||||
|
when 8;return :"Human-like Pokémon"
|
||||||
|
when 9;return :"Water Pokémon"
|
||||||
|
when 10;return :"Mineral Pokémon"
|
||||||
|
when 11;return :"Blob Pokémon"
|
||||||
|
when 12;return :"Water Pokémon"
|
||||||
|
when 13;return :"Ditto"
|
||||||
|
when 14;return :"Dragon Pokémon"
|
||||||
|
when 15;return :"Legendary Pokémon"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_random_trainer_name(trainer_class) #0: male, 1: female
|
||||||
|
gender = GameData::TrainerType.get(trainer_class).gender
|
||||||
|
if(gender == 0)
|
||||||
|
return RandTrainerNames_male[rand(RandTrainerNames_male.length)]
|
||||||
|
else
|
||||||
|
return RandTrainerNames_female[rand(RandTrainerNames_female.length)]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_random_battle_lounge_egg_group
|
||||||
|
_DISABLED_EGG_GROUPS = [0,13,15]
|
||||||
|
group=0
|
||||||
|
while _DISABLED_EGG_GROUPS.include?(group)
|
||||||
|
group = rand(0,15)
|
||||||
|
end
|
||||||
|
return group
|
||||||
|
end
|
||||||
|
|
||||||
|
GENERIC_PRIZES_MULTI = [:HEARTSCALE,:LEMONADE]
|
||||||
|
GENERIC_PRIZES_SINGLE = [:RARECANDY,:RARECANDY,:PPUP,:EJECTBUTTON,:FOCUSBAND,:FOCUSSASH,:RESETURGE,:ABILITYURGE,:ITEMURGE,:ITEMDROP,:HPUP]
|
||||||
|
MONSTER_PRIZES = [:RAREBONE,:LAGGINGTAIL,:RAZORFANG,:RAZORCLAW]
|
||||||
|
WATER_PRIZES = [:MYSTICWATER,:BIGPEARL]
|
||||||
|
BUG_PRIZES = [:SILVERPOWDER,:SHEDSHELL]
|
||||||
|
FLYING_PRIZES = [:HEALTHWING,:MUSCLEWING,:RESISTWING,:GENIUSWING,:CLEVERWING,:SWIFTWING]
|
||||||
|
FIELD_PRIZES = [:MOOMOOMILK,:IRONBALL]
|
||||||
|
FAIRY_PRIZES = [:STARPIECE,:DESTINYKNOT]
|
||||||
|
HUMAN_PRIZES = [:BLACKBELT,:RINGTARGET,:EXPERTBELT]
|
||||||
|
GRASS_PRIZES = [:REVIVALHERB,:POWERHERB,:HEALPOWDER,:ABSORBBULB,:BIGMUSHROOM]
|
||||||
|
MINERAL_PRIZES = [:CELLBATTERY]
|
||||||
|
AMORPHOUS_PRIZES = [:SPELLTAG,:WIDELENS,:ZOOMLENS,:SCOPELENS]
|
||||||
|
DRAGON_PRIZES = [:DRAGONSCALE,:DRAGONFANG]
|
||||||
|
UNDISCOVERED_PRIZES = [:MASTERBALL,:SACREDASH]
|
||||||
|
#todo: prizes related to the group (ex: dragon fang for dragon types, TMs, etc. )
|
||||||
|
# todo: if heartscale, give a random amount from 10-20
|
||||||
|
def get_random_battle_lounge_prize(group_type)
|
||||||
|
generic_prizes = [GENERIC_PRIZES_MULTI, GENERIC_PRIZES_SINGLE]
|
||||||
|
is_generic_prize = rand(2)==1
|
||||||
|
if is_generic_prize
|
||||||
|
type = generic_prizes.sample
|
||||||
|
return type.sample
|
||||||
|
else
|
||||||
|
case get_egg_group_from_id(group_type)
|
||||||
|
when :Monster ; return MONSTER_PRIZES.sample
|
||||||
|
when :Water1,:Water2,:Water3 ; return WATER_PRIZES.sample
|
||||||
|
when :Bug ; return BUG_PRIZES.sample
|
||||||
|
when :Flying ; return FLYING_PRIZES.sample
|
||||||
|
when :Field ; return FIELD_PRIZES.sample
|
||||||
|
when :Fairy ; return FAIRY_PRIZES.sample
|
||||||
|
when :Grass ; return GRASS_PRIZES.sample
|
||||||
|
when :Humanlike ; return MINERAL_PRIZES.sample
|
||||||
|
when :Amorphous ; return AMORPHOUS_PRIZES.sample
|
||||||
|
when :Dragon ; return DRAGON_PRIZES.sample
|
||||||
|
when :Undiscovered ; return UNDISCOVERED_PRIZES.sample
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def generateSameEggGroupFusionsTeam(eggGroup_id)
|
||||||
|
eggGroup = get_egg_group_from_id(eggGroup_id)
|
||||||
|
teamComplete = false
|
||||||
|
generatedTeam = []
|
||||||
|
while !teamComplete
|
||||||
|
foundFusionPartner = false
|
||||||
|
species1 = rand(Settings::NB_POKEMON)+1
|
||||||
|
if getPokemonEggGroups(species1).include?(eggGroup)
|
||||||
|
foundFusionPartner = false
|
||||||
|
while !foundFusionPartner
|
||||||
|
species2 = rand(Settings::NB_POKEMON)+1
|
||||||
|
if getPokemonEggGroups(species2).include?(eggGroup)
|
||||||
|
generatedTeam << getFusionSpecies(species1, species2)
|
||||||
|
foundFusionPartner = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
teamComplete = generatedTeam.length == 3
|
||||||
|
end
|
||||||
|
return generatedTeam
|
||||||
|
end
|
||||||
232
Data/Scripts/050_AddOns/CustomTrainers.rb
Normal file
232
Data/Scripts/050_AddOns/CustomTrainers.rb
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
# # Written by Stochastic, except for customTrainerBattle method which is a
|
||||||
|
# # modified version of pbTrainerBattle method.
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# BR_DRAW = 5
|
||||||
|
# BR_LOSS = 2
|
||||||
|
# BR_WIN = 1
|
||||||
|
#
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
# # species - Name of the species, e.g. "PIKACHU"
|
||||||
|
# # level - Level
|
||||||
|
# # moveset - Optional. Array of moves, e.g. [:MUDSLAP, :THUNDERBOLT, :VINEWHIP]
|
||||||
|
# # If not specified, pokemon will be created with moves learned by leveling.
|
||||||
|
# # The pokemon doesn't need to be able to learn the given moves, they can be
|
||||||
|
# # arbitary.
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
# def createPokemon(species, level, helditem=nil, moveset=nil, ability=nil, form=nil, nature=nil, hpev=nil, atkev=nil, defev=nil, speev=nil, spaev=nil, spdev=nil)
|
||||||
|
# begin
|
||||||
|
# poke = Pokemon.new(species, level)
|
||||||
|
# poke.item=(helditem) if helditem
|
||||||
|
# poke.moves = convertMoves(moveset) if moveset
|
||||||
|
# poke.ability=(ability) if ability
|
||||||
|
# poke.form = form if form
|
||||||
|
# poke.shiny = false
|
||||||
|
# poke.nature =(nature) if nature
|
||||||
|
# poke.happiness=0
|
||||||
|
# poke.iv[0]=hpev
|
||||||
|
# poke.iv[1]=atkev
|
||||||
|
# poke.iv[2]=defev
|
||||||
|
# poke.iv[3]=speev
|
||||||
|
# poke.iv[4]=spaev
|
||||||
|
# poke.iv[5]=spdev
|
||||||
|
#
|
||||||
|
# poke.calc_stats
|
||||||
|
# return poke
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def convertMoves(moves)
|
||||||
|
# moves.map! {|m| PBMove.new(getMoveID(m))}
|
||||||
|
# return moves
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# # provide move like this; :TACKLE
|
||||||
|
# def getMoveID(move)
|
||||||
|
# return getConst(PBMoves,move)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
# # Creates a trainer with specified id, name, party, and optionally, items.
|
||||||
|
# # Does not depend on defined trainers, only on trainer types
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
# def createTrainer(trainerid,trainername,party,items=[])
|
||||||
|
#
|
||||||
|
# name = pbGetMessageFromHash(MessageTypes::TrainerNames, trainername)
|
||||||
|
#
|
||||||
|
# trainer_hash = {
|
||||||
|
# :id_number => 999,
|
||||||
|
# :trainer_type => trainerid,
|
||||||
|
# :name => name,
|
||||||
|
# :version => 0,
|
||||||
|
# :pokemon => party,
|
||||||
|
# :items => items
|
||||||
|
# }
|
||||||
|
# opponent = GameData::Trainer.new(trainer_hash)
|
||||||
|
# #opponent.setForeignID($Trainer) if $Trainer
|
||||||
|
# # opponent.party = party
|
||||||
|
# return [opponent.to_trainer,items,party]
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def init_trainer(trainer_data)
|
||||||
|
# return (trainer_data) ? trainer_data.to_trainer : nil
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
# # Initiates trainer battle. This is a modified pbTrainerBattle method.
|
||||||
|
# #
|
||||||
|
# # trainer - custom PokeBattle_Trainer provided by the user
|
||||||
|
# # endspeech - what the trainer says in-battle when defeated
|
||||||
|
# # doublebattle - Optional. Set it to true if you want a double battle
|
||||||
|
# # canlose - Optional. Set it to true if you want your party to be healed after battle,and if you don't want to be sent to a pokemon center if you lose
|
||||||
|
# # ------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# def customTrainerBattle(trainer,endSpeech,doubleBattle=false,canLose=false,outcomeVar=1)
|
||||||
|
# # If there is another NPC trainer who spotted the player at the same time, and
|
||||||
|
# # it is possible to have a double battle (the player has 2+ able Pokémon or
|
||||||
|
# # has a partner trainer), then record this first NPC trainer into
|
||||||
|
# # $PokemonTemp.waitingTrainer and end this method. That second NPC event will
|
||||||
|
# # then trigger and cause the battle to happen against this first trainer and
|
||||||
|
# # themselves.
|
||||||
|
# if !$PokemonTemp.waitingTrainer && pbMapInterpreterRunning? &&
|
||||||
|
# ($Trainer.able_pokemon_count > 1 ||
|
||||||
|
# ($Trainer.able_pokemon_count > 0 && $PokemonGlobal.partner))
|
||||||
|
# thisEvent = pbMapInterpreter.get_character(0)
|
||||||
|
# # Find all other triggered trainer events
|
||||||
|
# triggeredEvents = $game_player.pbTriggeredTrainerEvents([2],false)
|
||||||
|
# otherEvent = []
|
||||||
|
# for i in triggeredEvents
|
||||||
|
# next if i.id==thisEvent.id
|
||||||
|
# next if $game_self_switches[[$game_map.map_id,i.id,"A"]]
|
||||||
|
# otherEvent.push(i)
|
||||||
|
# end
|
||||||
|
# return false if !trainer
|
||||||
|
# Events.onTrainerPartyLoad.trigger(nil,trainer)
|
||||||
|
# # If there is exactly 1 other triggered trainer event, and this trainer has
|
||||||
|
# # 6 or fewer Pokémon, record this trainer for a double battle caused by the
|
||||||
|
# # other triggered trainer event
|
||||||
|
# if otherEvent.length == 1 && trainer.party.length <= Settings::MAX_PARTY_SIZE
|
||||||
|
# trainer.lose_text = endSpeech if endSpeech && !endSpeech.empty?
|
||||||
|
# $PokemonTemp.waitingTrainer = [trainer, thisEvent.id]
|
||||||
|
# return false
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# # Set some battle rules
|
||||||
|
# setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
|
||||||
|
# setBattleRule("canLose") if canLose
|
||||||
|
# setBattleRule("double") if doubleBattle || $PokemonTemp.waitingTrainer
|
||||||
|
# # Perform the battle
|
||||||
|
# if $PokemonTemp.waitingTrainer
|
||||||
|
# decision = pbTrainerBattleCore($PokemonTemp.waitingTrainer[0],
|
||||||
|
# [trainer[0].trainer_type,trainer[0].name,endSpeech]
|
||||||
|
# )
|
||||||
|
# else
|
||||||
|
# decision = pbTrainerCustomBattleCore(trainer,[trainer[0].trainer_type,trainer[0].name,endSpeech]) #trainerPartyID
|
||||||
|
# end
|
||||||
|
# # Finish off the recorded waiting trainer, because they have now been battled
|
||||||
|
# if decision==1 && $PokemonTemp.waitingTrainer # Win
|
||||||
|
# pbMapInterpreter.pbSetSelfSwitch($PokemonTemp.waitingTrainer[1], "A", true)
|
||||||
|
# end
|
||||||
|
# $PokemonTemp.waitingTrainer = nil
|
||||||
|
# # Return true if the player won the battle, and false if any other result
|
||||||
|
# return (decision==1)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def pbTrainerCustomBattleCore(trainer,*args)
|
||||||
|
# outcomeVar = $PokemonTemp.battleRules["outcomeVar"] || 1
|
||||||
|
# canLose = $PokemonTemp.battleRules["canLose"] || false
|
||||||
|
# # Skip battle if the player has no able Pokémon, or if holding Ctrl in Debug mode
|
||||||
|
# if $Trainer.able_pokemon_count == 0 || ($DEBUG && Input.press?(Input::CTRL))
|
||||||
|
# pbMessage(_INTL("SKIPPING BATTLE...")) if $DEBUG
|
||||||
|
# pbMessage(_INTL("AFTER WINNING...")) if $DEBUG && $Trainer.able_pokemon_count > 0
|
||||||
|
# pbSet(outcomeVar,($Trainer.able_pokemon_count == 0) ? 0 : 1) # Treat it as undecided/a win
|
||||||
|
# $PokemonTemp.clearBattleRules
|
||||||
|
# $PokemonGlobal.nextBattleBGM = nil
|
||||||
|
# $PokemonGlobal.nextBattleME = nil
|
||||||
|
# $PokemonGlobal.nextBattleCaptureME = nil
|
||||||
|
# $PokemonGlobal.nextBattleBack = nil
|
||||||
|
# pbMEStop
|
||||||
|
# return ($Trainer.able_pokemon_count == 0) ? 0 : 1 # Treat it as undecided/a win
|
||||||
|
# end
|
||||||
|
# # Record information about party Pokémon to be used at the end of battle (e.g.
|
||||||
|
# # comparing levels for an evolution check)
|
||||||
|
# Events.onStartBattle.trigger(nil)
|
||||||
|
# # Generate trainers and their parties based on the arguments given
|
||||||
|
# foeTrainers = []
|
||||||
|
# foeItems = []
|
||||||
|
# foeEndSpeeches = []
|
||||||
|
# foeParty = []
|
||||||
|
# foePartyStarts = []
|
||||||
|
# for arg in args
|
||||||
|
# if arg.is_a?(NPCTrainer)
|
||||||
|
# foeTrainers.push(arg)
|
||||||
|
# foePartyStarts.push(foeParty.length)
|
||||||
|
# arg.party.each { |pkmn| foeParty.push(pkmn) }
|
||||||
|
# foeEndSpeeches.push(arg.lose_text)
|
||||||
|
# foeItems.push(arg.items)
|
||||||
|
# elsif arg.is_a?(Array) # [trainer type, trainer name, ID, speech (optional)]
|
||||||
|
# pbMissingTrainer(arg[0],arg[1],arg[2]) if !trainer
|
||||||
|
# return 0 if !trainer
|
||||||
|
# Events.onTrainerPartyLoad.trigger(nil,trainer)
|
||||||
|
# foeTrainers.push(trainer)
|
||||||
|
# foePartyStarts.push(foeParty.length)
|
||||||
|
# trainer.party.each { |pkmn| foeParty.push(pkmn) }
|
||||||
|
# foeEndSpeeches.push(arg[3] || trainer.lose_text)
|
||||||
|
# foeItems.push(trainer.items)
|
||||||
|
# else
|
||||||
|
# raise _INTL("Expected NPCTrainer or array of trainer data, got {1}.", arg)
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# # Calculate who the player trainer(s) and their party are
|
||||||
|
# playerTrainers = [$Trainer]
|
||||||
|
# playerParty = $Trainer.party
|
||||||
|
# playerPartyStarts = [0]
|
||||||
|
# room_for_partner = (foeParty.length > 1)
|
||||||
|
# if !room_for_partner && $PokemonTemp.battleRules["size"] &&
|
||||||
|
# !["single", "1v1", "1v2", "1v3"].include?($PokemonTemp.battleRules["size"])
|
||||||
|
# room_for_partner = true
|
||||||
|
# end
|
||||||
|
# if $PokemonGlobal.partner && !$PokemonTemp.battleRules["noPartner"] && room_for_partner
|
||||||
|
# ally = NPCTrainer.new($PokemonGlobal.partner[1], $PokemonGlobal.partner[0])
|
||||||
|
# ally.id = $PokemonGlobal.partner[2]
|
||||||
|
# ally.party = $PokemonGlobal.partner[3]
|
||||||
|
# playerTrainers.push(ally)
|
||||||
|
# playerParty = []
|
||||||
|
# $Trainer.party.each { |pkmn| playerParty.push(pkmn) }
|
||||||
|
# playerPartyStarts.push(playerParty.length)
|
||||||
|
# ally.party.each { |pkmn| playerParty.push(pkmn) }
|
||||||
|
# setBattleRule("double") if !$PokemonTemp.battleRules["size"]
|
||||||
|
# end
|
||||||
|
# # Create the battle scene (the visual side of it)
|
||||||
|
# scene = pbNewBattleScene
|
||||||
|
# # Create the battle class (the mechanics side of it)
|
||||||
|
# battle = PokeBattle_Battle.new(scene,playerParty,foeParty,playerTrainers,foeTrainers)
|
||||||
|
# battle.party1starts = playerPartyStarts
|
||||||
|
# battle.party2starts = foePartyStarts
|
||||||
|
# battle.items = foeItems
|
||||||
|
# battle.endSpeeches = foeEndSpeeches
|
||||||
|
# # Set various other properties in the battle class
|
||||||
|
# pbPrepareBattle(battle)
|
||||||
|
# $PokemonTemp.clearBattleRules
|
||||||
|
# # End the trainer intro music
|
||||||
|
# Audio.me_stop
|
||||||
|
# # Perform the battle itself
|
||||||
|
# decision = 0
|
||||||
|
# pbBattleAnimation(pbGetTrainerBattleBGM(foeTrainers),(battle.singleBattle?) ? 1 : 3,foeTrainers) {
|
||||||
|
# pbSceneStandby {
|
||||||
|
# decision = battle.pbStartBattle
|
||||||
|
# }
|
||||||
|
# pbAfterBattle(decision,canLose)
|
||||||
|
# }
|
||||||
|
# Input.update
|
||||||
|
# # Save the result of the battle in a Game Variable (1 by default)
|
||||||
|
# # 0 - Undecided or aborted
|
||||||
|
# # 1 - Player won
|
||||||
|
# # 2 - Player lost
|
||||||
|
# # 3 - Player or wild Pokémon ran from battle, or player forfeited the match
|
||||||
|
# # 5 - Draw
|
||||||
|
# pbSet(outcomeVar,decision)
|
||||||
|
# return decision
|
||||||
|
# end
|
||||||
@@ -198,14 +198,7 @@ def getAllNonLegendaryPokemon()
|
|||||||
end
|
end
|
||||||
|
|
||||||
def getPokemonEggGroups(species)
|
def getPokemonEggGroups(species)
|
||||||
groups = []
|
return GameData::Species.get(species).egg_groups
|
||||||
|
|
||||||
compat10 = $pkmn_dex[species][13][0]
|
|
||||||
compat11 = $pkmn_dex[species][13][1]
|
|
||||||
|
|
||||||
groups << compat10
|
|
||||||
groups << compat11
|
|
||||||
return groups
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def generateEggGroupTeam(eggGroup)
|
def generateEggGroupTeam(eggGroup)
|
||||||
@@ -229,26 +222,7 @@ 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}!", $Trainer.name, badgeName))
|
||||||
end
|
end
|
||||||
|
|
||||||
def generateSameEggGroupFusionsTeam(eggGroup)
|
|
||||||
teamComplete = false
|
|
||||||
generatedTeam = []
|
|
||||||
while !teamComplete
|
|
||||||
foundFusionPartner = false
|
|
||||||
species1 = rand(NB_POKEMON)
|
|
||||||
if getPokemonEggGroups(species1).include?(eggGroup)
|
|
||||||
foundFusionPartner = false
|
|
||||||
while !foundFusionPartner
|
|
||||||
species2 = rand(NB_POKEMON)
|
|
||||||
if getPokemonEggGroups(species2).include?(eggGroup)
|
|
||||||
generatedTeam << getFusionSpecies(species1, species2)
|
|
||||||
foundFusionPartner = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
teamComplete = generatedTeam.length == 3
|
|
||||||
end
|
|
||||||
return generatedTeam
|
|
||||||
end
|
|
||||||
|
|
||||||
def getAllNonLegendaryPokemon()
|
def getAllNonLegendaryPokemon()
|
||||||
list = []
|
list = []
|
||||||
|
|||||||
228
Data/Scripts/050_AddOns/Trainers Rebattle.rb
Normal file
228
Data/Scripts/050_AddOns/Trainers Rebattle.rb
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# class RematchTrainer
|
||||||
|
# attr_reader :id
|
||||||
|
# attr_reader :nbTimesRematched
|
||||||
|
#
|
||||||
|
# def initialize(id)
|
||||||
|
# @id = id
|
||||||
|
# @nbTimesRematched = 0
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def incrementNbTimes()
|
||||||
|
# @nbTimesRematched += 1
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def removeNbTimes()
|
||||||
|
# @nbTimesRematched -= 1
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# #garder un list de cette classe en mem. globale
|
||||||
|
#
|
||||||
|
# #quand lance un combat: check si le switch pour rematch est actif.
|
||||||
|
# #si oui, check dans l'array globale si on trouve le trainer id.
|
||||||
|
# #si oui on maj, si non on l'ajoute
|
||||||
|
#
|
||||||
|
# #overload la classe qui lance les combats et ajuste les niveaux
|
||||||
|
# #selon le nb. de fois rematched
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# # levelCap = originalLevel + (nbBadges*2) +2
|
||||||
|
#
|
||||||
|
# # on incremente le level a chaque x (jusqu'au levelcap)
|
||||||
|
# # nb = (level/10).ceil
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def addNewTrainerRematch(trainerId)
|
||||||
|
# #$PokemonGlobal.rematchedTrainers[:trainerId]
|
||||||
|
# newTrainer = RematchTrainer.new(trainerId)
|
||||||
|
# $PokemonGlobal.rematchedTrainers[trainerId.to_sym] = newTrainer
|
||||||
|
#
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def getNumberRematch(trainerId)
|
||||||
|
# if $PokemonGlobal.rematchedTrainers == nil
|
||||||
|
# $PokemonGlobal.rematchedTrainers = Hash.new
|
||||||
|
# addNewTrainerRematch(trainerId)
|
||||||
|
# end
|
||||||
|
# trainer = $PokemonGlobal.rematchedTrainers[trainerId.to_sym]
|
||||||
|
# if trainer == nil
|
||||||
|
# addNewTrainerRematch(trainerId)
|
||||||
|
# return 0
|
||||||
|
# end
|
||||||
|
# return (trainer.nbTimesRematched)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def getNumberRematchOld(trainerId)
|
||||||
|
# if $PokemonGlobal.rematchedTrainers == nil
|
||||||
|
# $PokemonGlobal.rematchedTrainers = Hash.new
|
||||||
|
# addNewTrainerRematch(trainerId)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# $PokemonGlobal.rematchedTrainers.each do |key, trainer|
|
||||||
|
# if(trainer.id == trainerId)
|
||||||
|
# return (trainer.nbTimesRematched)
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# addNewTrainerRematch(trainerId)
|
||||||
|
# return 0
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def incrNbRematches(trainerId)
|
||||||
|
# $PokemonGlobal.rematchedTrainers.each do |key, trainer|
|
||||||
|
# if(trainer.id == trainerId)
|
||||||
|
# trainer.incrementNbTimes()
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def getRematchLevel(originalLevel,nbRematch)
|
||||||
|
# levelCap = getLevelCap(originalLevel,$Trainer.numbadges)
|
||||||
|
# expRate = getLevelRate(originalLevel)
|
||||||
|
# levelIncr =0
|
||||||
|
# for i in 0..nbRematch
|
||||||
|
# if i % expRate == 0
|
||||||
|
# levelIncr += 1
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# newLevel = originalLevel + levelIncr
|
||||||
|
# #printDebugRematchInfo(nbRematch,expRate,newLevel,levelCap,originalLevel)
|
||||||
|
# return (newLevel < levelCap) ? newLevel : levelCap
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def getLevelRate(originalLevel)
|
||||||
|
# return 2 + (originalLevel/20).ceil
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def getLevelCap(originalLevel,nbBadges)
|
||||||
|
# return 100 if $game_switches[599] #no cap in battle arena
|
||||||
|
# cap = originalLevel + nbBadges +2
|
||||||
|
# return cap < 100 ? cap : 100
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def decreaseRematchNumber(trainerId)
|
||||||
|
# $PokemonGlobal.rematchedTrainers.each do |key, trainer|
|
||||||
|
# if(trainer.id == trainerId)
|
||||||
|
# trainer.removeNbTimes()
|
||||||
|
# return
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def evolveRematchPokemon(nbRematch,species)
|
||||||
|
# if(nbRematch >= 10 && $Trainer.numbadges >= 3)
|
||||||
|
# evospecies=getEvolution(species)
|
||||||
|
# return species if evospecies == -1
|
||||||
|
# if(nbRematch >= 20 && $Trainer.numbadges >= 8)
|
||||||
|
# secondEvoSpecies=getEvolution(evospecies)
|
||||||
|
# return secondEvoSpecies == -1 ? evospecies : secondEvoSpecies
|
||||||
|
# end
|
||||||
|
# return evospecies
|
||||||
|
# end
|
||||||
|
# return species
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def getEvolution(species)
|
||||||
|
# if species >= Settings::NB_POKEMON
|
||||||
|
# pokemon = PokeBattle_Pokemon.new(species,1)
|
||||||
|
# body = getBasePokemonID(species)
|
||||||
|
# head = getBasePokemonID(species,false)
|
||||||
|
# ret_evoB = pbGetEvolvedFormData(body)
|
||||||
|
# ret_evoH = pbGetEvolvedFormData(head)
|
||||||
|
#
|
||||||
|
# evoBody = ret_evoB.any? ? ret_evoB[0][2] : -1
|
||||||
|
# evoHead = ret_evoH.any? ? ret_evoH[0][2] : -1
|
||||||
|
#
|
||||||
|
# return -1 if isNegativeOrNull(evoBody) && isNegativeOrNull(evoHead)
|
||||||
|
# return body*Settings::NB_POKEMON+evoHead if isNegativeOrNull(evoBody) #only head evolves
|
||||||
|
# return evoBody*Settings::NB_POKEMON + head if isNegativeOrNull(evoHead) #only body evolves
|
||||||
|
# return evoBody*Settings::NB_POKEMON+evoHead #both evolve
|
||||||
|
# else
|
||||||
|
# evo = pbGetEvolvedFormData(species)
|
||||||
|
# return evo.any? ? evo[0][2] : -1
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
def getFusionSpecies(body,head)
|
||||||
|
id = body * Settings::NB_POKEMON + head
|
||||||
|
return GameData::Species.get(id).species
|
||||||
|
end
|
||||||
|
#
|
||||||
|
# def evolveHead(species)
|
||||||
|
# if species <= Settings::NB_POKEMON
|
||||||
|
# evo = getEvolution(species)
|
||||||
|
# return evo == -1 ? species : evo
|
||||||
|
# end
|
||||||
|
# head = getBasePokemonID(species,false)
|
||||||
|
# body = getBasePokemonID(species)
|
||||||
|
# headEvo = getEvolution(head)
|
||||||
|
# return headEvo == -1 ? species : getFusionSpecies(body,headEvo)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# def evolveBody(species)
|
||||||
|
# if species <= Settings::NB_POKEMON
|
||||||
|
# evo = getEvolution(species)
|
||||||
|
# return evo == -1 ? species : evo
|
||||||
|
# end
|
||||||
|
# head = getBasePokemonID(species,false)
|
||||||
|
# body = getBasePokemonID(species)
|
||||||
|
# bodyEvo = getEvolution(body)
|
||||||
|
# return bodyEvo == -1 ? species : getFusionSpecies(bodyEvo,head)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def getCorrectEvolvedSpecies(pokemon)
|
||||||
|
# if pokemon.species >= Settings::NB_POKEMON
|
||||||
|
# body = getBasePokemonID(pokemon.species)
|
||||||
|
# head = getBasePokemonID(pokemon.species,false)
|
||||||
|
# ret1=-1;ret2=-1
|
||||||
|
# for form in pbGetEvolvedFormData(body)
|
||||||
|
# retB=yield pokemon,form[0],form[1],form[2]
|
||||||
|
# break if retB>0
|
||||||
|
# end
|
||||||
|
# for form in pbGetEvolvedFormData(head)
|
||||||
|
# retH=yield pokemon,form[0],form[1],form[2]
|
||||||
|
# break if retH>0
|
||||||
|
# end
|
||||||
|
# return ret if ret == retB && ret == retH
|
||||||
|
# return fixEvolutionOverflow(retB,retH,pokemon.species)
|
||||||
|
# else
|
||||||
|
# for form in pbGetEvolvedFormData(pokemon.species)
|
||||||
|
# newspecies=form[2]
|
||||||
|
# end
|
||||||
|
# return newspecies;
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# def printDebugRematchInfo(nbRematch,expRate,newLevel,levelCap,originalLevel)
|
||||||
|
# info = ""
|
||||||
|
# info << "total rematched trainers: "+ $PokemonGlobal.rematchedTrainers.length.to_s + "\n"
|
||||||
|
#
|
||||||
|
# info << "nb times: "+ nbRematch.to_s + "\n"
|
||||||
|
# info << "lvl up every " + expRate.to_s + " times" + "\n"
|
||||||
|
# info << "original level: " << originalLevel.to_s + "\n"
|
||||||
|
# info << "new level: " + newLevel.to_s + "\n"
|
||||||
|
# info << "level cap: "+ levelCap.to_s
|
||||||
|
# print info
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# class PokeBattle_Trainer
|
||||||
|
# attr_accessor(:name)
|
||||||
|
# def name()
|
||||||
|
# return @name
|
||||||
|
# end
|
||||||
|
# end
|
||||||
@@ -44,7 +44,8 @@ It is up to you to use it how you wish, credits will be appreciated.
|
|||||||
# List of Randomly selected Trainer Names
|
# List of Randomly selected Trainer Names
|
||||||
# These are just names taken from a generator, add custom or change to
|
# These are just names taken from a generator, add custom or change to
|
||||||
# whatever you desire.
|
# whatever you desire.
|
||||||
RandTrainerNames=[
|
|
||||||
|
RandTrainerNames_male=[
|
||||||
"Mikaël",
|
"Mikaël",
|
||||||
"James",
|
"James",
|
||||||
"Keith",
|
"Keith",
|
||||||
@@ -52,53 +53,90 @@ RandTrainerNames=[
|
|||||||
"Jeremy",
|
"Jeremy",
|
||||||
"Louis",
|
"Louis",
|
||||||
"Albert",
|
"Albert",
|
||||||
"Emily",
|
|
||||||
"Aaron",
|
"Aaron",
|
||||||
"Frances",
|
"Francis",
|
||||||
"Steve",
|
"Steve",
|
||||||
"Joan",
|
|
||||||
"Dorothy",
|
|
||||||
"Jeffrey",
|
"Jeffrey",
|
||||||
"Alice",
|
|
||||||
"Sara",
|
|
||||||
"David",
|
"David",
|
||||||
"Anne",
|
|
||||||
"Shirley",
|
|
||||||
"Henry",
|
"Henry",
|
||||||
"Carolyn",
|
|
||||||
"Christopher",
|
"Christopher",
|
||||||
"Christina",
|
|
||||||
"Ronald",
|
"Ronald",
|
||||||
"Randy",
|
"Randy",
|
||||||
"Nancy",
|
|
||||||
"Virginia",
|
|
||||||
"Donna",
|
|
||||||
"William",
|
"William",
|
||||||
"Jacqueline",
|
|
||||||
"Catherine",
|
|
||||||
"Ash",
|
"Ash",
|
||||||
"Jesse",
|
"Jesse",
|
||||||
"Roger",
|
"Roger",
|
||||||
|
"Todd",
|
||||||
|
"Fred",
|
||||||
|
"Scott",
|
||||||
|
"Phillip",
|
||||||
|
"Craig",
|
||||||
|
"Mildred",
|
||||||
|
"Douglas",
|
||||||
|
"Ernest",
|
||||||
|
"Brandon",
|
||||||
|
"Jean",
|
||||||
|
"Stan",
|
||||||
|
"Kenny",
|
||||||
|
"Eric",
|
||||||
|
"Kyle",
|
||||||
|
"Raymond",
|
||||||
|
"Harry",
|
||||||
|
"Gary",
|
||||||
|
"Bill",
|
||||||
|
"Howard",
|
||||||
|
"Stephen",
|
||||||
|
"Russell",
|
||||||
|
"Bobby",
|
||||||
|
"Martin",
|
||||||
|
"Harold",
|
||||||
|
"Juan",
|
||||||
|
"Joseph",
|
||||||
|
"Charles",
|
||||||
|
"Donald",
|
||||||
|
"Arthur",
|
||||||
|
"Janice",
|
||||||
|
"Carlos",
|
||||||
|
"Jack",
|
||||||
|
"Ralph",
|
||||||
|
"Barrack",
|
||||||
|
"Kevin",
|
||||||
|
"James",
|
||||||
|
"Michael",
|
||||||
|
"Boris",
|
||||||
|
"Vladimir"
|
||||||
|
]
|
||||||
|
|
||||||
|
RandTrainerNames_female=[
|
||||||
|
"Emily",
|
||||||
|
"France",
|
||||||
|
"Joan",
|
||||||
|
"Dorothy",
|
||||||
|
"Alice",
|
||||||
|
"Sara",
|
||||||
|
"Anne",
|
||||||
|
"Shirley",
|
||||||
|
"Carolyn",
|
||||||
|
"Christina",
|
||||||
|
"Nancy",
|
||||||
|
"Virginia",
|
||||||
|
"Donna",
|
||||||
|
"Jacqueline",
|
||||||
|
"Catherine",
|
||||||
|
"Jesse",
|
||||||
"Denise",
|
"Denise",
|
||||||
"Ashley",
|
"Ashley",
|
||||||
"Maria",
|
"Maria",
|
||||||
"Todd",
|
|
||||||
"Helen",
|
"Helen",
|
||||||
"Teresa",
|
"Teresa",
|
||||||
"Fred",
|
|
||||||
"Annie",
|
"Annie",
|
||||||
"Rachel",
|
"Rachel",
|
||||||
"Kathleen",
|
"Kathleen",
|
||||||
"Marie",
|
"Marie",
|
||||||
"Scott",
|
|
||||||
"Phillip",
|
|
||||||
"Craig",
|
|
||||||
"Diane",
|
"Diane",
|
||||||
"Beverly",
|
"Beverly",
|
||||||
"Lisa",
|
"Lisa",
|
||||||
"Mildred",
|
|
||||||
"Lois",
|
"Lois",
|
||||||
"Douglas",
|
|
||||||
"Deborah",
|
"Deborah",
|
||||||
"Bianca",
|
"Bianca",
|
||||||
"Phyllis",
|
"Phyllis",
|
||||||
@@ -106,48 +144,36 @@ RandTrainerNames=[
|
|||||||
"Laura",
|
"Laura",
|
||||||
"Lara",
|
"Lara",
|
||||||
"Stephanie",
|
"Stephanie",
|
||||||
"Ernest",
|
|
||||||
"Evelyn",
|
"Evelyn",
|
||||||
"Irene",
|
"Irene",
|
||||||
"Brandon",
|
|
||||||
"Jean",
|
"Jean",
|
||||||
"Sandra",
|
"Sandra",
|
||||||
"Linda",
|
"Linda",
|
||||||
"Stan",
|
|
||||||
"Kenny",
|
|
||||||
"Eric",
|
|
||||||
"Kyle",
|
|
||||||
"Raymond",
|
|
||||||
"Lucy",
|
"Lucy",
|
||||||
"Molly",
|
"Molly",
|
||||||
"Kathryn",
|
"Kathryn",
|
||||||
"Harry",
|
|
||||||
"Gary",
|
|
||||||
"Katherine",
|
"Katherine",
|
||||||
"Theresa",
|
"Theresa",
|
||||||
"Bill",
|
|
||||||
"Howard",
|
|
||||||
"Stephen",
|
|
||||||
"Russell",
|
|
||||||
"Louisel",
|
"Louisel",
|
||||||
"Bobby",
|
|
||||||
"Alyssa",
|
"Alyssa",
|
||||||
"Susan",
|
"Susan",
|
||||||
"Martin",
|
|
||||||
"Harold",
|
|
||||||
"Andrea",
|
"Andrea",
|
||||||
"Sharon",
|
"Sharon",
|
||||||
"Juan",
|
|
||||||
"Rose",
|
"Rose",
|
||||||
"Lori",
|
"Lori",
|
||||||
"Dorist",
|
"Doris",
|
||||||
"Mom",
|
|
||||||
"Joseph",
|
"Joseph",
|
||||||
"Charles",
|
|
||||||
"Donald",
|
|
||||||
"Arthur",
|
|
||||||
"Janice",
|
"Janice",
|
||||||
"Carlos",
|
"Wanda",
|
||||||
|
"Christine",
|
||||||
|
"Mel",
|
||||||
|
"Betty",
|
||||||
|
"Julia",
|
||||||
|
"Michelle",
|
||||||
|
"Kathy"
|
||||||
|
]
|
||||||
|
|
||||||
|
RandTrainerNames_others=[
|
||||||
"Brock",
|
"Brock",
|
||||||
"Misty",
|
"Misty",
|
||||||
"Lt. Surge",
|
"Lt. Surge",
|
||||||
@@ -162,24 +188,10 @@ RandTrainerNames=[
|
|||||||
"Agatha",
|
"Agatha",
|
||||||
"Bruno",
|
"Bruno",
|
||||||
"Lorelei",
|
"Lorelei",
|
||||||
"Jack",
|
|
||||||
"Wanda",
|
|
||||||
"Miyamoto",
|
"Miyamoto",
|
||||||
"Ralph",
|
|
||||||
"Christine",
|
|
||||||
"Mel",
|
|
||||||
"Betty",
|
|
||||||
"Julia",
|
|
||||||
"Michelle",
|
|
||||||
"Barrack",
|
|
||||||
"Kevin",
|
|
||||||
"James",
|
|
||||||
"Michael",
|
|
||||||
"Kathy",
|
|
||||||
"Game Freak",
|
"Game Freak",
|
||||||
"Nintendo",
|
"Nintendo",
|
||||||
"Silph Co.",
|
"Silph Co.",
|
||||||
"Boris",
|
|
||||||
"Mr. Fuji",
|
"Mr. Fuji",
|
||||||
"Santa Claus",
|
"Santa Claus",
|
||||||
"Blue",
|
"Blue",
|
||||||
@@ -187,7 +199,8 @@ RandTrainerNames=[
|
|||||||
"Maxie",
|
"Maxie",
|
||||||
"Cyrus",
|
"Cyrus",
|
||||||
"Team Rocket",
|
"Team Rocket",
|
||||||
"Vladimir"
|
"Mom",
|
||||||
|
"Dad"
|
||||||
]
|
]
|
||||||
|
|
||||||
# List of randomly selected Pokemon Nicknames
|
# List of randomly selected Pokemon Nicknames
|
||||||
@@ -1048,7 +1061,8 @@ def pbWonderTrade(lvl,except=[],except2=[],rare=true)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
tname=RandTrainerNames[rand(RandTrainerNames.size)] # Randomizes Trainer Names
|
randTrainerNames = RandTrainerNames_male + RandTrainerNames_female + RandTrainerNames_others
|
||||||
|
tname=randTrainerNames[rand(randTrainerNames.size)] # Randomizes Trainer Names
|
||||||
pname=RandPokeNick[rand(RandPokeNick.size)] # Randomizes Pokemon Nicknames
|
pname=RandPokeNick[rand(RandPokeNick.size)] # Randomizes Pokemon Nicknames
|
||||||
|
|
||||||
#num of Wondertrade - 1
|
#num of Wondertrade - 1
|
||||||
|
|||||||
Reference in New Issue
Block a user