Mercurial > pyntnclick
diff gamelib/ss_state.py @ 853:f95830b58336
Merge pyntnclick
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 21 Jun 2014 22:04:35 +0200 |
parents | bdebe693453f |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gamelib/ss_state.py Sat Jun 21 22:04:35 2014 +0200 @@ -0,0 +1,24 @@ +"""The Custom state object for Suspended Sentence""" + +from pyntnclick.state import GameState + + +class SSState(GameState): + + def get_jim_state(self): + """Check JIM's health""" + return self['bridge']['ai status'] + + def loop_ai(self): + """Make JIM loopy""" + self['bridge']['ai status'] = 'looping' + + def break_ai(self): + self['bridge']['ai status'] = 'dead' + + def get_total_sentence(self): + return self['cryo']['sentence'] + + def increase_sentence(self, years): + if self['bridge']['ai status'] == 'online': + self['cryo']['sentence'] += years