VP talks a lot more now

This commit is contained in:
John 2015-07-07 00:47:56 +03:00
parent 32a26abd79
commit 4ca9255561
6 changed files with 52 additions and 10 deletions

View file

@ -87,7 +87,7 @@ class NewsManagerAI(DistributedObjectAI):
if id == ToontownGlobals.FISH_BINGO or id == ToontownGlobals.SILLY_SATURDAY: if id == ToontownGlobals.FISH_BINGO or id == ToontownGlobals.SILLY_SATURDAY:
messenger.send('checkBingoState') messenger.send('checkBingoState')
elif id in [ToontownGlobals.SUMMER_FIREWORKS, ToontownGlobals.NEW_YEAR_FIREWORKS]: elif id in [ToontownGlobals.SUMMER_FIREWORKS, ToontownGlobals.NEW_YEAR_FIREWORKS]:
self.fireworkTasks.append(taskMgr.doMethodLater((60 - datetime.datetime.now().minute) * 60, self.startFireworkTask)) self.fireworkTasks.append(taskMgr.doMethodLater((60 - datetime.datetime.now().minute) * 60, self.startFireworkTask, 'initialFireworkTask-%s' % id))
def endSpecialHoliday(self, id): def endSpecialHoliday(self, id):
if id == ToontownGlobals.FISH_BINGO or id == ToontownGlobals.SILLY_SATURDAY: if id == ToontownGlobals.FISH_BINGO or id == ToontownGlobals.SILLY_SATURDAY:
@ -97,7 +97,7 @@ class NewsManagerAI(DistributedObjectAI):
def startFireworkTask(self, id, task=None): def startFireworkTask(self, id, task=None):
self.startFireworks(id) self.startFireworks(id)
self.fireworkTasks.append(taskMgr.doMethodLater(3600, self.startFireworks, extraArgs=[id])) self.fireworkTasks.append(taskMgr.doMethodLater(3600, self.startFireworks, 'fireworkTask-%s' % id, extraArgs=[id]))
return Task.done return Task.done
def startFireworks(self, type, task=None): def startFireworks(self, type, task=None):

View file

@ -92,8 +92,10 @@ class DistributedBattleFinal(DistributedBattleBase.DistributedBattleBase):
if self.bossCog == None: if self.bossCog == None:
return return
random.seed(suits[0].doId) bossDept = self.bossCog.dna.dept
bossTaunt = Func(self.bossCog.setChatAbsolute, random.choice(TTLocalizer.BossTaunts), CFSpeech | CFTimeout)
if bossDept in TTLocalizer.SendCogBossTaunts:
self.bossCog.setChatAbsolute(random.choice(TTLocalizer.SendCogBossTaunts[bossDept]), CFSpeech | CFTimeout)
if self.battleSide: if self.battleSide:
openDoor = Func(self.bossCog.doorB.request, 'open') openDoor = Func(self.bossCog.doorB.request, 'open')
@ -127,7 +129,7 @@ class DistributedBattleFinal(DistributedBattleBase.DistributedBattleBase):
else: else:
base.camera.setPosHpr(-20, -4, 7, -60, 0, 0) base.camera.setPosHpr(-20, -4, 7, -60, 0, 0)
done = Func(callback) done = Func(callback)
track = Sequence(bossTaunt, openDoor, suitTrack, closeDoor, done, name=name) track = Sequence(openDoor, suitTrack, closeDoor, done, name=name)
track.start(ts) track.start(ts)
self.storeInterval(track, name) self.storeInterval(track, name)
return return

View file

