Final minor changes for v0.44.0

This commit is contained in:
danielyxie
2019-02-26 00:29:53 -08:00
parent d2762a99b1
commit f1e43a86db
9 changed files with 185 additions and 121 deletions
+9 -3
View File
@@ -338,13 +338,19 @@ export class Sleeve extends Person {
*/
getRepGain(p: IPlayer): number {
if (this.currentTask === SleeveTaskType.Faction) {
let favorMult: number = 1;
const fac: Faction | null = Factions[this.currentTaskLocation];
if (fac != null) {
favorMult = 1 + (fac!.favor / 100);
}
switch (this.factionWorkType) {
case FactionWorkType.Hacking:
return this.getFactionHackingWorkRepGain() * (this.shock / 100);
return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;
case FactionWorkType.Field:
return this.getFactionFieldWorkRepGain() * (this.shock / 100);
return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;
case FactionWorkType.Security:
return this.getFactionSecurityWorkRepGain() * (this.shock / 100);
return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;
default:
console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);
return 0;