本文整理匯總了Python中toontown.battle.BattleExperienceAI類的典型用法代碼示例。如果您正苦於以下問題:Python BattleExperienceAI類的具體用法?Python BattleExperienceAI怎麽用?Python BattleExperienceAI使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了BattleExperienceAI類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __doneVictory
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)
示例2: __doneVictory
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:
for i in xrange(5):
toon.addResistanceMessage(self.rewardId)
toon.b_promote(self.deptIndex)
示例3: __doneVictory
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, numCalls=1):
self.notify.info('%s.unable to add NPCFriend %s to %s.' % (self.doId, self.cagedToonNpcId, toonId))
toon.b_promote(self.deptIndex)
示例4: __doneVictory
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(typeWeights)
for toonId in self.involvedToons:
toon = self.air.doId2do.get(toonId)
if toon:
self.giveCogSummonReward(toon, preferredDept, preferredSummonType)
toon.b_promote(self.deptIndex)
示例5: getBattleExperience
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