changeset 266:3a86c4e070dc

Implement ECL’s 3rd hardcoded function.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 23 Jan 2012 19:01:04 +0100
parents 0aab9b34299e
children 35644a67ba4c
files pytouhou/vm/eclrunner.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -912,6 +912,13 @@ class ECLRunner(object):
             offset = (self._game.prng.rand_uint16() % arg - arg / 2,
                       self._game.prng.rand_uint16() % arg - arg / 2)
             self._enemy.fire(offset=offset)
+        elif function == 3: # Patchouli’s dual sign spellcards
+            values = [[0, 3, 1],
+                      [2, 3, 4],
+                      [1, 4, 0],
+                      [4, 2, 3]]
+            character = self._enemy.select_player().state.character
+            self.variables[1:4] = values[character]
         elif function == 13:
             if self._enemy.bullet_attributes is None:
                 return