diff --git a/src/endWeek/economics/persBusiness.js b/src/endWeek/economics/persBusiness.js index 0665171a46cd6aeb7c7b8a38a26009e04458fa0e..7adcd0e5f95b5fe1fa7757866620b155dea21240 100644 --- a/src/endWeek/economics/persBusiness.js +++ b/src/endWeek/economics/persBusiness.js @@ -568,6 +568,7 @@ App.EndWeek.personalBusiness = function() { } else { if (V.PC.skill.trading >= 100) { V.personalAttention = "sex"; + V.PC.skill.trading = 100; r.push(`You are now a <span class="green">master venture capitalist.</span>`); } else { r.push(`You have made progress towards mastering venture capitalism.`); @@ -603,6 +604,7 @@ App.EndWeek.personalBusiness = function() { } else { if (V.PC.skill.warfare >= 100) { V.personalAttention = "sex"; + V.PC.skill.warfare = 100; r.push(`You are now a <span class="green">master mercenary.</span>`); } else { r.push(`You have made progress towards mastering mercenary work.`); @@ -638,6 +640,7 @@ App.EndWeek.personalBusiness = function() { } else { if (V.PC.skill.slaving >= 100) { V.personalAttention = "sex"; + V.PC.skill.slaving = 100; r.push(`You are now a <span class="green">master slaver.</span>`); } else { r.push(`You have made progress towards mastering slaving.`); @@ -673,6 +676,7 @@ App.EndWeek.personalBusiness = function() { } else { if (V.PC.skill.engineering >= 100) { V.personalAttention = "sex"; + V.PC.skill.engineering = 100; r.push(`You are now a <span class="green">master arcology engineer.</span>`); } else { r.push(`You have made progress towards mastering arcology engineering.`); @@ -708,6 +712,7 @@ App.EndWeek.personalBusiness = function() { } else { if (V.PC.skill.medicine >= 100) { V.personalAttention = "sex"; + V.PC.skill.medicine = 100; r.push(`You are now a <span class="green">master slave surgeon.</span>`); } else { r.push(`You have made progress towards mastering slave surgery.`); @@ -743,6 +748,7 @@ App.EndWeek.personalBusiness = function() { } else { if (V.PC.skill.hacking >= 100) { V.personalAttention = "sex"; + V.PC.skill.hacking = 100; r.push(`You are now a <span class="green">master hacker.</span>`); } else { r.push(`You have made progress towards mastering hacking and data manipulation.`); diff --git a/src/js/utilsPC.js b/src/js/utilsPC.js index c79196d031f172d10ef903cfd17ec38b489454c3..857ed5e7929db204eed008a896b27243753512d4 100644 --- a/src/js/utilsPC.js +++ b/src/js/utilsPC.js @@ -604,17 +604,17 @@ globalThis.IncreasePCSkills = function(input, increase = 1) { } const player = V.PC; const oldSkill = player.skill[input]; - player.skill[input] += increase; + player.skill[input] = Math.clamp(player.skill[input] + increase, -100, 100); let t = ``; if (oldSkill < 10 && player.skill[input] >= 10) { - t += `<span class="green"> \nYou have gained basic knowledge in ${input}.</span>`; + t += ` <span class="green">You have gained basic knowledge in ${input}.</span>`; } else if (oldSkill < 30 && player.skill[input] >= 30) { - t += `<span class="green"> \nYou have gained some knowledge in ${input}.</span>`; + t += ` <span class="green">You have gained some knowledge in ${input}.</span>`; } else if (oldSkill < 60 && player.skill[input] >= 60) { - t += `<span class="green"> \nYou have become an expert in ${input}.</span>`; + t += ` <span class="green">You have become an expert in ${input}.</span>`; } else if (oldSkill < 100 && player.skill[input] >= 100) { - t += `<span class="green"> \nYou have mastered ${input}.</span>`; + t += ` <span class="green">You have mastered ${input}.</span>`; } return t; };