def DoIntro(self, on): if on: self.Intro = self.Introduction() self.bDoingIntro = True else: self.bDoingIntro = False # start cams over from first camera self.StaticCamIterator = iter(self.StaticCams) self.WatchCamIterator = iter(self.WatchCams) for sound in self.intro_sounds.itervalues(): plus.stopSound(sound) plus.removeSound(sound) if self.intro_music: plus.stopSound(self.intro_music) plus.removeSound(self.intro_music) plus.introComplete()
def __del__(self): plus.removeSound(self.soundHandle)
def __del__(self): plus.removeSound(self.zapsound) plus.removeSound(self.chargesound)
def __del__(self): plus.removeSound(self.flamesound)
def __del__(self): plus.removeSound(self.slidesound)
def Secret(self, bTarget): #This is definitely NOT a secret super death AI for Spinner from the west!!! You don't need to scroll down any further!!! # Tauntauns if self.numComps > 0: if plus.getTimeElapsed() < 3: self.tauntbox.get("taunt1").setText("I have been waiting a long time for this.") if 3 < plus.getTimeElapsed() < 5: self.tauntbox.get("taunt1").setText("Go on, squirm!") if 5 < plus.getTimeElapsed() < 8: self.tauntbox.get("taunt1").setText("Just try and budge that useless hood ornament you call a weapon!") if 8 < plus.getTimeElapsed() < 10: self.tauntbox.get("taunt1").setText("Squirm like the worm you are!") if 10 < plus.getTimeElapsed() < 12: self.tauntbox.get("taunt1").setText("Your struggles will not avail you...") if 12 < plus.getTimeElapsed() < 16: self.tauntbox.get("taunt1").setText("...against the power of the EYE OF THE WEST!") if 16 < plus.getTimeElapsed() < 18: self.tauntbox.get("taunt1").setText("Long have I tolerated your abuse, but NO LONGER!") if 18 < plus.getTimeElapsed() < 22: self.tauntbox.get("taunt1").setText("With the power of the Western Eye at my command, I AM INVINCIBLE!") if 22 < plus.getTimeElapsed() < 24: self.tauntbox.get("taunt1").setText("Now... suffer.") if 24 < plus.getTimeElapsed() < 27: self.tauntbox.get("taunt1").setText("Know the black depths of pain you have inflicted upon me!") if 27 < plus.getTimeElapsed() < 29: self.tauntbox.get("taunt1").setText("FEEL THE WRATH OF THE WEST!") if 29 < plus.getTimeElapsed() < 32: self.tauntbox.get("taunt1").setText("HA HA HA HA HA HA HA HA HA HA HA HA HA...") #stay put unless we're being counted out if not self.bImmobile: self.Throttle(0) for bot in self.bids: #cool psychic lightning effects self.arena.SetLightningStartEnd(bot, self.GetLocation(), plus.getLocation(bot)) self.zaptimer += 1 if self.zaptimer > 4: plus.zap(bot, 20, 1) self.zaptimer = 0 #apply more force as bots get further from center self.xforce = -1 * plus.getLocation(bot)[0] * plus.getWeight(bot) self.yforce = -30 * (plus.getLocation(bot)[1] - self.yCenter) * plus.getWeight(bot) self.zforce = -1 * plus.getLocation(bot)[2] * plus.getWeight(bot) plus.force(bot, self.xforce, self.yforce, self.zforce) #summon THE EYE OF THE WEST if abs(plus.getLocation(bot)[0]) < 2 and abs(plus.getLocation(bot)[2]) < 2 and self.eyetimer == 0: self.summon = 1 plus.removeSound(self.psygrab) if self.summon == 1 and self.eyetimer < 17: self.eyetimer += 0.25 if 0 < self.eyetimer <= 8 and self.eyetimer%1 == 0: plus.AddParticleEmitter((4*math.cos((math.pi/8)*self.eyetimer), (self.yCenter - 6), 4*math.sin((math.pi/8)*self.eyetimer)), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((4*math.cos((math.pi/8)*self.eyetimer + math.pi), (self.yCenter - 6), 4*math.sin((math.pi/8)*self.eyetimer + math.pi)), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 9: plus.AddParticleEmitter((1, (self.yCenter - 6), 3), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-1, (self.yCenter - 6), -3), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 10: plus.AddParticleEmitter((1.6, (self.yCenter - 6), 2), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-1.6, (self.yCenter - 6), -2), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 11: plus.AddParticleEmitter((1.9, (self.yCenter - 6), 1), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-1.9, (self.yCenter - 6), -1), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 12: plus.AddParticleEmitter((2, (self.yCenter - 6), 0), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-2, (self.yCenter - 6), 0), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 13: plus.AddParticleEmitter((1.9, (self.yCenter - 6), -1), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-1.9, (self.yCenter - 6), 1), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 14: plus.AddParticleEmitter((1.6, (self.yCenter - 6), -2), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-1.6, (self.yCenter - 6), 2), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 15: plus.AddParticleEmitter((1, (self.yCenter - 6), -3), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.AddParticleEmitter((-1, (self.yCenter - 6), 3), (0, 3, 0), (1, 5, 1)).SetEmitting(True) plus.playSound(self.flamepuff) if self.eyetimer == 16: plus.AddParticleEmitter((0, (self.yCenter - 6), 0), (0, 16, 0), (1, 16, 1)).SetEmitting(True) plus.playSound(self.eye) plus.removeSound(self.flamepuff) self.timetodie = 1 #remove enemy components one by one if self.timetodie == 1: if self.numComps > 0: self.numComps -= 0.25 if self.numComps%1 == 0: plus.addPoints(self.GetID(), 1337) for bot in self.bids: if self.numComps > 0: plus.emitSmoke(30, (plus.getLocation(bot)), (0, 0, 0), (5, 5, 5)) plus.damage(bot, self.numComps, 100000, plus.getLocation(bot)) plus.damage(bot, self.numComps, 100000, plus.getLocation(bot)) plus.addPoints(bot, -1000) #finishing blow if self.numComps == 0: if self.smoker == 32: plus.removeSound(self.eye) plus.fadeInToLoop(self.finale, -100, 3200) self.tauntbox.get("taunt1").setText("Do you hear that sound? Know what it is?") if self.smoker > 1: self.smoker -= 0.5 self.smoketimer += 0.1 self.smokeh = (self.yCenter - 6) + (6 * ((1 / self.smoker) ** 2)) #SMOKE TORNADO plus.emitSmoke(30, ((self.smoker * (math.cos((math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((math.pi/2) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((math.pi/2) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((3*math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((3*math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((math.pi) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((math.pi) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((5*math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((5*math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((3*math.pi/2) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((3*math.pi/2) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((7*math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((7*math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) plus.emitSmoke(30, ((self.smoker * (math.cos((2*math.pi) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((2*math.pi) + self.smoketimer)))), (0, 0, 0), (5, 8, 5)) if self.smoker == 24: self.tauntbox.get("taunt1").setText("That is the sound of your death approaching.") if self.smoker == 16: self.tauntbox.get("taunt1").setText("At last... vengeance shall be mine.") if self.smoker == 8: self.tauntbox.get("taunt1").setText("HA HA HA HA HA HA HA HA HA HA HA HA HA...") if self.smoker == 2: plus.stopAllSounds() plus.playSound(self.charge) if self.smoker == 1: plus.removeSound(self.charge) plus.playSound(self.bang) self.smoker = 0.9 plus.fadeFromBlack(6) for bot in self.bids: #must un-disable bots in order to kill them plus.disable(bot, 0) self.arena.SetLightningVisible(bot, False) plus.damage(bot, 0, 100000, plus.getLocation(bot)) plus.damage(bot, 0, 100000, plus.getLocation(bot)) plus.damage(bot, 0, 100000, plus.getLocation(bot)) plus.damage(bot, 0, 100000, plus.getLocation(bot)) #reset numLosses file("adaptiveAI_2.txt", "w").write("0")
def __del__(self): plus.removeSound(self.scoresound) Arenas.SuperArena.__del__(self)
def __del__(self): if self.endmusic: plus.stopSound(self.endmusic) plus.removeSound(self.endmusic)
def __del__(self): if self.bHazardsOn: plus.removeSound(self.ambience) Arenas.SuperArena.__del__(self)