From 7139be634f4fb165b3156009eef181c00b9fe7e1 Mon Sep 17 00:00:00 2001 From: Loudrob Date: Fri, 14 Aug 2015 19:24:08 -0400 Subject: [PATCH] cashbot boss treasure --- .../coghq/DistributedCashbotBossTreasureAI.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/toontown/coghq/DistributedCashbotBossTreasureAI.py b/toontown/coghq/DistributedCashbotBossTreasureAI.py index a9a4995b..238b19ce 100755 --- a/toontown/coghq/DistributedCashbotBossTreasureAI.py +++ b/toontown/coghq/DistributedCashbotBossTreasureAI.py @@ -1,15 +1,22 @@ -class DistributedCashbotBossTreasureAI: - pass -'''from toontown.safezone import DistributedSZTreasureAI +from toontown.safezone import DistributedTreasureAI +from toontown.safezone import TreasureGlobals -class DistributedCashbotBossTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): +class DistributedCashbotBossTreasureAI(DistributedTreasureAI.DistributedTreasureAI): def __init__(self, air, boss, goon, style, fx, fy, fz): pos = goon.getPos() - DistributedSZTreasureAI.DistributedSZTreasureAI.__init__(self, air, boss, pos[0], pos[1], 0) + type = TreasureGlobals.SafeZoneTreasureSpawns[style][0] + DistributedTreasureAI.DistributedTreasureAI.__init__(self, air, boss, type, pos[0], pos[1], 0) self.goonId = goon.doId self.style = style self.finalPosition = (fx, fy, fz) + + def validAvatar(self, av): + if av.getHp() < av.getMaxHp() and av.getHp() > 0: + av.toonUp(self.healAmount) + return True + else: + return False def getGoonId(self): return self.goonId @@ -48,4 +55,4 @@ class DistributedCashbotBossTreasureAI(DistributedSZTreasureAI.DistributedSZTrea self.d_setFinalPosition(x, y, z) def d_setFinalPosition(self, x, y, z): - self.sendUpdate('setFinalPosition', [x, y, z])''' + self.sendUpdate('setFinalPosition', [x, y, z])