2018-03-06 14:39:48 +00:00
|
|
|
/// <reference path="ShipModel.ts" />
|
2018-02-08 15:16:03 +00:00
|
|
|
|
|
|
|
module TK.SpaceTac {
|
2018-03-06 14:39:48 +00:00
|
|
|
export class ModelAvenger extends ShipModel {
|
2018-02-08 15:16:03 +00:00
|
|
|
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[] {
|
2018-02-08 15:16:03 +00:00
|
|
|
let engine = new MoveAction("Engine", {
|
|
|
|
distance_per_power: 50,
|
|
|
|
safety_distance: 250,
|
|
|
|
});
|
|
|
|
engine.configureCooldown(1, 1);
|
|
|
|
|
|
|
|
// TODO Weapons should be less efficient in short range
|
|
|
|
|
|
|
|
let charged_shot = new TriggerAction("Charged Shot", {
|
2018-03-20 23:23:00 +00:00
|
|
|
effects: [new DamageEffect(40)],
|
2018-02-08 15:16:03 +00:00
|
|
|
power: 3,
|
|
|
|
range: 900,
|
|
|
|
}, "gatlinggun");
|
|
|
|
charged_shot.configureCooldown(2, 2);
|
|
|
|
|
|
|
|
let long_range_missile = new TriggerAction("Long Range Missile", {
|
2018-03-20 23:23:00 +00:00
|
|
|
effects: [new DamageEffect(27)],
|
2018-02-08 15:16:03 +00:00
|
|
|
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",
|
2018-02-08 15:16:03 +00:00
|
|
|
effects: [
|
|
|
|
new AttributeEffect("precision", 8),
|
|
|
|
new AttributeEffect("maneuvrability", 0),
|
|
|
|
new AttributeEffect("hull_capacity", 80),
|
|
|
|
new AttributeEffect("shield_capacity", 20),
|
|
|
|
new AttributeEffect("power_capacity", 8),
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Main Engine",
|
|
|
|
actions: [engine]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Charged Shot",
|
|
|
|
actions: [charged_shot]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Long Range Missile",
|
|
|
|
actions: [long_range_missile]
|
|
|
|
},
|
|
|
|
];
|
|
|
|
} else if (level == 2) {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
code: "Laser Targetting",
|
2018-03-06 14:39:48 +00:00
|
|
|
description: "Improved targetting, using fine-grained laser sensors",
|
2018-02-08 15:16:03 +00:00
|
|
|
cost: 1,
|
2018-03-06 14:39:48 +00:00
|
|
|
effects: [new AttributeEffect("precision", 2)],
|
2018-02-08 15:16:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Basic Countermeasures",
|
2018-03-06 14:39:48 +00:00
|
|
|
description: "Chaffs and lures to divert enemy fire",
|
2018-02-08 15:16:03 +00:00
|
|
|
cost: 1,
|
2018-03-06 14:39:48 +00:00
|
|
|
effects: [new AttributeEffect("maneuvrability", 2)],
|
2018-02-08 15:16:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Targetting Assist",
|
2018-03-06 14:39:48 +00:00
|
|
|
description: "Share your targetting subnetwork with nearby ships",
|
2018-02-08 15:16:03 +00:00
|
|
|
cost: 3,
|
|
|
|
actions: [new ToggleAction("Targetting Assist", {
|
|
|
|
power: 3,
|
|
|
|
radius: 300,
|
|
|
|
effects: [new AttributeEffect("precision", 2)]
|
2018-03-06 14:39:48 +00:00
|
|
|
}, "precisionboost")],
|
2018-02-08 15:16:03 +00:00
|
|
|
},
|
|
|
|
];
|
|
|
|
} else if (level == 3) {
|
2018-03-06 14:39:48 +00:00
|
|
|
let shield_booster = new TriggerAction("Shield Booster", {
|
|
|
|
effects: [
|
|
|
|
new StickyEffect(new AttributeEffect("shield_capacity", 50), 2),
|
|
|
|
new ValueEffect("shield", 70),
|
|
|
|
],
|
|
|
|
power: 2
|
|
|
|
}, "forcefield");
|
|
|
|
shield_booster.configureCooldown(1, 4);
|
|
|
|
|
2018-02-08 15:16:03 +00:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
code: "Gyroscopic Stabilizers",
|
2018-03-06 14:39:48 +00:00
|
|
|
description: "Heavy mercury gyroscopes, used to stabilize the whole ship while firing",
|
2018-02-08 15:16:03 +00:00
|
|
|
cost: 1,
|
|
|
|
effects: [
|
|
|
|
new AttributeEffect("precision", 3),
|
|
|
|
new AttributeEffect("maneuvrability", -2)
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Shield Booster",
|
2018-03-06 14:39:48 +00:00
|
|
|
description: "Temporary power surge directed toward the shield mainframe, to boost its output",
|
2018-02-08 15:16:03 +00:00
|
|
|
cost: 3,
|
|
|
|
actions: [shield_booster]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: "Hard Coated Hull",
|
2018-03-06 14:39:48 +00:00
|
|
|
description: "Improved metal coating of outer hull layers, making them more damage resistant",
|
2018-02-08 15:16:03 +00:00
|
|
|
cost: 2,
|
|
|
|
effects: [new AttributeEffect("hull_capacity", 10)]
|
|
|
|
},
|
|
|
|
];
|
|
|
|
} else {
|
|
|
|
return this.getStandardUpgrades(level);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|