mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
dna reverser, hotel crashes fix, unfusing & exp tracking, wondertrade
This commit is contained in:
@@ -110,4 +110,146 @@ end
|
||||
|
||||
def getHeadID(species, bodyId)
|
||||
return (species - (bodyId * NB_POKEMON)).round
|
||||
end
|
||||
|
||||
def getAllNonLegendaryPokemon()
|
||||
list= []
|
||||
for i in 1..143
|
||||
list.push(i)
|
||||
end
|
||||
for i in 147..149
|
||||
list.push(i)
|
||||
end
|
||||
for i in 152..242
|
||||
list.push(i)
|
||||
end
|
||||
list.push(246)
|
||||
list.push(247)
|
||||
list.push(248)
|
||||
for i in 252..314
|
||||
list.push(i)
|
||||
end
|
||||
for i in 316..339
|
||||
list.push(i)
|
||||
end
|
||||
for i in 352..377
|
||||
list.push(i)
|
||||
end
|
||||
for i in 382..420
|
||||
list.push(i)
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
def getPokemonEggGroups(species)
|
||||
groups = []
|
||||
|
||||
compat10=$pkmn_dex[species][13][0]
|
||||
compat11=$pkmn_dex[species][13][1]
|
||||
|
||||
groups << compat10
|
||||
groups << compat11
|
||||
return groups
|
||||
end
|
||||
|
||||
def generateEggGroupTeam(eggGroup)
|
||||
teamComplete = false
|
||||
generatedTeam = []
|
||||
while !teamComplete
|
||||
species = rand(PBSpecies.maxValue)
|
||||
if getPokemonEggGroups(species).include?(eggGroup)
|
||||
generatedTeam << species
|
||||
end
|
||||
teamComplete = generatedTeam.length == 3
|
||||
end
|
||||
return generatedTeam
|
||||
end
|
||||
|
||||
def pbGetSelfSwitch(eventId,switch)
|
||||
return $game_self_switches[[@map_id,eventId,switch]]
|
||||
end
|
||||
|
||||
def obtainBadgeMessage(badgeName)
|
||||
Kernel.pbMessage(_INTL("\\me[Badge get]{1} obtained the {2}!",$Trainer.name,badgeName))
|
||||
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()
|
||||
list= []
|
||||
for i in 1..143
|
||||
list.push(i)
|
||||
end
|
||||
for i in 147..149
|
||||
list.push(i)
|
||||
end
|
||||
for i in 152..242
|
||||
list.push(i)
|
||||
end
|
||||
list.push(246)
|
||||
list.push(247)
|
||||
list.push(248)
|
||||
for i in 252..314
|
||||
list.push(i)
|
||||
end
|
||||
for i in 316..339
|
||||
list.push(i)
|
||||
end
|
||||
for i in 352..377
|
||||
list.push(i)
|
||||
end
|
||||
for i in 382..420
|
||||
list.push(i)
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
def generateSimpleTrainerParty(teamSpecies,level)
|
||||
team = []
|
||||
for species in teamSpecies
|
||||
poke = Pokemon.new(species, level)
|
||||
team << poke
|
||||
end
|
||||
return team
|
||||
end
|
||||
|
||||
|
||||
def isSinnohPokemon(species)
|
||||
list =
|
||||
[254,255,256,257,258,259,260,261,262,263,264,265,
|
||||
266,267,268,269,270,271,272,273,274,275,288,294,
|
||||
295,296,297,298,299,305,306,307,308,315,316,317,
|
||||
318,319,320,321,322,323,324,326,332,343,344,345,
|
||||
346,347,352,353,354,358,383,384,388,389,400,402,403]
|
||||
return list.include?(species)
|
||||
end
|
||||
|
||||
|
||||
def isHoennPokemon(species)
|
||||
list=[252,253,276,277,278,279,280,281,282,283,284,
|
||||
285,286,287,289,290,291,292,293,300,301,302,303,
|
||||
304,309,310,311,312,313,314,333,334,335,336,340,
|
||||
341,342,355,356,357,378,379,380,381,382,385,386,387,390,
|
||||
391,392,393,394,395,396,401,404,405]
|
||||
return list.include?(species)
|
||||
end
|
||||
Reference in New Issue
Block a user