mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
Add CJ and CEO tasks, need to fix tasks tho.
This commit is contained in:
parent
6573d40c91
commit
63b34432a2
13 changed files with 95 additions and 27 deletions
|
@ -17,7 +17,7 @@ class CogPageManagerAI:
|
|||
cogCounts = toon.cogCounts
|
||||
cogs = toon.cogs
|
||||
for cog in killedCogs:
|
||||
if cog['isSkelecog'] or cog['isVP'] or cog['isCFO']:
|
||||
if cog['isSkelecog'] or cog['isVP'] or cog['isCFO'] or cog['isCJ'] or cog['isCEO']:
|
||||
continue
|
||||
if toon.getDoId() in cog['activeToons']:
|
||||
deptIndex = SuitDNA.suitDepts.index(cog['track'])
|
||||
|
|
|
@ -85,7 +85,7 @@ def getBattleExperience(numToons, activeToons, toonExp, toonSkillPtsGained, toon
|
|||
for deathRecord in suitsKilled:
|
||||
level = deathRecord['level']
|
||||
type = deathRecord['type']
|
||||
if deathRecord['isVP'] or deathRecord['isCFO']:
|
||||
if deathRecord['isVP'] or deathRecord['isCFO'] or deathRecord['isCJ'] or deathRecord['isCEO']:
|
||||
level = 0
|
||||
typeNum = SuitDNA.suitDepts.index(deathRecord['track'])
|
||||
else:
|
||||
|
@ -105,6 +105,10 @@ def getBattleExperience(numToons, activeToons, toonExp, toonSkillPtsGained, toon
|
|||
flags |= ToontownBattleGlobals.DLF_VP
|
||||
if deathRecord['isCFO']:
|
||||
flags |= ToontownBattleGlobals.DLF_CFO
|
||||
if deathRecord['isCJ']:
|
||||
flags |= ToontownBattleGlobals.DLF_CJ
|
||||
if deathRecord['isCEO']:
|
||||
flags |= ToontownBattleGlobals.DLF_CEO
|
||||
if deathRecord['isSupervisor']:
|
||||
flags |= ToontownBattleGlobals.DLF_SUPERVISOR
|
||||
if deathRecord['isVirtual']:
|
||||
|
|
|
@ -1564,6 +1564,8 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas
|
|||
'isForeman': suit.isForeman(),
|
||||
'isVP': 0,
|
||||
'isCFO': 0,
|
||||
'isCJ': 0,
|
||||
'isCEO': 0,
|
||||
'isSupervisor': suit.isSupervisor(),
|
||||
'isVirtual': suit.isVirtual(),
|
||||
'hasRevives': suit.getMaxSkeleRevives(),
|
||||
|
|
|
@ -571,10 +571,12 @@ class RewardPanel(DirectFrame):
|
|||
isForeman = flags & ToontownBattleGlobals.DLF_FOREMAN
|
||||
isVP = flags & ToontownBattleGlobals.DLF_VP
|
||||
isCFO = flags & ToontownBattleGlobals.DLF_CFO
|
||||
isCJ = flags & ToontownBattleGlobals.DLF_CJ
|
||||
isCEO = flags & ToontownBattleGlobals.DLF_CEO
|
||||
isSupervisor = flags & ToontownBattleGlobals.DLF_SUPERVISOR
|
||||
isVirtual = flags & ToontownBattleGlobals.DLF_VIRTUAL
|
||||
hasRevives = flags & ToontownBattleGlobals.DLF_REVIVES
|
||||
if isVP or isCFO:
|
||||
if isVP or isCFO or isCJ or isCEO:
|
||||
cogType = None
|
||||
cogTrack = SuitDNA.suitDepts[cogIndex]
|
||||
else:
|
||||
|
@ -587,6 +589,8 @@ class RewardPanel(DirectFrame):
|
|||
'isForeman': isForeman,
|
||||
'isVP': isVP,
|
||||
'isCFO': isCFO,
|
||||
'isCJ': isCJ,
|
||||
'isCEO': isCEO,
|
||||
'isSupervisor': isSupervisor,
|
||||
'isVirtual': isVirtual,
|
||||
'hasRevives': hasRevives,
|
||||
|
@ -622,6 +626,10 @@ class RewardPanel(DirectFrame):
|
|||
num = quest.doesVPCount(avId, cogDict, zoneId, toonShortList)
|
||||
elif cogDict['isCFO']:
|
||||
num = quest.doesCFOCount(avId, cogDict, zoneId, toonShortList)
|
||||
elif cogDict['isCJ']:
|
||||
num = quest.doesCJCount(avId, cogDict, zoneId, toonShortList)
|
||||
elif cogDict['isCEO']:
|
||||
num = quest.doesCEOCount(avId, cogDict, zoneId, toonShortList)
|
||||
else:
|
||||
num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList)
|
||||
if num:
|
||||
|
|
|
@ -705,6 +705,19 @@ class QuestPoster(DirectFrame):
|
|||
infoText = quest.getLocationName()
|
||||
if infoText == '':
|
||||
infoText = TTLocalizer.QuestPosterAnywhere
|
||||
elif quest.getType() == Quests.CJQuest or quest.getType() == Quests.CEOQuest:
|
||||
self.teleportButton.hide()
|
||||
cj = quest.getType() == Quests.CJQuest
|
||||
frameBgColor = 'blue' if cj else 'brown'
|
||||
cardMaker = CardMaker('boss-cm')
|
||||
cardMaker.setFrame(-0.5, 0.5, -0.5, 0.5)
|
||||
lIconGeom = NodePath(cardMaker.generate())
|
||||
lIconGeom.setTexture(loader.loadTexture('phase_3.5/maps/' + 'cj_icon.jpg' if cj else 'ceo_icon.jpg'))
|
||||
lIconGeomScale = 0.13
|
||||
if not fComplete:
|
||||
infoText = quest.getLocationName()
|
||||
if infoText == '':
|
||||
infoText = TTLocalizer.QuestPosterAnywhere
|
||||
elif quest.getType() == Quests.CFONewbieQuest:
|
||||
self.teleportButton.hide()
|
||||
frameBgColor = 'blue'
|
||||
|
|
|
@ -237,6 +237,12 @@ class Quest:
|
|||
def checkNumCFOs(self, num):
|
||||
self.check(num > 0, 'invalid number of CFOs: %s' % num)
|
||||
|
||||
def checkNumCJs(self, num):
|
||||
self.check(num > 0, 'invalid number of CJs: %s' % num)
|
||||
|
||||
def checkNumCEOs(self, num):
|
||||
self.check(num > 0, 'invalid number of CEOs: %s' % num)
|
||||
|
||||
def checkNumBuildings(self, num):
|
||||
self.check(1, 'invalid num buildings: %s' % num)
|
||||
|
||||
|
@ -358,6 +364,12 @@ class Quest:
|
|||
def doesCFOCount(self, avId, cogDict, zoneId, avList):
|
||||
return 0
|
||||
|
||||
def doesCJCount(self, avId, cogDict, zoneId, avList):
|
||||
return 0
|
||||
|
||||
def doesCEOCount(self, avId, cogDict, zoneId, avList):
|
||||
return 0
|
||||
|
||||
def doesFactoryCount(self, avId, location, avList):
|
||||
return 0
|
||||
|
||||
|
@ -905,7 +917,6 @@ class SupervisorNewbieQuest(SupervisorQuest, NewbieQuest):
|
|||
else:
|
||||
return 0
|
||||
|
||||
|
||||
class CFOQuest(CogQuest):
|
||||
def __init__(self, id, quest):
|
||||
CogQuest.__init__(self, id, quest)
|
||||
|
@ -915,18 +926,38 @@ class CFOQuest(CogQuest):
|
|||
return Any
|
||||
|
||||
def getCogNameString(self):
|
||||
numCogs = self.getNumCogs()
|
||||
if numCogs == 1:
|
||||
return TTLocalizer.ACogCFO
|
||||
else:
|
||||
return TTLocalizer.CogCFOs
|
||||
|
||||
def doesCogCount(self, avId, cogDict, zoneId, avList):
|
||||
return 0
|
||||
return TTLocalizer.ACogCFO if self.getNumCogs() == 1 else TTLocalizer.CogCFOs
|
||||
|
||||
def doesCFOCount(self, avId, cogDict, zoneId, avList):
|
||||
return self.isLocationMatch(zoneId)
|
||||
|
||||
class CJQuest(CogQuest):
|
||||
def __init__(self, id, quest):
|
||||
CogQuest.__init__(self, id, quest)
|
||||
self.checkNumCJs(self.quest[1])
|
||||
|
||||
def getCogType(self):
|
||||
return Any
|
||||
|
||||
def getCogNameString(self):
|
||||
return TTLocalizer.ACogCJ if self.getNumCogs() == 1 else TTLocalizer.CogCJs
|
||||
|
||||
def doesCJCount(self, avId, cogDict, zoneId, avList):
|
||||
return self.isLocationMatch(zoneId)
|
||||
|
||||
class CEOQuest(CogQuest):
|
||||
def __init__(self, id, quest):
|
||||
CogQuest.__init__(self, id, quest)
|
||||
self.checkNumCEOs(self.quest[1])
|
||||
|
||||
def getCogType(self):
|
||||
return Any
|
||||
|
||||
def getCogNameString(self):
|
||||
return TTLocalizer.ACogCEO if self.getNumCogs() == 1 else TTLocalizer.CogCEOs
|
||||
|
||||
def doesCEOCount(self, avId, cogDict, zoneId, avList):
|
||||
return self.isLocationMatch(zoneId)
|
||||
|
||||
class CFONewbieQuest(CFOQuest, NewbieQuest):
|
||||
def __init__(self, id, quest):
|
||||
|
@ -3283,7 +3314,7 @@ QuestDict = {
|
|||
8185: (DL_TIER + 2, OBSOLETE, (SkelecogLevelQuest, ToontownGlobals.SellbotHQ, 16, 6), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
8186: (DL_TIER + 2, OBSOLETE, (ForemanQuest, ToontownGlobals.SellbotHQ, 12), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
8187: (DL_TIER + 2, OBSOLETE, (ForemanQuest, ToontownGlobals.SellbotHQ, 16), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
8188: (DL_TIER + 2, OBSOLETE, (VPQuest, ToontownGlobals.SellbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
8188: (DL_TIER + 2, Start, (VPQuest, ToontownGlobals.SellbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
8189: (DL_TIER + 2, OBSOLETE, (RescueQuest, ToontownGlobals.SellbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
8190: (DL_TIER + 2, OBSOLETE, (CogNewbieQuest, ToontownGlobals.SellbotHQ, 30, Any, SELLBOT_HQ_NEWBIE_HP), Any, ToonHQ, 610, NA, DefaultDialog),
|
||||
8191: (DL_TIER + 2, OBSOLETE, (CogNewbieQuest, ToontownGlobals.SellbotHQ, 30, Any, SELLBOT_HQ_NEWBIE_HP), Any, ToonHQ, 610, NA, DefaultDialog),
|
||||
|
@ -3401,7 +3432,7 @@ QuestDict = {
|
|||
9185: (DL_TIER + 3, OBSOLETE, (SkelecogLevelQuest, ToontownGlobals.SellbotHQ, 32, 6), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
9186: (DL_TIER + 3, OBSOLETE, (ForemanQuest, ToontownGlobals.SellbotHQ, 25), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
9187: (DL_TIER + 3, OBSOLETE, (ForemanQuest, ToontownGlobals.SellbotHQ, 35), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
9188: (DL_TIER + 3, OBSOLETE, (VPQuest, ToontownGlobals.SellbotHQ, 3), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
9188: (DL_TIER + 3, Start, (VPQuest, ToontownGlobals.SellbotHQ, 3), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
9189: (DL_TIER + 3, OBSOLETE, (RescueQuest, ToontownGlobals.SellbotHQ, 3), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
9190: (DL_TIER + 3, OBSOLETE, (CogNewbieQuest, ToontownGlobals.SellbotHQ, 35, Any, SELLBOT_HQ_NEWBIE_HP), Any, ToonHQ, 611, NA, DefaultDialog),
|
||||
9191: (DL_TIER + 3, OBSOLETE, (CogNewbieQuest, ToontownGlobals.SellbotHQ, 35, Any, SELLBOT_HQ_NEWBIE_HP), Any, ToonHQ, 611, NA, DefaultDialog),
|
||||
|
@ -3468,7 +3499,7 @@ QuestDict = {
|
|||
10120: (ELDER_TIER, OBSOLETE, (CogQuest, ToontownGlobals.SellbotHQ, 60, Any), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10121: (ELDER_TIER, OBSOLETE, (FactoryQuest, ToontownGlobals.SellbotHQ, 10), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10122: (ELDER_TIER, OBSOLETE, (ForemanQuest, ToontownGlobals.SellbotHQ, 10), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10123: (ELDER_TIER, OBSOLETE, (VPQuest, ToontownGlobals.SellbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10123: (ELDER_TIER, Start, (VPQuest, ToontownGlobals.SellbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10124: (ELDER_TIER, OBSOLETE, (RescueQuest, ToontownGlobals.SellbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10130: (ELDER_TIER, OBSOLETE, (CogNewbieQuest, ToontownGlobals.SellbotHQ, 40, Any, SELLBOT_HQ_NEWBIE_HP), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10131: (ELDER_TIER, OBSOLETE, (FactoryNewbieQuest, ToontownGlobals.SellbotHQ, 3, SELLBOT_HQ_NEWBIE_HP), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
|
@ -3480,6 +3511,8 @@ QuestDict = {
|
|||
10145: (ELDER_TIER, Start, (CogNewbieQuest, ToontownGlobals.CashbotHQ, 40, Any, CASHBOT_HQ_NEWBIE_HP), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10146: (ELDER_TIER, Start, (MintNewbieQuest, ToontownGlobals.CashbotHQ, 3, CASHBOT_HQ_NEWBIE_HP), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10147: (ELDER_TIER, Start, (SupervisorNewbieQuest, ToontownGlobals.CashbotHQ, 3, CASHBOT_HQ_NEWBIE_HP), Any, ToonHQ, 611, NA, DefaultDialog),
|
||||
10148: (ELDER_TIER, Start, (CJQuest, ToontownGlobals.LawbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10149: (ELDER_TIER, Start, (CEOQuest, ToontownGlobals.BossbotHQ, 2), Any, ToonHQ, Any, NA, DefaultDialog),
|
||||
10200: (ELDER_TIER, Start, (CogQuest, Anywhere, 100, Any), Any, ToonHQ, NA, 10201, DefaultDialog),
|
||||
10201: (ELDER_TIER, Cont, (DeliverItemQuest, 1000), Any, ToonTailor, 1000, NA, DefaultDialog),
|
||||
10202: (ELDER_TIER, Start, (BuildingQuest, Anywhere, 25, Any, 1, 0), Any, ToonHQ, NA, 10203, DefaultDialog),
|
||||
|
|
|
@ -575,8 +575,10 @@ class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
|
|||
'track': self.dna.dept,
|
||||
'isSkelecog': 0,
|
||||
'isForeman': 0,
|
||||
'isVP': 1,
|
||||
'isVP': 0,
|
||||
'isCFO': 0,
|
||||
'isCJ': 0,
|
||||
'isCEO': 1,
|
||||
'isSupervisor': 0,
|
||||
'isVirtual': 0,
|
||||
'activeToons': self.involvedToons[:]})
|
||||
|
|
|
@ -475,6 +475,8 @@ class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
|
|||
'isForeman': 0,
|
||||
'isVP': 0,
|
||||
'isCFO': 1,
|
||||
'isCJ': 0,
|
||||
'isCEO': 0,
|
||||
'isSupervisor': 0,
|
||||
'isVirtual': 0,
|
||||
'activeToons': self.involvedToons[:]})
|
||||
|
|
|
@ -633,8 +633,10 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM
|
|||
'track': self.dna.dept,
|
||||
'isSkelecog': 0,
|
||||
'isForeman': 0,
|
||||
'isVP': 1,
|
||||
'isVP': 0,
|
||||
'isCFO': 0,
|
||||
'isCJ': 1,
|
||||
'isCEO': 0,
|
||||
'isSupervisor': 0,
|
||||
'isVirtual': 0,
|
||||
'activeToons': self.involvedToons[:]})
|
||||
|
|
|
@ -335,6 +335,8 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
|
|||
'isForeman': 0,
|
||||
'isVP': 1,
|
||||
'isCFO': 0,
|
||||
'isCJ': 0,
|
||||
'isCEO': 0,
|
||||
'isSupervisor': 0,
|
||||
'isVirtual': 0,
|
||||
'activeToons': self.involvedToons[:]})
|
||||
|
|
|
@ -180,6 +180,10 @@ ASupervisor = 'a Mint Supervisor'
|
|||
CogCFO = Cog + ' C.F.O.'
|
||||
CogCFOs = "Cog C.F.O.'s"
|
||||
ACogCFO = ACog + ' C.F.O.'
|
||||
CogCJs = "Cog C.J.'s"
|
||||
ACogCJ = ACog + ' C.J.'
|
||||
CogCEOs = "Cog C.E.O.'s"
|
||||
ACogCEO = ACog + ' C.E.O.'
|
||||
TheFish = 'the Fish'
|
||||
AFish = 'a fish'
|
||||
Level = 'Level'
|
||||
|
|
|
@ -445,9 +445,11 @@ DLF_SKELECOG = 1
|
|||
DLF_FOREMAN = 2
|
||||
DLF_VP = 4
|
||||
DLF_CFO = 8
|
||||
DLF_SUPERVISOR = 16
|
||||
DLF_VIRTUAL = 32
|
||||
DLF_REVIVES = 64
|
||||
DLF_CJ = 16
|
||||
DLF_CEO = 32
|
||||
DLF_SUPERVISOR = 64
|
||||
DLF_VIRTUAL = 128
|
||||
DLF_REVIVES = 256
|
||||
pieNames = ['tart',
|
||||
'fruitpie-slice',
|
||||
'creampie-slice',
|
||||
|
|
|
@ -14,9 +14,3 @@ class DistributedBattleTutorialAI(DistributedBattleAI):
|
|||
|
||||
def startRewardTimer(self):
|
||||
pass # We don't want a reward timer in the tutorial.
|
||||
|
||||
def exitReward(self):
|
||||
av = simbase.air.doId2do.get(self.air.getAvatarIdFromSender())
|
||||
|
||||
if av:
|
||||
av.b_setQuests([[101, 1, 1000, 100, 1]])
|
Loading…
Reference in a new issue