1
0
Fork 0
spacetac/src/game/effects/AttributeMaxEffect.ts

25 lines
684 B
TypeScript

/// <reference path="BaseEffect.ts"/>
module TS.SpaceTac.Game {
// 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;
}
getFullCode(): string {
return this.code + "-" + AttributeCode[this.attrcode].toLowerCase().replace("_", "");
}
}
}