From 393df6ec998ff796fa192bff4293a06f4ed11c70 Mon Sep 17 00:00:00 2001 From: Crimson Fox <43253740+CrimsonFox762@users.noreply.github.com> Date: Tue, 1 Aug 2023 09:24:55 -0400 Subject: [PATCH] Tweaked Code for Knockback --- toontown/battle/BattleCalculatorAI.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toontown/battle/BattleCalculatorAI.py b/toontown/battle/BattleCalculatorAI.py index 982b4b8..9dd3f5a 100644 --- a/toontown/battle/BattleCalculatorAI.py +++ b/toontown/battle/BattleCalculatorAI.py @@ -747,11 +747,15 @@ class BattleCalculatorAI: toonId = self.toonAtkOrder[attackIndex] attack = self.battle.toonAttacks[toonId] atkTrack = self.__getActualTrack(attack) + TTOStyle = simbase.config.GetBool('want-tto-style-knockback', False) if atkTrack == HEAL or atkTrack == PETSOS: return tgts = self.__createToonTargetList(toonId) for currTgt in tgts: - tgtPos = self.battle.activeSuits.index(currTgt) + if not TTOStyle: + tgtPos = self.battle.activeSuits.index(currTgt) + else: + tgtPos = self.battle.suits.index(currTgt) attackerId = self.toonAtkOrder[attackIndex] attack = self.battle.toonAttacks[attackerId] track = self.__getActualTrack(attack)