Mercurial > sypikslang
changeset 241:f5d9a063013b
Fail very long equipment lists automatically
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 13 May 2012 00:16:44 +0200 |
parents | af86a207d8d2 |
children | 0bc8592ee28c |
files | gamelib/missions.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/missions.py Sun May 13 00:13:46 2012 +0200 +++ b/gamelib/missions.py Sun May 13 00:16:44 2012 +0200 @@ -145,6 +145,12 @@ if not equipment: return self.attempt_no_equipment(state) + # Fail overly complex plans automatically + if len(equipment) > 10: + self.fail( + "Your plan is much too complicated, doctor. Surely there" + " is a more elegant solution?") + # Try with some equipment. self.attempt_with(self.categorise_equipment(equipment), state)