2017-11-14 00:07:06 +00:00
|
|
|
/// <reference path="BaseBattleDiff.ts"/>
|
|
|
|
|
|
|
|
module TK.SpaceTac {
|
|
|
|
/**
|
|
|
|
* A ship takes damage (to hull or shield)
|
|
|
|
*
|
2018-02-08 15:16:03 +00:00
|
|
|
* This is only informative, and does not apply the damage on ship values (there are ShipValueDiff for this).
|
2017-11-14 00:07:06 +00:00
|
|
|
*/
|
|
|
|
export class ShipDamageDiff extends BaseBattleShipDiff {
|
|
|
|
// Damage to hull
|
|
|
|
hull: number
|
|
|
|
|
|
|
|
// Damage to shield
|
|
|
|
shield: number
|
|
|
|
|
2018-03-26 15:30:43 +00:00
|
|
|
// Evaded damage
|
|
|
|
evaded: number
|
|
|
|
|
2017-12-08 00:18:15 +00:00
|
|
|
// Theoretical damage value
|
|
|
|
theoretical: number
|
|
|
|
|
2018-03-26 15:30:43 +00:00
|
|
|
constructor(ship: Ship, hull: number, shield: number, evaded = 0, theoretical = hull + shield + evaded) {
|
2017-11-14 00:07:06 +00:00
|
|
|
super(ship);
|
|
|
|
|
|
|
|
this.hull = hull;
|
|
|
|
this.shield = shield;
|
2018-03-26 15:30:43 +00:00
|
|
|
this.evaded = evaded;
|
2017-12-08 00:18:15 +00:00
|
|
|
this.theoretical = theoretical;
|
2017-11-14 00:07:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|