mirror of
https://gitlab.com/Deukhoofd/BattleSim.git
synced 2025-10-27 18:00:03 +00:00
Resolve #21
This commit is contained in:
@@ -58,6 +58,7 @@ getGenerationFromInt = (generationInteger) ->
|
||||
loopLearnsets = (Generations, pokemon, forGeneration, iterator) ->
|
||||
minimumGeneration = getMinimumGeneration(forGeneration)
|
||||
{species, forme, ability} = pokemon
|
||||
origspecies = species
|
||||
formeName = forme || "default"
|
||||
# Find pre-evolutions and formes
|
||||
thePokemon = []
|
||||
@@ -100,6 +101,17 @@ loopLearnsets = (Generations, pokemon, forGeneration, iterator) ->
|
||||
return true if iterator(learnset, species, formeName, generation) == true
|
||||
return false
|
||||
|
||||
eeveelutions = [
|
||||
'Vaporeon'
|
||||
'Jolteon'
|
||||
'Flareon'
|
||||
'Espeon'
|
||||
'Umbreon'
|
||||
'Leafeon'
|
||||
'Glaceon'
|
||||
'Sylveon'
|
||||
]
|
||||
|
||||
# Returns an array of moves that this Pokemon can learn for a given generation.
|
||||
self.learnableMoves = (Generations, pokemon, forGeneration) ->
|
||||
learnable = []
|
||||
@@ -121,6 +133,13 @@ self.learnableMoves = (Generations, pokemon, forGeneration) ->
|
||||
for moveName of Generations[getGenerationFromInt(forGeneration)].MoveData
|
||||
if moveName not in unsketchableMoves
|
||||
learnable.push(moveName)
|
||||
if pokemon.species in eeveelutions and forGeneration is 7
|
||||
remindex = -1
|
||||
for ele, index in learnable
|
||||
if "Hydro Pump" in ele and "Flare Blitz" in ele and "Psychic" in ele and pokemon.species != 'Eevee'
|
||||
remindex = index
|
||||
learnable.splice(remindex, 1)
|
||||
console.log(learnable)
|
||||
|
||||
_.chain(learnable).flatten().sort().unique().value()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user