def __createFloorBattle(self):
     if self.currentFloor == self.topFloor:
         bossBattle = 1
     else:
         bossBattle = 0
     self.battle = DistributedBattleBldgAI.DistributedBattleBldgAI(
         self.air,
         self.zoneId,
         self.__handleRoundDone,
         self.__handleBattleDone,
         bossBattle=bossBattle)
     self.battle.suitsKilled = self.suitsKilled
     self.battle.suitsKilledPerFloor = self.suitsKilledPerFloor
     self.battle.battleCalc.toonSkillPtsGained = self.toonSkillPtsGained
     self.battle.toonExp = self.toonExp
     self.battle.toonOrigQuests = self.toonOrigQuests
     self.battle.toonItems = self.toonItems
     self.battle.toonOrigMerits = self.toonOrigMerits
     self.battle.toonMerits = self.toonMerits
     self.battle.toonParts = self.toonParts
     self.battle.helpfulToons = self.helpfulToons
     self.battle.setInitialMembers(self.toons, self.suits)
     self.battle.generateWithRequired(self.zoneId)
     mult = getCreditMultiplier(self.currentFloor)
     if self.air.holidayManager.isMoreXpHolidayRunning(
     ) and self.air.suitInvasionManager.getInvading():
         mult *= simbase.air.holidayManager.getXpMultiplier(
         ) + getInvasionMultiplier()
     elif self.air.holidayManager.isMoreXpHolidayRunning():
         mult *= simbase.air.holidayManager.getXpMultiplier()
     elif self.air.suitInvasionManager.getInvading():
         mult *= getInvasionMultiplier()
     self.battle.battleCalc.setSkillCreditMultiplier(mult)
    def _DistributedSuitInteriorAI__createFloorBattle(self):
        if self.currentFloor == self.topFloor:
            bossBattle = 1
        else:
            bossBattle = 0
        self.battle = DistributedBattleBldgAI.DistributedBattleBldgAI(
            self.air,
            self.zoneId,
            self._DistributedSuitInteriorAI__handleRoundDone,
            self._DistributedSuitInteriorAI__handleBattleDone,
            bossBattle=bossBattle)
        self.battle.suitsKilled = self.suitsKilled
        self.battle.suitsKilledPerFloor = self.suitsKilledPerFloor
        self.battle.battleCalc.toonSkillPtsGained = self.toonSkillPtsGained
        self.battle.toonExp = self.toonExp
        self.battle.toonOrigQuests = self.toonOrigQuests
        self.battle.toonItems = self.toonItems
        self.battle.toonOrigMerits = self.toonOrigMerits
        self.battle.toonMerits = self.toonMerits
        self.battle.toonParts = self.toonParts
        self.battle.helpfulToons = self.helpfulToons
        self.battle.setInitialMembers(self.toons, self.suits)
        self.battle.generateWithRequired(self.zoneId)
        mult = getCreditMultiplier(self.currentFloor)

        self.battle.battleCalc.setSkillCreditMultiplier(
            self.battle.battleCalc.getSkillCreditMultiplier() * mult)
    def __createFloorBattle(self):
        assert (len(self.toons) > 0)
        if (self.currentFloor == self.topFloor):
            assert (self.notify.debug('createFloorBattle() - boss battle'))
            bossBattle = 1
        else:
            bossBattle = 0
        # Create the battle for the floor
        self.battle = DistributedBattleBldgAI.DistributedBattleBldgAI(
            self.air,
            self.zoneId,
            self.__handleRoundDone,
            self.__handleBattleDone,
            bossBattle=bossBattle)

        # We store the lists of experience gained and suits killed in
        # the DistributedSuitInterior object, and share these pointers
        # in all battles created for this building.  This way, each
        # battle will actually be modifying the same objects, these,
        # and will thus accumulate the experience from previous
        # battles.
        self.battle.suitsKilled = self.suitsKilled
        self.battle.suitsKilledPerFloor = self.suitsKilledPerFloor
        self.battle.battleCalc.toonSkillPtsGained = self.toonSkillPtsGained
        self.battle.toonExp = self.toonExp
        self.battle.toonOrigQuests = self.toonOrigQuests
        self.battle.toonItems = self.toonItems
        self.battle.toonOrigMerits = self.toonOrigMerits
        self.battle.toonMerits = self.toonMerits
        self.battle.toonParts = self.toonParts
        self.battle.helpfulToons = self.helpfulToons

        # We must set the members of a building battle before we
        # generate it.
        self.battle.setInitialMembers(self.toons, self.suits)
        self.battle.generateWithRequired(self.zoneId)

        # We get a bonus factor applied toward each attack's experience credit.
        mult = getCreditMultiplier(self.currentFloor)

        # If there is an invasion, multiply the exp for the duration of this battle
        # Now, if the invasion ends midway through this battle, the players will
        # continue getting credit. This is ok I guess.
        if self.air.suitInvasionManager.getInvading():
            mult *= getInvasionMultiplier()

        self.battle.battleCalc.setSkillCreditMultiplier(mult)