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

61 lines
1.9 KiB
TypeScript

/// <reference path="ShipModel.ts" />
module TK.SpaceTac {
export class ModelRhino extends ShipModel {
constructor() {
super("rhino", "Rhino");
}
getDescription(): string {
return "A sturdy ship, able to sustain massive damage.";
}
getLevelUpgrades(level: number): ShipUpgrade[] {
if (level == 1) {
let engine = new MoveAction("Engine", {
distance_per_power: 2,
});
let gatling = new TriggerAction("Gatling Gun", {
effects: [new DamageEffect(2)],
power: 3,
range: 8,
}, "gatlinggun");
gatling.configureCooldown(2, 2);
let laser = new TriggerAction("Prokhorov Laser", {
effects: [new DamageEffect(3)],
power: 4,
range: 5, angle: 60,
}, "prokhorovlaser");
return [
{
code: "Rhino Base",
effects: [
new AttributeEffect("initiative", 1),
new AttributeEffect("hull_capacity", 3),
new AttributeEffect("shield_capacity", 3),
new AttributeEffect("power_capacity", 6),
]
},
{
code: "Main Engine",
actions: [engine]
},
{
code: "Gatling Gun",
actions: [gatling]
},
{
code: "Prokhorov Laser",
actions: [laser]
},
];
} else {
return this.getStandardUpgrades(level);
}
}
}
}