Changeset 1635
- Timestamp:
- 07/22/08 02:38:52 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/games/minionsofmirth/v1/experimental/new-stuff/mud/world/defines.py
r1614 r1635 534 534 # Never generate aggro based on realm or factions, only when provoked. 535 535 RPG_SPAWN_PASSIVE = 1 << 8 536 # Don't generate any loot at all. 537 RPG_SPAWN_NORANDOMLOOT = 1 << 9 536 538 # Player monster received template advancement points if set. 537 539 # Exists so old monsters can be given their missing advancement branches/games/minionsofmirth/v1/experimental/new-stuff/mud/world/loot.py
r1614 r1635 219 219 if len(loot) == 16: 220 220 break 221 221 222 # Check if this particular spawn drops random loot or if the loot 223 # table already is maxed out. 224 if len(loot) >= 16 or spawn.flags & RPG_SPAWN_NORANDOMLOOT: 225 # No random loot or loot table full, 226 # so finish the corpse loot generation. 227 return self.finishCorpseLootGeneration() 228 222 229 #Start code added by BellyFish 223 230 # Zone dependent Seasonal drops 224 if len(loot) < 16 andZONE_SEASONALITEMS.has_key(self.mob.zone.zone.name):231 if ZONE_SEASONALITEMS.has_key(self.mob.zone.zone.name): 225 232 # check if mob can have a Seasonal drop, a 1 in 4 chance 226 233 # as the ZONE_SEASONALITEMS list increases for the same time period the chance for a … … 510 517 traceback.print_exc() 511 518 519 # Finish corpse loot generation. 520 return self.finishCorpseLootGeneration() 521 522 523 def finishCorpseLootGeneration(self): 512 524 # Now assign to every item in the loot table a random 513 525 # repair value if the item makes use of one. 514 for item in loot:526 for item in self.items: 515 527 if not (item.flags & RPG_ITEM_INDESTRUCTIBLE) and item.repairMax > 0: 516 528 if item.repairMax == 1: … … 521 533 # Return True if this mob got something to loot, 522 534 # otherwise False. 523 if len(loot): 524 self.items = loot 525 return True 526 if self.tin: 527 return True 528 return False 535 return (self.tin or len(self.items)) 529 536 530 537

