1
0
Fork 0
spacetac/src/core/effects/PinnedEffect.ts
2019-11-21 23:14:27 +01:00

21 lines
439 B
TypeScript

import { BaseEffect } from "./BaseEffect";
/**
* Pin a ship in space, preventing him from moving using its engine
*
* If hard pinned, the ship also may not be moved by another MoveEffect
*/
export class PinnedEffect extends BaseEffect {
constructor(readonly hard = false) {
super("pinned");
}
isBeneficial(): boolean {
return false;
}
getDescription(): string {
return this.hard ? "anchored" : "pinned";
}
}