@ -6,15 +6,15 @@ from direct.interval.IntervalGlobal import *
from direct.showbase.PythonUtil import Functor from direct.showbase.PythonUtil import Functor
from direct.task.Task import Task from direct.task.Task import Task
from panda3d.core import * from panda3d.core import *
import string
import types import types
import random
import Suit import Suit
import SuitDNA import SuitDNA
from otp.avatar import Avatar from otp.avatar import Avatar
from toontown.battle import BattleParticles from toontown.battle import BattleParticles
from toontown.battle import BattleProps from toontown.battle import BattleProps
from otp.nametag.NametagGroup import NametagGroup from otp.nametag.NametagGroup import NametagGroup
from otp.nametag.NametagConstants import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
@ -536,7 +536,7 @@ class BossCog(Avatar.Avatar):
ival = Sequence(Func(self.reverseHead), ActorInterval(self, 'Bb2Ff_spin'), Func(self.forwardHead)) ival = Sequence(Func(self.reverseHead), ActorInterval(self, 'Bb2Ff_spin'), Func(self.forwardHead))
if self.forward: if self.forward:
ival = Sequence(Func(self.reverseBody), ParallelEndTogether(ival, self.pelvis.hprInterval(0.5, self.pelvisForwardHpr, blendType='easeInOut'))) ival = Sequence(Func(self.reverseBody), ParallelEndTogether(ival, self.pelvis.hprInterval(0.5, self.pelvisForwardHpr, blendType='easeInOut')))
ival = Sequence(Track((0, ival), (0, SoundInterval(self.spinSfx, node=self)), (0.9, Parallel(SoundInterval(self.rainGearsSfx, node=self), ParticleInterval(pe, self.frontAttack, worldRelative=0, duration=1.5, cleanup=True), duration=0)), (1.9, Func(self.bubbleF.unstash))), Func(self.bubbleF.stash)) ival = Sequence(Track((0, ival), (0, Sequence(Func(self.setChatAbsolute, random.choice(TTLocalizer.VPSpinMessages), CFSpeech | CFTimeout), SoundInterval(self.spinSfx, node=self))), (0.9, Parallel(SoundInterval(self.rainGearsSfx, node=self), ParticleInterval(pe, self.frontAttack, worldRelative=0, duration=1.5, cleanup=True), duration=0)), (1.9, Func(self.bubbleF.unstash))), Func(self.bubbleF.stash))
self.forward = 1 self.forward = 1
self.happy = 0 self.happy = 0
self.raised = 1 self.raised = 1
@ -545,7 +545,7 @@ class BossCog(Avatar.Avatar):
self.doAnimate(None, raised=1, happy=0, queueNeutral=0) self.doAnimate(None, raised=1, happy=0, queueNeutral=0)
else: else:
self.doAnimate(None, raised=1, happy=1, queueNeutral=1) self.doAnimate(None, raised=1, happy=1, queueNeutral=1)
ival = Parallel(ActorInterval(self, 'Fb_jump'), Sequence(SoundInterval(self.swishSfx, duration=1.1, node=self), SoundInterval(self.boomSfx, duration=1.9)), Sequence(Wait(1.21), Func(self.announceAreaAttack))) ival = Parallel(ActorInterval(self, 'Fb_jump'), Sequence(Func(self.setChatAbsolute, random.choice(TTLocalizer.JumpBossTaunts[self.dna.dept]), CFSpeech | CFTimeout), SoundInterval(self.swishSfx, duration=1.1, node=self), SoundInterval(self.boomSfx, duration=1.9)), Sequence(Wait(1.21), Func(self.announceAreaAttack)))
if self.twoFaced: if self.twoFaced:
self.happy = 0 self.happy = 0
else: else:

View file

@ -23,6 +23,7 @@ from direct.controls.ControlManager import CollisionHandlerRayStart
from direct.showbase import PythonUtil from direct.showbase import PythonUtil
import random import random
from otp.nametag import NametagGlobals from otp.nametag import NametagGlobals
from otp.nametag.NametagConstants import *
class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog): class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossCog') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossCog')
@ -921,7 +922,7 @@ class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog):
extraAnim = Sequence() extraAnim = Sequence()
if attackCode == ToontownGlobals.BossCogSlowDirectedAttack: if attackCode == ToontownGlobals.BossCogSlowDirectedAttack:
extraAnim = ActorInterval(self, neutral) extraAnim = ActorInterval(self, neutral)
seq = Sequence(ParallelEndTogether(self.pelvis.hprInterval(1, VBase3(toToonH, 0, 0)), neutral1Anim), extraAnim, Parallel(Sequence(Wait(0.19), gearTrack, Func(gearRoot.detachNode), self.pelvis.hprInterval(0.2, VBase3(0, 0, 0))), Sequence(throwAnim, neutral2Anim))) seq = Sequence(ParallelEndTogether(self.pelvis.hprInterval(1, VBase3(toToonH, 0, 0)), neutral1Anim), extraAnim, Parallel(Sequence(Wait(0.19), gearTrack, Func(gearRoot.detachNode), self.pelvis.hprInterval(0.2, VBase3(0, 0, 0))), Sequence(Func(self.setChatAbsolute, random.choice(TTLocalizer.DirectedAttackBossTaunts[self.dna.dept]) % {'toon': toon.getName()}, CFSpeech | CFTimeout), throwAnim, neutral2Anim)))
self.doAnimate(seq, now=1, raised=1) self.doAnimate(seq, now=1, raised=1)
def announceAreaAttack(self): def announceAreaAttack(self):

