def do_testmission(self, s=None): mission = None if s is not None: mission = game.get_mission(s) if mission is None: mission = game.random_mission() attempt = MissionAttempt(mission) goon_count = 0 for objective in mission.objectives: for i in range(0, random.randint(2,4)): goon_count += 1 goon = Goon() goon.generateTraits() attempt.add_goon_to_objective(objective.id, goon) print "The team is prepared to start %s" % mission.name game.player.remove_money(goon_count*200) print 'Spent %s on hiring goons.' % (goon_count*200) try: attempt.attempt() print '****************************************************************************************************' print 'The team has returned with the loot!' reward = attempt.reward game.player.add_money(reward) print '$%s is safe and sound back at the base!' % reward print 'You now have $%s!' % game.player.money print '****************************************************************************************************' except FailedCriticalObjective: print '####################################################################################################' print 'The team has failed the objective' print '####################################################################################################'
def do_newgoon(self, s): g = Goon() print("Name: %s\nType: %s" % (g.name, g.type)) print(g.generateTraits())