diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-05-20 03:15:36 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-05-20 03:15:36 -0500 |
commit | efd43a17b2869b02f88949dfc02d646a3fa718db (patch) | |
tree | d85ca203746aedc5b952d4328a7e74e2aadc5fdd /extras/crystal.py | |
parent | 40000ca816fe71cfb56f9390830e6e70a8a00660 (diff) |
improve MoveParam to handle zeroed-out moves
Diffstat (limited to 'extras/crystal.py')
-rw-r--r-- | extras/crystal.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extras/crystal.py b/extras/crystal.py index 92d3375fa..ab58a19cd 100644 --- a/extras/crystal.py +++ b/extras/crystal.py @@ -1724,7 +1724,11 @@ class TrainerGroupParam(SingleByteParam): class MoveParam(SingleByteParam): def to_asm(self): - return moves[self.byte] + if self.byte in moves.keys(): + return moves[self.byte] + else: + # this happens for move=0 (no move) in trainer headers + return str(self.byte) class MenuDataPointerParam(PointerLabelParam): #read menu data at the target site |