Add config option to give SOS cards

This commit is contained in:
DenialMC 2015-04-10 14:08:35 +03:00
parent d0daa44f93
commit fa78289835
4 changed files with 8 additions and 3 deletions

View file

@ -96,6 +96,9 @@ want-resistance-dance #f
# Cog battles: # Cog battles:
base-xp-multiplier 1.0 base-xp-multiplier 1.0
# SOS toons:
sos-card-reward 2
# Cog Dominiums # Cog Dominiums
want-emblems #t want-emblems #t
cogdo-want-barrel-room #t cogdo-want-barrel-room #t

View file

@ -487,7 +487,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI, FSM.FSM):
toon = self.air.doId2do.get(v) toon = self.air.doId2do.get(v)
if toon: if toon:
if self.FOType == 's': if self.FOType == 's':
if not toon.attemptAddNPCFriend(self.sosNPC, numCalls=1): if not toon.attemptAddNPCFriend(self.sosNPC):
self.notify.info('%s unable to add NPCFriend %s to %s.' % (self.doId, self.sosNPC, v)) self.notify.info('%s unable to add NPCFriend %s to %s.' % (self.doId, self.sosNPC, v))
elif self.FOType == 'l': elif self.FOType == 'l':

View file

@ -349,7 +349,7 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
for toonId in self.involvedToons: for toonId in self.involvedToons:
toon = self.air.doId2do.get(toonId) toon = self.air.doId2do.get(toonId)
if toon: if toon:
if not toon.attemptAddNPCFriend(self.cagedToonNpcId, numCalls=1): if not toon.attemptAddNPCFriend(self.cagedToonNpcId):
self.notify.info('%s.unable to add NPCFriend %s to %s.' % (self.doId, self.cagedToonNpcId, toonId)) self.notify.info('%s.unable to add NPCFriend %s to %s.' % (self.doId, self.cagedToonNpcId, toonId))
toon.b_promote(self.deptIndex) toon.b_promote(self.deptIndex)

View file

@ -648,7 +648,9 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
def resetNPCFriendsDict(self): def resetNPCFriendsDict(self):
self.b_setNPCFriendsDict([]) self.b_setNPCFriendsDict([])
def attemptAddNPCFriend(self, npcFriend, numCalls = 1): def attemptAddNPCFriend(self, npcFriend):
numCalls = simbase.air.config.GetInt('sos-card-reward', 1)
if numCalls <= 0: if numCalls <= 0:
self.notify.warning('invalid numCalls: %d' % numCalls) self.notify.warning('invalid numCalls: %d' % numCalls)
return 0 return 0