1
0
mirror of https://gitlab.com/Deukhoofd/BattleSim.git synced 2025-09-01 16:37:20 +00:00

Quick fix to crashing issue

This commit is contained in:
Deukhoofd 2016-05-21 00:43:01 +02:00
parent 20e59467d1
commit ac740143ee

View File

@ -130,7 +130,10 @@ class @Pokemon
@maxPPHash = {}
if @moves?
for move in @moves
@ppHash[move.name] = @maxPPHash[move.name] = pp || (move.pp * 8/5)
try
@ppHash[move.name] = @maxPPHash[move.name] = pp || (move.pp * 8/5)
catch error
print error
setType: (newType) ->
@types = newType