diff --git a/toontown/battle/BattleCalculatorAI.py b/toontown/battle/BattleCalculatorAI.py index 770db091..b3f9f0ca 100755 --- a/toontown/battle/BattleCalculatorAI.py +++ b/toontown/battle/BattleCalculatorAI.py @@ -27,13 +27,6 @@ class BattleCalculatorAI: 40, 50, 60] - NumRoundsLured = [2, - 2, - 3, - 3, - 4, - 4, - 15] TRAP_CONFLICT = -2 APPLY_HEALTH_ADJUSTMENTS = 1 TOONS_TAKE_NO_DAMAGE = 0 @@ -431,7 +424,7 @@ class BattleCalculatorAI: if not self.__suitIsLured(targetId, prevRound=1): if not self.__combatantDead(targetId, toon=toonTarget): validTargetAvail = 1 - rounds = self.NumRoundsLured[atkLevel] + rounds = NumRoundsLured[atkLevel] wakeupChance = 100 - atkAcc * 2 npcLurer = attack[TOON_TRACK_COL] == NPCSOS currLureId = self.__addLuredSuitInfo(targetId, -1, rounds, wakeupChance, toonId, atkLevel, lureId=currLureId, npc=npcLurer) @@ -461,7 +454,7 @@ class BattleCalculatorAI: if not self.__suitIsLured(targetId, prevRound=1): if not self.__combatantDead(targetId, toon=toonTarget): validTargetAvail = 1 - rounds = self.NumRoundsLured[atkLevel] + rounds = NumRoundsLured[atkLevel] wakeupChance = 100 - atkAcc * 2 npcLurer = attack[TOON_TRACK_COL] == NPCSOS currLureId = self.__addLuredSuitInfo(targetId, -1, rounds, wakeupChance, toonId, atkLevel, lureId=currLureId, npc=npcLurer) diff --git a/toontown/toonbase/ToontownBattleGlobals.py b/toontown/toonbase/ToontownBattleGlobals.py index cb0e2aab..2fe00b4a 100755 --- a/toontown/toonbase/ToontownBattleGlobals.py +++ b/toontown/toonbase/ToontownBattleGlobals.py @@ -698,6 +698,13 @@ AvPropTarget = (0, 3, 3, 3) +NumRoundsLured = [2, + 2, + 3, + 3, + 4, + 4, + 15] def getAvPropDamage(attackTrack, attackLevel, exp, organicBonus = False, propBonus = False, propAndOrganicBonusStack = False): minD = AvPropDamage[attackTrack][attackLevel][0][0] @@ -821,4 +828,4 @@ def getUberFlagSafe(flagMask, index): if flagMask == 'unknown' or flagMask < 0: return -1 else: - return getUberFlag(flagMask, index) + return getUberFlag(flagMask, index) \ No newline at end of file diff --git a/toontown/town/TownBattleToonPanel.py b/toontown/town/TownBattleToonPanel.py index 67b70b51..fbd77dea 100755 --- a/toontown/town/TownBattleToonPanel.py +++ b/toontown/town/TownBattleToonPanel.py @@ -22,6 +22,8 @@ class TownBattleToonPanel(DirectFrame): self.sosText.hide() self.fireText = DirectLabel(parent=self, relief=None, pos=(0.1, 0, 0.015), text=TTLocalizer.TownBattleToonFire, text_scale=0.06) self.fireText.hide() + self.roundsText = DirectLabel(parent=self, relief=None, pos=(0.16, 0, -0.07), text='', text_scale=0.045) + self.roundsText.hide() self.sosHead = None self.undecidedText = DirectLabel(parent=self, relief=None, pos=(0.1, 0, 0.015), text=TTLocalizer.TownBattleUndecided, text_scale=0.1) self.healthText = DirectLabel(parent=self, text='', pos=(-0.06, 0, -0.075), text_scale=0.055) @@ -40,7 +42,6 @@ class TownBattleToonPanel(DirectFrame): self.whichText = DirectLabel(parent=self, text='', pos=(0.1, 0, -0.08), text_scale=0.05) self.hide() gui.removeNode() - return def setLaffMeter(self, avatar): self.notify.debug('setLaffMeter: new avatar %s' % avatar.doId) @@ -91,10 +92,13 @@ class TownBattleToonPanel(DirectFrame): self.undecidedText.hide() self.sosText.hide() self.fireText.hide() + self.roundsText.hide() self.gagNode.hide() self.whichText.hide() self.passNode.hide() self.cleanupSosHead() + self.whichText.setPos(0.1, 0, -0.08) + self.whichText['text_scale'] = 0.05 if self.hasGag: self.gag.removeNode() self.hasGag = 0 @@ -125,6 +129,17 @@ class TownBattleToonPanel(DirectFrame): if numTargets is not None and targetIndex is not None and localNum is not None: self.whichText.show() self.whichText['text'] = self.determineWhichText(numTargets, targetIndex, localNum, index) + self.roundsText.setPos(0.16, 0, -0.07) + self.roundsText['text_scale'] = 0.045 + elif track == LURE_TRACK: + self.roundsText['text_scale'] = 0.05 + self.roundsText.setPos(0.1, 0, -0.08) + if track == LURE_TRACK: + self.roundsText.show() + self.roundsText['text'] = str(NumRoundsLured[level]) + self.whichText.setPos(0.085, 0, -0.07) + self.whichText['text_scale'] = 0.045 + else: self.notify.error('Bad track value: %s' % track)