1
0
Fork 0
spacetac/src/core/models/ModelFalcon.ts
2018-07-10 16:23:32 +02:00

62 lines
2 KiB
TypeScript

/// <reference path="ShipModel.ts" />
module TK.SpaceTac {
export class ModelFalcon extends ShipModel {
constructor() {
super("falcon", "Falcon");
}
getDescription(): string {
return "A ship with an efficient targetting system, allowing to hit multiple foes.";
}
getLevelUpgrades(level: number): ShipUpgrade[] {
if (level == 1) {
let engine = new MoveAction("Engine", {
distance_per_power: 3,
});
let missile = new TriggerAction("SubMunition Missile", {
effects: [new DamageEffect(3)],
power: 3,
range: 5, blast: 3,
}, "submunitionmissile");
missile.configureCooldown(2, 2);
// TODO targetting enemies only
let gatling = new TriggerAction("Multi-head Gatling", {
effects: [new DamageEffect(2)],
power: 2,
range: 7, blast: 3,
}, "gatlinggun");
gatling.configureCooldown(3, 2);
return [
{
code: "Falcon Base",
effects: [
new AttributeEffect("hull_capacity", 3),
new AttributeEffect("shield_capacity", 2),
new AttributeEffect("power_capacity", 4),
]
},
{
code: "Main Engine",
actions: [engine]
},
{
code: "Submunition Missile",
actions: [missile]
},
{
code: "Gatling Gun",
actions: [gatling]
},
];
} else {
return this.getStandardUpgrades(level);
}
}
}
}