Преглед на файлове

Stop Exploring when you run out of turns.

Steve Thielemann преди 5 години
родител
ревизия
ff5449662c
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10 0
      flexible.py

+ 10 - 0
flexible.py

@@ -1274,7 +1274,17 @@ class ScriptExplore(object):
         #if "Mine Control" in line: # If we don't have a Holo-Scanner and we attempted to do a Holo-scan, abort
         #    self.deactivate()
 
+        if line.startswith("You don't have enough turns left."):
+            self.send2player(self.nl + Boxes.alert("You're out of turns!"))
+            self.deactivate(True)
+            return
+
         if self.state == 1:
+            if line.startswith('You have ') and 'turns left.' in line:
+                # Ok, you're in trouble!
+                self.send2player(self.nl + Boxes.alert("You're running low on turns!"))
+                self.deactivate(True)
+                return
             self.send2game("S")
             self.state += 1
         elif self.state == 2: