1
0
Fork 0

Fixed sticky effects description

This commit is contained in:
Michaël Lemaire 2017-05-22 22:17:59 +02:00
parent 2fe2665b07
commit dbd2c8e49b
3 changed files with 1 additions and 7 deletions

View file

@ -68,9 +68,6 @@ module TS.SpaceTac {
let desc = `Deploy drone for ${this.lifetime} cycle${this.lifetime > 1 ? "s" : ""} (power usage ${this.power}, max range ${this.deploy_distance}km)`;
let effects = this.effects.map(effect => {
let suffix = `for ships in ${this.effect_radius}km radius`;
if (effect instanceof StickyEffect) {
suffix = `for ${effect.duration} turn${effect.duration > 1 ? "s" : ""} ${suffix}`;
}
return "• " + effect.getDescription() + " " + suffix;
});
return `${desc}:\n${effects.join("\n")}`;

View file

@ -100,9 +100,6 @@ module TS.SpaceTac {
let desc = `${this.name} (power usage ${this.power}, max range ${this.range}km)`;
let effects = this.effects.map(effect => {
let suffix = this.blast ? `in ${this.blast}km radius` : "on target";
if (effect instanceof StickyEffect) {
suffix = `for ${effect.duration} turn${effect.duration > 1 ? "s" : ""} ${suffix}`;
}
return "• " + effect.getDescription() + " " + suffix;
});
return `${desc}:\n${effects.join("\n")}`;

View file

@ -72,7 +72,7 @@ module TS.SpaceTac {
}
getDescription(): string {
return this.base.getDescription();
return this.base.getDescription() + ` for ${this.duration} turn${this.duration > 1 ? "s" : ""}`;
}
}
}