mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Minor tweaks to cog invasions, preparing for v3 cogs and the other cogdo types
This commit is contained in:
parent
49c88deaed
commit
50bbe79aac
4 changed files with 24 additions and 4 deletions
|
@ -24,6 +24,12 @@ from toontown.toonbase import ToontownGlobals
|
||||||
ALLOWED_FO_TRACKS = 's'
|
ALLOWED_FO_TRACKS = 's'
|
||||||
if config.GetBool('want-lawbot-cogdo', True):
|
if config.GetBool('want-lawbot-cogdo', True):
|
||||||
ALLOWED_FO_TRACKS += 'l'
|
ALLOWED_FO_TRACKS += 'l'
|
||||||
|
if config.GetBool('want-cashbot-cogdo', False):
|
||||||
|
ALLOWED_FO_TRACKS += 'c'
|
||||||
|
if config.GetBool('want-bossbot-cogdo', False):
|
||||||
|
ALLOWED_FO_TRACKS += 'b'
|
||||||
|
if config.GetBool('want-omni-cogdo', False):
|
||||||
|
ALLOWED_FO_TRACKS += 'slcb'
|
||||||
|
|
||||||
DEFAULT_COGDO_RATIO = .5
|
DEFAULT_COGDO_RATIO = .5
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
# Types:
|
# Types:
|
||||||
INVASION_TYPE_NORMAL = 0
|
INVASION_TYPE_NORMAL = 0
|
||||||
INVASION_TYPE_MEGA = 1
|
INVASION_TYPE_MEGA = 1
|
||||||
|
INVASION_TYPE_BRUTAL = 2
|
||||||
|
|
||||||
# Flags:
|
# Flags:
|
||||||
IFSkelecog = 1 << 0
|
IFSkelecog = 1 << 0
|
||||||
IFWaiter = 1 << 1
|
IFWaiter = 1 << 1
|
||||||
IFV2 = 1 << 2
|
IFV2 = 1 << 2
|
||||||
|
IFV3 = 1 << 3
|
|
@ -53,7 +53,7 @@ class SuitInvasionManagerAI:
|
||||||
# It's impossible to determine the invading Cog.
|
# It's impossible to determine the invading Cog.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if flags not in (0, IFV2, IFSkelecog, IFWaiter):
|
if flags not in (0, IFV3, IFV2, IFSkelecog, IFWaiter):
|
||||||
# The provided flag combination is not possible.
|
# The provided flag combination is not possible.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class SuitInvasionManagerAI:
|
||||||
# Invalid suit type.
|
# Invalid suit type.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if type not in (INVASION_TYPE_NORMAL, INVASION_TYPE_MEGA):
|
if type not in (INVASION_TYPE_NORMAL, INVASION_TYPE_MEGA, INVASION_TYPE_BRUTAL):
|
||||||
# Invalid invasion type.
|
# Invalid invasion type.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -80,7 +80,9 @@ class SuitInvasionManagerAI:
|
||||||
if type == INVASION_TYPE_NORMAL:
|
if type == INVASION_TYPE_NORMAL:
|
||||||
self.total = 1000
|
self.total = 1000
|
||||||
elif type == INVASION_TYPE_MEGA:
|
elif type == INVASION_TYPE_MEGA:
|
||||||
self.total = 0xFFFFFFFF
|
self.total = 5000
|
||||||
|
elif type == INVASION_TYPE_BRUTAL:
|
||||||
|
self.total = 10000
|
||||||
self.remaining = self.total
|
self.remaining = self.total
|
||||||
|
|
||||||
self.flySuits()
|
self.flySuits()
|
||||||
|
@ -97,6 +99,16 @@ class SuitInvasionManagerAI:
|
||||||
if type == INVASION_TYPE_NORMAL:
|
if type == INVASION_TYPE_NORMAL:
|
||||||
timeout = config.GetInt('invasion-timeout', 1800)
|
timeout = config.GetInt('invasion-timeout', 1800)
|
||||||
taskMgr.doMethodLater(timeout, self.stopInvasion, 'invasionTimeout')
|
taskMgr.doMethodLater(timeout, self.stopInvasion, 'invasionTimeout')
|
||||||
|
|
||||||
|
# If this is a mega invasion, and the players take to long to defeat
|
||||||
|
# all of the cogs, we want the invasion to take a bit longer to timeout:
|
||||||
|
if type == INVASION_TYPE_MEGA:
|
||||||
|
timeout = config.GetInt('invasion-timeout', 3200)
|
||||||
|
|
||||||
|
# If this is a brutal invasion, the players will have a very long time to
|
||||||
|
# Defeat the cogs before the invasion times out:
|
||||||
|
if type == INVASION_TYPE_BRUTAL:
|
||||||
|
timeout = config.GetInt('invasion-timeout', 10000)
|
||||||
|
|
||||||
self.sendInvasionStatus()
|
self.sendInvasionStatus()
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1657,7 +1657,7 @@ AV_TOUCH_CHECK_DIST_Z = 5.0
|
||||||
AV_TOUCH_CHECK_TIMELIMIT_CL = 0.002
|
AV_TOUCH_CHECK_TIMELIMIT_CL = 0.002
|
||||||
AV_TOUCH_COUNT_LIMIT = 5
|
AV_TOUCH_COUNT_LIMIT = 5
|
||||||
AV_TOUCH_COUNT_TIME = 300
|
AV_TOUCH_COUNT_TIME = 300
|
||||||
GloveCost = 2000
|
GloveCost = 1
|
||||||
|
|
||||||
# Buffs...
|
# Buffs...
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue