Finished Ship Salvo Mode

Added remaining trailer Mods
Fixed Ship Charge Bugs
Fixed Tug Charge Bugs
Fixed trailer bugs
This commit is contained in:
Christoph
2020-08-13 09:43:14 -07:00
parent d754b33a64
commit 3d7db2da14
2 changed files with 749 additions and 79 deletions
+5 -5
View File
@@ -1868,11 +1868,11 @@ input.sheet-toolDeselect:checked ~ .sheet-threatDirection
}
/*Hide Charge or Supply box by tool*/
.sheet-shipSheet input.sheet-colorChanger[value="Launcher"] ~ .sheet-salvoChargeBox,
.sheet-shipSheet input.sheet-colorChanger[value="Sensors"] ~ .sheet-salvoSupplyBox,
.sheet-shipSheet input.sheet-colorChanger[value="Grav Drive"] ~ .sheet-salvoSupplyBox,
.sheet-shipSheet input.sheet-colorChanger[value="Pulse Array"] ~ .sheet-salvoSupplyBox,
.sheet-shipSheet input.sheet-colorChanger[value="Shields"] ~ .sheet-salvoSupplyBox
.sheet-shipSheet input.sheet-colorChanger[value="Launcher"] + div.sheet-salvoChargeBox,
.sheet-shipSheet input.sheet-colorChanger[value="Sensors"] + div.sheet-salvoSupplyBox,
.sheet-shipSheet input.sheet-colorChanger[value="Grav Drive"] + div.sheet-salvoSupplyBox,
.sheet-shipSheet input.sheet-colorChanger[value="Pulse Array"] + div.sheet-salvoSupplyBox,
.sheet-shipSheet input.sheet-colorChanger[value="Shields"] + div.sheet-salvoSupplyBox
{
display: none;
}
+744 -74
View File
@@ -2158,7 +2158,7 @@
<option label="Shields">Shields</option>
</select>
<input type="hidden" class="shuttleModChanger" name="attr_salvoShuttleSystem" />
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttlePulseDrive shuttleMods shuttleMod1" ></span><span class="salvoShuttlePulseDrive shuttleModText shuttleMod1" >Atmospheric Thrusters: 2</span>
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttlePulseDrive shuttleMods shuttleMod1"></span><span class="salvoShuttlePulseDrive shuttleModText shuttleMod1">Atmospheric Thrusters: 2</span>
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod2" name="attr_salvoShipMod2" value="1" /><span class="salvoShuttlePulseDrive shuttleMods shuttleMod2"></span><span class="salvoShuttlePulseDrive shuttleModText shuttleMod2">Orbital Injectors: 1</span>
<input type="checkbox" class="salvoShuttleShields shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttleShields shuttleMods shuttleMod1"></span><span class="salvoShuttleShields shuttleModText shuttleMod1">Kinetic Deflector: 2</span>
<input type="checkbox" class="salvoShuttleShields shuttleMods shuttleMod2" vname="attr_salvoShipMod2" value="1" /><span class="salvoShuttleShields shuttleMods shuttleMod2"></span><span class="salvoShuttleShields shuttleModText shuttleMod2">Energy Dissipater: 2</span>
@@ -2177,7 +2177,7 @@
<input type="hidden" class="shuttleModChanger" name="attr_salvoShuttleSystem" />
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttlePulseDrive shuttleMods shuttleMod1"></span><span class="salvoShuttlePulseDrive shuttleModText shuttleMod1">Atmospheric Thrusters: 2</span>
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod2" name="attr_salvoShipMod2" value="1" /><span class="salvoShuttlePulseDrive shuttleMods shuttleMod2"></span><span class="salvoShuttlePulseDrive shuttleModText shuttleMod2">Orbital Injectors: 3</span>
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod3" name="attr_salvoShipMod3" value="1" /><span class="salvoShuttleShields shuttleMods shuttleMod3"></span><span class="salvoShuttleShields shuttleModText shuttleMod3">Wake Generator: 3</span>
<input type="checkbox" class="salvoShuttlePulseDrive shuttleMods shuttleMod3" name="attr_salvoShipMod3" value="1" /><span class="salvoShuttlePulseDrive shuttleMods shuttleMod3"></span><span class="salvoShuttlePulseDrive shuttleModText shuttleMod3">Wake Generator: 3</span>
<input type="checkbox" class="salvoShuttleShields shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttleShields shuttleMods shuttleMod1"></span><span class="salvoShuttleShields shuttleModText shuttleMod1">Kinetic Deflector: 2</span>
<input type="checkbox" class="salvoShuttleShields shuttleMods shuttleMod2" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttleShields shuttleMods shuttleMod2"></span><span class="salvoShuttleShields shuttleModText shuttleMod2">Energy Dissipater: 2</span>
<input type="checkbox" class="salvoShuttlePulseArray shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttlePulseArray shuttleMods shuttleMod1"></span><span class="salvoShuttlePulseArray shuttleModText shuttleMod1">Tractor Lifter: 3</span>
@@ -2200,7 +2200,7 @@
<input type="checkbox" class="salvoShuttleSensors shuttleMods shuttleMod1" name="attr_salvoShipMod1" value="1" /><span class="salvoShuttleSensors shuttleMods shuttleMod1"></span><span class="salvoShuttleSensors shuttleModText shuttleMod1">Survey Sensors: 4</span>
<input type="checkbox" class="salvoShuttleSensors shuttleMods shuttleMod2" name="attr_salvoShipMod2" value="1" /><span class="salvoShuttleSensors shuttleMods shuttleMod2"></span><span class="salvoShuttleSensors shuttleModText shuttleMod2">Depth Analyser: 3</span>
</div>
<!--Fighter Trailer-->
<input type="hidden" class="shuttleSystemChanger" name="attr_salvoShuttleTrailer" />
<div class="otherToolBackground shuttleSystemBox fighterTrailer">
@@ -2220,6 +2220,7 @@
</div>
<!--Charge Process Box-->
<input type="hidden" class="colorChanger" name="attr_salvoToolShip" value="Choose a Tool" />
<div class="salvoChargeBox processBox salvoOverlayBox">
<input type="hidden" class="colorChanger" name="attr_salvoChargeDirection" value="Charged" /><!--Input to allow salvoChargeDirection Colour to Change-->
<input type="number" class="salvoRating" name="attr_salvoChargeShip" readonly />
@@ -2227,6 +2228,7 @@
</div>
<!--Supply Process Box-->
<input type="hidden" class="colorChanger" name="attr_salvoToolShip" value="Choose a Tool" />
<div class="salvoSupplyBox processBox salvoOverlayBox">
<input type="hidden" class="colorChanger" name="attr_salvoSupplyDirection" value="0" /><!--Input to allow salvoChargeDirection Colour to Change-->
<input type="number" class="salvoRating" name="attr_salvoSupply" readonly />
@@ -10023,6 +10025,7 @@
setObj.salvoSpecialty = "Choose a Specialty";
setObj.salvoTool = "Choose a Tool";
setObj.salvoAdvantage = 0;
setObj.salvoCharge = 0;
//Reset the basic Reactor settings
setObj.salvoChargeDirection = "Charged";
@@ -10055,6 +10058,8 @@
setObj.salvoToolShip = "Choose a Tool";
setObj.salvoAdvantageShip = 0;
setObj.salvoShuttleTrailerPrinter = 0;
setObj.salvoChargeShip = 0;
setObj.salvoSupply = 0;
//Reset Operator List
let index = 1;
@@ -10273,6 +10278,8 @@
setObj.salvoMod19 = 0;
setObj.salvoMod20 = 0;
setObj.salvoCharge = 0;
setObj.salvoChargeDirection = "Charged";
if (values.ReactorOvercharge == "1")
@@ -10302,30 +10309,32 @@
setObj.salvoModuleFitting = 0;
setObj.salvoShuttleTrailerPrinter = 0;
setObj.salvoShuttleTrailer = "Choose a Trailer";
//Determine the Reactor to be monitored
let overcharge = 0;
let charge = 0;
setObj.salvoChargeShip = 0;
setObj.salvoSupply = 0;
//Reset the basic Reactor settings for the Reactor to be monitored
setObj.salvoChargeDirection = "Charged";
if (values.salvoToolShip == "Launch Bay")
{
overcharge = parseInt(values.tugReactorOvercharge) || 0;
charge = parseInt(values.tugReactorCharge) || 0;
if (values.tugReactorOvercharge == 1)
{
setObj.salvoChargeDirection = "Overcharged";
}
else if (values.tugReactorCharge <= 0)
{
setObj.salvoChargeDirection = "Uncharged";
}
}
else
{
overcharge = parseInt(values.shipReactorOvercharge) || 0;
charge = parseInt(values.shipReactorCharge) || 0;
}
//Reset the basic Reactor settings
setObj.salvoChargeDirection = "Charged";
if (overcharge == "1")
{
setObj.salvoChargeDirection = "Overcharged";
}
else if (charge <= 0)
{
setObj.salvoChargeDirection = "Uncharged";
if (values.shipReactorOvercharge == 1)
{
setObj.salvoChargeDirection = "Overcharged";
}
else if (values.shipReactorCharge <= 0)
{
setObj.salvoChargeDirection = "Uncharged";
}
}
//Reset the basic Supply settings
@@ -10351,6 +10360,8 @@
setObj.salvoShipMod3 = 0;
setObj.salvoShipMod4 = 0;
setObj.salvoShuttleSystem = "Select System";
setObj.salvoChargeShip = 0;
setObj.salvoSupply = 0;
setAttrs(setObj);
});
@@ -11598,7 +11609,7 @@
"supply", "salvoShuttleTrailerPrinter",
"tugReactorCharge", "tugReactorOvercharge",
"salvoShipMod1", "salvoShipMod2", "salvoShipMod3", "salvoShipMod4",
"salvoModuleFitting", "salvoShuttleTrailer","salvoShuttleSystem",
"salvoModuleFitting", "salvoShuttleTrailer", "salvoShuttleSystem",
"SensorsSurveySensor", "SensorsDepthAnalyser", "SensorsAreaEffect", "SensorsRangeCompensator",
"gravDriveAtmosphericThrusters", "gravDriveOrbitalInjectors", "gravDriveFoldInducer", "gravDriveWakeGenerator",
"PulseArraySpaceTargeter", "PulseArraySurfaceTargeter", "PulseArrayTractorLifter",
@@ -11607,41 +11618,52 @@
const setObj = {};
let rating = 0;
let charge = 0;
//Set Reactor Max
let maxCharge = 0;
//console.log("Max Charge: ", maxCharge);
//Determine the Reactor to be monitored
let overcharge = 0;
let charge = 0;
if (values.salvoToolShip == "Launch Bay")
{
overcharge = parseInt(values.tugReactorOvercharge) || 0;
charge = parseInt(values.tugReactorCharge) || 0;
maxCharge = parseInt(values.tugReactorCharge) || 0;
maxCharge += parseInt(values.tugReactorOvercharge) || 0;
//Reset the basic Reactor settings
setObj.salvoChargeDirection = "Charged";
if (values.tugReactorOvercharge == "1")
{
setObj.salvoChargeDirection = "Overcharged";
}
else if (values.tugReactorCharge <= 0)
{
setObj.salvoChargeDirection = "Uncharged";
}
}
else
{
overcharge = parseInt(values.shipReactorOvercharge) || 0;
charge = parseInt(values.shipReactorCharge) || 0;
}
maxCharge = parseInt(values.shipReactorCharge) || 0;
maxCharge += parseInt(values.shipReactorOvercharge) || 0;
//Set Reactor Max
let maxCharge = charge;
maxCharge += overcharge;
//console.log("Max Charge: ", maxCharge);
//Reset the basic Reactor settings
setObj.salvoChargeDirection = "Charged";
if (values.shipReactorOvercharge == "1")
{
setObj.salvoChargeDirection = "Overcharged";
}
else if (values.shipReactorCharge <= 0)
{
setObj.salvoChargeDirection = "Uncharged";
}
}
//Set Supply and supplyTotal
let supplySpent = 0;
let supplyTotal = parseInt(values.supply) || 0;
//Reset the basic Reactor settings
setObj.salvoChargeDirection = "Charged";
if (overcharge == "1")
{
setObj.salvoChargeDirection = "Overcharged";
}
else if (charge <= 0)
{
setObj.salvoChargeDirection = "Uncharged";
}
//Set the status of the Supply box
setObj.salvoSupplyDirection = "Supplied";
if (values.supply <= 0)
@@ -12149,19 +12171,93 @@
console.log(setObj);
setAttrs(setObj);
}
//Shuttle
//Shuttle
else if (values.salvoToolShip == "Launch Bay")
{
let printTrailer = parseInt(values.salvoShuttleTrailerPrinter) || 0;
//Equip Trailer, set supply Spent, set rating from Mods
//Transport Trailer
if (values.salvoShuttleTrailer == "Transport")
{
if (printTrailer == 1)
{
supplySpent = 6;
}
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++; setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 1;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++; setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
//Flight Trailer
else if (values.salvoShuttleTrailer == "Flight")
{
//Spend Supply if Trailer printer is checked
@@ -12175,7 +12271,8 @@
if (values.salvoShipMod1 == "1")
{
rating += 4;
charge++; setObj.salvoChargeDirection = "Charged";
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
@@ -12191,11 +12288,12 @@
if (values.salvoShipMod2 == "1")
{
rating += 3;
charge++; setObj.salvoChargeDirection = "Charged";
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
@@ -12210,7 +12308,8 @@
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++; setObj.salvoChargeDirection = "Charged";
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
@@ -12226,7 +12325,304 @@
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++; setObj.salvoChargeDirection = "Charged";
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
//Drop Trailer
else if (values.salvoShuttleTrailer == "Drop")
{
if (printTrailer == 1)
{
supplySpent = 12;
}
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 1;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
//Boarding Trailer
else if (values.salvoShuttleTrailer == "Boarding")
{
if (printTrailer == 1)
{
supplySpent = 12;
}
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 1;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod3 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod3 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
//Tractor Trailer
else if (values.salvoShuttleTrailer == "Tractor")
{
if (printTrailer == 1)
{
supplySpent = 12;
}
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod3 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod3 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
else if (values.salvoShuttleSystem == "Pulse Array")
{
if (values.salvoShipMod1 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
@@ -12240,44 +12636,318 @@
}
}
}
else if (values.salvoShuttleTrailer == "Drop")
{
if (printTrailer == 1)
{
supplySpent = 12;
}
}
else if (values.salvoShuttleTrailer == "Boarding")
{
if (printTrailer == 1)
{
supplySpent = 12;
}
}
else if (values.salvoShuttleTrailer == "Tractor")
{
if (printTrailer == 1)
{
supplySpent = 12;
}
}
//Survey Trailer
else if (values.salvoShuttleTrailer == "Survey")
{
if (printTrailer == 1)
{
supplySpent = 15;
}
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 1;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Sensors is selected
else if (values.salvoShuttleSystem == "Sensors")
{
if (values.salvoShipMod1 == "1")
{
rating += 4;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
//Fighter Trailer
else if (values.salvoShuttleTrailer == "Fighter")
{
if (printTrailer == 1)
{
supplySpent = 18;
}
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Pulse Array is selected
else if (values.salvoShuttleSystem == "Pulse Array")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 3;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
else
{
//Set rating if Pulse Drive is selected
if (values.salvoShuttleSystem == "Pulse Drive")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 1;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
//Set rating if Shields is selected
else if (values.salvoShuttleSystem == "Shields")
{
if (values.salvoShipMod1 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod1 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
if (values.salvoShipMod2 == "1")
{
rating += 2;
charge++;
setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
{
setObj.salvoChargeDirection = "Expended";
}
}
}
}
setObj.salvoToolRatingShip = rating;
setObj.salvoChargeShip = charge;