Esempio n. 1
0
 def puzzle_complete():
     notify(
         self.world, self.small_font,
         "You got a crack in it. Thanks for nothing.", self,
         text.TextScene(
             "NaN was depressed. For the majority of his life he was the strongest, fastest, all around best adventurer in the whole realm. But it was his own effectiveness led to his now pitiful existence.",
             SceneSix()))
Esempio n. 2
0
        def dragon_hit():
            #I extracted the GIF Frames from my gif img of 8bit explosion and placed in nan/images/gifframes
            #Total of 23 frames, I will do for i in range(23) and update the image for each frame. Delay 0.05s
            #Create Entities
            frame = 1
            
            explosion1 = create_entity(self.world,"gifframes/frame_0_delay-0.05s.png",pygame.Rect(853,121,80,80))
            
            time.sleep(0.5)
            self.world.component_for_entity(explosion1,components.Image).image = pygame.image.load("images/gifframes/frame_" + str(frame) + "_delay-0.05s.png")
            frame=frame+1
                
                
                
            
            self.world.component_for_entity(dragon, components.Animation).frame = 1
            damage = notify(self.world, self.font, "999,999,999,999,999,999", self, text.TextScene("And thusly the skilled adventurer NaN took out yet another dragon. Dragon killing was no longer a dangerous quest but rather routine cleaning. With the dragon population dwindling NaN had time to help more people with their non life threatening problems.", SceneTwo()))
            image = self.font.render("999,999,999,999,999,999", False, (255, 128, 0))

            self.world.component_for_entity(damage, components.Image).image = image
            self.world.component_for_entity(damage, components.Position).x = 960
            self.world.component_for_entity(damage, components.Position).y = 320
            self.world.component_for_entity(damage, components.Size).width = image.get_width()
            self.world.component_for_entity(damage, components.Size).height = image.get_height()
        
            pygame.mixer.Sound(os.path.join(components.get_base_path(), 'audio', 'dragon.ogg')).play()
Esempio n. 3
0
 def puzzle_complete():
     notify(
         self.world, self.small_font,
         "You better not have dropped her or anything.", self,
         text.TextScene(
             "With adventuring work in low demand and the cost of living constantly increasing, NaN was forced to stoop to more and more menial work.",
             SceneThree()))
Esempio n. 4
0
 def dragon_hit():
     self.world.component_for_entity(dragon, components.Animation).frame = 1
     damage = notify(self.world, self.font, "Dragon Tamed", self, text.TextScene("Sadly, the dragon refused to be tamed. Instead, though, it granted NaN the power of fireballs! Let's see how this turns out...",SceneEight()))
     image = self.font.render("Dragon Tamed", False, (255, 128, 0))
     self.world.component_for_entity(damage, components.Image).image = image
     self.world.component_for_entity(damage, components.Position).x = 960
     self.world.component_for_entity(damage, components.Position).y = 320
     self.world.component_for_entity(damage, components.Size).width = image.get_width()
     self.world.component_for_entity(damage, components.Size).height = image.get_height()
     pygame.mixer.Sound(os.path.join(components.get_base_path(), 'audio', 'dragon.ogg')).play()
Esempio n. 5
0
 def puzzle_complete():
     p = self.world.component_for_entity(player, components.Player)
     if p.holding is books:
         p.holding = None
     self.world.delete_entity(books)
     notify(
         self.world, self.small_font,
         "Wow, you got the books dirty. I can't use these anymore.",
         self,
         text.TextScene(
             "These thankless jobs took their toll on NaN. He put on a friendly face, but inside he was growing weary...",
             SceneFour()))
Esempio n. 6
0
 def puzzle_complete():
     if self.world.component_for_entity(mug, components.Flammable).lit:
         p = self.world.component_for_entity(player, components.Player)
         if p.holding is mug:
             p.holding = None
         self.world.delete_entity(mug)
         #self.switch_to_scene(text.TextScene("NaN was unsure how much longer he could go on like this. He still wanted to help people, but was filled with thoughts of inadequacy and self doubt.", SceneSeven()))
         notify(self.world, self.small_font, "Way to take your time.", self, text.TextScene("Eventually he'd had enough. He decided he would get revenge on his town for treating him this way.", SceneSeven()))
     else:
         complaint = create_entity(self.world, "speech.png", pygame.Rect(640, 500, 307, 173))
         self.world.add_component(complaint, components.ChangeAlpha(0, 4, interpolation.Smooth()))
         util.drawText(self.world.component_for_entity(complaint, components.Image).image, "It's cold! Heat it up for me.", (255, 255, 255), pygame.Rect(30, 20, 246, 134), self.small_font)
