Changeset 525:8087e95ade2f


Ignore:
Timestamp:
04/09/11 21:40:50 (12 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
35613636303366653261653166313661336336323061623639613963616465373962333232616531
Message:

More cannon stuff

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • data/game.json

    r520 r525  
    4545        "kindling": { "type": "Kindling", "level": "road", "pos": [36, 3] },
    4646        "oil": { "type": "Oil", "level": "road", "pos": [17, 8] },
    47         "cannon": { "type": "Cannon", "level": "road", "pos": [57, 8], "broken": false },
     47        "cannon": { "type": "Cannon", "level": "road", "pos": [57, 8], "broken": false, "block": true },
    4848        "rice": { "type": "Rice", "level": "tea_house", "pos": [3, 8], "broken": false },
    4949        "documents": { "type": "Documents", "level": "tea_house", "pos": [7, 9] },
     
    171171        "hattori": { "type": "Hattori", "level": "road", "pos": [37, 8], "dsm": "npcs/hattori.json", "state": "start", "block": true, "facing": "left" },
    172172        "ichiro": { "type": "Ichiro", "level": "road", "pos": [36, 8], "dsm": "npcs/ichiro.json", "state": "start", "block": true, "facing": "right" },
    173         "sasuke": { "type": "Sasuke", "level": "road", "pos": [54, 8], "dsm": "npcs/sasuke.json", "state": "start"},
     173        "sasuke": { "type": "Sasuke", "level": "road", "pos": [54, 8], "dsm": "npcs/sasuke.json", "state": "start", "present": true},
    174174        "kaneda2": { "type": "Kaneda", "level": "tea_house", "pos": [6, 10], "dsm": "npcs/kaneda2.json", "state": "start", "facing": "right" },
    175175        "tetsuo": { "type": "Tetsuo", "level": "tea_house", "pos": [9, 10], "dsm": "npcs/tetsuo.json", "state": "start", "facing": "left" },
  • data/npcs/sasuke.json

    r500 r525  
    1515    },
    1616    "gone" : {
    17         "on_entry": "drop_item('tail_invisibility')"
     17        "on_entry": "drop_item('tail_invisibility'); npcs.sasuke.present=False"
    1818    }
    1919}
  • skaapsteker/sprites/items.py

    r522 r525  
    198198    liftable = False
    199199
     200    def setup(self, block, **opts):
     201        super(Cannon, self).setup(**opts)
     202        self.block = block
     203
     204    def smash(self):
     205        self._me.block = False
     206        self.block = False
     207        super(Cannon, self).smash()
     208        self.world.missions.cannon_destroyed = True
    200209
    201210
  • skaapsteker/sprites/npcs.py

    r516 r525  
    102102    image_dir = 'sprites/sasuke'
    103103
    104     def setup(self, name, world, dsm, state, facing=None):
     104    def setup(self, name, world, dsm, state, present, facing=None):
    105105        self._animation = 'standing'
    106106        super(Sasuke, self).setup(name, world, dsm, state, facing)
    107107
     108    def update(self):
     109        if not self._me.present:
     110            self.remove()
    108111
    109112
Note: See TracChangeset for help on using the changeset viewer.