Fix Zach's doors, fix immortal mode, fix unlimited gags, add new CJ cutscene.

This commit is contained in:
John 2015-06-29 16:35:22 +03:00
parent 40875ea6f6
commit c04b4967fb
7 changed files with 38 additions and 69 deletions

View file

@ -1771,7 +1771,7 @@ dclass DistributedCogHQDoor : DistributedDoor {
}; };
dclass DistributedCogHQExteriorDoor : DistributedCogHQDoor { dclass DistributedCogHQExteriorDoor : DistributedCogHQDoor {
selectLobby(uint32) broadcast ram; selectLobby(uint32) broadcast;
confirmEntrance(uint32, bool) airecv clsend; confirmEntrance(uint32, bool) airecv clsend;
}; };

View file

@ -1168,9 +1168,7 @@ class BattleCalculatorAI:
toonId = targetList[currTarget] toonId = targetList[currTarget]
toon = self.battle.getToon(toonId) toon = self.battle.getToon(toonId)
result = 0 result = 0
if toon and toon.immortalMode: if (toon and toon.immortalMode) or self.TOONS_TAKE_NO_DAMAGE:
result = 1
elif self.TOONS_TAKE_NO_DAMAGE:
result = 0 result = 0
elif self.__suitAtkHit(attackIndex): elif self.__suitAtkHit(attackIndex):
atkType = attack[SUIT_ATK_COL] atkType = attack[SUIT_ATK_COL]

View file

@ -1361,7 +1361,7 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas
pass pass
elif track != SOS: elif track != SOS:
toon = self.getToon(toonId) toon = self.getToon(toonId)
if toon != None: if toon != None and not toon.unlimitedGags:
check = toon.inventory.useItem(track, level) check = toon.inventory.useItem(track, level)
if check == -1: if check == -1:
self.air.writeServerEvent('suspicious', toonId, 'Toon generating movie for non-existant gag track %s level %s' % (track, level)) self.air.writeServerEvent('suspicious', toonId, 'Toon generating movie for non-existant gag track %s level %s' % (track, level))
@ -1634,8 +1634,6 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas
toon.inventory.zeroInv(1) toon.inventory.zeroInv(1)
deadToons.append(activeToon) deadToons.append(activeToon)
self.notify.debug('AFTER ROUND: toon: %d setHp: %d' % (toon.doId, toon.hp)) self.notify.debug('AFTER ROUND: toon: %d setHp: %d' % (toon.doId, toon.hp))
if toon.unlimitedGags:
toon.doRestock(noUber=0)
for deadToon in deadToons: for deadToon in deadToons:
self.__removeToon(deadToon) self.__removeToon(deadToon)

View file

@ -223,8 +223,7 @@ class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI):
self.resetBattles() self.resetBattles()
self.arenaSide = None self.arenaSide = None
self.makeBattleOneBattles() self.makeBattleOneBattles()
self.barrier = self.beginBarrier('Introduction', self.involvedToons, 45, self.doneIntroduction) self.barrier = self.beginBarrier('Introduction', self.involvedToons, 50, self.doneIntroduction)
return
def doneIntroduction(self, avIds): def doneIntroduction(self, avIds):
self.b_setState('BattleOne') self.b_setState('BattleOne')

View file

