<commit_before>package main

type targetType uint8

const (
	_ targetType = iota
	targetTypeOneself
	targetTypeFriend
	targetTypeAllFriends
	targetTypeEnemy
	targetTypeAllEnemies
)

type damageType uint8

const (
	_ damageType = iota
	damageTypePhysical
	damageTypeMagic
	damageTypeTrue
)

type ability struct {
	name               string
	targetType         targetType
	damageType         damageType
	healthCost         statistic
	manaCost           statistic
	activationDuration gameDuration
	cooldownDuration   gameDuration
	disableTypes       []disableType
	perform            func(performer, receiver *unit)
}

// satisfiedRequirements returns true iff the ability satisfy activation requirements
func (a *ability) satisfiedRequirements(performer *unit) bool {
	if performer.health() < a.healthCost {
		return false
	}
	if performer.mana() < a.manaCost {
		return false
	}
	for o := range performer.operators {
		switch o := o.(type) {
		case *cooldown:
			if a == o.ability {
				return false
			}
		case *disable:
			for d := range a.disableTypes {
				if disableType(d) == o.disableType {
					return false
				}
			}
		}
	}
	return true
}
<commit_msg>Remove the damageType<commit_after>package main

import (
	"time"
)

type targetType uint8

const (
	_ targetType = iota
	targetTypeOneself
	targetTypeFriend
	targetTypeAllFriends
	targetTypeEnemy
	targetTypeAllEnemies
)

type ability struct {
	name               string
	targetType         targetType
	healthCost         statistic
	manaCost           statistic
	activationDuration time.Duration
	cooldownDuration   time.Duration
	disableTypes       []disableType
	perform            func(performer, receiver *unit)
}

// satisfiedRequirements returns true iff the ability satisfy activation requirements
func (a *ability) satisfiedRequirements(performer *unit) bool {
	// TODO check receiver
	if performer.health() < a.healthCost {
		return false
	}
	if performer.mana() < a.manaCost {
		return false
	}
	for o := range performer.operators {
		switch o := o.(type) {
		case *cooldown:
			if a == o.ability {
				return false
			}
		case *disable:
			for d := range a.disableTypes {
				if disableType(d) == o.disableType {
					return false
				}
			}
		}
	}
	return true
}

{'fraction_non_alphanumeric': 0.06845637583892618, 'fraction_numerical': 0.0013422818791946308, 'mean_word_length': 3.050724637681159, 'pattern_counts': {'":': 0, '<': 7, '<?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': '162319', 'n_tokens_mistral': 752, 'n_tokens_neox': 686, 'n_words': 190}