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

64 lines
2.1 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 ModelAvenger extends ShipModel {
constructor() {
super("avenger", "Avenger");
}
getDescription(): string {
return "A heavy ship, dedicated to firing high precision charged shots across great distances.";
}
2018-03-06 14:39:48 +00:00
getLevelUpgrades(level: number): ShipUpgrade[] {
let engine = new MoveAction("Engine", {
2018-03-28 22:48:21 +00:00
distance_per_power: 60,
});
engine.configureCooldown(1, 1);
// TODO Weapons should be less efficient in short range
let charged_shot = new TriggerAction("Charged Shot", {
2018-03-21 22:25:25 +00:00
effects: [new DamageEffect(3)],
power: 4,
range: 900,
}, "gatlinggun");
charged_shot.configureCooldown(2, 2);
let long_range_missile = new TriggerAction("Long Range Missile", {
2018-03-21 22:25:25 +00:00
effects: [new DamageEffect(2)],
power: 4,
range: 700, blast: 120,
}, "submunitionmissile");
long_range_missile.configureCooldown(1, 2);
if (level == 1) {
return [
{
2018-03-06 14:39:48 +00:00
code: "Avenger Base",
effects: [
2018-03-21 22:25:25 +00:00
new AttributeEffect("hull_capacity", 2),
2018-03-28 22:48:21 +00:00
new AttributeEffect("shield_capacity", 2),
new AttributeEffect("power_capacity", 4),
]
},
{
code: "Main Engine",
actions: [engine]
},
{
code: "Charged Shot",
actions: [charged_shot]
},
{
code: "Long Range Missile",
actions: [long_range_missile]
},
];
} else {
return this.getStandardUpgrades(level);
}
}
}
}