<commit_before>import pygame
from utils import *
from ability import Ability
from characters.transformed import Transformed
from characters.directions import Directions

# Revert is called in switch, it is used to revert Biggie back to his normal size
class Revert(Ability):

	def __init__(self):
		Ability.__init__(self, "revert", pygame.K_r)

	# Revert before switching so Biggie = AI
	# Revert his rec/image and unlock him
	def cast(self, c):
		if c.AI.status == Transformed.Ladder:
			c.AI.image = pygame.transform.scale(c.AI.image, (BIGGIE_WIDTH, BIGGIE_HEIGHT))
			c.AI.rect = pygame.Rect(c.AI.rect.left, c.AI.rect.top - BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)
		elif c.AI.status == Transformed.Bridge:
			c.lvl_current.platform_list.remove(c.AI)
			c.AI.image = pygame.transform.scale(c.AI.image, (BIGGIE_WIDTH, BIGGIE_HEIGHT))
			if c.AI.heading == Directions.Left:
				c.AI.rect = pygame.Rect(c.AI.rect.left - BIGGIE_WIDTH, c.AI.rect.top - BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)
			elif c.AI.heading == Directions.Right:
				c.AI.rect = pygame.Rect(c.AI.rect.right, c.AI.rect.top - BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)
			else:
				print "PROBLEM#"
		elif c.AI.status == Transformed.Wall:
			c.lvl_current.platform_list.remove(c.AI)
			c.AI.image = pygame.transform.scale(c.AI.image, (BIGGIE_WIDTH, BIGGIE_HEIGHT))
			c.AI.rect = pygame.Rect(c.AI.rect.left, c.AI.rect.top + BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)

		c.AI.locked = False
		c.AI.status = Transformed.Default<commit_msg>Biggie now reverts to the left of tracey<commit_after>import pygame
from utils import *
from ability import Ability
from characters.transformed import Transformed
from characters.directions import Directions

# Revert is called in switch, it is used to revert Biggie back to his normal size
class Revert(Ability):

	def __init__(self):
		Ability.__init__(self, "revert", pygame.K_r)

	# Revert before switching so Biggie = AI
	# Revert his rec/image and unlock him
	def cast(self, c):
		if c.AI.status == Transformed.Ladder:
			c.AI.image = pygame.transform.scale(c.AI.image, (BIGGIE_WIDTH, BIGGIE_HEIGHT))
			c.AI.rect = pygame.Rect(c.AI.rect.left, c.AI.rect.top - BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)
		elif c.AI.status == Transformed.Bridge:
			c.lvl_current.platform_list.remove(c.AI)
			c.AI.image = pygame.transform.scale(c.AI.image, (BIGGIE_WIDTH, BIGGIE_HEIGHT))
			if c.AI.heading == Directions.Left:
				c.AI.rect = pygame.Rect(c.AI.rect.left - BIGGIE_WIDTH, c.AI.rect.top - BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)
			elif c.AI.heading == Directions.Right:
				c.AI.rect = pygame.Rect(c.AI.rect.right, c.AI.rect.top - BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)
			else:
				print "PROBLEM#"
		elif c.AI.status == Transformed.Wall:
			c.lvl_current.platform_list.remove(c.AI)
			c.AI.image = pygame.transform.scale(c.AI.image, (BIGGIE_WIDTH, BIGGIE_HEIGHT))
			c.AI.rect = pygame.Rect(c.AI.rect.left, c.AI.rect.top + BIGGIE_HEIGHT, BIGGIE_WIDTH, BIGGIE_HEIGHT)

		c.AI.rect.right = c.player.rect.left
		c.AI.rect.bottom = c.player.rect.bottom
		c.AI.locked = False
		c.AI.status = Transformed.Default
{'fraction_non_alphanumeric': 0.12380344607530312, 'fraction_numerical': 0.0, 'mean_word_length': 4.105863192182411, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7522518', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1222, 'n_words': 242}