"use strict";
this.name = "FuelTweaks_BurningFuel";
this.author = "Thargoid";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Script for fuel station";

this._timer = null;

//-------------------------------------------------------------------------------------------------------------
this.shipSpawned = function() {
    var delay = 0.25;
    var chance = parseInt(Math.random() * 8 + 1);
    switch (chance) {
        case 1: 
            delay += 0.25;
            break;
        case 3:
            delay += 0.50;
            break;
        case 5:
            delay += 0.75;
            break;
        case 7:
            delay += 1;
            break;
    }
    this._timer = new Timer(this, this.$sequence, delay, 0);
}

//-------------------------------------------------------------------------------------------------------------
this.$sequence = function $sequence() {
    this.ship.dealEnergyDamage(300, 50);
    this.ship.explode();
}