Skip to content
Snippets Groups Projects
Commit 3fec68f1 authored by klorpa's avatar klorpa
Browse files

DisabledDisabled

parent 270ebeeb
No related branches found
No related tags found
No related merge requests found
...@@ -1206,6 +1206,7 @@ DairyRestraintsSetting($dairyRestraintsSetting) ...@@ -1206,6 +1206,7 @@ DairyRestraintsSetting($dairyRestraintsSetting)
<<set $one_time_age_overrides_pedo_mode = 0>> <<set $one_time_age_overrides_pedo_mode = 0>>
<<set $activeSlaveOneTimeMinAge = 0>> <<set $activeSlaveOneTimeMinAge = 0>>
<<set $activeSlaveOneTimeMaxAge = 999>> <<set $activeSlaveOneTimeMaxAge = 999>>
<<set $oneTimeDisableDisability = 0>>
<<set $targetAge = $minimumSlaveAge>> <<set $targetAge = $minimumSlaveAge>>
<<set $pubertyLength = 5>> <<set $pubertyLength = 5>>
<<set $maxGrowthAge = 24>> <<set $maxGrowthAge = 24>>
......
...@@ -1262,3 +1262,41 @@ window.randomizeAttraction = function randomizeAttraction(slave) { ...@@ -1262,3 +1262,41 @@ window.randomizeAttraction = function randomizeAttraction(slave) {
slave.attrXX = Math.clamp(slave.attrXX + jsRandom(-5, 5), 0, 100); slave.attrXX = Math.clamp(slave.attrXX + jsRandom(-5, 5), 0, 100);
slave.attrXY = Math.clamp(slave.attrXY + jsRandom(-5, 5), 0, 100); slave.attrXY = Math.clamp(slave.attrXY + jsRandom(-5, 5), 0, 100);
}; };
window.disabilityRoll = function disabilityRoll(slave) {
const V = State.variables;
let disList = [];
disList.push("hearNot");
disList.push("seeNot");
disList.push("speakNot");
let disableCount = 0;
if (V.oneTimeDisableDisability === 0) {
while (disList.length > 0) {
let rolled jsEither(disList);
switch (rolled) {
case "hearNot":
if ((jsRandom(1,100)-(disableCount*2)) > 90) {
slave.hears = -2;
}
removeFromArray(disList, hearNot);
disableCount++;
break;
case "seeNot":
if ((jsRandom(1,100)-(disableCount*2)) > 90) {
slave.eyes = -2;
}
removeFromArray(disList, seeNot);
disableCount++;
break;
case "speakNot":
if ((jsRandom(1,100)-(disableCount*2)) > 90) {
slave.voice = 0;
}
removeFromArray(disList, speakNot);
disableCount++;
break;
}
}
}
V.oneTimeDisableDisability = 0;
};
...@@ -709,6 +709,9 @@ ...@@ -709,6 +709,9 @@
<<if ndef $activeSlaveOneTimeMaxAge>> <<if ndef $activeSlaveOneTimeMaxAge>>
<<set $activeSlaveOneTimeMaxAge = 999>> <<set $activeSlaveOneTimeMaxAge = 999>>
<</if>> <</if>>
<<if ndef $oneTimeDisableDisability>>
<<set $oneTimeDisableDisability = 0>>
<</if>>
<<if ndef $AgePenalty>> <<if ndef $AgePenalty>>
<<set $AgePenalty = 1>> <<set $AgePenalty = 1>>
<</if>> <</if>>
......
...@@ -183,13 +183,8 @@ ...@@ -183,13 +183,8 @@
<<set $activeSlave.waist = random(50,100)>> <<set $activeSlave.waist = random(50,100)>>
<</if>> <</if>>
<<if ($activeSlave.physicalAge > random(0,100))>> <<if ($activeSlave.physicalAge > random(30,100))>>
<<set $activeSlave.eyes = -1>> <<set $activeSlave.eyes = -1>>
<<if random(0,100) > 90>>
<<if setup.gratefulCareers.includes($activeSlave.career)>>
<<set $activeSlave.eyes = -2>>
<</if>>
<</if>>
<</if>> <</if>>
<<if ($activeSlave.physicalAge > random(30,100))>> <<if ($activeSlave.physicalAge > random(30,100))>>
<<set $activeSlave.hears = -1>> <<set $activeSlave.hears = -1>>
...@@ -518,3 +513,5 @@ ...@@ -518,3 +513,5 @@
<</if>> <</if>>
<</if>> <</if>>
<</if>> <</if>>
<<run disabilityRoll($activeSlave)>>
...@@ -91,19 +91,15 @@ ...@@ -91,19 +91,15 @@
<<set $activeSlave.devotion = random(-90,-60)>> <<set $activeSlave.devotion = random(-90,-60)>>
<<set $activeSlave.trust = random(-45,-25)>> <<set $activeSlave.trust = random(-45,-25)>>
/% Begin height replacement section. %/ <<if ($activeSlave.physicalAge > random(30,100))>>
<<if ($activeSlave.physicalAge > random(0,100))>>
<<set $activeSlave.eyes = -1>> <<set $activeSlave.eyes = -1>>
<<if random(0,100) > 90>>
<<if setup.gratefulCareers.includes($activeSlave.career)>>
<<set $activeSlave.eyes = -2>>
<</if>>
<</if>>
<</if>> <</if>>
<<if ($activeSlave.physicalAge > random(30,100))>> <<if ($activeSlave.physicalAge > random(30,100))>>
<<set $activeSlave.hears = -1>> <<set $activeSlave.hears = -1>>
<</if>> <</if>>
/% Begin height replacement section. %/
/% Since we use nationality for height effects we need to initialize it now instead of later on like in vanilla Free Cities. %/ /% Since we use nationality for height effects we need to initialize it now instead of later on like in vanilla Free Cities. %/
<<if $fixedRace == 0>> <<if $fixedRace == 0>>
<<if $fixedNationality == 0>> <<if $fixedNationality == 0>>
...@@ -680,3 +676,5 @@ ...@@ -680,3 +676,5 @@
<</if>> <</if>>
<</if>> <</if>>
<</if>> <</if>>
<<run disabilityRoll($activeSlave)>>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment