changeset 623:9f0e738ab4a5

Only issue the cyan keycard once
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 08 Sep 2013 01:04:04 +0200
parents 3687d06c539f
children 59d375111cc5
files nagslang/enemies.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/nagslang/enemies.py	Sun Sep 08 01:00:20 2013 +0200
+++ b/nagslang/enemies.py	Sun Sep 08 01:04:04 2013 +0200
@@ -341,9 +341,10 @@
     def update(self, dt):
         result = super(Queen, self).update(dt)
         self.spawn(result)
-        if self.health <= 0:
+        if (self.health <= 0
+                and not self.world.protagonist.has_item('keycard_cyan')):
             result.add += (KeyCard(self.get_space(),
-            self.physicser.position, "keycard_cyan"),)
+                                   self.physicser.position, 'keycard_cyan'),)
         return result
 
     @classmethod