mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Rounds a lure takes is shown in battle
This commit is contained in:
parent
b14505435c
commit
92b3eac364
3 changed files with 26 additions and 11 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue