diff --git a/src/endWeek/endWeekUtils.js b/src/endWeek/endWeekUtils.js new file mode 100644 index 0000000000000000000000000000000000000000..58bfb027c082cfb1a4893ec8d50e6c2314e75169 --- /dev/null +++ b/src/endWeek/endWeekUtils.js @@ -0,0 +1,12 @@ +/** + * 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; + 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..ab9b7c85dcf5ef411904235472c496cf6d2aaafe 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.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) {