1
0
mirror of https://gitlab.com/Deukhoofd/BattleSim.git synced 2025-10-29 02:30:05 +00:00

Gotta git gud

This commit is contained in:
Deukhoofd
2016-02-20 00:54:42 +01:00
parent 19558607f3
commit 1114909caf
32 changed files with 401 additions and 121 deletions

View File

@@ -14,7 +14,6 @@ HiddenPower = (if module? then require('../../../../shared/hidden_power') else w
[ all, pokemonLine, gender, item ] = line.match(pokemonRegex)
pokemon = {}
team.push(pokemon)
if pokemonLine.match(/(.*?)\s*\((.*)\)/)
pokemon.name = RegExp.$1
pokemonLine = RegExp.$2
@@ -30,7 +29,7 @@ HiddenPower = (if module? then require('../../../../shared/hidden_power') else w
if pokemon.ability is oldability
pokemon.ability = newability
else if line.match(/^Level:\s+(.*)$/i)
pokemon.level = Number(RegExp.$1) || 100
pokemon.level = Number(RegExp.$1) || 120
else if line.match(/^Happiness:\s+(.*)$/i)
pokemon.happiness = Number(RegExp.$1) || 0
else if line.match(/^Shiny: Yes$/i)
@@ -105,7 +104,7 @@ HiddenPower = (if module? then require('../../../../shared/hidden_power') else w
s.push("#{pokemon.nature} nature") if pokemon.nature
# Level
s.push("Level: #{pokemon.level}") if pokemon.level && pokemon.level != 100
s.push("Level: #{pokemon.level}") if pokemon.level && pokemon.level != 120
# Shiny
s.push("Shiny: Yes") if pokemon.shiny