diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py index 876b5682..abb41b6f 100644 --- a/toontown/battle/DistributedBattleBaseAI.py +++ b/toontown/battle/DistributedBattleBaseAI.py @@ -1620,6 +1620,8 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas toon.inventory.zeroInv(1) deadToons.append(activeToon) self.notify.debug('AFTER ROUND: toon: %d setHp: %d' % (toon.doId, toon.hp)) + if toon.unlimitedGags: + toon.doRestock(noUber=0, noPaid=0) for deadToon in deadToons: self.__removeToon(deadToon) diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index 227ba20b..cdad97c2 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -689,10 +689,11 @@ class CatalogScreen(DirectFrame): self.clarabelleFrame = DirectLabel(self, relief=None, image=guiItems.find('**/clarabelle_frame')) hangupGui = guiItems.find('**/hangup') hangupRolloverGui = guiItems.find('**/hangup_rollover') - self.hangup = DirectButton(base.a2dBottomRight, relief=None, pos=(-0.158, 0, 0.14), scale=(0.7, 0.7, 0.7), image=[hangupGui, + self.hangup = DirectButton(self, relief=None, pos=(-0.158, 0, 0.14), scale=(0.7, 0.7, 0.7), image=[hangupGui, hangupRolloverGui, hangupRolloverGui, hangupGui], text=['', TTLocalizer.CatalogHangUp, TTLocalizer.CatalogHangUp], text_fg=Vec4(1), text_scale=0.07, text_pos=(0.0, 0.14), command=self.hangUp) + self.hangup.reparentTo(base.a2dBottomRight) self.beanBank = DirectLabel(self, relief=None, image=guiItems.find('**/bean_bank'), text=str(base.localAvatar.getMoney() + base.localAvatar.getBankMoney()), text_align=TextNode.ARight, text_scale=0.11, text_fg=(0.95, 0.95, 0, 1), text_shadow=(0, 0, 0, 1), text_pos=(0.75, -0.81), text_font=ToontownGlobals.getSignFont()) nextUp = guiItems.find('**/arrow_up') nextRollover = guiItems.find('**/arrow_Rollover') diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 8919853d..d6ba7e66 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -2307,6 +2307,9 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def setImmortalMode(self, flag): self.immortalMode = flag + def setUnlimitedGags(self, flag): + self.unlimitedGags = flag + def b_setSpeedChatStyleIndex(self, index): self.setSpeedChatStyleIndex(index) self.d_setSpeedChatStyleIndex(index) @@ -5159,3 +5162,17 @@ def disguise(command, suitIndex, value): return 'Merits set.' else: return 'Unknow command: %s' % command + +@magicWord(category=CATEGORY_PROGRAMMER) +def unlimitedGags(): + """ Restock avatar's gags at the start of each round. """ + av = spellbook.getTarget() if spellbook.getInvokerAccess() >= 500 else spellbook.getInvoker() + av.setUnlimitedGags(not av.unlimitedGags) + return 'Toggled unlimited gags %s for %s' % ('ON' if av.unlimitedGags else 'OFF', av.getName()) + +@magicWord(category=CATEGORY_PROGRAMMER) +def immortal(): + """ Make target (if 500+) or self (if 499-) immortal. """ + av = spellbook.getTarget() if spellbook.getInvokerAccess() >= 500 else spellbook.getInvoker() + av.setImmortalMode(not av.immortalMode) + return 'Toggled immortal mode %s for %s' % ('ON' if av.immortalMode else 'OFF', av.getName())