def makeGoon(self, side = None):
        if side == None:
            side = random.choice(['EmergeA', 'EmergeB'])

        # First, look to see if we have a goon we can recycle.
        goon = self.__chooseOldGoon()
        if goon == None:
            # No, no old goon; is there room for a new one?
            if len(self.goons) >= self.getMaxGoons():
                return

            # make a new one.
            goon = DistributedCashbotBossGoonAI.DistributedCashbotBossGoonAI(self.air, self)
            goon.generateWithRequired(self.zoneId)
            self.goons.append(goon)

        if self.getBattleThreeTime() > 1.0:
            # If the battle goes into overtime, we only make
            # SuperGoons.
            goon.STUN_TIME = 4
            goon.b_setupGoon(velocity = 8,
                             hFov = 90,
                             attackRadius = 20,
                             strength = 30,
                             scale = 1.8)
        else:
            # Normally, we make regular goons.
            goon.STUN_TIME = self.progressValue(30, 8)
            goon.b_setupGoon(velocity = self.progressRandomValue(3, 7),
                             hFov = self.progressRandomValue(70, 80),
                             attackRadius = self.progressRandomValue(6, 15),
                             strength = int(self.progressRandomValue(5, 25)),
                             scale = self.progressRandomValue(0.5, 1.5))

        goon.request(side)
Пример #2
0
 def makeGoon(self, side=None):
     if side == None:
         side = random.choice(['EmergeA', 'EmergeB'])
     goon = self.__chooseOldGoon()
     if goon == None:
         if len(self.goons) >= self.getMaxGoons():
             return
         goon = DistributedCashbotBossGoonAI.DistributedCashbotBossGoonAI(
             self.air, self)
         goon.generateWithRequired(self.zoneId)
         self.goons.append(goon)
     if self.getBattleThreeTime() > 1.0:
         goon.STUN_TIME = 4
         goon.b_setupGoon(velocity=8,
                          hFov=90,
                          attackRadius=20,
                          strength=30,
                          scale=1.8)
     else:
         goon.STUN_TIME = self.progressValue(30, 8)
         goon.b_setupGoon(velocity=self.progressRandomValue(3, 7),
                          hFov=self.progressRandomValue(70, 80),
                          attackRadius=self.progressRandomValue(6, 15),
                          strength=int(self.progressRandomValue(5, 25)),
                          scale=self.progressRandomValue(0.5, 1.5))
     goon.request(side)
     return
Пример #3
0
    def makeGoon(self, side = None):
        self.goonMovementTime = globalClock.getFrameTime()
        if len(self.involvedToons) > 1:
            self.wantMovementModification = False
        else:
            self.wantMovementModification = True
        if side == None:
            if not self.wantOpeningModifications:
                side = random.choice(['EmergeA', 'EmergeB'])
            else:
                for t in self.involvedToons:
                    avId = t
                toon = self.air.doId2do.get(avId)
                pos = toon.getPos()[1]
                if pos < -315:
                    side = 'EmergeB'
                else:
                    side = 'EmergeA'
				
        goon = self.__chooseOldGoon()
        if goon == None:
            if len(self.goons) >= self.getMaxGoons():
                return
            goon = DistributedCashbotBossGoonAI.DistributedCashbotBossGoonAI(self.air, self)
            goon.generateWithRequired(self.zoneId)
            self.goons.append(goon)
        if self.getBattleThreeTime() > 1.0:
            goon.STUN_TIME = 8
            goon.b_setupGoon(velocity=5, hFov=90, attackRadius=20, strength=200, scale=1.9)
        else:
            goon.STUN_TIME = self.progressValue(15, 10)
            if self.want4ManPractice and (self.bossDamage > 20 and self.bossDamage < 50):
               goon.b_setupGoon(velocity=self.progressRandomValue(3, 7), hFov=self.progressRandomValue(70, 80), attackRadius=self.progressRandomValue(6, 15), strength=int(self.progressRandomValue(5, 25)), scale=0.61)
            else:
               goon.b_setupGoon(velocity=self.progressRandomValue(2, 4), hFov=self.progressRandomValue(70, 80), attackRadius=self.progressRandomValue(10, 18), strength=int(self.progressRandomValue(35, 126)), scale=self.progressRandomValue(0.8, 1.6, noRandom=True))
        goon.request(side)
        return