changeset 273:595b227886b1

Partially implement hardcoded function 16, used for QED: ripples of 495 years
author Thibaut Girka <thib@sitedethib.com>
date Tue, 24 Jan 2012 23:26:53 +0100
parents b21acb12bed1
children f037bca24f2d
files pytouhou/vm/eclrunner.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -958,6 +958,17 @@ class ECLRunner(object):
                                      self._getval(-10006) + _angle, angle, flags)
                 self._enemy.fire(launch_pos=launch_pos,
                                  bullet_attributes=bullet_attributes)
+        elif function == 16: # QED: Ripples of 495 years
+            #TODO: the rythm seems to be really wrong
+            # Indeed, Flandre is supposed to start slowly, and those values
+            # match the craziest parts of the spellcard
+            if arg == 0:
+                self.variables[9] = 40 #TODO: is that all?
+                self.variables[7] = 2. #TODO: check value. is that all?
+            else:
+                #TODO: check
+                self.variables[6] = self._game.prng.rand_double() * (self._game.width - 64.) + 32.
+                self.variables[7] = self._game.prng.rand_double() * (self._game.width / 2. - 64.) + 32.
         else:
             logger.warn("Unimplemented special function %d!", function)