'When Mario jumps on the Koopa and puts him in his shell'

def jumped_on(self):

    self.x_vel = 0
    self.frame_index = 2
    shell_y = self.rect.bottom
    shell_x = self.rect.x
    self.rect = self.frames[self.frame_index].get_rect()
    self.rect.x = shell_x
    self.rect.bottom = shell_y