@ -276,14 +276,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def __makeRollToBattleTwoMovie(self): def __makeRollToBattleTwoMovie(self):
startPos = Point3(ToontownGlobals.LawbotBossBattleOnePosHpr[0], ToontownGlobals.LawbotBossBattleOnePosHpr[1], ToontownGlobals.LawbotBossBattleOnePosHpr[2]) startPos = Point3(ToontownGlobals.LawbotBossBattleOnePosHpr[0], ToontownGlobals.LawbotBossBattleOnePosHpr[1], ToontownGlobals.LawbotBossBattleOnePosHpr[2])
if self.arenaSide:
topRampPos = Point3(*ToontownGlobals.LawbotBossTopRampPosB)
topRampTurnPos = Point3(*ToontownGlobals.LawbotBossTopRampTurnPosB)
p3Pos = Point3(*ToontownGlobals.LawbotBossP3PosB)
else:
topRampPos = Point3(*ToontownGlobals.LawbotBossTopRampPosA)
topRampTurnPos = Point3(*ToontownGlobals.LawbotBossTopRampTurnPosA)
p3Pos = Point3(*ToontownGlobals.LawbotBossP3PosA)
battlePos = Point3(ToontownGlobals.LawbotBossBattleTwoPosHpr[0], ToontownGlobals.LawbotBossBattleTwoPosHpr[1], ToontownGlobals.LawbotBossBattleTwoPosHpr[2]) battlePos = Point3(ToontownGlobals.LawbotBossBattleTwoPosHpr[0], ToontownGlobals.LawbotBossBattleTwoPosHpr[1], ToontownGlobals.LawbotBossBattleTwoPosHpr[2])
battleHpr = VBase3(ToontownGlobals.LawbotBossBattleTwoPosHpr[3], ToontownGlobals.LawbotBossBattleTwoPosHpr[4], ToontownGlobals.LawbotBossBattleTwoPosHpr[5]) battleHpr = VBase3(ToontownGlobals.LawbotBossBattleTwoPosHpr[3], ToontownGlobals.LawbotBossBattleTwoPosHpr[4], ToontownGlobals.LawbotBossBattleTwoPosHpr[5])
bossTrack = Sequence() bossTrack = Sequence()
@ -461,13 +453,11 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def loadPodium(self): def loadPodium(self):
self.podium = self.geom.find('**/Podium') self.podium = self.geom.find('**/Podium')
newZ = self.podium.getZ() - ToontownGlobals.LawbotBossBattleTwoPosHpr[2]
if not self.debugPositions: if not self.debugPositions:
self.podium.setZ(newZ) self.podium.setZ(ToontownGlobals.LawbotBossBattleOnePosHpr[2])
self.reflectedPodium = self.geom.find('**/Podium_Geo1_Refl') self.reflectedPodium = self.geom.find('**/Podium_Geo1_Refl')
reflectedZ = self.reflectedPodium.getZ()
if not self.debugPositions: if not self.debugPositions:
self.reflectedPodium.setZ(reflectedZ) self.reflectedPodium.setZ(ToontownGlobals.LawbotBossBattleTwoPosHpr[2])
if not self.reflectedPodium.isEmpty(): if not self.reflectedPodium.isEmpty():
if self.debugPositions: if self.debugPositions:
self.reflectedPodium.show() self.reflectedPodium.show()
@ -687,12 +677,12 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
DistributedBossCog.DistributedBossCog.enterElevator(self) DistributedBossCog.DistributedBossCog.enterElevator(self)
self.witnessToon.removeActive() self.witnessToon.removeActive()
self.reparentTo(render) self.reparentTo(render)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr) self.setPosHpr(*ToontownGlobals.LawbotBossBattleTwoPosHpr)
self.happy = 1 self.happy = 1
self.raised = 1 self.raised = 1
self.forward = 1 self.forward = 1
self.doAnimate() self.doAnimate()
self.__hideWitnessToon() self.__showWitnessToon()
if not self.mainDoor.isEmpty(): if not self.mainDoor.isEmpty():
self.mainDoor.stash() self.mainDoor.stash()
if not self.reflectedMainDoor.isEmpty(): if not self.reflectedMainDoor.isEmpty():
@ -709,9 +699,8 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def enterIntroduction(self): def enterIntroduction(self):
self.notify.debug('----- enterIntroduction') self.notify.debug('----- enterIntroduction')
self.reparentTo(render) self.reparentTo(render)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr) self.setPosHpr(*ToontownGlobals.LawbotBossBattleTwoPosHpr)
self.stopAnimate() self.stopAnimate()
self.__hideWitnessToon()
DistributedBossCog.DistributedBossCog.enterIntroduction(self) DistributedBossCog.DistributedBossCog.enterIntroduction(self)
base.playMusic(self.promotionMusic, looping=1, volume=0.9) base.playMusic(self.promotionMusic, looping=1, volume=0.9)
if not self.mainDoor.isEmpty(): if not self.mainDoor.isEmpty():
@ -732,13 +721,12 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def enterBattleOne(self): def enterBattleOne(self):
self.notify.debug('----- LawbotBoss.enterBattleOne ') self.notify.debug('----- LawbotBoss.enterBattleOne ')
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr)
DistributedBossCog.DistributedBossCog.enterBattleOne(self) DistributedBossCog.DistributedBossCog.enterBattleOne(self)
self.reparentTo(render) self.reparentTo(render)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr)
self.clearChat() self.clearChat()
self.loop('Ff_neutral') self.loop('Ff_neutral')
self.notify.debug('self.battleANode = %s' % self.battleANode) self.notify.debug('self.battleANode = %s' % self.battleANode)
self.__hideWitnessToon()
if self.battleA == None or self.battleB == None: if self.battleA == None or self.battleB == None:
pass pass
return return
@ -787,7 +775,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.setToonsToNeutral(self.involvedToons) self.setToonsToNeutral(self.involvedToons)
self.clearChat() self.clearChat()
self.reparentTo(render) self.reparentTo(render)
self.__showWitnessToon()
prepareBattleTwoMovie = self.__makePrepareBattleTwoMovie() prepareBattleTwoMovie = self.__makePrepareBattleTwoMovie()
intervalName = 'prepareBattleTwo' intervalName = 'prepareBattleTwo'
seq = Sequence(prepareBattleTwoMovie, name=intervalName) seq = Sequence(prepareBattleTwoMovie, name=intervalName)
@ -841,7 +828,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.clearChat() self.clearChat()
self.witnessToon.clearChat() self.witnessToon.clearChat()
self.releaseToons(finalBattle=1) self.releaseToons(finalBattle=1)
self.__showWitnessToon()
if not self.useCannons: if not self.useCannons:
self.toonsToBattlePosition(self.toonsA, self.battleANode) self.toonsToBattlePosition(self.toonsA, self.battleANode)
self.toonsToBattlePosition(self.toonsB, self.battleBNode) self.toonsToBattlePosition(self.toonsB, self.battleBNode)
@ -912,7 +898,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.clearChat() self.clearChat()
self.reparentTo(render) self.reparentTo(render)
base.playMusic(self.betweenBattleMusic, looping=1, volume=0.9) base.playMusic(self.betweenBattleMusic, looping=1, volume=0.9)
self.__showWitnessToon()
prepareBattleThreeMovie = self.__makePrepareBattleThreeMovie() prepareBattleThreeMovie = self.__makePrepareBattleThreeMovie()
self.acceptOnce('doneChatPage', self.__onToBattleThree) self.acceptOnce('doneChatPage', self.__onToBattleThree)
intervalName = 'prepareBattleThree' intervalName = 'prepareBattleThree'
@ -962,11 +947,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.setPosHpr(*ToontownGlobals.LawbotBossBattleThreePosHpr) self.setPosHpr(*ToontownGlobals.LawbotBossBattleThreePosHpr)
self.bossMaxDamage = ToontownGlobals.LawbotBossMaxDamage self.bossMaxDamage = ToontownGlobals.LawbotBossMaxDamage
base.playMusic(self.battleThreeMusic, looping=1, volume=0.9) base.playMusic(self.battleThreeMusic, looping=1, volume=0.9)
self.__showWitnessToon()
#diffSettings = ToontownGlobals.LawbotBossDifficultySettings[self.battleDifficulty]
#if diffSettings[4]:
#localAvatar.chatMgr.chatInputSpeedChat.removeCJMenu()
#localAvatar.chatMgr.chatInputSpeedChat.addCJMenu(self.bonusWeight)
def __doneBattleThree(self): def __doneBattleThree(self):
self.notify.debug('----- __doneBattleThree') self.notify.debug('----- __doneBattleThree')
@ -1137,7 +1117,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.stash() self.stash()
self.stopAnimate() self.stopAnimate()
self.controlToons() self.controlToons()
self.__showWitnessToon()
self.witnessToon.reparentTo(render) self.witnessToon.reparentTo(render)
self.witnessToon.setPosHpr(*ToontownGlobals.LawbotBossWitnessEpiloguePosHpr) self.witnessToon.setPosHpr(*ToontownGlobals.LawbotBossWitnessEpiloguePosHpr)
self.witnessToon.loop('Sit') self.witnessToon.loop('Sit')
@ -1371,29 +1350,28 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
if toon: if toon:
delayDeletes.append(DelayDelete.DelayDelete(toon, 'LawbotBoss.makeIntroductionMovie')) delayDeletes.append(DelayDelete.DelayDelete(toon, 'LawbotBoss.makeIntroductionMovie'))
track = Parallel() finalPodiumPos = Point3(self.podium.getX(), self.podium.getY(), -ToontownGlobals.LawbotBossBattleTwoPosHpr[2])
bossAnimTrack = Sequence( finalReflectedPodiumPos = Point3(self.reflectedPodium.getX(), self.reflectedPodium.getY(), 0.0)
ActorInterval(self, 'Ff_speech', startTime=2, duration=10, loop=1), finalBossPos = Point3(self.getX(), self.getY(), ToontownGlobals.LawbotBossBattleOnePosHpr[2])
ActorInterval(self, 'Ff_lookRt', duration=3),
ActorInterval(self, 'Ff_lookRt', duration=3, startTime=3, endTime=0), track = Track(
ActorInterval(self, 'Ff_neutral', duration=2), (0, Parallel(self.podium.posInterval(5, finalPodiumPos), self.reflectedPodium.posInterval(5, finalReflectedPodiumPos), self.posInterval(5, finalBossPos), Func(self.loop, 'Ff_speech'), Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro0, CFSpeech))),
ActorInterval(self, 'Ff_speech', duration=7, loop=1)) (5, Parallel(base.camera.posInterval(6, (-2.8, 5.6, 19.3), blendType='easeInOut'), self.posInterval(16, ToontownGlobals.LawbotBossBattleOnePosHpr[:3]))),
track.append(bossAnimTrack)
attackToons = TTLocalizer.BossCogAttackToons
dialogTrack = Track(
(0, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro0, CFSpeech)),
(5.6, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro1, CFSpeech)), (5.6, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro1, CFSpeech)),
(12, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro2, CFSpeech)), (11, Parallel(Func(self.play, 'Ff_lookRt'), base.camera.posInterval(3, (-2.8, -50.6, 19.3), blendType='easeInOut'))),
(18, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro3, CFSpeech)), (11.5, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro2, CFSpeech)),
(22, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro4, CFSpeech)), (13, self.actorInterval('Ff_lookRt', playRate=-1)),
(24, Sequence( (15, Sequence(Func(base.camera.reparentTo, self.witnessToon), Func(base.camera.setPosHpr, 0, 8, 2, 180, 10, 0))),
Func(self.clearChat), (15.5, Sequence(Func(self.clearChat), Func(self.witnessToon.setChatAbsolute, TTLocalizer.LawbotBossTempIntro3, CFSpeech))),
self.loseCogSuits(self.toonsA + self.toonsB, render, (-2.798, -70, 10, 180, 0, 0)))), (20, Sequence(Func(self.loop, 'Ff_speech'), Func(self.witnessToon.clearChat), Func(base.camera.reparentTo, render), Func(base.camera.setPosHpr, -2.4, -90.6, 19.5, 0, 0, 0))),
(27, Sequence( (21, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro4, CFSpeech)),
self.toonNormalEyes(self.involvedToons), (25, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro5, CFSpeech)),
Func(self.loop, 'Ff_neutral'), (29, Sequence(Func(self.loop, 'Ff_neutral'), Func(self.clearChat), self.loseCogSuits(self.toonsA + self.toonsB, render, (-2.798, -70, 10, 180, 0, 0)))),
Func(self.setChatAbsolute, attackToons, CFSpeech)))) (32, Sequence(self.toonNormalEyes(self.involvedToons), Func(self.loop, 'Ff_neutral'), Func(base.camera.reparentTo, render), Func(base.camera.setPosHpr, -2.4, -96.6, 4.5, 0, 20, 0))),
track.append(dialogTrack) (33, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro6, CFSpeech)),
(39, Sequence(Func(self.setChatAbsolute, TTLocalizer.BossCogAttackToons, CFSpeech), base.camera.posHprInterval(0.5, (-2.7, -90, 0), (0, 39.7, 8.3), blendType='easeInOut'))),
(42, Sequence()))
return Sequence( return Sequence(
Func(self.stickToonsToFloor), Func(self.stickToonsToFloor),
track, track,

View file

@ -7516,11 +7516,13 @@ CircuitRaceOngoing = 'Welcome! The Toontown Grand Prix is currently in progress.
CircuitRaceEnd = "That's all for today's Toontown Grand Prix at Goofy Speedway. See you next week!" CircuitRaceEnd = "That's all for today's Toontown Grand Prix at Goofy Speedway. See you next week!"
TrickOrTreatMsg = 'You have already\nfound this treat!' TrickOrTreatMsg = 'You have already\nfound this treat!'
WinterCarolingMsg = 'You have already been caroling here!' WinterCarolingMsg = 'You have already been caroling here!'
LawbotBossTempIntro0 = "Hmmm what's on the docket today?" LawbotBossTempIntro0 = "Hrmmm, what's on the docket for today?"
LawbotBossTempIntro1 = 'Aha, we have a Toon on trial!' LawbotBossTempIntro1 = 'Aha, we have a Toon on trial!'
LawbotBossTempIntro2 = "The prosecution's case is strong." LawbotBossTempIntro2 = "The prosecution's case is strong..."
LawbotBossTempIntro3 = 'And here are the public defenders.' LawbotBossTempIntro3 = "Hey, your honorable blindness, you're looking the wrong way!"
LawbotBossTempIntro4 = "Wait a minute... You're Toons!" LawbotBossTempIntro4 = 'I may be blind...'
LawbotBossTempIntro5 = 'But Justice is NOT!'
LawbotBossTempIntro6 = 'I should have known you Toons would try to upset this trial.'
LawbotBossTempJury1 = 'Jury selection will now commence.' LawbotBossTempJury1 = 'Jury selection will now commence.'
LawbotBossHowToGetEvidence = 'Touch the witness stand to get evidence.' LawbotBossHowToGetEvidence = 'Touch the witness stand to get evidence.'
LawbotBossTrialChat1 = 'Court is now in session' LawbotBossTrialChat1 = 'Court is now in session'
@ -7529,7 +7531,7 @@ LawbotBossNeedMoreEvidence = 'You need to get more evidence!'
LawbotBossDefenseWins1 = 'Impossible! The defense won?' LawbotBossDefenseWins1 = 'Impossible! The defense won?'
LawbotBossDefenseWins2 = 'No. I declare a mistrial! A new one will be scheduled.' LawbotBossDefenseWins2 = 'No. I declare a mistrial! A new one will be scheduled.'
LawbotBossDefenseWins3 = "Hrrmpphh. I'll be in my chambers." LawbotBossDefenseWins3 = "Hrrmpphh. I'll be in my chambers."
LawbotBossProsecutionWins = 'I find in favor of the plaintiff' LawbotBossProsecutionWins = 'I find in favor of the plaintiff!'
LawbotBossReward = 'I award a promotion and the ability to summon Cogs' LawbotBossReward = 'I award a promotion and the ability to summon Cogs'
LawbotBossLeaveCannon = 'Leave cannon' LawbotBossLeaveCannon = 'Leave cannon'
LawbotBossPassExam = 'Bah, so you passed the bar exam.' LawbotBossPassExam = 'Bah, so you passed the bar exam.'

View file

@ -943,12 +943,6 @@ LawbotBossBattleTwoPosHpr = (-2.798,
0, 0,
0, 0,
0) 0)
LawbotBossTopRampPosA = (-80, -35, 18)
LawbotBossTopRampTurnPosA = (-80, 10, 18)
LawbotBossP3PosA = (55, -9, 0)
LawbotBossTopRampPosB = (80, -35, 18)
LawbotBossTopRampTurnPosB = (80, 10, 18)
LawbotBossP3PosB = (55, -9, 0)
LawbotBossBattleThreePosHpr = LawbotBossBattleTwoPosHpr LawbotBossBattleThreePosHpr = LawbotBossBattleTwoPosHpr
LawbotBossBottomPos = (50, 39, 0) LawbotBossBottomPos = (50, 39, 0)
LawbotBossDeathPos = (50, 40, 0) LawbotBossDeathPos = (50, 40, 0)