Mercurial > touhou
comparison pytouhou/game/eclrunner.py @ 55:de358a7684c8
Fix a few bugs
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 23 Aug 2011 00:10:35 +0200 |
parents | e72166f73e30 |
children | 694f25881d0f |
comparison
equal
deleted
inserted
replaced
54:b383b09bc735 | 55:de358a7684c8 |
---|---|
133 | 133 |
134 def _setval(self, variable_id, value): | 134 def _setval(self, variable_id, value): |
135 if -10012 <= variable_id <= -10001: | 135 if -10012 <= variable_id <= -10001: |
136 self.variables[int(-10001-variable_id)] = value | 136 self.variables[int(-10001-variable_id)] = value |
137 elif -10025 <= variable_id <= -10013: | 137 elif -10025 <= variable_id <= -10013: |
138 if value == -10015: | 138 if variable_id == -10015: |
139 self._enemy.x = value | 139 self._enemy.x = value |
140 elif value == -10016: | 140 elif variable_id == -10016: |
141 self._enemy.y = value | 141 self._enemy.y = value |
142 elif value == -10017: | 142 elif variable_id == -10017: |
143 self._enemy.z = value | 143 self._enemy.z = value |
144 elif value == -10022: | 144 elif variable_id == -10022: |
145 self._enemy.frame = value | 145 self._enemy.frame = value |
146 elif value == -10024: | 146 elif variable_id == -10024: |
147 self._enemy.life = value | 147 self._enemy.life = value |
148 raise IndexError #TODO: proper exception | 148 else: |
149 raise IndexError #TODO: proper exception | |
149 else: | 150 else: |
150 raise IndexError #TODO: proper exception | 151 raise IndexError #TODO: proper exception |
151 | 152 |
152 | 153 |
153 @instruction(0) | 154 @instruction(0) |