Mercurial > touhou
diff pytouhou/vm/msgrunner.py @ 331:1b4f04b08729
Add the story mode.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 30 Jun 2012 19:37:21 +0200 |
parents | 61adb5453e46 |
children | 72ef7e24b373 |
line wrap: on
line diff
--- a/pytouhou/vm/msgrunner.py +++ b/pytouhou/vm/msgrunner.py @@ -21,6 +21,10 @@ from pytouhou.game.face import Face logger = get_logger(__name__) +class NextStage(Exception): + pass + + class MSGRunner(object): __metaclass__ = MetaRegistry __slots__ = ('_msg', '_game', 'frame', 'sleep_time', 'allow_skip', @@ -138,6 +142,11 @@ class MSGRunner(object): self.frozen = True + @instruction(11) + def next_stage(self): + raise NextStage + + @instruction(13) def set_allow_skip(self, boolean): self.allow_skip = bool(boolean)