Advertisement
Guest User

DistributedBossCreature.py

a guest
Jan 26th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. from pandac.PandaModules import Vec4
  2. from direct.directnotify import DirectNotifyGlobal
  3. from pirates.creature.DistributedCreature import DistributedCreature
  4. from pirates.pirate import AvatarTypes
  5. from pirates.npc.Boss import Boss
  6. CreatureTypes = {
  7. AvatarTypes.Crab: AvatarTypes.Crab,
  8. AvatarTypes.RockCrab: AvatarTypes.Crab,
  9. AvatarTypes.StoneCrab: AvatarTypes.Crab,
  10. AvatarTypes.GiantCrab: AvatarTypes.Crab,
  11. AvatarTypes.CrusherCrab: AvatarTypes.Crab,
  12. AvatarTypes.Stump: AvatarTypes.Stump,
  13. AvatarTypes.TwistedStump: AvatarTypes.Stump,
  14. AvatarTypes.FlyTrap: AvatarTypes.FlyTrap,
  15. AvatarTypes.RancidFlyTrap: AvatarTypes.FlyTrap,
  16. AvatarTypes.AncientFlyTrap: AvatarTypes.FlyTrap,
  17. AvatarTypes.Scorpion: AvatarTypes.Scorpion,
  18. AvatarTypes.DireScorpion: AvatarTypes.Scorpion,
  19. AvatarTypes.DreadScorpion: AvatarTypes.Scorpion,
  20. AvatarTypes.Alligator: AvatarTypes.Alligator,
  21. AvatarTypes.BayouGator: AvatarTypes.Alligator,
  22. AvatarTypes.BigGator: AvatarTypes.Alligator,
  23. AvatarTypes.HugeGator: AvatarTypes.Alligator,
  24. AvatarTypes.Bat: AvatarTypes.Bat,
  25. AvatarTypes.RabidBat: AvatarTypes.Bat,
  26. AvatarTypes.VampireBat: AvatarTypes.Bat,
  27. AvatarTypes.FireBat: AvatarTypes.Bat,
  28. AvatarTypes.Wasp: AvatarTypes.Wasp,
  29. AvatarTypes.KillerWasp: AvatarTypes.Wasp,
  30. AvatarTypes.AngryWasp: AvatarTypes.Wasp,
  31. AvatarTypes.SoldierWasp: AvatarTypes.Wasp }
  32.  
  33. class DistributedBossCreature(DistributedCreature, Boss):
  34. notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossCreature')
  35.  
  36. def __init__(self, cr):
  37. DistributedCreature.__init__(self, cr)
  38. Boss.__init__(self, cr)
  39.  
  40.  
  41. def setupCreature(self, avatarType):
  42. self.loadBossData(self.getUniqueId(), avatarType)
  43. DistributedCreature.setupCreature(self, avatarType)
  44.  
  45.  
  46. def announceGenerate(self):
  47. DistributedCreature.announceGenerate(self)
  48. if not self.isInInvasion():
  49. avType = CreatureTypes[self.avatarType.getNonBossType()]
  50. self.addBossEffect(avType)
  51.  
  52.  
  53.  
  54. def disable(self):
  55. self.removeBossEffect()
  56. DistributedCreature.disable(self)
  57.  
  58.  
  59. def getEnemyScale(self):
  60. return Boss.getEnemyScale(self)
  61.  
  62.  
  63. def getBossEffect(self):
  64. return Boss.getBossEffect(self)
  65.  
  66.  
  67. def getBossHighlightColor(self):
  68. return Boss.getBossHighlightColor(self)
  69.  
  70.  
  71. def getShortName(self):
  72. return Boss.getShortName(self)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement