def __doneVictory(self, avIds):
     self.d_setBattleExperience()
     self.b_setState('Reward')
     BattleExperienceAI.assignRewards(self.involvedToons, self.toonSkillPtsGained, self.suitsKilled, ToontownGlobals.dept2cogHQ(self.dept), self.helpfulToons)
     for toonId in self.involvedToons:
         toon = self.air.doId2do.get(toonId)
         if toon:
             self.givePinkSlipReward(toon)
             toon.b_promote(self.deptIndex)
 def __doneVictory(self, avIds):
     self.d_setBattleExperience()
     self.b_setState('Reward')
     BattleExperienceAI.assignRewards(self.involvedToons, self.toonSkillPtsGained, self.suitsKilled, ToontownGlobals.dept2cogHQ(self.dept), self.helpfulToons)
     for toonId in self.involvedToons:
         toon = self.air.doId2do.get(toonId)
         if toon:
             if not toon.attemptAddNPCFriend(self.cagedToonNpcId, Quests.InVP):
                 self.notify.info('%s.unable to add NPCFriend %s to %s.' % (self.doId, self.cagedToonNpcId, toonId))
             toon.b_promote(self.deptIndex)
 def __doneVictory(self, avIds):
     self.d_setBattleExperience()
     self.b_setState('Reward')
     BattleExperienceAI.assignRewards(self.involvedToons, self.toonSkillPtsGained, self.suitsKilled, ToontownGlobals.dept2cogHQ(self.dept), self.helpfulToons)
     preferredDept = random.randrange(len(SuitDNA.suitDepts))
     #typeWeights = ['single'] * 70 + ['building'] * 27 + ['invasion'] * 3
     preferredSummonType = random.choice(['building', 'invasion', 'cogdo', 'skelinvasion', 'waiterinvasion', 'v2invasion'])
     for toonId in self.involvedToons:
         toon = self.air.doId2do.get(toonId)
         if toon:
             self.giveCogSummonReward(toon, preferredDept, preferredSummonType)
             toon.b_promote(self.deptIndex)
Example #4
0
 def __doneVictory(self, avIds):
     self.d_setBattleExperience()
     self.b_setState('Reward')
     BattleExperienceAI.assignRewards(self.involvedToons,
                                      self.toonSkillPtsGained,
                                      self.suitsKilled,
                                      ToontownGlobals.dept2cogHQ(self.dept),
                                      self.helpfulToons)
     for toonId in self.involvedToons:
         toon = self.air.doId2do.get(toonId)
         if toon:
             self.givePinkSlipReward(toon)
             toon.b_promote(self.deptIndex)
Example #5
0
 def __doneVictory(self, avIds):
     self.d_setBattleExperience()
     self.b_setState('Reward')
     BattleExperienceAI.assignRewards(self.involvedToons,
                                      self.toonSkillPtsGained,
                                      self.suitsKilled,
                                      ToontownGlobals.dept2cogHQ(self.dept),
                                      self.helpfulToons)
     for toonId in self.involvedToons:
         toon = self.air.doId2do.get(toonId)
         if toon:
             if not toon.attemptAddNPCFriend(self.cagedToonNpcId,
                                             Quests.InVP):
                 self.notify.info('%s.unable to add NPCFriend %s to %s.' %
                                  (self.doId, self.cagedToonNpcId, toonId))
             toon.b_promote(self.deptIndex)
 def getBattleExperience(self):
     result = BattleExperienceAI.getBattleExperience(
         8, self.involvedToons, self.toonExp, self.toonSkillPtsGained,
         self.toonOrigQuests, self.toonItems, self.toonOrigMerits,
         self.toonMerits, self.toonParts, self.suitsKilled,
         self.helpfulToons)
     return result
 def getBattleExperience(self):
     result = BattleExperienceAI.getBattleExperience(8, self.involvedToons, self.toonExp, self.toonSkillPtsGained, self.toonOrigQuests, self.toonItems, self.toonOrigMerits, self.toonMerits, self.toonParts, self.suitsKilled, self.helpfulToons)
     return result