<commit_before>from ..utils import *

##
# Minions

# Armorsmith
class EX1_402:
	def OWN_DAMAGE(self, source, target, amount):
		if target.type == CardType.MINION:
			self.controller.hero.armor += 1


# Grommash Hellscream
class EX1_414:
	class Enrage:
		Atk = 6


# Cruel Taskmaster
class EX1_603:
	def action(self, target):
		self.buff(target, "EX1_603e")
		self.hit(target, 1)

class EX1_603e:
	Atk = 2


# Frothing Berserker
class EX1_604:
	def DAMAGE(self, source, target, amount):
		if target.type == CardType.MINION:
			self.buff(self, "EX1_604o")

class EX1_604o:
	Atk = 1


##
# Spells

# Charge
class CS2_103:
	action = buffTarget("CS2_103e2")

class CS2_103e2:
	Atk = 2
	Charge = True


# Rampage
class CS2_104:
	action = buffTarget("CS2_104e")

class CS2_104e:
	Atk = 3
	Health = 3


# Heroic Strike
class CS2_105:
	action = buffSelf("CS2_105e")

class CS2_105e:
	Atk = 4


# Execute
class CS2_108:
	action = destroyTarget


# Cleave
class CS2_114:
	def action(self):
		targets = random.sample(self.controller.opponent.field, 2)
		for target in targets:
			self.hit(target, 2)


# Slam
class EX1_391:
	def action(self, target):
		self.hit(target, 2)
		if target.zone == Zone.PLAY:
			self.controller.draw()


# Battle Rage
class EX1_392:
	def action(self):
		for target in self.controller.getTargets(TARGET_FRIENDLY_CHARACTERS):
			if target.damage:
				self.controller.draw()


# Whirlwind
class EX1_400:
	def action(self):
		for target in self.controller.getTargets(TARGET_ALL_MINIONS):
			self.hit(target, 1)


# Brawl
class EX1_407:
	def action(self):
		board = self.controller.getTargets(TARGET_ALL_MINIONS)
		for minion in random.sample(board, len(board) - 1):
			minion.destroy()


# Mortal Strike
class EX1_408:
	def action(self, target):
		self.hit(target, 6 if self.controller.hero.health <= 12 else 4)


# Upgrade!
class EX1_409:
	def action(self):
		if self.controller.hero.weapon:
			self.buff(self.controller.hero.weapon, "EX1_409e")
			self.controller.hero.weapon.durability += 1
		else:
			self.controller.summon("EX1_409t")

class EX1_409e:
	Atk = 1

<commit_msg>Increase Durability in the Upgrade! buff instead of the action<commit_after>from ..utils import *

##
# Minions

# Armorsmith
class EX1_402:
	def OWN_DAMAGE(self, source, target, amount):
		if target.type == CardType.MINION:
			self.controller.hero.armor += 1


# Grommash Hellscream
class EX1_414:
	class Enrage:
		Atk = 6


# Cruel Taskmaster
class EX1_603:
	def action(self, target):
		self.buff(target, "EX1_603e")
		self.hit(target, 1)

class EX1_603e:
	Atk = 2


# Frothing Berserker
class EX1_604:
	def DAMAGE(self, source, target, amount):
		if target.type == CardType.MINION:
			self.buff(self, "EX1_604o")

class EX1_604o:
	Atk = 1


##
# Spells

# Charge
class CS2_103:
	action = buffTarget("CS2_103e2")

class CS2_103e2:
	Atk = 2
	Charge = True


# Rampage
class CS2_104:
	action = buffTarget("CS2_104e")

class CS2_104e:
	Atk = 3
	Health = 3


# Heroic Strike
class CS2_105:
	action = buffSelf("CS2_105e")

class CS2_105e:
	Atk = 4


# Execute
class CS2_108:
	action = destroyTarget


# Cleave
class CS2_114:
	def action(self):
		targets = random.sample(self.controller.opponent.field, 2)
		for target in targets:
			self.hit(target, 2)


# Slam
class EX1_391:
	def action(self, target):
		self.hit(target, 2)
		if target.zone == Zone.PLAY:
			self.controller.draw()


# Battle Rage
class EX1_392:
	def action(self):
		for target in self.controller.getTargets(TARGET_FRIENDLY_CHARACTERS):
			if target.damage:
				self.controller.draw()


# Whirlwind
class EX1_400:
	def action(self):
		for target in self.controller.getTargets(TARGET_ALL_MINIONS):
			self.hit(target, 1)


# Brawl
class EX1_407:
	def action(self):
		board = self.controller.getTargets(TARGET_ALL_MINIONS)
		for minion in random.sample(board, len(board) - 1):
			minion.destroy()


# Mortal Strike
class EX1_408:
	def action(self, target):
		self.hit(target, 6 if self.controller.hero.health <= 12 else 4)


# Upgrade!
class EX1_409:
	def action(self):
		if self.controller.hero.weapon:
			self.buff(self.controller.hero.weapon, "EX1_409e")
		else:
			self.controller.summon("EX1_409t")

class EX1_409e:
	Atk = 1
	Durability = 1


{'fraction_non_alphanumeric': 0.1142313184198001, 'fraction_numerical': 0.0637791527843884, 'mean_word_length': 4.076086956521739, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1060826', 'n_tokens_mistral': 1934, 'n_tokens_neox': 1662, 'n_words': 391}