"use strict";
this.name = "deposed-tarantula";
this.author = "eric walch";
this.description = "ship script for Deposed";
this.license = "CC-BY-NC-SA 3.0";

this.shipSpawned = function () {
    var missilesAvailable = ["EQ_MISSILE", "EQ_MISSILE", "EQ_HARDENED_MISSILE"]; //33% are hardheads
    var missileCount = missilesAvailable.length;
    var capacity = this.ship.missileCapacity;
    var start = this.ship.missiles.length; // should be zero.

    for (var i = start; i < capacity; i++) {
        // The ship is defined with an empty missile bay, now fill the bay randomly with above missiles
        this.ship.awardEquipment(missilesAvailable[Math.floor(Math.random() * missileCount)]);
    }
};


this.shipDied = function () {
    missionVariables.deptaran = "DEAD";
    worldScripts.deposed.$markSystem(83);
    worldScripts.deposed.$unmarkSystem(255);
    mission.setInstructionsKey("deposed2_desc3b", "deposed");
};
