<commit_before>defaults = require('lodash/defaults')

Crafty.c 'Drone',
  init: ->
    @requires 'Enemy, standardDrone'

  drone: (attr = {}) ->
    @attr defaults(attr,
      w: 40
      h: 40
      health: 100
      defaultSpeed: 100
    )
    @origin 'center'
    @collision [2, 25, 8,18, 20,13, 30, 15, 33, 28, 14, 34, 4, 30]
    @attr weaponOrigin: [2, 25]

    @enemy()
    @bind 'Hit', (data) =>
      @shiftedX += 5 unless @juice is no
      Crafty.audio.play('hit', 1, .5) unless @juice is no
      Crafty.e('Blast, LaserHit').explode(
        x: data.projectile.x
        y: data.projectile.y
        radius: 4
        duration: 50
      ) if data.projectile.has('Bullet') and @juice isnt no<commit_msg>Make drones bit harder to kill again<commit_after>defaults = require('lodash/defaults')

Crafty.c 'Drone',
  init: ->
    @requires 'Enemy, standardDrone'

  drone: (attr = {}) ->
    @attr defaults(attr,
      w: 40
      h: 40
      health: 200
      defaultSpeed: 100
    )
    @origin 'center'
    @collision [2, 25, 8,18, 20,13, 30, 15, 33, 28, 14, 34, 4, 30]
    @attr weaponOrigin: [2, 25]

    @enemy()
    @bind 'Hit', (data) =>
      @shiftedX += 5 unless @juice is no
      Crafty.audio.play('hit', 1, .5) unless @juice is no
      Crafty.e('Blast, LaserHit').explode(
        x: data.projectile.x
        y: data.projectile.y
        radius: 4
        duration: 50
      ) if data.projectile.has('Bullet') and @juice isnt no
{'fraction_non_alphanumeric': 0.15044858523119392, 'fraction_numerical': 0.06073153899240856, 'mean_word_length': 2.3333333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4722608', 'n_tokens_mistral': 616, 'n_tokens_neox': 526, 'n_words': 149}