mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
New magic word: ~secondVP - skips to second battle
This commit is contained in:
parent
ce8d856ebe
commit
80b5e4c548
2 changed files with 22 additions and 13 deletions
|
@ -38,7 +38,7 @@ class DistributedCashbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
|
||||||
|
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
DistributedBossCog.DistributedBossCog.__init__(self, cr)
|
DistributedBossCog.DistributedBossCog.__init__(self, cr)
|
||||||
FSM.FSM.__init__(self, 'DistributedSellbotBoss')
|
FSM.FSM.__init__(self, 'DistributedCashbotBoss')
|
||||||
self.resistanceToon = None
|
self.resistanceToon = None
|
||||||
self.resistanceToonOnstage = 0
|
self.resistanceToonOnstage = 0
|
||||||
self.cranes = {}
|
self.cranes = {}
|
||||||
|
|
|
@ -403,18 +403,32 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
|
||||||
def enterReward(self):
|
def enterReward(self):
|
||||||
DistributedBossCogAI.DistributedBossCogAI.enterReward(self)
|
DistributedBossCogAI.DistributedBossCogAI.enterReward(self)
|
||||||
|
|
||||||
|
def getVP(invoker):
|
||||||
|
for do in simbase.air.doId2do.values():
|
||||||
|
if isinstance(do, DistributedSellbotBossAI):
|
||||||
|
if invoker.doId in do.involvedToons:
|
||||||
|
return do
|
||||||
|
|
||||||
|
@magicWord(category=CATEGORY_ADMINISTRATOR)
|
||||||
|
def secondVP():
|
||||||
|
"""
|
||||||
|
Skips to the second round of the VP.
|
||||||
|
"""
|
||||||
|
invoker = spellbook.getInvoker()
|
||||||
|
boss = getVP(invoker)
|
||||||
|
if not boss:
|
||||||
|
return "You aren't in a VP!"
|
||||||
|
boss.exitIntroduction()
|
||||||
|
boss.b_setState('RollToBattleTwo')
|
||||||
|
return 'Skipping to the second round...'
|
||||||
|
|
||||||
@magicWord(category=CATEGORY_ADMINISTRATOR)
|
@magicWord(category=CATEGORY_ADMINISTRATOR)
|
||||||
def skipVP():
|
def skipVP():
|
||||||
"""
|
"""
|
||||||
Skips to the final round of the VP.
|
Skips to the final round of the VP.
|
||||||
"""
|
"""
|
||||||
invoker = spellbook.getInvoker()
|
invoker = spellbook.getInvoker()
|
||||||
boss = None
|
boss = getVP(invoker)
|
||||||
for do in simbase.air.doId2do.values():
|
|
||||||
if isinstance(do, DistributedSellbotBossAI):
|
|
||||||
if invoker.doId in do.involvedToons:
|
|
||||||
boss = do
|
|
||||||
break
|
|
||||||
if not boss:
|
if not boss:
|
||||||
return "You aren't in a VP!"
|
return "You aren't in a VP!"
|
||||||
if boss.state in ('PrepareBattleThree', 'BattleThree'):
|
if boss.state in ('PrepareBattleThree', 'BattleThree'):
|
||||||
|
@ -429,12 +443,7 @@ def killVP():
|
||||||
Kills the VP.
|
Kills the VP.
|
||||||
"""
|
"""
|
||||||
invoker = spellbook.getInvoker()
|
invoker = spellbook.getInvoker()
|
||||||
boss = None
|
boss = getVP(invoker)
|
||||||
for do in simbase.air.doId2do.values():
|
|
||||||
if isinstance(do, DistributedSellbotBossAI):
|
|
||||||
if invoker.doId in do.involvedToons:
|
|
||||||
boss = do
|
|
||||||
break
|
|
||||||
if not boss:
|
if not boss:
|
||||||
return "You aren't in a VP!"
|
return "You aren't in a VP!"
|
||||||
boss.b_setState('Victory')
|
boss.b_setState('Victory')
|
||||||
|
|
Loading…
Reference in a new issue