suits: A few fixes including enabling battles to check PromoMgrAI.

This commit is contained in:
Harvir 2014-04-26 06:37:11 +01:00
parent d5b340f260
commit 8e3489dc06
2 changed files with 8 additions and 10 deletions

View file

@ -88,12 +88,11 @@ class DistributedBattleAI(DistributedBattleBaseAI.DistributedBattleBaseAI):
for toonId in self.activeToons:
toon = self.getToon(toonId)
if toon:
#TODO: promotion mgr
self.toonItems[toonId] = self.air.questManager.recoverItems(toon, self.suitsKilled, self.zoneId)
'''if toonId in self.helpfulToons:
if toonId in self.helpfulToons:
self.toonMerits[toonId] = self.air.promotionMgr.recoverMerits(toon, self.suitsKilled, self.zoneId)
else:
self.notify.debug('toon %d not helpful, skipping merits' % toonId)'''
self.notify.debug('toon %d not helpful, skipping merits' % toonId)
self.d_setMembers()
self.d_setBattleExperience()

View file

@ -114,19 +114,18 @@ class DistributedBattleBldgAI(DistributedBattleBaseAI.DistributedBattleBaseAI):
if topFloor == 0:
self.b_setState('Reward')
else:
for floorNum, cogsThisFloor in PythonUtil.enumerate(self.suitsKilledPerFloor):
for floorNum, cogsThisFloor in enumerate(self.suitsKilledPerFloor):
for toonId in self.activeToons:
toon = self.getToon(toonId)
if toon:
recovered, notRecovered = self.air.questManager.recoverItems(toon, cogsThisFloor, self.zoneId)
self.toonItems[toonId][0].extend(recovered)
self.toonItems[toonId][1].extend(notRecovered)
#TODO: promotionMgr
#meritArray = self.air.promotionMgr.recoverMerits(toon, cogsThisFloor, self.zoneId, getCreditMultiplier(floorNum))
#if toonId in self.helpfulToons:
# self.toonMerits[toonId] = addListsByValue(self.toonMerits[toonId], meritArray)
#else:
# self.notify.debug('toon %d not helpful, skipping merits' % toonId)
meritArray = self.air.promotionMgr.recoverMerits(toon, cogsThisFloor, self.zoneId, getCreditMultiplier(floorNum))
if toonId in self.helpfulToons:
self.toonMerits[toonId] = addListsByValue(self.toonMerits[toonId], meritArray)
else:
self.notify.debug('toon %d not helpful, skipping merits' % toonId)
self.d_setBattleExperience()
self.b_setState('BuildingReward')