1
0
Fork 0
spacetac/src/core/models/ModelTomahawk.ts

80 lines
2.7 KiB
TypeScript
Raw Normal View History

2018-03-06 14:39:48 +00:00
/// <reference path="ShipModel.ts" />
module TK.SpaceTac {
2018-03-06 14:39:48 +00:00
export class ModelTomahawk extends ShipModel {
constructor() {
super("tomahawk", "Tomahawk");
}
getDescription(): string {
return "A ship compensating its somewhat weak equipments with high power and usability.";
}
2018-03-06 14:39:48 +00:00
getLevelUpgrades(level: number): ShipUpgrade[] {
if (level == 1) {
let engine = new MoveAction("Engine", {
2019-05-23 17:04:22 +00:00
max_distance: 1200,
});
let gatling1 = new TriggerAction("Primary Gatling", {
2018-03-28 22:48:21 +00:00
effects: [new DamageEffect(3)],
2019-05-23 17:04:22 +00:00
power: 2, range: 600
}, "gatlinggun");
2018-03-29 22:57:53 +00:00
gatling1.configureCooldown(1, 2);
let gatling2 = new TriggerAction("Secondary Gatling", {
2018-03-28 22:48:21 +00:00
effects: [new DamageEffect(2)],
power: 1, range: 200
}, "gatlinggun");
2018-03-29 22:57:53 +00:00
gatling2.configureCooldown(1, 2);
let missile = new TriggerAction("Diffuse Missiles", {
2018-03-28 22:48:21 +00:00
effects: [new DamageEffect(2)],
power: 2,
2019-05-23 17:04:22 +00:00
range: 400, blast: 150,
}, "submunitionmissile");
2018-03-29 22:57:53 +00:00
missile.configureCooldown(1, 2);
let cooler = new TriggerAction("Circuits Cooler", {
effects: [new CooldownEffect(1, 1)],
power: 1,
}, "kelvingenerator");
return [
{
2018-03-06 14:39:48 +00:00
code: "Tomahawk Base",
effects: [
2018-03-26 15:30:43 +00:00
new AttributeEffect("initiative", 2),
2018-03-21 22:25:25 +00:00
new AttributeEffect("hull_capacity", 2),
new AttributeEffect("shield_capacity", 1),
2018-03-29 22:57:53 +00:00
new AttributeEffect("power_capacity", 5),
]
},
{
code: "Main Engine",
actions: [engine]
},
{
code: "Primary Gatling",
actions: [gatling1]
},
{
code: "Secondary Gatling",
actions: [gatling2]
},
{
code: "SubMunition Missile",
actions: [missile]
},
{
code: "Cooler",
actions: [cooler]
},
];
} else {
return this.getStandardUpgrades(level);
}
}
}
}