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

62 lines
2 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 ModelFalcon extends ShipModel {
constructor() {
super("falcon", "Falcon");
}
getDescription(): string {
return "A ship with an efficient targetting system, allowing to hit multiple foes.";
}
2018-03-06 14:39:48 +00:00
getLevelUpgrades(level: number): ShipUpgrade[] {
if (level == 1) {
let engine = new MoveAction("Engine", {
2018-07-09 14:59:17 +00:00
distance_per_power: 3,
});
let missile = new TriggerAction("SubMunition Missile", {
2018-03-28 22:48:21 +00:00
effects: [new DamageEffect(3)],
power: 3,
2018-07-10 14:23:32 +00:00
range: 5, blast: 3,
}, "submunitionmissile");
missile.configureCooldown(2, 2);
2018-03-29 22:57:53 +00:00
// TODO targetting enemies only
2018-03-28 22:48:21 +00:00
let gatling = new TriggerAction("Multi-head Gatling", {
effects: [new DamageEffect(2)],
power: 2,
2018-07-10 14:23:32 +00:00
range: 7, blast: 3,
}, "gatlinggun");
gatling.configureCooldown(3, 2);
return [
{
2018-03-06 14:39:48 +00:00
code: "Falcon Base",
effects: [
2018-03-28 22:48:21 +00:00
new AttributeEffect("hull_capacity", 3),
2018-03-21 23:52:13 +00:00
new AttributeEffect("shield_capacity", 2),
2018-03-28 22:48:21 +00:00
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);
}
}
}
}