1
0
Fork 0
spacetac/src/core/models/ModelAvenger.ts
2018-04-17 12:13:17 +02:00

96 lines
3.5 KiB
TypeScript

/// <reference path="ShipModel.ts" />
module TK.SpaceTac {
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.";
}
getLevelUpgrades(level: number): ShipUpgrade[] {
let engine = new MoveAction("Engine", {
distance_per_power: 60,
safety_distance: 250,
});
engine.configureCooldown(1, 1);
// TODO Weapons should be less efficient in short range
let charged_shot = new TriggerAction("Charged Shot", {
effects: [new DamageEffect(3)],
power: 4,
range: 900,
}, "gatlinggun");
charged_shot.configureCooldown(2, 2);
let long_range_missile = new TriggerAction("Long Range Missile", {
effects: [new DamageEffect(2)],
power: 4,
range: 700, blast: 120,
}, "submunitionmissile");
long_range_missile.configureCooldown(1, 2);
if (level == 1) {
return [
{
code: "Avenger Base",
effects: [
new AttributeEffect("hull_capacity", 2),
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 if (level == 2) {
let tracker = new TriggerAction("Tracking Beacon", {
effects: [new StickyEffect(new AttributeLimitEffect("evasion", 0), 2)],
power: 2,
range: 300
}, "precisionboost");
return [
{
code: "Tracking Beacon",
cost: 2,
description: "If an enemy comes too close, mark it with a low-power beacon, so that it will not evade your revenge",
actions: [tracker]
},
{
code: "Cyclomatic Power Output",
cost: 3,
description: "Clever usage of thermo-harmonics to boost the power core output",
effects: [
new AttributeEffect("power_capacity", 1),
]
},
{
code: "Fast Tactical Scanner",
cost: 1,
description: "Deploy a scanner at the start of battle to be ready to shoot as soon as possible",
effects: [
new AttributeEffect("initiative", 1),
]
}
];
} else {
return this.getStandardUpgrades(level);
}
}
}
}