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 {
selectLobby(uint32) broadcast ram;
selectLobby(uint32) broadcast;
confirmEntrance(uint32, bool) airecv clsend;
};

View file

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

View file

@ -1361,7 +1361,7 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas
pass
elif track != SOS:
toon = self.getToon(toonId)
if toon != None:
if toon != None and not toon.unlimitedGags:
check = toon.inventory.useItem(track, level)
if check == -1:
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)
deadToons.append(activeToon)
self.notify.debug('AFTER ROUND: toon: %d setHp: %d' % (toon.doId, toon.hp))
if toon.unlimitedGags:
toon.doRestock(noUber=0)
for deadToon in deadToons:
self.__removeToon(deadToon)

View file

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

View file

@ -276,14 +276,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def __makeRollToBattleTwoMovie(self):
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])
battleHpr = VBase3(ToontownGlobals.LawbotBossBattleTwoPosHpr[3], ToontownGlobals.LawbotBossBattleTwoPosHpr[4], ToontownGlobals.LawbotBossBattleTwoPosHpr[5])
bossTrack = Sequence()
@ -461,13 +453,11 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def loadPodium(self):
self.podium = self.geom.find('**/Podium')
newZ = self.podium.getZ() - ToontownGlobals.LawbotBossBattleTwoPosHpr[2]
if not self.debugPositions:
self.podium.setZ(newZ)
self.podium.setZ(ToontownGlobals.LawbotBossBattleOnePosHpr[2])
self.reflectedPodium = self.geom.find('**/Podium_Geo1_Refl')
reflectedZ = self.reflectedPodium.getZ()
if not self.debugPositions:
self.reflectedPodium.setZ(reflectedZ)
self.reflectedPodium.setZ(ToontownGlobals.LawbotBossBattleTwoPosHpr[2])
if not self.reflectedPodium.isEmpty():
if self.debugPositions:
self.reflectedPodium.show()
@ -687,12 +677,12 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
DistributedBossCog.DistributedBossCog.enterElevator(self)
self.witnessToon.removeActive()
self.reparentTo(render)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleTwoPosHpr)
self.happy = 1
self.raised = 1
self.forward = 1
self.doAnimate()
self.__hideWitnessToon()
self.__showWitnessToon()
if not self.mainDoor.isEmpty():
self.mainDoor.stash()
if not self.reflectedMainDoor.isEmpty():
@ -709,9 +699,8 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def enterIntroduction(self):
self.notify.debug('----- enterIntroduction')
self.reparentTo(render)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleTwoPosHpr)
self.stopAnimate()
self.__hideWitnessToon()
DistributedBossCog.DistributedBossCog.enterIntroduction(self)
base.playMusic(self.promotionMusic, looping=1, volume=0.9)
if not self.mainDoor.isEmpty():
@ -732,13 +721,12 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
def enterBattleOne(self):
self.notify.debug('----- LawbotBoss.enterBattleOne ')
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr)
DistributedBossCog.DistributedBossCog.enterBattleOne(self)
self.reparentTo(render)
self.setPosHpr(*ToontownGlobals.LawbotBossBattleOnePosHpr)
self.clearChat()
self.loop('Ff_neutral')
self.notify.debug('self.battleANode = %s' % self.battleANode)
self.__hideWitnessToon()
if self.battleA == None or self.battleB == None:
pass
return
@ -787,7 +775,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.setToonsToNeutral(self.involvedToons)
self.clearChat()
self.reparentTo(render)
self.__showWitnessToon()
prepareBattleTwoMovie = self.__makePrepareBattleTwoMovie()
intervalName = 'prepareBattleTwo'
seq = Sequence(prepareBattleTwoMovie, name=intervalName)
@ -841,7 +828,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.clearChat()
self.witnessToon.clearChat()
self.releaseToons(finalBattle=1)
self.__showWitnessToon()
if not self.useCannons:
self.toonsToBattlePosition(self.toonsA, self.battleANode)
self.toonsToBattlePosition(self.toonsB, self.battleBNode)
@ -912,7 +898,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.clearChat()
self.reparentTo(render)
base.playMusic(self.betweenBattleMusic, looping=1, volume=0.9)
self.__showWitnessToon()
prepareBattleThreeMovie = self.__makePrepareBattleThreeMovie()
self.acceptOnce('doneChatPage', self.__onToBattleThree)
intervalName = 'prepareBattleThree'
@ -962,11 +947,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.setPosHpr(*ToontownGlobals.LawbotBossBattleThreePosHpr)
self.bossMaxDamage = ToontownGlobals.LawbotBossMaxDamage
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):
self.notify.debug('----- __doneBattleThree')
@ -1137,7 +1117,6 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.stash()
self.stopAnimate()
self.controlToons()
self.__showWitnessToon()
self.witnessToon.reparentTo(render)
self.witnessToon.setPosHpr(*ToontownGlobals.LawbotBossWitnessEpiloguePosHpr)
self.witnessToon.loop('Sit')
@ -1371,29 +1350,28 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
if toon:
delayDeletes.append(DelayDelete.DelayDelete(toon, 'LawbotBoss.makeIntroductionMovie'))
track = Parallel()
bossAnimTrack = Sequence(
ActorInterval(self, 'Ff_speech', startTime=2, duration=10, loop=1),
ActorInterval(self, 'Ff_lookRt', duration=3),
ActorInterval(self, 'Ff_lookRt', duration=3, startTime=3, endTime=0),
ActorInterval(self, 'Ff_neutral', duration=2),
ActorInterval(self, 'Ff_speech', duration=7, loop=1))
track.append(bossAnimTrack)
attackToons = TTLocalizer.BossCogAttackToons
dialogTrack = Track(
(0, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro0, CFSpeech)),
finalPodiumPos = Point3(self.podium.getX(), self.podium.getY(), -ToontownGlobals.LawbotBossBattleTwoPosHpr[2])
finalReflectedPodiumPos = Point3(self.reflectedPodium.getX(), self.reflectedPodium.getY(), 0.0)
finalBossPos = Point3(self.getX(), self.getY(), ToontownGlobals.LawbotBossBattleOnePosHpr[2])
track = Track(
(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))),
(5, Parallel(base.camera.posInterval(6, (-2.8, 5.6, 19.3), blendType='easeInOut'), self.posInterval(16, ToontownGlobals.LawbotBossBattleOnePosHpr[:3]))),
(5.6, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro1, CFSpeech)),
(12, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro2, CFSpeech)),
(18, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro3, CFSpeech)),
(22, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro4, CFSpeech)),
(24, Sequence(
Func(self.clearChat),
self.loseCogSuits(self.toonsA + self.toonsB, render, (-2.798, -70, 10, 180, 0, 0)))),
(27, Sequence(
self.toonNormalEyes(self.involvedToons),
Func(self.loop, 'Ff_neutral'),
Func(self.setChatAbsolute, attackToons, CFSpeech))))
track.append(dialogTrack)
(11, Parallel(Func(self.play, 'Ff_lookRt'), base.camera.posInterval(3, (-2.8, -50.6, 19.3), blendType='easeInOut'))),
(11.5, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro2, CFSpeech)),
(13, self.actorInterval('Ff_lookRt', playRate=-1)),
(15, Sequence(Func(base.camera.reparentTo, self.witnessToon), Func(base.camera.setPosHpr, 0, 8, 2, 180, 10, 0))),
(15.5, Sequence(Func(self.clearChat), Func(self.witnessToon.setChatAbsolute, TTLocalizer.LawbotBossTempIntro3, CFSpeech))),
(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))),
(21, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro4, CFSpeech)),
(25, Func(self.setChatAbsolute, TTLocalizer.LawbotBossTempIntro5, CFSpeech)),
(29, Sequence(Func(self.loop, 'Ff_neutral'), Func(self.clearChat), self.loseCogSuits(self.toonsA + self.toonsB, render, (-2.798, -70, 10, 180, 0, 0)))),
(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))),
(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(
Func(self.stickToonsToFloor),
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!"
TrickOrTreatMsg = 'You have already\nfound this treat!'
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!'
LawbotBossTempIntro2 = "The prosecution's case is strong."
LawbotBossTempIntro3 = 'And here are the public defenders.'
LawbotBossTempIntro4 = "Wait a minute... You're Toons!"
LawbotBossTempIntro2 = "The prosecution's case is strong..."
LawbotBossTempIntro3 = "Hey, your honorable blindness, you're looking the wrong way!"
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.'
LawbotBossHowToGetEvidence = 'Touch the witness stand to get evidence.'
LawbotBossTrialChat1 = 'Court is now in session'
@ -7529,7 +7531,7 @@ LawbotBossNeedMoreEvidence = 'You need to get more evidence!'
LawbotBossDefenseWins1 = 'Impossible! The defense won?'
LawbotBossDefenseWins2 = 'No. I declare a mistrial! A new one will be scheduled.'
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'
LawbotBossLeaveCannon = 'Leave cannon'
LawbotBossPassExam = 'Bah, so you passed the bar exam.'

View file

@ -943,12 +943,6 @@ LawbotBossBattleTwoPosHpr = (-2.798,
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
LawbotBossBottomPos = (50, 39, 0)
LawbotBossDeathPos = (50, 40, 0)