Mercurial > touhou
diff pytouhou/game/game.py @ 303:647bde10353d
Add score/effective_score distinction and prepare for highscore handling.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sat, 10 Mar 2012 20:37:15 +0100 |
parents | da53bc29b94a |
children | f3099ebf4f61 |
line wrap: on
line diff
--- a/pytouhou/game/game.py +++ b/pytouhou/game/game.py @@ -117,6 +117,8 @@ class Game(object): player = self.players[0] #TODO if _type > 6: return + if len(self.items) >= self.nb_bullets_max: + return #TODO: check item_type = self.item_types[_type] item = Item((x, y), _type, item_type, self, end_pos=end_pos) self.items.append(item) @@ -234,6 +236,11 @@ class Game(object): for bullet in self.players_bullets: bullet.update() + #XXX: Why 78910? Is it really the right value? + player.state.effective_score = min(player.state.effective_score + 78910, + player.state.score) + #TODO: give extra lives to the player + def update_effects(self): for effect in self.effects: