mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 03:35:12 -06:00
Calling doodles now does the call animation
This commit is contained in:
parent
ec6ed0a35d
commit
17b459b00e
3 changed files with 29 additions and 39 deletions
|
@ -40,7 +40,7 @@ SOUND = SOUND_TRACK
|
|||
THROW = THROW_TRACK
|
||||
SQUIRT = SQUIRT_TRACK
|
||||
DROP = DROP_TRACK
|
||||
TOON_ATTACK_TIME = 12.0
|
||||
TOON_ATTACK_TIME = 14.0
|
||||
SUIT_ATTACK_TIME = 12.0
|
||||
TOON_TRAP_DELAY = 0.8
|
||||
TOON_SOUND_DELAY = 1.0
|
||||
|
@ -57,10 +57,7 @@ TOON_FIRE_SUIT_DELAY = 1.0
|
|||
REWARD_TIMEOUT = 120
|
||||
FLOOR_REWARD_TIMEOUT = 4
|
||||
BUILDING_REWARD_TIMEOUT = 300
|
||||
try:
|
||||
CLIENT_INPUT_TIMEOUT = base.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
|
||||
except:
|
||||
CLIENT_INPUT_TIMEOUT = simbase.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
|
||||
CLIENT_INPUT_TIMEOUT = config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
|
||||
|
||||
def levelAffectsGroup(track, level):
|
||||
return attackAffectsGroup(track, level)
|
||||
|
|
|
@ -32,18 +32,14 @@ def doPetSOSs(PetSOSs):
|
|||
return (track, camTrack)
|
||||
|
||||
|
||||
def __doPetSOS(sos):
|
||||
return __healJuggle(sos)
|
||||
|
||||
|
||||
def __healToon(toon, hp, gender, callerToonId, ineffective = 0):
|
||||
notify.debug('healToon() - toon: %d hp: %d ineffective: %d' % (toon.doId, hp, ineffective))
|
||||
nolaughter = 0
|
||||
noLaughter = 0
|
||||
if ineffective == 1:
|
||||
if callerToonId == toon.doId:
|
||||
laughter = TTLocalizer.MoviePetSOSTrickFail
|
||||
else:
|
||||
nolaughter = 1
|
||||
noLaughter = 1
|
||||
else:
|
||||
maxDam = ToontownBattleGlobals.AvPropDamage[0][1][0][1]
|
||||
if callerToonId == toon.doId:
|
||||
|
@ -55,23 +51,33 @@ def __healToon(toon, hp, gender, callerToonId, ineffective = 0):
|
|||
laughter = random.choice(TTLocalizer.MovieHealLaughterHits2)
|
||||
else:
|
||||
laughter = random.choice(TTLocalizer.MovieHealLaughterHits1)
|
||||
if nolaughter == 0:
|
||||
if not noLaughter:
|
||||
toon.setChatAbsolute(laughter, CFSpeech | CFTimeout)
|
||||
if hp > 0 and toon.hp != None:
|
||||
toon.toonUp(hp)
|
||||
else:
|
||||
notify.debug('__healToon() - toon: %d hp: %d' % (toon.doId, hp))
|
||||
return
|
||||
|
||||
|
||||
def __teleportIn(attack, pet, pos = Point3(0, 0, 0), hpr = Vec3(180.0, 0.0, 0.0)):
|
||||
a = Func(pet.reparentTo, attack['battle'])
|
||||
b = Func(pet.setPos, pos)
|
||||
c = Func(pet.setHpr, hpr)
|
||||
d = Func(pet.pose, 'reappear', 0)
|
||||
e = pet.getTeleportInTrack()
|
||||
g = Func(pet.loop, 'neutral')
|
||||
return Sequence(a, b, c, d, e, g)
|
||||
callSfx = loader.loadSfx('phase_5.5/audio/sfx/call_pet.ogg')
|
||||
toon = attack['toon']
|
||||
seq = Sequence()
|
||||
|
||||
seq.append(Func(toon.clearChat))
|
||||
seq.append(Func(callSfx.play))
|
||||
seq.append(ActorInterval(toon, 'callPet'))
|
||||
seq.append(Func(toon.loop, 'neutral'))
|
||||
seq.append(Func(pet.reparentTo, attack['battle']))
|
||||
seq.append(Func(pet.setPos, pos))
|
||||
seq.append(Func(pet.setHpr, hpr))
|
||||
seq.append(Func(pet.pose, 'reappear', 0))
|
||||
seq.append(pet.getTeleportInTrack())
|
||||
seq.append(Func(toon.setSC, 21200 + attack['level']))
|
||||
seq.append(Func(pet.loop, 'neutral'))
|
||||
seq.append(Func(loader.unloadSfx, callSfx))
|
||||
|
||||
return seq
|
||||
|
||||
|
||||
def __teleportOut(attack, pet):
|
||||
|
@ -81,14 +87,7 @@ def __teleportOut(attack, pet):
|
|||
return Sequence(a, c)
|
||||
|
||||
|
||||
def __doPet(attack, level, hp):
|
||||
track = __doSprinkle(attack, 'suits', hp)
|
||||
pbpText = attack['playByPlayText']
|
||||
pbpTrack = pbpText.getShowInterval(TTLocalizer.MovieNPCSOSCogsMiss, track.getDuration())
|
||||
return (track, pbpTrack)
|
||||
|
||||
|
||||
def __healJuggle(heal):
|
||||
def __doPetSOS(heal):
|
||||
petProxyId = heal['petId']
|
||||
pet = Pet.Pet()
|
||||
gender = 0
|
||||
|
@ -100,16 +99,8 @@ def __healJuggle(heal):
|
|||
pet.setName(petProxy.petName)
|
||||
gender = petProxy.gender
|
||||
else:
|
||||
pet.setDNA([-1,
|
||||
0,
|
||||
0,
|
||||
-1,
|
||||
2,
|
||||
0,
|
||||
4,
|
||||
0,
|
||||
1])
|
||||
pet.setName('Smiley')
|
||||
pet.setDNA([-1, 0, 0, -1, 2, 0, 4, 0, 1])
|
||||
pet.setName(TTLocalizer.DefaultDoodleName)
|
||||
targets = heal['target']
|
||||
ineffective = heal['sidestep']
|
||||
level = heal['level']
|
||||
|
|
|
@ -2208,7 +2208,7 @@ MovieNPCSOSThrow = 'Throw'
|
|||
MovieNPCSOSSquirt = 'Squirt'
|
||||
MovieNPCSOSDrop = 'Drop'
|
||||
MovieNPCSOSAll = 'All'
|
||||
MoviePetSOSTrickFail = 'Sigh'
|
||||
MoviePetSOSTrickFail = 'Sigh...'
|
||||
MoviePetSOSTrickSucceedBoy = 'Good boy!'
|
||||
MoviePetSOSTrickSucceedGirl = 'Good girl!'
|
||||
MovieSuitCancelled = 'CANCELLED\nCANCELLED\nCANCELLED'
|
||||
|
@ -8762,6 +8762,8 @@ ClothesGUICount = '%s/%s'
|
|||
FpsMeterLabelOn = 'The frame rate meter is on.'
|
||||
FpsMeterLabelOff = 'The frame rate meter is off.'
|
||||
|
||||
DefaultDoodleName = 'Smiley'
|
||||
|
||||
Blacklist = [
|
||||
"$1ut",
|
||||
"$h1t",
|
||||
|
|
Loading…
Reference in a new issue