mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Revert "Adds factory for Pokemon class"
This reverts commit d304d223bd.
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.
@@ -304,7 +304,7 @@ module GameData
|
|||||||
level = getRematchLevel(level, nbRematch)
|
level = getRematchLevel(level, nbRematch)
|
||||||
species = getSpecies(evolveRematchPokemon(nbRematch, species)).id
|
species = getSpecies(evolveRematchPokemon(nbRematch, species)).id
|
||||||
end
|
end
|
||||||
pkmn = Pokemon.create(species, level, trainer, false)
|
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
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ module GameData
|
|||||||
species = evolveRematchPokemon(nbRematch, species)
|
species = evolveRematchPokemon(nbRematch, species)
|
||||||
end
|
end
|
||||||
|
|
||||||
pkmn = Pokemon.create(species, level, trainer, false)
|
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
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ def customTrainerBattle(trainerName, trainerType, party_array, default_level=50,
|
|||||||
if pokemon.is_a?(Pokemon)
|
if pokemon.is_a?(Pokemon)
|
||||||
party << pokemon
|
party << pokemon
|
||||||
elsif pokemon.is_a?(Symbol)
|
elsif pokemon.is_a?(Symbol)
|
||||||
party << Pokemon.create(pokemon,default_level,trainer)
|
party << Pokemon.new(pokemon,default_level,trainer)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
trainer.party=party
|
trainer.party=party
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ end
|
|||||||
# Applies wild Pokémon modifiers (wild held item, shiny chance modifiers,
|
# Applies wild Pokémon modifiers (wild held item, shiny chance modifiers,
|
||||||
# Pokérus, gender/nature forcing because of player's lead Pokémon).
|
# Pokérus, gender/nature forcing because of player's lead Pokémon).
|
||||||
def pbGenerateWildPokemon(species,level,isRoamer=false)
|
def pbGenerateWildPokemon(species,level,isRoamer=false)
|
||||||
genwildpoke = Pokemon.create(species,level)
|
genwildpoke = Pokemon.new(species,level)
|
||||||
# Give the wild Pokémon a held item
|
# Give the wild Pokémon a held item
|
||||||
items = genwildpoke.wildHoldItems
|
items = genwildpoke.wildHoldItems
|
||||||
first_pkmn = $Trainer.first_pokemon
|
first_pkmn = $Trainer.first_pokemon
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ def pbDayCareGenerateEgg
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Generate egg
|
# Generate egg
|
||||||
egg = Pokemon.create(babyspecies, Settings::EGG_LEVEL)
|
egg = Pokemon.new(babyspecies, Settings::EGG_LEVEL)
|
||||||
# Randomise personal ID
|
# Randomise personal ID
|
||||||
pid = rand(65536)
|
pid = rand(65536)
|
||||||
pid |= (rand(65536)<<16)
|
pid |= (rand(65536)<<16)
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class Pokemon
|
|||||||
attr_accessor :body_original_ability_index
|
attr_accessor :body_original_ability_index
|
||||||
attr_accessor :head_original_ability_index
|
attr_accessor :head_original_ability_index
|
||||||
|
|
||||||
|
|
||||||
# @return [Array<Pokemon::Move>] the moves known by this Pokémon
|
# @return [Array<Pokemon::Move>] the moves known by this Pokémon
|
||||||
attr_accessor :moves
|
attr_accessor :moves
|
||||||
# @return [Array<Integer>] the IDs of moves known by this Pokémon when it was obtained
|
# @return [Array<Integer>] the IDs of moves known by this Pokémon when it was obtained
|
||||||
@@ -160,7 +161,7 @@ class Pokemon
|
|||||||
return isSpecies?(check_species)
|
return isSpecies?(check_species)
|
||||||
end
|
end
|
||||||
bodySpecies = getBodyID(species)
|
bodySpecies = getBodyID(species)
|
||||||
checkSpeciesId = getID(nil, check_species)
|
checkSpeciesId = getID(nil,check_species)
|
||||||
return bodySpecies == checkSpeciesId
|
return bodySpecies == checkSpeciesId
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -169,14 +170,14 @@ class Pokemon
|
|||||||
return isSpecies?(check_species)
|
return isSpecies?(check_species)
|
||||||
end
|
end
|
||||||
headSpecies = getHeadID(species)
|
headSpecies = getHeadID(species)
|
||||||
checkSpeciesId = getID(nil, check_species)
|
checkSpeciesId = getID(nil,check_species)
|
||||||
return headSpecies == checkSpeciesId
|
return headSpecies == checkSpeciesId
|
||||||
end
|
end
|
||||||
|
|
||||||
def shiny=(value)
|
def shiny=(value)
|
||||||
@shiny = value
|
@shiny=value
|
||||||
if value && Settings::SHINY_POKEMON_CHANCE != S_CHANCE_VALIDATOR
|
if value && Settings::SHINY_POKEMON_CHANCE != S_CHANCE_VALIDATOR
|
||||||
@debug_shiny = true
|
@debug_shiny=true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -477,6 +478,8 @@ class Pokemon
|
|||||||
return [:AlwaysMale, :AlwaysFemale, :Genderless].include?(gender_ratio)
|
return [:AlwaysMale, :AlwaysFemale, :Genderless].include?(gender_ratio)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Shininess
|
# Shininess
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -491,13 +494,13 @@ class Pokemon
|
|||||||
is_shiny = d < Settings::SHINY_POKEMON_CHANCE
|
is_shiny = d < Settings::SHINY_POKEMON_CHANCE
|
||||||
if is_shiny
|
if is_shiny
|
||||||
@shiny = true
|
@shiny = true
|
||||||
@natural_shiny = true
|
@natural_shiny=true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
if @shiny && Settings::SHINY_POKEMON_CHANCE != S_CHANCE_VALIDATOR
|
if @shiny && Settings::SHINY_POKEMON_CHANCE != S_CHANCE_VALIDATOR
|
||||||
@debug_shiny = true
|
@debug_shiny=true
|
||||||
@natural_shiny = false
|
@natural_shiny=false
|
||||||
end
|
end
|
||||||
return @shiny
|
return @shiny
|
||||||
end
|
end
|
||||||
@@ -784,9 +787,9 @@ class Pokemon
|
|||||||
body_species_id = getBasePokemonID(species)
|
body_species_id = getBasePokemonID(species)
|
||||||
head_species = GameData::Species.get(head_species_id)
|
head_species = GameData::Species.get(head_species_id)
|
||||||
body_species = GameData::Species.get(body_species_id)
|
body_species = GameData::Species.get(body_species_id)
|
||||||
return move_data && (pokemon_can_learn_move(head_species, move_data) || pokemon_can_learn_move(body_species, move_data))
|
return move_data && (pokemon_can_learn_move(head_species,move_data) || pokemon_can_learn_move(body_species,move_data))
|
||||||
else
|
else
|
||||||
return move_data && pokemon_can_learn_move(species_data, move_data)
|
return move_data && pokemon_can_learn_move(species_data,move_data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1211,14 +1214,6 @@ class Pokemon
|
|||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create(species, level, owner = $Trainer, withMoves = true, recheck_form = true)
|
|
||||||
if species.to_s.match?(/\AB\d+H\d+\z/)
|
|
||||||
FusedPokemon.new(species, level, owner, withMoves, recheck_form)
|
|
||||||
else
|
|
||||||
Pokemon.new(species, level, owner, withMoves, recheck_form)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Creates a new Pokémon object.
|
# Creates a new Pokémon object.
|
||||||
# @param species [Symbol, String, Integer] Pokémon species
|
# @param species [Symbol, String, Integer] Pokémon species
|
||||||
# @param level [Integer] Pokémon level
|
# @param level [Integer] Pokémon level
|
||||||
@@ -1265,7 +1260,7 @@ class Pokemon
|
|||||||
@ivMaxed = {}
|
@ivMaxed = {}
|
||||||
@ev = {}
|
@ev = {}
|
||||||
@hiddenPowerType = nil
|
@hiddenPowerType = nil
|
||||||
@glitter = nil
|
@glitter=nil
|
||||||
GameData::Stat.each_main do |s|
|
GameData::Stat.each_main do |s|
|
||||||
@iv[s.id] = rand(IV_STAT_LIMIT + 1)
|
@iv[s.id] = rand(IV_STAT_LIMIT + 1)
|
||||||
@ev[s.id] = 0
|
@ev[s.id] = 0
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class PokeBattle_Pokemon
|
|||||||
return pkmn if pkmn.is_a?(Pokemon)
|
return pkmn if pkmn.is_a?(Pokemon)
|
||||||
owner = Pokemon::Owner.new(pkmn.trainerID, pkmn.ot, pkmn.otgender, pkmn.language)
|
owner = Pokemon::Owner.new(pkmn.trainerID, pkmn.ot, pkmn.otgender, pkmn.language)
|
||||||
# Set level to 1 initially, as it will be recalculated later
|
# Set level to 1 initially, as it will be recalculated later
|
||||||
ret = Pokemon.create(pkmn.species, 1, owner, false, false)
|
ret = Pokemon.new(pkmn.species, 1, owner, false, false)
|
||||||
ret.forced_form = pkmn.forcedForm if pkmn.forcedForm
|
ret.forced_form = pkmn.forcedForm if pkmn.forcedForm
|
||||||
ret.time_form_set = pkmn.formTime
|
ret.time_form_set = pkmn.formTime
|
||||||
ret.exp = pkmn.exp
|
ret.exp = pkmn.exp
|
||||||
@@ -201,7 +201,7 @@ end
|
|||||||
# slated to be removed in v20.
|
# slated to be removed in v20.
|
||||||
def pbNewPkmn(species, level, owner = $Trainer, withMoves = true)
|
def pbNewPkmn(species, level, owner = $Trainer, withMoves = true)
|
||||||
Deprecation.warn_method('pbNewPkmn', 'v20', 'Pokemon.new')
|
Deprecation.warn_method('pbNewPkmn', 'v20', 'Pokemon.new')
|
||||||
return Pokemon.create(species, level, owner, withMoves)
|
return Pokemon.new(species, level, owner, withMoves)
|
||||||
end
|
end
|
||||||
alias pbGenPkmn pbNewPkmn
|
alias pbGenPkmn pbNewPkmn
|
||||||
alias pbGenPoke pbNewPkmn
|
alias pbGenPoke pbNewPkmn
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0,saveg
|
|||||||
else
|
else
|
||||||
species_data = GameData::Species.try_get(newpoke)
|
species_data = GameData::Species.try_get(newpoke)
|
||||||
raise _INTL("Species does not exist ({1}).", newpoke) if !species_data
|
raise _INTL("Species does not exist ({1}).", newpoke) if !species_data
|
||||||
yourPokemon = Pokemon.create(species_data.id, myPokemon.level, opponent)
|
yourPokemon = Pokemon.new(species_data.id, myPokemon.level, opponent)
|
||||||
end
|
end
|
||||||
yourPokemon.name = nickname
|
yourPokemon.name = nickname
|
||||||
yourPokemon.obtain_method = 2 # traded
|
yourPokemon.obtain_method = 2 # traded
|
||||||
|
|||||||
@@ -295,13 +295,13 @@ class PurifyChamber
|
|||||||
end
|
end
|
||||||
|
|
||||||
def debugAddShadow(set,species)
|
def debugAddShadow(set,species)
|
||||||
pkmn=Pokemon.create(species,1)
|
pkmn=Pokemon.new(species,1)
|
||||||
pkmn.makeShadow
|
pkmn.makeShadow
|
||||||
setShadow(set,pkmn)
|
setShadow(set,pkmn)
|
||||||
end
|
end
|
||||||
|
|
||||||
def debugAddNormal(set,species)
|
def debugAddNormal(set,species)
|
||||||
pkmn=Pokemon.create(species,1)
|
pkmn=Pokemon.new(species,1)
|
||||||
insertAfter(set,setCount(set),pkmn)
|
insertAfter(set,setCount(set),pkmn)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ class PBPokemon
|
|||||||
end
|
end
|
||||||
|
|
||||||
def createPokemon(level, iv, trainer)
|
def createPokemon(level, iv, trainer)
|
||||||
pkmn = Pokemon.create(@species, level, trainer, false)
|
pkmn = Pokemon.new(@species, level, trainer, false)
|
||||||
pkmn.item = @item
|
pkmn.item = @item
|
||||||
pkmn.personalID = rand(2**16) | rand(2**16) << 16
|
pkmn.personalID = rand(2**16) | rand(2**16) << 16
|
||||||
pkmn.nature = nature
|
pkmn.nature = nature
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
def createPokemon(species, level, iv, trainer)
|
def createPokemon(species, level, iv, trainer)
|
||||||
pkmn = Pokemon.create(species, level, trainer)
|
pkmn = Pokemon.new(species, level, trainer)
|
||||||
pkmn.personalID = rand(2 ** 16) | rand(2 ** 16) << 16
|
pkmn.personalID = rand(2 ** 16) | rand(2 ** 16) << 16
|
||||||
GameData::Stat.each_main { |s| pkmn.iv[s.id] = iv }
|
GameData::Stat.each_main { |s| pkmn.iv[s.id] = iv }
|
||||||
pkmn.calc_stats
|
pkmn.calc_stats
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class BugContestState
|
|||||||
if !enc
|
if !enc
|
||||||
raise _INTL("No encounters for map {1}, so can't judge contest",@contestMap)
|
raise _INTL("No encounters for map {1}, so can't judge contest",@contestMap)
|
||||||
end
|
end
|
||||||
pokemon=Pokemon.create(enc[0],enc[1])
|
pokemon=Pokemon.new(enc[0],enc[1])
|
||||||
pokemon.hp = rand(1..pokemon.totalhp - 1)
|
pokemon.hp = rand(1..pokemon.totalhp - 1)
|
||||||
score=pbBugContestScore(pokemon)
|
score=pbBugContestScore(pokemon)
|
||||||
judgearray.push([cont,pokemon.species,score])
|
judgearray.push([cont,pokemon.species,score])
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ def pbAddPokemon(pkmn, level = 1, see_form = true, dontRandomize=false)
|
|||||||
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
|
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
pkmn = Pokemon.create(pkmn, level) if !pkmn.is_a?(Pokemon)
|
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
|
||||||
tryRandomizeGiftPokemon(pkmn,dontRandomize)
|
tryRandomizeGiftPokemon(pkmn,dontRandomize)
|
||||||
species_name = pkmn.speciesName
|
species_name = pkmn.speciesName
|
||||||
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
|
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
|
||||||
@@ -80,7 +80,7 @@ end
|
|||||||
|
|
||||||
def pbAddPokemonSilent(pkmn, level = 1, see_form = true)
|
def pbAddPokemonSilent(pkmn, level = 1, see_form = true)
|
||||||
return false if !pkmn || pbBoxesFull?
|
return false if !pkmn || pbBoxesFull?
|
||||||
pkmn = Pokemon.create(pkmn, level) if !pkmn.is_a?(Pokemon)
|
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
|
||||||
$Trainer.pokedex.register(pkmn) if see_form
|
$Trainer.pokedex.register(pkmn) if see_form
|
||||||
$Trainer.pokedex.set_owned(pkmn.species)
|
$Trainer.pokedex.set_owned(pkmn.species)
|
||||||
pkmn.record_first_moves
|
pkmn.record_first_moves
|
||||||
@@ -97,7 +97,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbAddToParty(pkmn, level = 1, see_form = true, dontRandomize=false)
|
def pbAddToParty(pkmn, level = 1, see_form = true, dontRandomize=false)
|
||||||
return false if !pkmn || $Trainer.party_full?
|
return false if !pkmn || $Trainer.party_full?
|
||||||
pkmn = Pokemon.create(pkmn, level) if !pkmn.is_a?(Pokemon)
|
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
|
||||||
tryRandomizeGiftPokemon(pkmn,dontRandomize)
|
tryRandomizeGiftPokemon(pkmn,dontRandomize)
|
||||||
species_name = pkmn.speciesName
|
species_name = pkmn.speciesName
|
||||||
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
|
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
|
||||||
@@ -108,7 +108,7 @@ end
|
|||||||
|
|
||||||
def pbAddToPartySilent(pkmn, level = nil, see_form = true)
|
def pbAddToPartySilent(pkmn, level = nil, see_form = true)
|
||||||
return false if !pkmn || $Trainer.party_full?
|
return false if !pkmn || $Trainer.party_full?
|
||||||
pkmn = Pokemon.create(pkmn, level) if !pkmn.is_a?(Pokemon)
|
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
|
||||||
$Trainer.pokedex.register(pkmn) if see_form
|
$Trainer.pokedex.register(pkmn) if see_form
|
||||||
$Trainer.pokedex.set_owned(pkmn.species)
|
$Trainer.pokedex.set_owned(pkmn.species)
|
||||||
pkmn.record_first_moves
|
pkmn.record_first_moves
|
||||||
@@ -118,7 +118,7 @@ end
|
|||||||
|
|
||||||
def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner_gender = 0, see_form = true)
|
def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner_gender = 0, see_form = true)
|
||||||
return false if !pkmn
|
return false if !pkmn
|
||||||
pkmn = Pokemon.create(pkmn, level) if !pkmn.is_a?(Pokemon)
|
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
|
||||||
# Set original trainer to a foreign one
|
# Set original trainer to a foreign one
|
||||||
pkmn.owner = Pokemon::Owner.new_foreign(owner_name || "", owner_gender)
|
pkmn.owner = Pokemon::Owner.new_foreign(owner_name || "", owner_gender)
|
||||||
# Set nickname
|
# Set nickname
|
||||||
@@ -138,7 +138,7 @@ end
|
|||||||
|
|
||||||
def pbGenerateEgg(pkmn, text = "")
|
def pbGenerateEgg(pkmn, text = "")
|
||||||
return false if !pkmn #|| $Trainer.party_full?
|
return false if !pkmn #|| $Trainer.party_full?
|
||||||
pkmn = Pokemon.create(pkmn, Settings::EGG_LEVEL) if !pkmn.is_a?(Pokemon)
|
pkmn = Pokemon.new(pkmn, Settings::EGG_LEVEL) if !pkmn.is_a?(Pokemon)
|
||||||
# Set egg's details
|
# Set egg's details
|
||||||
pkmn.name = _INTL("Egg")
|
pkmn.name = _INTL("Egg")
|
||||||
pkmn.steps_to_hatch = pkmn.species_data.hatch_steps
|
pkmn.steps_to_hatch = pkmn.species_data.hatch_steps
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ DebugMenuCommands.register("demoparty", {
|
|||||||
$Trainer.party.clear
|
$Trainer.party.clear
|
||||||
# Generate Pokémon of each species at level 20
|
# Generate Pokémon of each species at level 20
|
||||||
party.each do |species|
|
party.each do |species|
|
||||||
pkmn = Pokemon.create(species, 20)
|
pkmn = Pokemon.new(species, 20)
|
||||||
$Trainer.party.push(pkmn)
|
$Trainer.party.push(pkmn)
|
||||||
$Trainer.pokedex.register(pkmn)
|
$Trainer.pokedex.register(pkmn)
|
||||||
$Trainer.pokedex.set_owned(species)
|
$Trainer.pokedex.set_owned(species)
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
class FusedPokemon < Pokemon
|
|
||||||
def initialize(species, level, owner = $Trainer, withMoves = true, recheck_form = true)
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ def pbAddPokemonID(pokemon, level = nil, seeform = true, dontRandomize = false)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if pokemon.is_a?(Integer) && level.is_a?(Integer)
|
if pokemon.is_a?(Integer) && level.is_a?(Integer)
|
||||||
pokemon = Pokemon.create(pokemon, level, $Trainer)
|
pokemon = Pokemon.new(pokemon, level, $Trainer)
|
||||||
end
|
end
|
||||||
#random species if randomized gift pokemon & wild poke
|
#random species if randomized gift pokemon & wild poke
|
||||||
if $game_switches[SWITCH_RANDOM_GIFT_POKEMON] && $game_switches[SWITCH_RANDOM_WILD] && !dontRandomize
|
if $game_switches[SWITCH_RANDOM_GIFT_POKEMON] && $game_switches[SWITCH_RANDOM_WILD] && !dontRandomize
|
||||||
@@ -32,7 +32,7 @@ def pbAddPokemonID(pokemon_id, level = 1, see_form = true, skip_randomize = fals
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if pokemon_id.is_a?(Integer) && level.is_a?(Integer)
|
if pokemon_id.is_a?(Integer) && level.is_a?(Integer)
|
||||||
pokemon = Pokemon.create(pokemon_id, level)
|
pokemon = Pokemon.new(pokemon_id, level)
|
||||||
species_name = pokemon.speciesName
|
species_name = pokemon.speciesName
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ end
|
|||||||
def generateSimpleTrainerParty(teamSpecies, level)
|
def generateSimpleTrainerParty(teamSpecies, level)
|
||||||
team = []
|
team = []
|
||||||
for species in teamSpecies
|
for species in teamSpecies
|
||||||
poke = Pokemon.create(species, level)
|
poke = Pokemon.new(species, level)
|
||||||
team << poke
|
team << poke
|
||||||
end
|
end
|
||||||
return team
|
return team
|
||||||
|
|||||||
@@ -1471,14 +1471,14 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
|
|||||||
new_level = calculateUnfuseLevelOldMethod(pokemon, supersplicers)
|
new_level = calculateUnfuseLevelOldMethod(pokemon, supersplicers)
|
||||||
body_level = new_level
|
body_level = new_level
|
||||||
head_level = new_level
|
head_level = new_level
|
||||||
poke1 = Pokemon.create(bodyPoke, body_level)
|
poke1 = Pokemon.new(bodyPoke, body_level)
|
||||||
poke2 = Pokemon.create(headPoke, head_level)
|
poke2 = Pokemon.new(headPoke, head_level)
|
||||||
else
|
else
|
||||||
exp_body = pokemon.exp_when_fused_body + pokemon.exp_gained_since_fused
|
exp_body = pokemon.exp_when_fused_body + pokemon.exp_gained_since_fused
|
||||||
exp_head = pokemon.exp_when_fused_head + pokemon.exp_gained_since_fused
|
exp_head = pokemon.exp_when_fused_head + pokemon.exp_gained_since_fused
|
||||||
|
|
||||||
poke1 = Pokemon.create(bodyPoke, pokemon.level)
|
poke1 = Pokemon.new(bodyPoke, pokemon.level)
|
||||||
poke2 = Pokemon.create(headPoke, pokemon.level)
|
poke2 = Pokemon.new(headPoke, pokemon.level)
|
||||||
poke1.exp = exp_body
|
poke1.exp = exp_body
|
||||||
poke2.exp = exp_head
|
poke2.exp = exp_head
|
||||||
end
|
end
|
||||||
@@ -1540,8 +1540,8 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
|
|||||||
$PokemonStorage.pbStoreCaught(poke2)
|
$PokemonStorage.pbStoreCaught(poke2)
|
||||||
scene.pbDisplay(_INTL("{1} was sent to the PC.", poke2.name))
|
scene.pbDisplay(_INTL("{1} was sent to the PC.", poke2.name))
|
||||||
else
|
else
|
||||||
poke2 = Pokemon.create(bodyPoke, body_level)
|
poke2 = Pokemon.new(bodyPoke, body_level)
|
||||||
poke1 = Pokemon.create(headPoke, head_level)
|
poke1 = Pokemon.new(headPoke, head_level)
|
||||||
|
|
||||||
if pcPosition != nil
|
if pcPosition != nil
|
||||||
box = pcPosition[0]
|
box = pcPosition[0]
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ def generateCurrentGalleryBattle(level = nil, number_of_pokemon = 3)
|
|||||||
selected_battlers_idx = possible_battlers.sample(number_of_pokemon)
|
selected_battlers_idx = possible_battlers.sample(number_of_pokemon)
|
||||||
party = []
|
party = []
|
||||||
selected_battlers_idx.each { |species|00
|
selected_battlers_idx.each { |species|00
|
||||||
party << Pokemon.create(species, level)
|
party << Pokemon.new(species, level)
|
||||||
}
|
}
|
||||||
customTrainerBattle(spriter_name,
|
customTrainerBattle(spriter_name,
|
||||||
:PAINTER,
|
:PAINTER,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user