|
|
|
@ -466,8 +466,20 @@ class LevelSelect(Animation):
|
|
|
|
|
y = 250
|
|
|
|
|
indent = 10
|
|
|
|
|
dsr = self.get_display_surface().get_rect()
|
|
|
|
|
self.platforms = [Platform(self, (0, y)), Platform(self, (dsr.centerx, y)), Platform(self, (0, y))]
|
|
|
|
|
self.platforms = [Platform(self, (0, y)), Platform(self, (0, y)), Platform(self, (0, y))]
|
|
|
|
|
scale = .75
|
|
|
|
|
for platform in self.platforms:
|
|
|
|
|
for ii, frame in enumerate(platform.view.frames):
|
|
|
|
|
scaled = pygame.transform.smoothscale(frame, (int(frame.get_width() * scale), int(frame.get_height() * scale)))
|
|
|
|
|
platform.view.frames[ii] = scaled
|
|
|
|
|
platform.view.get_current_frameset().measure_rect()
|
|
|
|
|
platform.view.update_location_size()
|
|
|
|
|
for corner in platform.glow_masks:
|
|
|
|
|
for ii, frame in enumerate(corner):
|
|
|
|
|
scaled = pygame.transform.smoothscale(frame, (int(frame.get_width() * scale), int(frame.get_height() * scale)))
|
|
|
|
|
corner[ii] = scaled
|
|
|
|
|
self.platforms[0].view.location.left = dsr.left + indent
|
|
|
|
|
self.platforms[1].view.location.centerx = dsr.centerx
|
|
|
|
|
self.platforms[2].view.location.right = dsr.right - indent
|
|
|
|
|
self.platforms[0].set_glowing((NS.LNW, NS.LSE))
|
|
|
|
|
self.platforms[1].set_glowing((NS.LNW, NS.LSW))
|
|
|
|
@ -1963,9 +1975,8 @@ class Boss(Animation):
|
|
|
|
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Boil"), True)
|
|
|
|
|
self.boss_sprites[-1].add_frameset(name="hurt", switch=True)
|
|
|
|
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Hit"), True)
|
|
|
|
|
if path.joinpath(f"{prefix}Death").exists():
|
|
|
|
|
self.boss_sprites[-1].add_frameset(name="death", switch=True)
|
|
|
|
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Death"), True)
|
|
|
|
|
self.boss_sprites[-1].add_frameset(name="death", switch=True)
|
|
|
|
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Death"), True)
|
|
|
|
|
self.boss_sprites[-1].add_frameset(name="entrance", switch=True)
|
|
|
|
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Intro"), True)
|
|
|
|
|
self.boss_sprites[-1].location.topleft = 207, 10
|
|
|
|
@ -2338,10 +2349,7 @@ class Boss(Animation):
|
|
|
|
|
self.queue = []
|
|
|
|
|
self.brandish_complete = True
|
|
|
|
|
if win:
|
|
|
|
|
if "death" in [str(frameset) for frameset in self.level_sprite().framesets]:
|
|
|
|
|
self.level_sprite().set_frameset("death")
|
|
|
|
|
else:
|
|
|
|
|
self.level_sprite().set_frameset("hurt")
|
|
|
|
|
self.level_sprite().set_frameset("hurt")
|
|
|
|
|
if self.get_configuration("system", "enable-level-select"):
|
|
|
|
|
self.get_game().add_time_to_scores(self.time_elapsed, self.level_index)
|
|
|
|
|
elif self.level_index == 2:
|
|
|
|
@ -2992,12 +3000,18 @@ class Ending(Animation):
|
|
|
|
|
"""
|
|
|
|
|
Add a sword to the list based on what button is pressed. Remove swords that are out of view.
|
|
|
|
|
"""
|
|
|
|
|
if self.get_game().platform.get_edge_pressed() is not None:
|
|
|
|
|
edge = self.get_game().platform.get_edge_pressed()
|
|
|
|
|
if edge is not None:
|
|
|
|
|
sprite = Sprite(self)
|
|
|
|
|
# Add frames from Boss->Sword storage
|
|
|
|
|
for frame in self.get_game().boss.sword.swords[0][self.get_game().platform.get_edge_pressed()]:
|
|
|
|
|
for frame in self.get_game().boss.sword.swords[0][edge]:
|
|
|
|
|
sprite.add_frame(frame)
|
|
|
|
|
sprite.location.center = self.slime_bag.location.center
|
|
|
|
|
if edge == NS.W:
|
|
|
|
|
sprite.location.midleft = self.slime_bag.location.midleft
|
|
|
|
|
elif edge == NS.E:
|
|
|
|
|
sprite.location.midright = self.slime_bag.location.midright
|
|
|
|
|
else:
|
|
|
|
|
sprite.location.center = self.slime_bag.location.center
|
|
|
|
|
self.swords.append(sprite)
|
|
|
|
|
outgoing = []
|
|
|
|
|
for sword in self.swords:
|
|
|
|
|