mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 14:33:22 +00:00
Armour value improved by bulkhead
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', 'calcJumpRange', 'calcTotalRange', 'lodash', function(Components, calcShieldStrength, calcJumpRange, calcTotalRange, _) {
|
||||
angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', 'calcJumpRange', 'calcTotalRange', 'lodash', 'ArmourMultiplier', function(Components, calcShieldStrength, calcJumpRange, calcTotalRange, _, ArmourMultiplier) {
|
||||
|
||||
/**
|
||||
* Returns the power usage type of a slot and it's particular component
|
||||
@@ -84,10 +84,10 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
||||
this.cargoCapacity = 0;
|
||||
this.ladenMass = 0;
|
||||
this.armourAdded = 0;
|
||||
this.armourMultiplier = 1;
|
||||
this.shieldMultiplier = 1;
|
||||
this.totalCost = this.c.incCost ? this.c.discountedCost : 0;
|
||||
this.unladenMass = this.hullMass;
|
||||
this.armour = this.baseArmour;
|
||||
this.totalDps = 0;
|
||||
|
||||
this.bulkheads.c = null;
|
||||
@@ -158,6 +158,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
||||
this.bulkheads.id = index;
|
||||
this.bulkheads.c = Components.bulkheads(this.id, index);
|
||||
this.bulkheads.discountedCost = this.bulkheads.c.cost * this.componentCostMultiplier;
|
||||
this.armourMultiplier = ArmourMultiplier[index];
|
||||
this.updateStats(this.bulkheads, this.bulkheads.c, oldBulkhead, preventUpdate);
|
||||
};
|
||||
|
||||
@@ -359,7 +360,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
||||
}
|
||||
|
||||
this.ladenMass = this.unladenMass + this.cargoCapacity + this.fuelCapacity;
|
||||
this.armour = this.armourAdded + this.baseArmour;
|
||||
this.armour = this.armourAdded + Math.round(this.baseArmour * this.armourMultiplier);
|
||||
|
||||
if (!preventUpdate) {
|
||||
if (powerChange) {
|
||||
|
||||
@@ -10,6 +10,13 @@ angular.module('shipyard', ['ngLodash'])
|
||||
// Create 'angularized' references to DB.This will aid testing
|
||||
.constant('ShipsDB', DB.ships)
|
||||
.constant('ComponentsDB', DB.components)
|
||||
.value('ArmourMultiplier', [
|
||||
1, // Lightweight
|
||||
1.4, // Reinforced
|
||||
1.945, // Military
|
||||
1.945, // Mirrored
|
||||
1.945 // Reactive
|
||||
])
|
||||
.value('commonArray', [
|
||||
'Power Plant',
|
||||
'Thrusters',
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
<td>{{fRound(ship.speed)}} <u>m/s</u></td>
|
||||
<td>{{fRound(ship.boost)}} <u>m/s</u></td>
|
||||
<td>{{fRound(ship.totalDps)}}</td>
|
||||
<td>{{ship.armour}} <span ng-if="ship.armourAdded">({{ship.baseArmour}} + {{ship.armourAdded}})</span></td>
|
||||
<td>
|
||||
{{ship.armour}}
|
||||
<span ng-if="ship.armourAdded || ship.armourMultiplier > 1">(<span ng-if="ship.armourMultiplier > 1">{{fRPct(ship.armourMultiplier)}}</span>
|
||||
<span ng-if="ship.armourAdded">+ {{ship.armourAdded}}</span>)</span>
|
||||
</td>
|
||||
<td>{{fRound(ship.shieldStrength)}} <u>MJ</u> <span ng-if="ship.shieldMultiplier > 1 && ship.shieldStrength > 0">({{fRPct(ship.shieldMultiplier)}})</span></td>
|
||||
<td>{{ship.hullMass}} <u>T</u></td>
|
||||
<td>{{fRound(ship.unladenMass)}} <u>T</u></td>
|
||||
|
||||
@@ -198,11 +198,12 @@
|
||||
"fuelCapacity": 32,
|
||||
"cargoCapacity": 128,
|
||||
"ladenMass": 1339.2,
|
||||
"armour": 2078,
|
||||
"armourAdded": 240,
|
||||
"armourMultiplier": 1.95,
|
||||
"shieldMultiplier": 1.4,
|
||||
"totalCost": 882362049,
|
||||
"unladenMass": 1179.2,
|
||||
"armour": 1185,
|
||||
"totalDps": 29,
|
||||
"powerAvailable": 36,
|
||||
"powerRetracted": 23.93,
|
||||
|
||||
Reference in New Issue
Block a user