Mercurial > touhou
comparison eosd @ 445:b0abb05811f7
Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Sat, 17 Aug 2013 04:44:28 +0200 |
| parents | 18e4b121646b |
| children | 1f5156093785 |
comparison
equal
deleted
inserted
replaced
| 444:f26c8ab57257 | 445:b0abb05811f7 |
|---|---|
| 54 | 54 |
| 55 from pytouhou.ui.window import Window | 55 from pytouhou.ui.window import Window |
| 56 from pytouhou.resource.loader import Loader | 56 from pytouhou.resource.loader import Loader |
| 57 from pytouhou.ui.gamerunner import GameRunner | 57 from pytouhou.ui.gamerunner import GameRunner |
| 58 from pytouhou.games.eosd import EoSDCommon, EoSDGame | 58 from pytouhou.games.eosd import EoSDCommon, EoSDGame |
| 59 from pytouhou.game.game import GameOver | 59 from pytouhou.game.player import PlayerState, GameOver |
| 60 from pytouhou.game.player import PlayerState | |
| 61 from pytouhou.formats.t6rp import T6RP, Level | 60 from pytouhou.formats.t6rp import T6RP, Level |
| 62 from pytouhou.utils.random import Random | 61 from pytouhou.utils.random import Random |
| 63 from pytouhou.vm.msgrunner import NextStage | 62 from pytouhou.vm.msgrunner import NextStage |
| 64 from pytouhou.formats.hint import Hint | 63 from pytouhou.formats.hint import Hint |
| 65 | 64 |
| 159 #TODO: see if the stored score is used or if it’s the one from the previous stage. | 158 #TODO: see if the stored score is used or if it’s the one from the previous stage. |
| 160 if stage_num != 1 and stage_num - 2 in replay.levels: | 159 if stage_num != 1 and stage_num - 2 in replay.levels: |
| 161 previous_level = replay.levels[stage_num - 1] | 160 previous_level = replay.levels[stage_num - 1] |
| 162 states[0].score = previous_level.score | 161 states[0].score = previous_level.score |
| 163 states[0].effective_score = previous_level.score | 162 states[0].effective_score = previous_level.score |
| 164 states[0].point_items = level.point_items | 163 states[0].points = level.point_items |
| 165 states[0].power = level.power | 164 states[0].power = level.power |
| 166 states[0].lives = level.lives | 165 states[0].lives = level.lives |
| 167 states[0].bombs = level.bombs | 166 states[0].bombs = level.bombs |
| 168 difficulty = level.difficulty | 167 difficulty = level.difficulty |
| 169 else: | 168 else: |