Esempio n. 7
0
 def dragon_hit():
     self.world.component_for_entity(dragon,
                                     components.Animation).frame = 1
     damage = notify(
         self.world, self.font, "999,999,999,999,999,999", self,
         text.TextScene(
             "And thusly the skilled adventurer NaN took out yet another dragon. Dragon killing was no longer a dangerous quest but rather routine cleaning. With the dragon population dwindling NaN had time to help more people with their non life threatening problems.",
             SceneTwo()))
     image = self.font.render("999,999,999,999,999,999", False,
                              (255, 128, 0))
     self.world.component_for_entity(damage,
                                     components.Image).image = image
     self.world.component_for_entity(damage,
                                     components.Position).x = 960
     self.world.component_for_entity(damage,
                                     components.Position).y = 320
     self.world.component_for_entity(
         damage, components.Size).width = image.get_width()
     self.world.component_for_entity(
         damage, components.Size).height = image.get_height()
     pygame.mixer.Sound(
         os.path.join(components.get_base_path(), 'audio',
                      'dragon.ogg')).play()
Esempio n. 8
0
 def puzzle_complete():
     if self.world.component_for_entity(mug, components.Flammable).lit:
         p = self.world.component_for_entity(player, components.Player)
         if p.holding is mug:
             p.holding = None
         self.world.delete_entity(mug)
         #self.switch_to_scene(text.TextScene("NaN was unsure how much longer he could go on like this. He still wanted to help people, but was filled with thoughts of inadequacy and self doubt.", SceneSeven()))
         notify(
             self.world, self.small_font, "Way to take your time.",
             self,
             text.TextScene(
                 "Eventually he'd had enough. There was no way he could go back to adventuring, but he similarly could not stop here. He began a new journey, leaving his town without a single goodbye. Thanks for playing.",
                 title.TitleScene()))
     else:
         complaint = create_entity(self.world, "speech.png",
                                   pygame.Rect(640, 500, 307, 173))
         self.world.add_component(
             complaint,
             components.ChangeAlpha(0, 4, interpolation.Smooth()))
         util.drawText(
             self.world.component_for_entity(complaint,
                                             components.Image).image,
             "It's cold! Heat it up for me.", (255, 255, 255),
             pygame.Rect(30, 20, 246, 134), self.small_font)
Esempio n. 9
0
 def puzzle_complete():
     notify(
         self.world, self.small_font, "Now get out of my barn!", self,
         text.TextScene(
             "Lack of real adventuring work not only wore on NaN, but it dulled him. His body atrophied as his mind numbed, and he realized he could no longer perform the same feats he'd grown accustomed to.",
             SceneFive()))
Esempio n. 10
0
 def puzzle_complete():
     notify(self.world, self.small_font, "MY CAT!!! GET THE HECK OUT OF HERE!!!!", self, text.TextScene("NaN was so overjoyed with his power he decided to slay a dragon. Not just any dragon. The hardest dragon known to man.", SceneTen()))
Esempio n. 11
0
 def puzzle_complete():
     puzzledone = True
     p = self.world.component_for_entity(player, components.Player)
     if p.holding is bed:
         p.holding = None
     self.world.delete_entity(books)
     notify(self.world, self.small_font, "OH MY GOD. MY HOUSE. GET THE HECK OUT OF HERE.", self, text.TextScene("These thankless jobs took their toll on NaN. He put on a friendly face, but inside he was growing weary...", SceneFour()))
Esempio n. 12
0
 def change_scene():
     self.switch_to_scene(
         text.TextScene(
             "This is the story of an adventurer named NaN, known across the land for his unwavering enthusiasm for helping anyone with anything. His abilities were known far and wide, and indeed our story even begins with him defeating a dragon with ease...",
             game.SceneOne()))