2015-03-03 00:00:00 +00:00
|
|
|
/// <reference path="../Serializable.ts"/>
|
|
|
|
|
2015-01-22 00:00:00 +00:00
|
|
|
module SpaceTac.Game {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
// Base class for effects of actions
|
|
|
|
// Effects can be permanent or temporary (for a number of turns)
|
2015-03-03 00:00:00 +00:00
|
|
|
export class BaseEffect extends Serializable {
|
2015-01-22 00:00:00 +00:00
|
|
|
// Identifier code for the type of effect
|
|
|
|
code: string;
|
|
|
|
|
|
|
|
// Base constructor
|
|
|
|
constructor(code: string) {
|
2015-03-03 00:00:00 +00:00
|
|
|
super();
|
|
|
|
|
2015-01-22 00:00:00 +00:00
|
|
|
this.code = code;
|
|
|
|
}
|
2015-01-28 00:00:00 +00:00
|
|
|
|
|
|
|
// Apply ponctually the effect on a given ship
|
|
|
|
// Return true if the effect could be applied
|
|
|
|
applyOnShip(ship: Ship): boolean {
|
|
|
|
return false;
|
|
|
|
}
|
2015-01-22 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|