# HG changeset patch # User Jeremy Thurgood # Date 1302394159 -7200 # Node ID 91ad18a5acf19dcd6b45620d2661a2d4d6c39854 # Parent 0236c5fe6ac13f936bd17cd277c3ea2915850e98 Celestial Doorway now counts tails. diff -r 0236c5fe6ac1 -r 91ad18a5acf1 data/levels/town.json --- a/data/levels/town.json Sun Apr 10 02:02:53 2011 +0200 +++ b/data/levels/town.json Sun Apr 10 02:09:19 2011 +0200 @@ -47,7 +47,7 @@ "to_theatre": {"type": "Doorway", "pos": [13, 5], "facing": "right", "leadsto": "theatre.starting"}, "to_tea_house": {"type": "Doorway", "pos": [29, 3], "facing": "right", "leadsto": "tea_house.starting"}, "to_market": {"type": "Doorway", "pos": [44, 6], "facing": "right", "leadsto": "market.starting"}, - "to_celestial_plane": {"type": "Doorway", "pos": [59, 14], "facing": "left", "leadsto": "celestial_plane.starting"} + "to_celestial_plane": {"type": "CelestialDoorway", "pos": [59, 14], "facing": "left", "leadsto": "celestial_plane.starting"} }, "music" : { "track" : "ambient japanese music 2.ogg", diff -r 0236c5fe6ac1 -r 91ad18a5acf1 skaapsteker/levelscene.py --- a/skaapsteker/levelscene.py Sun Apr 10 02:02:53 2011 +0200 +++ b/skaapsteker/levelscene.py Sun Apr 10 02:09:19 2011 +0200 @@ -59,7 +59,7 @@ for sprite in self._level.sprites: # XXX: NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO! - if isinstance(sprite, base.Monster): + if isinstance(sprite, base.Monster) or isinstance(sprite, base.CelestialDoorway): sprite.world = game_state.world self._world.add(sprite) npcs_and_items = game_state.create_sprites(self._level.name) diff -r 0236c5fe6ac1 -r 91ad18a5acf1 skaapsteker/sprites/base.py --- a/skaapsteker/sprites/base.py Sun Apr 10 02:02:53 2011 +0200 +++ b/skaapsteker/sprites/base.py Sun Apr 10 02:09:19 2011 +0200 @@ -450,6 +450,16 @@ +class CelestialDoorway(Doorway): + def player_action(self, player): + from .. import engine + if len(self.world.fox.tails) < 8: + engine.OpenNotification.post(text="You need eight tails to enter the Celestial Plane.") + return + super(CelestialDoorway, self).player_action(player) + + + class StartingDoorway(Doorway): actionable = False