def handle_can_be_learned_intent(self, message): if self.wav_mode: play( os.path.join(skill_path, 'audio/tragedy of darth plagueis 5.wav')) led.wait(1, led.LED.ON) else: self.speak("Not from a Jedi")
def stop(self): if self.started and not self.darkside: if self.wav_mode: play(os.path.join(skill_path,'audio/tragedy of darth plagueis 3.wav')) led.wait(8) else: self.speak("The dark side of the Force is a pathway to many abilities some consider to be unnatural.") return True
def handle_save_from_death_intent(self, message): if self.wav_mode: play( os.path.join(skill_path, 'audio/tragedy of darth plagueis 3.wav')) led.wait(8) self.speak(" ", expect_response=True) else: self.speak( "The dark side of the Force is a pathway to many abilities some consider to be unnatural.", expect_response=True) self.darkside = True
def handle_darth_plagueis_intent(self, message): self.started = True # choice = self.get_response("Did you ever hear the tragedy of Darth Plagueis the Wise?") if self.wav_mode: play( os.path.join(skill_path, 'audio/tragedy of darth plagueis 1.wav')) led.wait(5) self.speak(" ", expect_response=True) else: self.speak( "Did you ever hear the tragedy of Darth Plagueis the Wise?") # ToDo: find a better way to move to the next line if there is no response # the blank dialog below does not work with the Google TTS, so removed '''
def story(self): if self.wav_mode: play( os.path.join(skill_path, 'audio/tragedy of darth plagueis 2.wav')) led.wait(35) self.speak(" ", expect_response=True) else: self.speak("I thought not.") self.speak("It's not a story the Jedi would tell you.") self.speak("It's a Sith legend.") self.speak( "Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force " "to influence the midichlorians to create life...") self.speak( "He had such a knowledge of the dark side that he could even keep the ones he cared about " "from dying.", expect_response=True)
def what_happened_intent(self, message): if self.wav_mode: play( os.path.join(skill_path, 'audio/tragedy of darth plagueis 4.wav')) led.wait(31) self.speak(" ", expect_response=True) else: self.speak( "He became so powerful... " "the only thing he was afraid of was losing his power, which eventually, of course, he did." ) self.speak( "Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep." ) sleep(0.4) self.speak( "It's ironic he could save others from death, but not himself.", expect_response=True)