Mercurial > pyntnclick
comparison gamelib/ss_state.py @ 854:3577c51029f1 default tip
Remove Suspended Sentence. pyntnclick is the library we extracted from it
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 21 Jun 2014 22:15:54 +0200 |
parents | f95830b58336 |
children |
comparison
equal
deleted
inserted
replaced
853:f95830b58336 | 854:3577c51029f1 |
---|---|
1 """The Custom state object for Suspended Sentence""" | |
2 | |
3 from pyntnclick.state import GameState | |
4 | |
5 | |
6 class SSState(GameState): | |
7 | |
8 def get_jim_state(self): | |
9 """Check JIM's health""" | |
10 return self['bridge']['ai status'] | |
11 | |
12 def loop_ai(self): | |
13 """Make JIM loopy""" | |
14 self['bridge']['ai status'] = 'looping' | |
15 | |
16 def break_ai(self): | |
17 self['bridge']['ai status'] = 'dead' | |
18 | |
19 def get_total_sentence(self): | |
20 return self['cryo']['sentence'] | |
21 | |
22 def increase_sentence(self, years): | |
23 if self['bridge']['ai status'] == 'online': | |
24 self['cryo']['sentence'] += years |