View file

@ -380,6 +380,7 @@ class DistributedSellbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
battlePos = Point3(ToontownGlobals.SellbotBossBattleTwoPosHpr[0], ToontownGlobals.SellbotBossBattleTwoPosHpr[1], ToontownGlobals.SellbotBossBattleTwoPosHpr[2]) battlePos = Point3(ToontownGlobals.SellbotBossBattleTwoPosHpr[0], ToontownGlobals.SellbotBossBattleTwoPosHpr[1], ToontownGlobals.SellbotBossBattleTwoPosHpr[2])
battleHpr = VBase3(ToontownGlobals.SellbotBossBattleTwoPosHpr[3], ToontownGlobals.SellbotBossBattleTwoPosHpr[4], ToontownGlobals.SellbotBossBattleTwoPosHpr[5]) battleHpr = VBase3(ToontownGlobals.SellbotBossBattleTwoPosHpr[3], ToontownGlobals.SellbotBossBattleTwoPosHpr[4], ToontownGlobals.SellbotBossBattleTwoPosHpr[5])
bossTrack = Sequence() bossTrack = Sequence()
bossTrack.append(Func(self.setChatAbsolute, TTLocalizer.VPRampMessage, CFSpeech | CFTimeout))
bossTrack.append(Func(self.getGeomNode().setH, 180)) bossTrack.append(Func(self.getGeomNode().setH, 180))
bossTrack.append(Func(self.loop, 'Fb_neutral')) bossTrack.append(Func(self.loop, 'Fb_neutral'))
track, hpr = self.rollBossToPoint(startPos, None, topRampPos, None, 0) track, hpr = self.rollBossToPoint(startPos, None, topRampPos, None, 0)
@ -970,6 +971,7 @@ class DistributedSellbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
self.happy = 0 self.happy = 0
self.raised = 0 self.raised = 0
self.forward = 1 self.forward = 1
self.setChatAbsolute(TTLocalizer.VPDeathTaunt, CFSpeech | CFTimeout)
self.doAnimate('Fb_fall', now=1) self.doAnimate('Fb_fall', now=1)
self.acceptOnce(self.animDoneEvent, self.__continueVictory) self.acceptOnce(self.animDoneEvent, self.__continueVictory)
base.playMusic(self.battleThreeMusic, looping=1, volume=0.9, time=self.battleThreeMusicTime) base.playMusic(self.battleThreeMusic, looping=1, volume=0.9, time=self.battleThreeMusicTime)

View file

@ -8524,6 +8524,43 @@ BossLocations = {
'm': 'Cashbot Treasury Vault', 'm': 'Cashbot Treasury Vault',
's': 'Sellbot Towers\nRooftop' 's': 'Sellbot Towers\nRooftop'
} }
SendCogBossTaunts = {
's': [
"We're going door to door to give you an dedious offer.",
"It's time for your estimated cost.",
'You toons never learn when to snatch up a great deal.',
"Call now and we'll reduce your laff, absolutely free.",
'Sell, sell, sell!',
'Let us Sellbots give you a helping hand.',
'The deal has only just begun.',
'Going sad already? How about we settle a retirement plan.',
'Get them! Get them all!'
]
}
VPRampMessage = "I don't have time for this, I'm late for my meeting!"
VPDeathTaunt = "WAAAH! YOU HAVEN'T SEEN THE LAST OF ME!"
DirectedAttackBossTaunts = {
's': [
'Have a free sample!',
'I see you over there!',
'My products beat out all of Toontown!',
"Don't think I skipped you, %(toon)s!"
]
}
VPSpinMessages = [
"Let's get these ideas going!",
"I wouldn't get too close. My patents protect these gears.",
'Why worry about problems when you can shake them off?',
"I may be old, but I'm still reliable."
]
JumpBossTaunts = {
's': [
'STOP!',
'Pay attention to my pitch!',
'This is a waste of my time!',
'Time to send you back to the playground!'
]
}
BossTaunts = [ BossTaunts = [
"You can't stop this. We'll just keep on coming.", "You can't stop this. We'll just keep on coming.",
'Break time is over.', 'Break time is over.',