2015-01-22 00:00:00 +00:00
|
|
|
/// <reference path="BaseEffect.ts"/>
|
|
|
|
|
|
|
|
module SpaceTac.Game {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
// Effect on attribute maximum
|
|
|
|
// Typically, these effects are summed up to define an attribute maximum
|
|
|
|
export class AttributeMaxEffect extends BaseEffect {
|
|
|
|
// Affected attribute
|
|
|
|
attrcode: AttributeCode;
|
|
|
|
|
|
|
|
// Value to add to the maximum
|
|
|
|
value: number;
|
|
|
|
|
|
|
|
constructor(attrcode: AttributeCode, value: number) {
|
|
|
|
super("attrmax");
|
|
|
|
|
|
|
|
this.attrcode = attrcode;
|
|
|
|
this.value = value;
|
|
|
|
}
|
2015-04-22 20:03:59 +00:00
|
|
|
|
|
|
|
getFullCode(): string {
|
|
|
|
return this.code + "-" + AttributeCode[this.attrcode].toLowerCase().replace("_", "");
|
|
|
|
}
|
2015-01-22 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|