diff gamelib/missions.py @ 124:685301e35f88

Add a minion cost to missions
author Neil Muller <drnlmuller@gmail.com>
date Thu, 10 May 2012 12:16:15 +0200
parents 7cd716328a44
children be79e113d494
line wrap: on
line diff
--- a/gamelib/missions.py	Thu May 10 02:37:02 2012 +0200
+++ b/gamelib/missions.py	Thu May 10 12:16:15 2012 +0200
@@ -37,6 +37,7 @@
 
     MINIMUM_REPUTATION = None
     MINIMUM_MILESTONE = "neighbourhood"
+    MINIONS_REQUIRED = 1
 
     def __init__(self, init_data=None):
         self.data = {}
@@ -77,6 +78,9 @@
             self.MINIMUM_REPUTATION > state.reputation):
             # Don't have the reputation required
             return False
+        if self.MINIONS_REQUIRED > state.minions:
+            # Need more minions!
+            return False
         return True
 
     def attempt(self, equipment, state):