<commit_before>{ LazerScript } = require('src/lib/LazerScript')
{ StartOfDawn, DayBreak, Morning } = require('./stage1/sunrise')
{ Swirler, Shooter } = require('./stage1/army_drone')

class Benchmark extends LazerScript
  assets: ->
    @loadAssets('explosion', 'playerShip', 'general')

  execute: ->
    @inventoryAdd 'weapon', 'lasers', marking: 'L'
    @inventoryAdd 'ship', 'points', marking: 'P', icon: 'star'
    Crafty.e('DebugInfo')

    @sequence(
      #@setShipType('PlayerControlledCube')

      @setWeapons(['lasers'])
      @setScenery 'Ocean'
      @setSpeed 0
      @wait 1500
      => Crafty('DebugInfo').capture('start')
      @setSpeed 300
      @wait 15000
      @setScenery('BayStart')
      => Crafty('DebugInfo').capture('scrolling')
      @runScript(StartOfDawn, speed: 5)
      @runScript(DayBreak, speed: 5)
      @runScript(Morning, speed: 5)
      => Crafty('DebugInfo').capture('recolor')
      => Crafty('PlayerSpaceship').addComponent('Invincible').invincibleDuration(15000)
      @enemies()
      => Crafty('DebugInfo').capture('swirlers')
      => Crafty('PlayerSpaceship').shoot(true)
      @enemies()
      => Crafty('PlayerSpaceship').shoot(false)
      => Crafty('DebugInfo').capture('swirlers shooting')
      @parallel(
        @gainHeight(800, duration: 14000)
        @setScenery('Skyline')
      )
      => Crafty('PlayerSpaceship').shoot(true)
      @enemies()
      => Crafty('PlayerSpaceship').shoot(false)
      => Crafty('DebugInfo').capture('swirlers shooting skyline')
      @setScenery 'Ocean'
      @gainHeight(-800, duration: 14000)
      => Crafty('DebugInfo').capture('end')
    )

  enemies: ->
    @parallel(
      @placeSquad Shooter,
        amount: 4
        delay: 250
        options:<commit_msg>Fix benchmark for 2 player mode<commit_after>{ LazerScript } = require('src/lib/LazerScript')
{ StartOfDawn, DayBreak, Morning } = require('./stage1/sunrise')
{ Swirler, Shooter } = require('./stage1/army_drone')

class Benchmark extends LazerScript
  assets: ->
    @loadAssets('explosion', 'playerShip', 'general')

  execute: ->
    @inventoryAdd 'weapon', 'lasers', marking: 'L'
    @inventoryAdd 'ship', 'points', marking: 'P', icon: 'star'
    Crafty.e('DebugInfo')

    @sequence(
      #@setShipType('PlayerControlledCube')

      @setWeapons(['lasers'])
      @setScenery 'Ocean'
      @setSpeed 0
      @wait 1500
      => Crafty('DebugInfo').capture('start')
      @setSpeed 300
      @wait 15000
      @setScenery('BayStart')
      => Crafty('DebugInfo').capture('scrolling')
      @runScript(StartOfDawn, speed: 5)
      @runScript(DayBreak, speed: 5)
      @runScript(Morning, speed: 5)
      => Crafty('DebugInfo').capture('recolor')
      => Crafty('PlayerSpaceship').each(-> @addComponent('Invincible').invincibleDuration(15000))
      @enemies()
      => Crafty('DebugInfo').capture('swirlers')
      => Crafty('PlayerSpaceship').each(-> @shoot(true))
      @enemies()
      => Crafty('PlayerSpaceship').each(-> @shoot(false))
      => Crafty('DebugInfo').capture('swirlers shooting')
      @parallel(
        @gainHeight(800, duration: 14000)
        @setScenery('Skyline')
      )
      => Crafty('PlayerSpaceship').each(-> @shoot(true))
      @enemies()
      => Crafty('PlayerSpaceship').each(-> @shoot(false))
      => Crafty('DebugInfo').capture('swirlers shooting skyline')
      @setScenery 'Ocean'
      @gainHeight(-800, duration: 14000)
      => Crafty('DebugInfo').capture('end')
    )

  enemies: ->
    @parallel(
      @placeSquad Shooter,
        amount: 4
        delay: 250
        options:
{'fraction_non_alphanumeric': 0.169921875, 'fraction_numerical': 0.024274553571428572, 'mean_word_length': 3.319277108433735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 38, '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': '4648985', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1163, 'n_words': 193}