diff --git a/src/endWeek/endWeekUtils.js b/src/endWeek/endWeekUtils.js new file mode 100644 index 0000000000000000000000000000000000000000..3e17832622d65ed1b2344ef252371619a0a7f24a --- /dev/null +++ b/src/endWeek/endWeekUtils.js @@ -0,0 +1,14 @@ +/** + * Sets slave's fetish + * @param {App.Entity.SlaveState} slave + * @param {string} fetish + * @param {int} strength + */ +globalThis.fetishChange = function(slave, fetish, strength = 65) { + slave.fetish = fetish; + slave.fetishStrength = strength; + slave.fetishKnown = 1; + if (App.EndWeek.saVars) { + App.EndWeek.saVars.fetishChanged = 1; + } +}; \ No newline at end of file diff --git a/src/endWeek/saSharedVariables.js b/src/endWeek/saSharedVariables.js index 67d1dbc0bd714ee11f025a500e93f50f432e4b42..8186fe687875f9c4a5af45e3d5f96b5132d31485 100644 --- a/src/endWeek/saSharedVariables.js +++ b/src/endWeek/saSharedVariables.js @@ -45,6 +45,8 @@ App.EndWeek.SASharedVariables = class { this.pornFameBonus = 1; /** Used to condense all the possible galactorrhea lactation start points to a single line of text in saLongTermPhysicalEffects. */ this.inappropriateLactation = 0; + /** Used limit a slave to a single fetish change per week. */ + this.fetishChanged = 0; /** TODO: move V.slaveUsedRest here after saRules is converted, and find others */ } diff --git a/src/js/utilsSlave.js b/src/js/utilsSlave.js index 08c031f857896596e3e96e3643f1e404bc0c6410..5fe7731b0a64e687baddc622629b86d0885d1008 100644 --- a/src/js/utilsSlave.js +++ b/src/js/utilsSlave.js @@ -2070,7 +2070,7 @@ globalThis.fetishChangeChance = function(slave) { fetish = (slave.fetishStrength / 4), sex = 0; - if (slave.clitSetting !== slave.fetish) { + if (slave.clitSetting !== slave.fetish && !(App.EndWeek.saVars && App.EndWeek.saVars.fetishChanged === 1)) { // fetish should be more uncertain leading towards puberty and then steadily become more set in stone afterwards if (slave.balls) { if (V.potencyAge >= slave.actualAge) {