Ejemplo n.º 1
0
    def makeBattle(self, bossCogPosHpr, battlePosHpr, roundCallback,
                   finishCallback, battleNumber, battleSide):
        battle = DistributedBattleFinalAI.DistributedBattleFinalAI(
            self.air, self, roundCallback, finishCallback, battleSide)
        self.setBattlePos(battle, bossCogPosHpr, battlePosHpr)

        # Just like the DistributedSuitInteriorAI class, we save a
        # reference to our suitsKilled and toonSkillPtsGained
        # structures in each battle we create.  That way, the battle
        # will directly adjust these structures and we accumulate the
        # toon credits for all battles.
        battle.suitsKilled = self.suitsKilled
        battle.battleCalc.toonSkillPtsGained = self.toonSkillPtsGained
        battle.toonExp = self.toonExp
        battle.toonOrigQuests = self.toonOrigQuests
        battle.toonItems = self.toonItems
        battle.toonOrigMerits = self.toonOrigMerits
        battle.toonMerits = self.toonMerits
        battle.toonParts = self.toonParts
        battle.helpfulToons = self.helpfulToons

        # We get a bonus factor applied toward each attack's
        # experience credit.
        mult = ToontownBattleGlobals.getBossBattleCreditMultiplier(
            battleNumber)

        # We don't, however, get any particular bonus for an invasion
        # here.
        battle.battleCalc.setSkillCreditMultiplier(mult)

        battle.generateWithRequired(self.zoneId)
        return battle
 def makeBattle(self, bossCogPosHpr, battlePosHpr, roundCallback, finishCallback, battleNumber, battleSide):
     battle = DistributedBattleFinalAI.DistributedBattleFinalAI(self.air, self, roundCallback, finishCallback, battleSide)
     self.setBattlePos(battle, bossCogPosHpr, battlePosHpr)
     battle.suitsKilled = self.suitsKilled
     battle.battleCalc.toonSkillPtsGained = self.toonSkillPtsGained
     battle.toonExp = self.toonExp
     battle.toonOrigQuests = self.toonOrigQuests
     battle.toonItems = self.toonItems
     battle.toonOrigMerits = self.toonOrigMerits
     battle.toonMerits = self.toonMerits
     battle.toonParts = self.toonParts
     battle.helpfulToons = self.helpfulToons
     mult = ToontownBattleGlobals.getBossBattleCreditMultiplier(battleNumber)
     battle.battleCalc.setSkillCreditMultiplier(mult)
     battle.generateWithRequired(self.zoneId)
     return battle