Changeset 367:ea315cdf286d for nagslang


Ignore:
Timestamp:
Sep 6, 2013, 7:13:45 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Message:

Enemy ranged attacks do damage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/protagonist.py

    r363 r367  
    2222        self._space = space
    2323        self._form_shapes = form_shapes
     24        for shape in form_shapes.values():
     25            shape.physicser = self
    2426
    2527    def switch_form(self, old_form, new_form):
     
    329331        return self.health_level
    330332
     333    def hit(self, weapon):
     334        '''Recieve an attack'''
     335        self.lose_health(weapon.damage)
     336
    331337    def die(self):
    332338        # Handle player death - may be called due to other reasons
Note: See TracChangeset for help on using the changeset viewer.