From c76dcab0577b9fd330117c41d399a26747fb7514 Mon Sep 17 00:00:00 2001 From: Loudrob Date: Fri, 6 Mar 2015 06:25:05 -0500 Subject: [PATCH] Made CFO back to the way it was. --- config/general.prc | 4 ++-- toontown/suit/DistributedCashbotBossAI.py | 24 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/config/general.prc b/config/general.prc index e147bdc7..1f6631ad 100644 --- a/config/general.prc +++ b/config/general.prc @@ -101,8 +101,8 @@ want-lawbot-headquarters #t want-bossbot-headquarters #t # Cashbot boss: -want-resistance-toonup #f -want-resistance-restock #f +want-resistance-toonup #t +want-resistance-restock #t want-resistance-dance #f # Cog battles: diff --git a/toontown/suit/DistributedCashbotBossAI.py b/toontown/suit/DistributedCashbotBossAI.py index aaa97b52..a6d2e811 100644 --- a/toontown/suit/DistributedCashbotBossAI.py +++ b/toontown/suit/DistributedCashbotBossAI.py @@ -4,7 +4,7 @@ from toontown.toonbase import ToontownGlobals from toontown.coghq import DistributedCashbotBossCraneAI from toontown.coghq import DistributedCashbotBossSafeAI from toontown.suit import DistributedCashbotBossGoonAI -#from toontown.coghq import DistributedCashbotBossTreasureAI +from toontown.coghq import DistributedCashbotBossTreasureAI from toontown.battle import BattleExperienceAI from toontown.chat import ResistanceChat from direct.fsm import FSM @@ -198,9 +198,8 @@ class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS treasure.b_setPosition(pos[0], pos[1], 0) treasure.b_setFinalPosition(fpos[0], fpos[1], 0) else: - #treasure = DistributedCashbotBossTreasureAI.DistributedCashbotBossTreasureAI(self.air, self, goon, style, fpos[0], fpos[1], 0) - #treasure.generateWithRequired(self.zoneId) - pass + treasure = DistributedCashbotBossTreasureAI.DistributedCashbotBossTreasureAI(self.air, self, goon, style, fpos[0], fpos[1], 0) + treasure.generateWithRequired(self.zoneId) treasure.healAmount = healAmount self.treasures[treasure.doId] = treasure @@ -541,3 +540,20 @@ def skipCFO(): boss.exitIntroduction() boss.b_setState('PrepareBattleThree') return 'Skipping the first round...' + +@magicWord(category=CATEGORY_ADMINISTRATOR) +def killCFO(): + """ + Kills the CFO. + """ + invoker = spellbook.getInvoker() + boss = None + for do in simbase.air.doId2do.values(): + if isinstance(do, DistributedCashbotBossAI): + if invoker.doId in do.involvedToons: + boss = do + break + if not boss: + return "You aren't in a CFO" + boss.b_setState('Victory') + return 'Killed CFO.'