Ejemplo n.º 1
0
 def getInvadingCog(self, holidayId):
     specialType = 0
     invadingCog = ToontownGlobals.SUIT_INVASION_HOLIDAYS.get(holidayId)
     if invadingCog == None:
         return
     if invadingCog == 'skelecog':
         invadingCog = random.choice(SuitDNA.suitHeadTypes)
         specialType = 1
     else:
         if invadingCog == 'sellbot':
             invadingCog = SuitDNA.getRandomSuitByDept('s')
         else:
             if invadingCog == 'cashbot':
                 invadingCog = SuitDNA.getRandomSuitByDept('m')
             else:
                 if invadingCog == 'lawbot':
                     invadingCog = SuitDNA.getRandomSuitByDept('l')
                 else:
                     if invadingCog == 'bossbot':
                         invadingCog = SuitDNA.getRandomSuitByDept('c')
                     else:
                         if invadingCog == 'hackerbot':
                             invadingCog = SuitDNA.getRandomSuitByDept('g')
     return (
      invadingCog, specialType)
    def __makeResistanceToon(self):
        if self.resistanceToon:
            return
        npc = Toon.Toon()
        npc.setName(TTLocalizer.ResistanceToonName)
        npc.setPickable(0)
        npc.setPlayerType(NametagGlobals.CCNonPlayer)
        dna = ToonDNA.ToonDNA()
        dna.newToonRandom(11237, 'f', 1)
        dna.head = 'pls'
        npc.setDNAString(dna.makeNetString())
        npc.animFSM.request('neutral')
        self.resistanceToon = npc
        self.resistanceToon.setPosHpr(*ToontownGlobals.CashbotRTBattleOneStartPosHpr)
        state = random.getstate()
        random.seed(self.doId)
        self.resistanceToon.suitType = SuitDNA.getRandomSuitByDept('m')
        random.setstate(state)
        self.fakeGoons = []
        for i in xrange(self.numFakeGoons):
            goon = DistributedCashbotBossGoon.DistributedCashbotBossGoon(base.cr)
            goon.doId = -1 - i
            goon.setBossCogId(self.doId)
            goon.generate()
            goon.announceGenerate()
            self.fakeGoons.append(goon)

        self.__hideFakeGoons()