Mercurial > sypikslang
diff gamelib/missions.py @ 32:00aff02bc6fc
Product categories.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 06 May 2012 20:57:04 +0200 |
parents | 27570aca5d17 |
children | 12c33aac7684 |
line wrap: on
line diff
--- a/gamelib/missions.py Sun May 06 20:54:03 2012 +0200 +++ b/gamelib/missions.py Sun May 06 20:57:04 2012 +0200 @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # vim:fileencoding=utf-8 ai ts=4 sts=4 et sw=4 -from products import DoomsdayVirus, MachineGun, LightningGun +from products import DoomsdayVirus, HAND_WEAPON MAJOR_SETBACK, FAILURE, SUCCESS, MAJOR_SUCCESS, GAME_WIN = range(5) @@ -58,7 +58,7 @@ LONG_DESCRIPTION = ("It's not menancing, or lucrative, but when the bills" " are due, no one cares how you earn the money") - def attempt(sefl, equipment, state): + def attempt(self, equipment, state): return Result(SUCCESS, 100, -1, "You devote your resources to" " robbing kids in a playpark. It's not the finest moment" " in your reign of terror, but at least you walked away" @@ -130,7 +130,7 @@ return Result(SUCCESS, 1000, 0, "Holding up a bank with" " only a small vial of clear liquid. Now that" " is power.") - elif isinstance(item, (MachineGun, LightningGun)): + elif HAND_WEAPON in item.CATEGORIES: return Result(SUCCESS, 1000, 0, "The threat of your weapons is" " enough to inspire an impressive level of cooperation") else: