<commit_before>//
//  Enemy.swift
//  Borba
//
//  Created by <NAME> on 7/25/15.
//  Copyright (c) 2015 Team Five Three. All rights reserved.
//

/*
Any enemy has:
- experience value
- 
*/

import SpriteKit

class Enemy : Character
{
  let expValue: Double
  
  init(texture: SKTexture, difficultyCounter: Double) {
    expValue = ExpValues.enemy + (difficultyCounter - 1.0)
    super.init(texture: texture, color: UIColor.whiteColor(), size: texture.size())
    
    setup()
    movementSpeed = 55.0 + Float(difficultyCounter)
    health = 80 + 4.0 * difficultyCounter
    attack = 0.1 + (difficultyCounter - 1.0) * 0.1
  }
  
  func setup() {
    
    physicsBody = SKPhysicsBody(rectangleOfSize: size)
    physicsBody?.categoryBitMask = CategoryBitMasks.Enemy.rawValue
    physicsBody?.collisionBitMask = CategoryBitMasks.Hero.rawValue | CategoryBitMasks.Enemy.rawValue
    physicsBody?.contactTestBitMask = CategoryBitMasks.Hero.rawValue
    physicsBody?.affectedByGravity = false
    physicsBody?.restitution = 1
  }

  required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")<commit_msg>made early game less punishing<commit_after>//
//  Enemy.swift
//  Borba
//
//  Created by <NAME> on 7/25/15.
//  Copyright (c) 2015 Team Five Three. All rights reserved.
//

/*
Any enemy has:
- experience value
- 
*/

import SpriteKit

class Enemy : Character
{
  let expValue: Double
  
  init(texture: SKTexture, difficultyCounter: Double) {
    expValue = ExpValues.enemy + (difficultyCounter - 1.0)
    super.init(texture: texture, color: UIColor.whiteColor(), size: texture.size())
    
    setup()
    movementSpeed = 55.0 + Float(difficultyCounter)
    health = 80 + 4.0 * difficultyCounter
    attack = 0.08 + (difficultyCounter - 1.0) * 0.1
  }
  
  func setup() {
    
    physicsBody = SKPhysicsBody(rectangleOfSize: size)
    physicsBody?.categoryBitMask = CategoryBitMasks.Enemy.rawValue
    physicsBody?.collisionBitMask = CategoryBitMasks.Hero.rawValue | CategoryBitMasks.Enemy.rawValue
    physicsBody?.contactTestBitMask = CategoryBitMasks.Hero.rawValue
    physicsBody?.affectedByGravity = false
    physicsBody?.restitution = 1
  }

  required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
{'fraction_non_alphanumeric': 0.11266375545851529, 'fraction_numerical': 0.0222707423580786, 'mean_word_length': 3.414258188824663, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6464277', 'n_tokens_mistral': 783, 'n_tokens_neox': 749, 'n_words': 167}