diff --git a/src/js/storyJS.tw b/src/js/storyJS.tw index 48d050b3d623cc3980c297df058359bea741c759..a76091090a2ceda60a3092ff1f1b03ebcc36ebc3 100644 --- a/src/js/storyJS.tw +++ b/src/js/storyJS.tw @@ -667,222 +667,39 @@ window.ruleApplied = function(slave, ID) { return slave.currentRules.includes(ID); }; -window.ruleAssignment = function(applyAssignment, assignment) { - if (!applyAssignment) - return false; - return applyAssignment.includes(assignment); -}; - -window.ruleFacility = function(applyFacility, facility) { - if (!applyFacility) - return false; - return applyFacility.includes(facility); -}; - -window.ruleExcludeSlaveFacility = function(rule, slave) { - if (!slave || !rule || !rule.excludeFacility) { - return null; - } else { - for(var d=0; d < rule.excludeFacility.length; ++d){ - if(rule.excludeFacility[d] == "hgsuite"){ - if(slave.assignment == "live with your Head Girl" ){ - return true; - } - else if(slave.assignment == "be your Head Girl"){ - return true; - } - } - else if(rule.excludeFacility[d] == "arcade"){ - if (slave.assignment == "be confined in the arcade" ){ - return true; - } - } - else if(rule.excludeFacility[d] == "mastersuite"){ - if(slave.assignment == "serve in the master suite" ){ - return true; - } - else if(slave.assignment == "be your Concubine"){ - return true; - } - } - else if(rule.excludeFacility[d] == "clinic"){ - if(slave.assignment == "get treatment in the clinic" ){ - return true; - } - else if(slave.assignment == "be the Nurse"){ - return true; - } - } - else if(rule.excludeFacility[d] == "spa"){ - if(slave.assignment == "rest in the spa" ){ - return true; - } - else if(slave.assignment == "be the Attendant"){ - return true; - } - } - else if(rule.excludeFacility[d] == "brothel"){ - if(slave.assignment == "work in the brothel" ){ - return true; - } - else if(slave.assignment == "be the Madam"){ - return true; - } - } - else if(rule.excludeFacility[d] == "club"){ - if(slave.assignment == "serve in the club" ){ - return true; - } - else if(slave.assignment == "be the DJ"){ - return true; - } - } - else if(rule.excludeFacility[d] == "dairy"){ - if (slave.assignment == "work in the dairy"){ - return true; - } - else if(slave.assignment == "be the Milkmaid"){ - return true; - } - } - else if(rule.excludeFacility[d] == "servantsquarters"){ - if(slave.assignment == "work as a servant"){ - return true; - } - else if(slave.assignment == "be the Stewardess"){ - return true; - } - } - else if(rule.excludeFacility[d] == "schoolroom"){ - if(slave.assignment == "learn in the schoolroom" ){ - return true; - } - else if(slave.assignment == "be the Schoolteacher"){ - return true; - } - } - else if(rule.excludeFacility[d] == "cellblock"){ - if(slave.assignment == "be confined in the cellblock" ){ - return true; - } - else if(slave.assignment == "be the Wardeness"){ - return true; - } - } - } - return false; - } -}; +window.expandFacilityAssignments = function(facilityAssignments) { + var assignmentPairs = { + "serve in the club": "be the DJ", + "rest in the spa": "be the Attendant", + "work in the brothel": "be the Madam", + "work in the dairy": "be the Milkmaid", + "work as a servant": "be the Stewardess", + "get treatment in the clinic": "be the Nurse", + "live with your Head Girl": "be your Head Girl", + "serve in the master suite": "be your Concubine", + "learn in the schoolroom": "be the Schoolteacher", + "be confined in the cellblock": "be the Wardeness", + }; -window.ruleAppliedToSlaveFacility = function(rule, slave) { - if (!slave || !rule || !rule.facility) { - return null; - } else { - for(var d=0; d < rule.facility.length; ++d){ - if(rule.facility[d] == "hgsuite"){ - if(slave.assignment == "live with your Head Girl" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be your Head Girl")){ - return true; - } - } - else if(rule.facility[d] == "arcade"){ - if(slave.assignment == "be confined in the arcade" ){ - return true; - } - } - else if(rule.facility[d] == "mastersuite"){ - if(slave.assignment == "serve in the master suite" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be your Concubine")){ - return true; - } - } - else if(rule.facility[d] == "clinic"){ - if(slave.assignment == "get treatment in the clinic" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Nurse")){ - return true; - } - } - else if(rule.facility[d] == "spa"){ - if(slave.assignment == "rest in the spa" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Attendant")){ - return true; - } - } - else if(rule.facility[d] == "brothel"){ - if(slave.assignment == "work in the brothel" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Madam")){ - return true; - } - } - else if(rule.facility[d] == "club"){ - if(slave.assignment == "serve in the club" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the DJ")){ - return true; - } - } - else if(rule.facility[d] == "dairy"){ - if (slave.assignment == "work in the dairy"){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Milkmaid")){ - return true; - } - } - else if(rule.facility[d] == "servantsquarters"){ - if(slave.assignment == "work as a servant" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Stewardess")){ - return true; - } - } - else if(rule.facility[d] == "schoolroom"){ - if(slave.assignment == "learn in the schoolroom" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Schoolteacher")){ - return true; - } - } - else if(rule.facility[d] == "cellblock"){ - if(slave.assignment == "be confined in the cellblock" ){ - return true; - } - else if((rule.excludeSpecialSlaves != true) && (slave.assignment == "be the Wardeness")){ - return true; - } - } - }return false; - } + if (!facilityAssignments || !facilityAssignments.length) + return []; + var fullList = facilityAssignments.map(function(a) { + if (a in assignmentPairs) + return [a, assignmentPairs[a]]; + return a; + }); + return fullList.flatten(); }; window.ruleSlaveSelected = function(slave, rule) { - if (!slave || !rule) { - return null; - } else if (!rule.selectedSlaves) { + if (!slave || !rule || !rule.selectedSlaves) return false; - } return rule.selectedSlaves.includes(slave.ID); }; window.ruleSlaveExcluded = function(slave, rule) { - if (!slave || !rule) { - return null; - } else if (!rule.excludedSlaves) { + if (!slave || !rule || !rule.excludedSlaves) return false; - } return rule.excludedSlaves.includes(slave.ID); }; @@ -1052,7 +869,8 @@ window.cumAmount = function(slave) { cum *= 1.2 } else if (slave.prostate == 3) { cum *= 1.5 - } if (slave.devotion > 50) { + } + if (slave.devotion > 50) { cum += (cum*(slave.devotion/100)) } else if (slave.devotion < -50) { cum += (cum*(slave.devotion/100)) @@ -1073,51 +891,23 @@ window.mergeRules = function(rules) { var combinedRule = {}; for (var i = 0; i < rules.length; i++) { - for (var attr in rules[i]) { + for (var prop in rules[i]) { + // we don't manage setAssignment here, we do it in <<DefaultRules>> + if (prop === "setAssignment") + continue; // A rule overrides any preceding ones if, // * there are no preceding ones, // * or it sets autoBrand, - // * or it sets setAssignment to something other that "none", - // * or it sets assignFacility to something other that "none", - // * or it sets none of the above and is not "no default setting" + // * or it does not set autoBrand and is not "no default setting" var applies = ( - combinedRule[attr] === undefined - || (attr === "autoBrand" && rules[i][attr]) - || (attr === "setAssignment" && rules[i][attr] !== "none") - || (attr === "assignFacility" && rules[i][attr] !== "none") - || ( - attr !== "autoBrand" - && attr !== "setAssignment" - && attr !== "assignFacility" - && attr !== "growth" - && rules[i][attr] !== "no default setting" - ) + combinedRule[prop] === undefined + || (prop === "autoBrand" && rules[i][prop]) + || (prop !== "autoBrand" && rules[i][prop] !== "no default setting") ); - if (applies) { - if (attr == "setAssignment" && combinedRule.assignFacility !== "none") { - // If the rules so far have set assignFacility, unset it, - // since the assignment overrides it. We assume that a - // given rule won't set both assignFacility and - // setAssignment. If that happens, which one will prevail - // is down to the enumeration order of "for ... in". - combinedRule.assignFacility = "none"; - combinedRule.facilityRemove = false; - } - if (attr == "assignFacility" && combinedRule.setAssignment !== "none") - // Similarly, if setAssignment is set, unset it. - combinedRule.setAssignment = "none"; - - combinedRule[attr] = rules[i][attr]; - } - else if (attr == "growth") { - for (var target in rules[i][attr]) { - if (rules[i][attr][target] == "no default setting") - continue; - combinedRule[attr][target] = rules[i][attr][target]; - } - } + if (applies) + combinedRule[prop] = rules[i][prop]; } } diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 02d3fe40fe8df72182c87e50d0b03e9f60589df4..3901121a98eae0ee0d7596d9504c0e73cbb2ec2a 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -393,52 +393,131 @@ <</if>> <<for _bci = 0; _bci < $defaultRules.length; _bci++>> + <<if ndef $defaultRules[_bci].condition>> + <<set _activation = $defaultRules[_bci].activation>> + <<if _activation == "sex drive">> + <<set _activation = "energy">> + <</if>> + + <<if _activation == "none">> + <<set $defaultRules[_bci].condition = {id: "false"}>> + <<elseif _activation == "always">> + <<set $defaultRules[_bci].condition = {id: "true"}>> + + <<elseif $defaultRules[_bci].thresholdLower != "none" && $defaultRules[_bci].thresholdUpper != "none">> + <<set $defaultRules[_bci].condition = { + id: "&&", + first: { + id: $defaultRules[_bci].eqUpper ? "<=" : "<", + first: {id: "(name)", name: _activation}, + second: {id: "(number)", value: $defaultRules[_bci].thresholdUpper} + }, + second: { + id: $defaultRules[_bci].eqLower ? ">=" : ">", + first: {id: "(name)", name: _activation}, + second: {id: "(number)", value: $defaultRules[_bci].thresholdLower}, + }, + }>> + + <<elseif $defaultRules[_bci].thresholdLower != "none">> + <<set $defaultRules[_bci].condition = { + id: $defaultRules[_bci].eqLower ? ">=" : ">", + first: {id: "(name)", name: _activation}, + second: {id: "(number)", value: $defaultRules[_bci].thresholdLower}, + }>> + + <<elseif $defaultRules[_bci].thresholdUpper != "none">> + <<set $defaultRules[_bci].condition = { + id: $defaultRules[_bci].eqUpper ? "<=" : "<", + first: {id: "(name)", name: _activation}, + second: {id: "(number)", value: $defaultRules[_bci].thresholdUpper}, + }>> + + <<else>> + /% both thresholds are "none", same as activation being none %/ + <<set $defaultRules[_bci].condition = {id: "false"}>> + <</if>> + <</if>> + + <<if $defaultRules[_bci].setAssignment == "none">> + <<set $defaultRules[_bci].setAssignment = "no default setting">> + <</if>> - <<if ndef $defaultRules[_bci].condition>> - <<set _activation = $defaultRules[_bci].activation>> - <<if _activation == "sex drive">> - <<set _activation = "energy">> - <</if>> - - <<if _activation == "none">> - <<set $defaultRules[_bci].condition = {id: "false"}>> - <<elseif _activation == "always">> - <<set $defaultRules[_bci].condition = {id: "true"}>> - - <<elseif $defaultRules[_bci].thresholdLower != "none" && $defaultRules[_bci].thresholdUpper != "none">> - <<set $defaultRules[_bci].condition = { - id: "&&", - first: { - id: $defaultRules[_bci].eqUpper ? "<=" : "<", - first: {id: "(name)", name: _activation}, - second: {id: "(number)", value: $defaultRules[_bci].thresholdUpper} - }, - second: { - id: $defaultRules[_bci].eqLower ? ">=" : ">", - first: {id: "(name)", name: _activation}, - second: {id: "(number)", value: $defaultRules[_bci].thresholdLower}, - }, - }>> - - <<elseif $defaultRules[_bci].thresholdLower != "none">> - <<set $defaultRules[_bci].condition = { - id: $defaultRules[_bci].eqLower ? ">=" : ">", - first: {id: "(name)", name: _activation}, - second: {id: "(number)", value: $defaultRules[_bci].thresholdLower}, - }>> - - <<elseif $defaultRules[_bci].thresholdUpper != "none">> - <<set $defaultRules[_bci].condition = { - id: $defaultRules[_bci].eqUpper ? "<=" : "<", - first: {id: "(name)", name: _activation}, - second: {id: "(number)", value: $defaultRules[_bci].thresholdUpper}, - }>> - - <<else>> - /% both thresholds are "none", same as activation being none - <<set $defaultRules[_bci].condition = {id: "false"}>> - <</if>> - <</if>> + <<if $defaultRules[_bci].assignFacility>> + <<switch $defaultRules[_bci].assignFacility>> + <<case "spa">> <<set $defaultRules[_bci].setAssignment = "rest in the spa">> + <<case "club">> <<set $defaultRules[_bci].setAssignment = "serve in the club">> + <<case "dairy">> <<set $defaultRules[_bci].setAssignment = "work in the dairy">> + <<case "clinic">> <<set $defaultRules[_bci].setAssignment = "get treatment in the clinic">> + <<case "arcade">> <<set $defaultRules[_bci].setAssignment = "be confined in the arcade">> + <<case "hgsuite">> <<set $defaultRules[_bci].setAssignment = "live with your Head Girl">> + <<case "brothel">> <<set $defaultRules[_bci].setAssignment = "work in the brothel">> + <<case "cellblock">> <<set $defaultRules[_bci].setAssignment = "be confined in the cellblock">> + <<case "schoolroom">> <<set $defaultRules[_bci].setAssignment = "learn in the schoolroom">> + <<case "mastersuite">> <<set $defaultRules[_bci].setAssignment = "serve in the master suite">> + <<case "servantsquarters">> <<set $defaultRules[_bci].setAssignment = "work as a servant">> + <</switch>> + <</if>> + + <<set $defaultRules[_bci].facility = $defaultRules[_bci].facility.map(function(x) { + switch (x) { + case "spa": return "rest in the spa"; + case "club": return "serve in the club"; + case "dairy": return "work in the dairy"; + case "clinic": return "get treatment in the clinic"; + case "arcade": return "be confined in the arcade"; + case "hgsuite": return "live with your Head Girl"; + case "brothel": return "work in the brothel"; + case "cellblock": return "be confined in the cellblock"; + case "schoolroom": return "learn in the schoolroom"; + case "mastersuite": return "serve in the master suite"; + case "servantsquarters": return "work as a servant"; + } + })>> + + <<set $defaultRules[_bci].excludeFacility = $defaultRules[_bci].excludeFacility.map(function(x) { + switch (x) { + case "spa": return "rest in the spa"; + case "club": return "serve in the club"; + case "dairy": return "work in the dairy"; + case "clinic": return "get treatment in the clinic"; + case "arcade": return "be confined in the arcade"; + case "hgsuite": return "live with your Head Girl"; + case "brothel": return "work in the brothel"; + case "cellblock": return "be confined in the cellblock"; + case "schoolroom": return "learn in the schoolroom"; + case "mastersuite": return "serve in the master suite"; + case "servantsquarters": return "work as a servant"; + } + })>> + + <<if ndef $defaultRules[_bci].aphrodisiacs>> + <<set $defaultRules[_bci].aphrodisiacs = 0>> + <</if>> + <<if $defaultRules[_bci].curatives == "applied">> + <<set $defaultRules[_bci].curatives = 2>> + <</if>> + <<if $defaultRules[_bci].drugs == "curatives">> + <<set $defaultRules[_bci].curatives = 2>> + <<set $defaultRules[_bci].drugs = "no drugs">> + <<elseif $defaultRules[_bci].drugs == "preventatives">> + <<set $defaultRules[_bci].curatives = 1>> + <<set $defaultRules[_bci].drugs = "no drugs">> + <<elseif $defaultRules[_bci].drugs == "aphrodisiacs">> + <<set $defaultRules[_bci].aphrodisiacs = 1>> + <<set $defaultRules[_bci].drugs = "no drugs">> + <<elseif $defaultRules[_bci].drugs == "extreme aphrodisiacs">> + <<set $defaultRules[_bci].aphrodisiacs = 2>> + <<set $defaultRules[_bci].drugs = "no drugs">> + <</if>> + + <<if $defaultRules[_bci].muscles >= 3 && $defaultRules[_bci].muscles <= 6>> + <<set $defaultRules[_bci].muscles = 100>> + <<elseif $defaultRules[_bci].muscles >= 2 && $defaultRules[_bci].muscles <= 6>> + <<set $defaultRules[_bci].muscles = 50>> + <<elseif $defaultRules[_bci].muscles >= 1 && $defaultRules[_bci].muscles <= 6>> + <<set $defaultRules[_bci].muscles = 20>> + <</if>> <<if ndef $defaultRules[_bci].standardReward>> <<set $defaultRules[_bci].standardReward = "no default setting">> @@ -455,27 +534,6 @@ <<if ndef $defaultRules[_bci].aVirginButtplug>> <<set $defaultRules[_bci].aVirginButtplug = "no default setting">> <</if>> - <<if ndef $defaultRules[_bci].surgery>> - <<set $defaultRules[_bci].surgery = {lactation: "no default setting", cosmetic: 0, accent: "no default setting", shoulders: "no default setting", shouldersImplant: "no default setting", boobs: "no default setting", hips: "no default setting", hipsImplant: "no default setting", butt: "no default setting", faceShape: "no default setting", lips: "no default setting", holes: 0}>> - <</if>> - <<if $releaseID < 1018>> - <<if $defaultRules[_bci].growth == "none">> - <<set $defaultRules[_bci].growth = {boobs: 0, butt: 0, lips: 0, dick: 0, balls: 0}>> - <<elseif $defaultRules[_bci].growth == "girlish">> - <<set $defaultRules[_bci].growth = {boobs: 350, butt: 2, lips: 25, dick: 0, balls: 0}>> - <<elseif $defaultRules[_bci].growth == "stacked">> - <<set $defaultRules[_bci].growth = {boobs: 1000, butt: 4, lips: 25, dick: 4, balls: 4}>> - <<elseif $defaultRules[_bci].growth == "functional">> - <<set $defaultRules[_bci].growth = {boobs: 9000, butt: 10, lips: 45, dick: 6, balls: 6}>> - <<elseif $defaultRules[_bci].growth == "unlimited">> - <<set $defaultRules[_bci].growth = {boobs: 24000, butt: 10, lips: 100, dick: 10, balls: 6}>> - <<else>> - <<set $defaultRules[_bci].growth = {boobs: "no default setting", butt: "no default setting", lips: "no default setting", dick: "no default setting", balls: "no default setting"}>> - <</if>> - <</if>> - <<if ndef $defaultRules[_bci].surgery.prostate>> - <<set $defaultRules[_bci].surgery.prostate = "no default setting">> - <</if>> <<if ndef $defaultRules[_bci].dietMilk>> <<set $defaultRules[_bci].dietMilk = 0>> <</if>> @@ -501,6 +559,27 @@ <<case "women">> <<set $defaultRules[_bci].clitSetting = "no default setting", $defaultRules[_bci].clitSettingXX = 100>> <</switch>> + <<if ndef $defaultRules[_bci].surgery>> + <<set $defaultRules[_bci].surgery = {lactation: "no default setting", cosmetic: 0, accent: "no default setting", shoulders: "no default setting", shouldersImplant: "no default setting", boobs: "no default setting", hips: "no default setting", hipsImplant: "no default setting", butt: "no default setting", faceShape: "no default setting", lips: "no default setting", holes: 0}>> + <</if>> + <<if ndef $defaultRules[_bci].surgery.prostate>> + <<set $defaultRules[_bci].surgery.prostate = "no default setting">> + <</if>> + <<if $releaseID < 1018>> + <<if $defaultRules[_bci].growth == "none">> + <<set $defaultRules[_bci].growth = {boobs: 0, butt: 0, lips: 0, dick: 0, balls: 0}>> + <<elseif $defaultRules[_bci].growth == "girlish">> + <<set $defaultRules[_bci].growth = {boobs: 350, butt: 2, lips: 25, dick: 0, balls: 0}>> + <<elseif $defaultRules[_bci].growth == "stacked">> + <<set $defaultRules[_bci].growth = {boobs: 1000, butt: 4, lips: 25, dick: 4, balls: 4}>> + <<elseif $defaultRules[_bci].growth == "functional">> + <<set $defaultRules[_bci].growth = {boobs: 9000, butt: 10, lips: 45, dick: 6, balls: 6}>> + <<elseif $defaultRules[_bci].growth == "unlimited">> + <<set $defaultRules[_bci].growth = {boobs: 24000, butt: 10, lips: 100, dick: 10, balls: 6}>> + <<else>> + <<set $defaultRules[_bci].growth = {boobs: "no default setting", butt: "no default setting", lips: "no default setting", dick: "no default setting", balls: "no default setting"}>> + <</if>> + <</if>> <</for>> <<if ndef $month>> diff --git a/src/uncategorized/rulesAssistant.tw b/src/uncategorized/rulesAssistant.tw index 3f8b1a937e74954ee63a4bf553d93d0f949e783e..0c29b89155cb323081abd77c19ee70fcbd3e18d4 100644 --- a/src/uncategorized/rulesAssistant.tw +++ b/src/uncategorized/rulesAssistant.tw @@ -167,112 +167,98 @@ __Rule $r Automatic Activation__ <<unset _customCondition>> <<set $currentRule.condition = {id: "false"}>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Always">> <<unset _customCondition>> <<set $currentRule.condition = {id: "true"}>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Devotion">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "devotion")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Trust">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "trust")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Health">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "health")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Sex drive">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "energy")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Weight">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "weight")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Age">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "actualAge")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Body Age">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "physicalAge")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Visible Age">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "visualAge")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Muscles">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "muscles")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Lactation">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "lactation")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Pregnancy">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "preg")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Pregnancy Multiples">> <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "pregType")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<if $bellyImplants == 1>> | @@ -280,8 +266,7 @@ __Rule $r Automatic Activation__ <<unset _customCondition>> <<set $currentRule.condition = changeVariable($currentRule.condition, "bellyImplant")>> <<RAChangeActivation>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> | @@ -295,12 +280,10 @@ __Rule $r Automatic Activation__ (custom): <br> <<textinput "_customCondition" _customCondition>> <<set _customConditionOld = _customCondition>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</textinput>> <</replace>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<else>> @@ -315,8 +298,7 @@ __Rule $r Automatic Activation__ //Sir, I'm afraid the condition you have given me is too complex to display in the usual interface.//<br> <<textinput "_customCondition" _customCondition>> <<set _customConditionOld = _customCondition>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</textinput>> <</replace>> <</timed>> @@ -408,8 +390,7 @@ Clothes: <<link "Select her own outfit">> <<set $currentRule.clothes = "choosing her own clothes">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -417,183 +398,157 @@ Clothes: <<link "No default clothes setting">> <<set $currentRule.clothes = "no default setting">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Bangles">> <<set $currentRule.clothes = "slutty jewelry">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Bodysuit">> <<set $currentRule.clothes = "a comfortable bodysuit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Cheerleader outfit">> <<set $currentRule.clothes = "a cheerleader outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Clubslut netting">> <<set $currentRule.clothes = "clubslut netting">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Cutoffs and a t-shirt">> <<set $currentRule.clothes = "cutoffs and a t-shirt">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Fallen nun">> <<set $currentRule.clothes = "a fallen nuns habit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Halter top">> <<set $currentRule.clothes = "a halter top dress">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Hijab and abaya">> <<set $currentRule.clothes = "a hijab and abaya">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Latex catsuit">> <<set $currentRule.clothes = "a latex catsuit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Leotard">> <<set $currentRule.clothes = "a leotard">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Maid (nice)">> <<set $currentRule.clothes = "a nice maid outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Maid (slutty)">> <<set $currentRule.clothes = "a slutty maid outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Military uniform">> <<set $currentRule.clothes = "a military uniform">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Mini dress">> <<set $currentRule.clothes = "a mini dress">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Nice lingerie">> <<set $currentRule.clothes = "attractive lingerie">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Nurse (nice)">> <<set $currentRule.clothes = "a nice nurse outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Nurse (slutty)">> <<set $currentRule.clothes = "a slutty nurse outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Schoolgirl">> <<set $currentRule.clothes = "a schoolgirl outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Silken ballgown">> <<set $currentRule.clothes = "a ball gown">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Skimpy battledress">> <<set $currentRule.clothes = "battledress">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Slave gown">> <<set $currentRule.clothes = "a slave gown">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "String bikini">> <<set $currentRule.clothes = "a string bikini">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Succubus costume">> <<set $currentRule.clothes = "a succubus outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Suit (nice)">> <<set $currentRule.clothes = "nice business attire">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Suit (slutty)">> <<set $currentRule.clothes = "slutty business attire">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<if ($arcologies[0].FSPhysicalIdealist != "unset") || ($cheatMode == 1) || ($clothesBoughtOil == 1)>> @@ -601,8 +556,7 @@ Clothes: <<link "Body oil">> <<set $currentRule.clothes = "body oil">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSGenderFundamentalist != "unset") || ($cheatMode == 1) || ($clothesBoughtBunny == 1)>> @@ -610,8 +564,7 @@ Clothes: <<link "Bunny outfit">> <<set $currentRule.clothes = "a bunny outfit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSDegradationist != "unset") || ($cheatMode == 1) || ($clothesBoughtChains == 1)>> @@ -619,8 +572,7 @@ Clothes: <<link "Chains">> <<set $currentRule.clothes = "chains">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSChattelReligionist != "unset") || ($cheatMode == 1) || ($clothesBoughtHabit == 1)>> @@ -628,8 +580,7 @@ Clothes: <<link "Chattel habit">> <<set $currentRule.clothes = "a chattel habit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSPaternalist != "unset") || ($cheatMode == 1) || ($clothesBoughtConservative == 1)>> @@ -637,8 +588,7 @@ Clothes: <<link "Conservative clothing">> <<set $currentRule.clothes = "conservative clothing">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSArabianRevivalist != "unset") || ($cheatMode == 1) || ($clothesBoughtHarem == 1)>> @@ -646,8 +596,7 @@ Clothes: <<link "Harem gauze">> <<set $currentRule.clothes = "harem gauze">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSAztecRevivalist != "unset") || ($cheatMode == 1) || ($clothesBoughtHuipil == 1)>> @@ -655,8 +604,7 @@ Clothes: <<link "Huipil">> <<set $currentRule.clothes = "a huipil", $currentRule.choosesOwnClothes = 0>> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSEdoRevivalist != "unset") || ($cheatMode == 1) || ($clothesBoughtKimono == 1)>> @@ -664,8 +612,7 @@ Clothes: <<link "Kimono">> <<set $currentRule.clothes = "a kimono">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSRepopulationFocus != "unset") || ($cheatMode == 1) || ($clothesBoughtMaternityDress == 1)>> @@ -673,8 +620,7 @@ Clothes: <<link "Maternity dress">> <<set $currentRule.clothes = "a maternity dress">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSRepopulationFocus != "unset") || ($cheatMode == 1) || ($clothesBoughtMaternityLingerie == 1)>> @@ -682,8 +628,7 @@ Clothes: <<link "Maternity lingerie">> <<set $currentRule.clothes = "attractive lingerie for a pregnant woman">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSChineseRevivalist != "unset") || ($cheatMode == 1) || ($clothesBoughtQipao == 1)>> @@ -691,8 +636,7 @@ Clothes: <<link "Slutty qipao">> <<set $currentRule.clothes = "a slutty qipao">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSHedonisticDecadence != "unset") || ($cheatMode == 1) || ($clothesBoughtLazyClothes == 1)>> @@ -700,8 +644,7 @@ Clothes: <<link "Stretch pants and a crop-top">> <<set $currentRule.clothes = "stretch pants and a crop-top">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSRomanRevivalist != "unset") || ($cheatMode == 1) || ($clothesBoughtToga == 1)>> @@ -709,8 +652,7 @@ Clothes: <<link "Toga">> <<set $currentRule.clothes = "a toga">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<if ($arcologies[0].FSPastoralist != "unset") || ($cheatMode == 1) || ($clothesBoughtWestern == 1)>> @@ -718,8 +660,7 @@ Clothes: <<link "Western clothing">> <<set $currentRule.clothes = "Western clothing">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> @@ -728,36 +669,31 @@ Clothes: <<link "Nude">> <<set $currentRule.clothes = "no clothing">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Penitent nun">> <<set $currentRule.clothes = "a penitent nuns habit">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Restrictive latex">> <<set $currentRule.clothes = "restrictive latex">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Shibari ropes">> <<set $currentRule.clothes = "shibari ropes">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Uncomfortable straps">> <<set $currentRule.clothes = "uncomfortable straps">> <<RAChangeClothes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> @@ -768,15 +704,13 @@ Collar: ''$currentRule.collar.'' <<link "No default collar setting">> <<set $currentRule.collar = "no default setting">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "No collar">> <<set $currentRule.collar = "none">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -784,15 +718,13 @@ Collar: ''$currentRule.collar.'' <<link "Stylish leather">> <<set $currentRule.collar = "stylish leather">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Satin choker">> <<set $currentRule.collar = "satin choker">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Heavy Gold">> @@ -803,32 +735,28 @@ Collar: ''$currentRule.collar.'' <<link "Pretty jewelry">> <<set $currentRule.collar = "pretty jewelry">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<if $seeAge != 0>> <<link "Nice retirement counter">> <<set $currentRule.collar = "nice retirement counter">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<link "Cowbell">> <<set $currentRule.collar = "leather with cowbell">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<if ($arcologies[0].FSGenderFundamentalist != "unset") || ($cheatMode == 1) || ($clothesBoughtBunny == 1)>> | //FS// <<link "Bowtie collar">> <<set $currentRule.collar = "bowtie">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($arcologies[0].FSEgyptianRevivalist != "unset") || ($cheatMode == 1) || ($clothesBoughtEgypt == 1)>> @@ -836,8 +764,7 @@ Collar: ''$currentRule.collar.'' <<link "Ancient Egyptian">> <<set $currentRule.collar = "ancient Egyptian">> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> @@ -854,8 +781,7 @@ Collar: ''$currentRule.collar.'' <<link setup.harshCollars[_i].name>> <<set $currentRule.collar = setup.harshCollars[_i].value>> <<RAChangeCollar>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <</for>> @@ -874,8 +800,7 @@ Shoes: ''$currentRule.shoes.'' <<link setup.shoes[_i].name>> <<set $currentRule.shoes = setup.shoes[_i].value>> <<RAChangeShoes>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <</for>> @@ -900,8 +825,7 @@ Torso accessory: ''$currentRule.bellyAccessory.'' <<link setup.bellyAccessories[_i].name>> <<set $currentRule.bellyAccessory = setup.bellyAccessories[_i].value>> <<RAChangeBelly>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <</for>> @@ -920,8 +844,7 @@ Vaginal accessories for virgins: ''$currentRule.virginAccessory.'' <<link setup.vaginalAccessories[_i].name>> <<set $currentRule.virginAccessory = setup.vaginalAccessories[_i].value>> <<RAChangeVAccessory 0>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <<if setup.vaginalAccessories[_i].value == "huge dildo">> @@ -943,8 +866,7 @@ Vaginal accessories for anal virgins: ''$currentRule.aVirginAccessory.'' <<link setup.vaginalAccessories[_i].name>> <<set $currentRule.aVirginAccessory = setup.vaginalAccessories[_i].value>> <<RAChangeVAccessory 1>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <<if setup.vaginalAccessories[_i].value == "huge dildo">> @@ -966,8 +888,7 @@ Vaginal accessories for other slaves: ''$currentRule.vaginalAccessory.'' <<link setup.vaginalAccessories[_i].name>> <<set $currentRule.vaginalAccessory = setup.vaginalAccessories[_i].value>> <<RAChangeVAccessory 2>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <<if setup.vaginalAccessories[_i].value == "huge dildo">> @@ -989,8 +910,7 @@ Dick accessories for anal virgins: ''$currentRule.aVirginDickAccessory.'' <<link setup.dickAccessories[_i].name>> <<set $currentRule.aVirginDickAccessory = setup.dickAccessories[_i].value>> <<RAChangeDAccessory 0>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <</for>> @@ -1009,8 +929,7 @@ Dick accessories for other slaves: ''$currentRule.dickAccessory.'' <<link setup.dickAccessories[_i].name>> <<set $currentRule.dickAccessory = setup.dickAccessories[_i].value>> <<RAChangeDAccessory 1>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <</for>> @@ -1030,8 +949,7 @@ Buttplugs for anal virgins: ''$currentRule.aVirginButtplug.'' <<link setup.buttplugs[_i].name>> <<set $currentRule.aVirginButtplug = setup.buttplugs[_i].value>> <<RAChangeBAccessory 0>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <<if setup.buttplugs[_i].value == "huge plug">> @@ -1052,8 +970,7 @@ Buttplugs for other slaves: ''$currentRule.buttplug.'' <<link setup.buttplugs[_i].name>> <<set $currentRule.buttplug = setup.buttplugs[_i].value>> <<RAChangeBAccessory 1>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <<if setup.buttplugs[_i].value == "huge plug">> @@ -1145,29 +1062,25 @@ Health drugs: <<link "No default setting">> <<set $currentRule.curatives = "no default setting">> <<RAChangeCuratives>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.curatives = 0>> <<RAChangeCuratives>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Preventatives">> <<set $currentRule.curatives = 1>> <<RAChangeCuratives>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Curatives">> <<set $currentRule.curatives = 2>> <<RAChangeCuratives>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1193,36 +1106,31 @@ Aphrodisiacs: <<link "No default setting">> <<set $currentRule.aphrodisiacs = "no default setting">> <<RAChangeAphrodisiacs>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.aphrodisiacs = 0>> <<RAChangeAphrodisiacs>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Standard">> <<set $currentRule.aphrodisiacs = 1>> <<RAChangeAphrodisiacs>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Extreme">> <<set $currentRule.aphrodisiacs = 2>> <<RAChangeAphrodisiacs>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Anaphrodisiacs">> <<set $currentRule.aphrodisiacs = -1>> <<RAChangeAphrodisiacs>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1250,52 +1158,45 @@ Contraceptives for fertile slaves: <<link "No default setting">> <<set $currentRule.preg = "no default setting">> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Fertile">> <<set $currentRule.preg = 0>> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Very fertile">> <<set $currentRule.preg = 1>> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Extremely fertile">> <<set $currentRule.preg = 2>> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<if $seeHyperPreg == 1 && $superFertilityDrugs == 1>> <<link "Hyper fertile">> <<set $currentRule.preg = 3>> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Maximize fertility">> <<set $currentRule.preg = 4>> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <</if>> <<link "Contraceptives">> <<set $currentRule.preg = -1>> <<RAChangePreg>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1331,43 +1232,37 @@ Hormones for female slaves: <<link "No default setting">> <<set $currentRule.XX = "no default setting">> <<RAChangeXXHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Intensive Female">> <<set $currentRule.XX = 2>> <<RAChangeXXHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Female">> <<set $currentRule.XX = 1>> <<RAChangeXXHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.XX = 0>> <<RAChangeXXHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Male">> <<set $currentRule.XX = -1>> <<RAChangeXXHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Intensive Male">> <<set $currentRule.XX = -2>> <<RAChangeXXHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1393,43 +1288,37 @@ Hormones for shemales: <<link "No default setting">> <<set $currentRule.XY = "no default setting">> <<RAChangeXYHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Intensive Female">> <<set $currentRule.XY = 2>> <<RAChangeXYHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Female">> <<set $currentRule.XY = 1>> <<RAChangeXYHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.XY = 0>> <<RAChangeXYHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Male">> <<set $currentRule.XY = -1>> <<RAChangeXYHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Intensive Male">> <<set $currentRule.XY = -2>> <<RAChangeXYHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1455,43 +1344,37 @@ Hormones for geldings: <<link "No default setting">> <<set $currentRule.gelding = "no default setting">> <<RAChangeGeldHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Intensive Female">> <<set $currentRule.gelding = 2>> <<RAChangeGeldHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Female">> <<set $currentRule.gelding = 1>> <<RAChangeGeldHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.gelding = 0>> <<RAChangeGeldHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Male">> <<set $currentRule.gelding = -1>> <<RAChangeGeldHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Intensive Male">> <<set $currentRule.gelding = -2>> <<RAChangeGeldHormones>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1517,8 +1400,7 @@ Other drugs: // Will be overriden by hormones and other drugs where applicable./ <<link setup.drugs[_i].name>> <<set $currentRule.drug = setup.drugs[_i].value>> <<RAChangeDrugs>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</capture>> <</for>> @@ -1551,59 +1433,51 @@ Slave diets: <<link "No default diet setting">> <<set $currentRule.diet = "no default setting">> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Fix fat and skinny slaves">> <<set $currentRule.diet = "attractive">> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Curvy">> <<set $currentRule.diet = 30>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Average">> <<set $currentRule.diet = 0>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Thin">> <<set $currentRule.diet = -30>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<if $feeder == 1>> | <<link "Feminine">> <<set $currentRule.diet = "XX">> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Masculine">> <<set $currentRule.diet = "XY">> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<if $dietXXY == 1>> | <<link "Futanari">> <<set $currentRule.diet = "XXY">> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <</if>> /* closes $feeder == 1 */ @@ -1622,15 +1496,13 @@ Diet support for growth drugs: <<link "On">> <<set $currentRule.dietGrowthSupport = 1>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Off">> <<set $currentRule.dietGrowthSupport = 0>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> </span> @@ -1660,56 +1532,49 @@ Diet base: <<link "no default setting">> <<set $currentRule.dietCum = "no default setting">> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Normal Diet">> <<set $currentRule.dietCum = 0>> <<set $currentRule.dietMilk = 0>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Cum Added">> <<set $currentRule.dietCum = 1>> <<set $currentRule.dietMilk = 0>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Milk Added">> <<set $currentRule.dietCum = 0>> <<set $currentRule.dietMilk = 1>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Cum & Milk Added">> <<set $currentRule.dietCum = 1>> <<set $currentRule.dietMilk = 1>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Cum-Based">> <<set $currentRule.dietCum = 2>> <<set $currentRule.dietMilk = 0>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Milk Based">> <<set $currentRule.dietCum = 0>> <<set $currentRule.dietMilk = 2>> <<RAChangeDiet>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1733,36 +1598,31 @@ Muscles: <<link "No default diet setting">> <<set $currentRule.muscles = "no default setting">> <<RAChangeMuscles>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.muscles = 0>> <<RAChangeMuscles>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Toned">> <<set $currentRule.muscles = 20>> <<RAChangeMuscles>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Ripped">> <<set $currentRule.muscles = 50>> <<RAChangeMuscles>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Massive">> <<set $currentRule.muscles = 100>> <<RAChangeMuscles>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1784,29 +1644,25 @@ Braces: <<link "No default braces setting">> <<set $currentRule.teeth = "no default setting">> <<RAChangeBraces>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.teeth = "none">> <<RAChangeBraces>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Straighten">> <<set $currentRule.teeth = "straighten">> <<RAChangeBraces>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Universal">> <<set $currentRule.teeth = "universal">> <<RAChangeBraces>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1819,16 +1675,14 @@ Assistant-applied implants: <<link "Off">> <<set $currentRule.autoSurgery = 0>> <<RAChangeAssistantImplants>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<else>> ''off.'' <<link "Activate">> <<set $currentRule.autoSurgery = 1>> <<RAChangeAssistantImplants>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> </span> @@ -1845,29 +1699,25 @@ Living standard: ''$currentRule.livingRules.'' <<link "No default setting">> <<set $currentRule.livingRules = "no default setting">> <<RAChangeLiving>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Luxurious">> <<set $currentRule.livingRules = "luxurious">> <<RAChangeLiving>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Normal">> <<set $currentRule.livingRules = "normal">> <<RAChangeLiving>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Spare">> <<set $currentRule.livingRules = "spare">> <<RAChangeLiving>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1883,36 +1733,31 @@ Typical punishment: ''$currentRule.standardPunishment.'' <<link "No default setting">> <<set $currentRule.standardPunishment = "no default setting">> <<RAChangePunish>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Confinement">> <<set $currentRule.standardPunishment = "confinement">> <<RAChangePunish>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Whipping">> <<set $currentRule.standardPunishment = "whipping">> <<RAChangePunish>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Chastity">> <<set $currentRule.standardPunishment = "chastity">> <<RAChangePunish>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Situational">> <<set $currentRule.standardPunishment = "situational">> <<RAChangePunish>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1928,36 +1773,31 @@ Typical reward: ''$currentRule.standardReward.'' <<link "No default setting">> <<set $currentRule.standardReward = "no default setting">> <<RAChangeReward>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Relaxation">> <<set $currentRule.standardReward = "relaxation">> <<RAChangeReward>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Drugs">> <<set $currentRule.standardReward = "drugs">> <<RAChangeReward>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Orgasm">> <<set $currentRule.standardReward = "orgasm">> <<RAChangeReward>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Situational">> <<set $currentRule.standardReward = "situational">> <<RAChangeReward>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -1969,29 +1809,25 @@ Release rules: ''$currentRule.releaseRules.'' <<link "No default setting">> <<set $currentRule.releaseRules = "no default setting">> <<RAChangeMast>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Permissive">> <<set $currentRule.releaseRules = "permissive">> <<RAChangeMast>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Sapphic">> <<set $currentRule.releaseRules = "sapphic">> <<RAChangeMast>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Restrictive">> <<set $currentRule.releaseRules = "restrictive">> <<RAChangeMast>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -2002,78 +1838,67 @@ Smart piercing fetish target: <span id = "spf">''$currentRule.clitSetting.''</sp <<link "No default setting">> <<set $currentRule.clitSetting = "no default setting">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Vanilla">> <<set $currentRule.clitSetting = "vanilla">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Oral">> <<set $currentRule.clitSetting = "oral">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Anal">> <<set $currentRule.clitSetting = "anal">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Boobs">> <<set $currentRule.clitSetting = "boobs">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Sub">> <<set $currentRule.clitSetting = "submissive">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Dom">> <<set $currentRule.clitSetting = "dom">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Humiliation">> <<set $currentRule.clitSetting = "humiliation">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Preg">> <<set $currentRule.clitSetting = "pregnancy">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Pain">> <<set $currentRule.clitSetting = "masochist">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Sadism">> <<set $currentRule.clitSetting = "sadist">> <<RAChangeSPF>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -2084,36 +1909,31 @@ Smart piercing XY attraction target: <span id = "spxy"><<RAInitSPXY>></span> <<link "No default setting">> <<set $currentRule.clitSettingXY = "no default setting">> <<RAChangeSPXY>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Passionate">> <<set $currentRule.clitSettingXY = 100>> <<RAChangeSPXY>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Attracted">> <<set $currentRule.clitSettingXY = 75>> <<RAChangeSPXY>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Indifferent">> <<set $currentRule.clitSettingXY = 45>> <<RAChangeSPXY>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.clitSettingXY = 0>> <<RAChangeSPXY>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -2124,36 +1944,31 @@ Smart piercing XX attraction target: <span id = "spxx"><<RAInitSPXX>></span> <<link "No default setting">> <<set $currentRule.clitSettingXX = "no default setting">> <<RAChangeSPXX>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Passionate">> <<set $currentRule.clitSettingXX = 100>> <<RAChangeSPXX>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Attracted">> <<set $currentRule.clitSettingXX = 75>> <<RAChangeSPXX>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Indifferent">> <<set $currentRule.clitSettingXX = 45>> <<RAChangeSPXX>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "None">> <<set $currentRule.clitSettingXX = 0>> <<RAChangeSPXX>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -2164,50 +1979,43 @@ Smart piercing sex drive target: <span id = "spe"><<RAInitSPE>></span> <<link "No default setting">> <<set $currentRule.clitSettingEnergy = "no default setting">> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Nympho">> <<set $currentRule.clitSettingEnergy = 100>> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Sex Addict">> <<set $currentRule.clitSettingEnergy = 85>> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Powerful">> <<set $currentRule.clitSettingEnergy = 65>> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Healthy">> <<set $currentRule.clitSettingEnergy = 45>> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Weak">> <<set $currentRule.clitSettingEnergy = 25>> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Frigid">> <<set $currentRule.clitSettingEnergy = 0>> <<RAChangeSPE>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -2219,29 +2027,25 @@ Speech rules: ''$currentRule.speechRules.'' <<link "No default setting">> <<set $currentRule.speechRules = "no default setting">> <<RAChangeSpeech>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Permissive">> <<set $currentRule.speechRules = "permissive">> <<RAChangeSpeech>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Suppress accents">> <<set $currentRule.speechRules = "accent elimination">> <<RAChangeSpeech>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Restrictive">> <<set $currentRule.speechRules = "restrictive">> <<RAChangeSpeech>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <br> @@ -2253,29 +2057,25 @@ Relationship rules: ''$currentRule.relationshipRules.'' <<link "No default setting">> <<set $currentRule.relationshipRules = "no default setting">> <<RAChangeRelationship>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Permissive">> <<set $currentRule.relationshipRules = "permissive">> <<RAChangeRelationship>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Just friends">> <<set $currentRule.relationshipRules = "just friends">> <<RAChangeRelationship>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "Restrictive">> <<set $currentRule.relationshipRules = "restrictive">> <<RAChangeRelationship>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<if $studio == 1>> @@ -2286,8 +2086,7 @@ Relationship rules: ''$currentRule.relationshipRules.'' <<link "Enable">> <<set $currentRule.pornFameSpending = 0>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<else>> Weekly porn publicity subsidy: ''¤$currentRule.pornFameSpending.'' @@ -2297,57 +2096,49 @@ Relationship rules: ''$currentRule.relationshipRules.'' <<link "No default setting">> <<set $currentRule.pornFameSpending = "no default setting">> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "No subsidy">> <<set $currentRule.pornFameSpending = 0>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "1000">> <<set $currentRule.pornFameSpending = 1000>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "2000">> <<set $currentRule.pornFameSpending = 2000>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "3000">> <<set $currentRule.pornFameSpending = 3000>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "4000">> <<set $currentRule.pornFameSpending = 4000>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "5000">> <<set $currentRule.pornFameSpending = 5000>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> | <<link "No broadcasting">> <<set $currentRule.pornFameSpending = -1>> <<RAChangeFameSpending>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> diff --git a/src/utility/raWidgets.tw b/src/utility/raWidgets.tw index 7f54ae3022b55d6e1599c403f4f9f9cd89e0b25d..d4f656ff673666c1828809fe932e69e4c29935aa 100644 --- a/src/utility/raWidgets.tw +++ b/src/utility/raWidgets.tw @@ -141,1197 +141,850 @@ <</widget>> /% - Call as <<RAChangeApplyAssignment>> -%/ -<<widget "RAChangeApplyAssignment">> -<<replace #applyassignment>> -<<set _rest = false>> -<<set _fucktoy = false>> -<<set _servant = false>> -<<set _confined = false>> -<<set _whore = false>> -<<set _public = false>> -<<set _milked = false>> -<<set _subordinate = false>> -<<set _gloryhole = false>> -<<set _classes = false>> -<<if def $currentRule.assignment>> - <<for _a = $currentRule.assignment.length; _a >= 0; _a-->> - <<if $currentRule.assignment[_a] == "rest">> - <<set _rest = true>> - <</if>> - <<if $currentRule.assignment[_a] == "please you">> - <<set _fucktoy = true>> - <</if>> - <<if $currentRule.assignment[_a] == "be a servant">> - <<set _servant = true>> - <</if>> - <<if $currentRule.assignment[_a] == "whore">> - <<set _whore = true>> - <</if>> - <<if $currentRule.assignment[_a] == "work a glory hole">> - <<set _gloryhole = true>> - <</if>> - <<if $currentRule.assignment[_a] == "get milked">> - <<set _milked = true>> + % Call as <<RACommonAssignmentVariables>> + %/ +<<widget "RACommonAssignmentVariables">> + <<set _assignments = [ + "rest", + "whore", + "please you", + "get milked", + "be a servant", + "take classes", + "stay confined", + "serve the public", + "work a glory hore", + "be a subordinate slave", + ]>> + + <<set _facilityAssignments = [ + "rest in the spa", + "serve in the club", + "work as a servant", + "work in the dairy", + "work in the brothel", + "learn in the schoolroom", + "live with your Head Girl", + "be confined in the arcade", + "serve in the master suite", + "get treatment in the clinic", + "be confined in the cellblock", + ]>> +<</widget>> + +/% + % Call as <<RANormalizeAssignments>> + %/ +<<widget "RANormalizeAssignments">> +<<RACommonAssignmentVariables>> + +<<switch $args[0]>> +<<case "assignment">> + <<if $currentRule.assignment.length > 0>> + <<set $currentRule.excludeAssignment = []>> + <<set $currentRule.facilityRemove = false>> + <<RAChangeAssignFacility>> + <</if>> + /% RAChangeExcludeAssignment is also responsible for the case that both + % assignment and excludeAssignment are empty (it sets some colors and + % stuff) so we always need to call it. + %/ + <<RAChangeExcludeAssignment>> + <<RAChangeApplyAssignment>> + <<RARuleModified>> + +<<case "excludeAssignment">> + <<if $currentRule.excludeAssignment.length > 0>> + <<set $currentRule.assignment = []>> + <<RAChangeApplyAssignment>> + <</if>> + <<RAChangeExcludeAssignment>> + <<RARuleModified>> + +<<case "facility">> + <<if $currentRule.facility.length > 0>> + <<set $currentRule.excludeFacility = []>> + <<if !$currentRule.facility.includes($currentRule.setAssignment)>> + <<set $currentRule.facilityRemove = false>> + <<RAChangeAssignFacility>> <</if>> - <<if $currentRule.assignment[_a] == "serve the public">> - <<set _public = true>> + <</if>> + /% same as above with RAChangeExcludeAssignment %/ + <<RAChangeExcludeFacility>> + <<RAChangeApplyFacility>> + <<RARuleModified>> + +<<case "excludeFacility">> + <<if $currentRule.excludeFacility.length > 0>> + <<set $currentRule.facility = []>> + <<if $currentRule.excludeFacility.includes($currentRule.setAssignment)>> + <<set $currentRule.facilityRemove = false>> + <<RAChangeAssignFacility>> <</if>> - <<if $currentRule.assignment[_a] == "be a subordinate slave">> - <<set _subordinate = true>> + <<RAChangeApplyFacility>> + <</if>> + <<RAChangeExcludeFacility>> + <<RARuleModified>> + +<<case "setAssignment">> + <<if _facilityAssignments.includes($currentRule.setAssignment) && $currentRule.facilityRemove>> + /% If a rule sends a slave to a facility that it does not + % manage (due to exclusion or inclusion settings) and + % facilityRemove is turned on, then the slave would be sent to + % the facility, the rule would not apply anymore and so she + % would be removed from the facility. So we try to prevent + % that. + %/ + <<if $currentRule.excludeFacility.includes($currentRule.setAssignment)>> + <<set $currentRule.excludeFacility.delete($currentRule.setAssignment)>> + <<RAChangeExcludeFacility>> <</if>> - <<if $currentRule.assignment[_a] == "stay confined">> - <<set _confined = true>> + <<if $currentRule.facility.length > 0 && !$currentRule.facility.includes($currentRule.setAssignment)>> + <<set $currentRule.facility.push($currentRule.setAssignment)>> + <<RAChangeApplyFacility>> <</if>> - <<if $currentRule.assignment[_a] == "take classes">> - <<set _classes = true>> + <<else>> + /% facilityRemove would have no effect when the assignment is not in a + % facility, but we reset anyway to prevent potential surprises to the + % user later + %/ + <<set $currentRule.facilityRemove = false>> + <</if>> + <<RAChangeSetAssignment>> + <<RAChangeAssignFacility>> + <<RARuleModified>> + +<<case "facilityRemove">> + <<if $currentRule.facilityRemove>> + /% If facilityRemove is true that means that it was just set + % which means that setAssignment is a facility (because otherwise + % the UI that enables facilityRemove wouldn't be visible) + %/ + <<set $currentRule.assignment = []>> + <<set $currentRule.excludeFacility.delete($currentRule.setAssignment)>> + <<if $currentRule.facility.length > 0>> + <<set $currentRule.facility.push($currentRule.setAssignment)>> + <<RAChangeApplyFacility>> <</if>> - <</for>> -<</if>> + /% again the thing with the RAChangeExcludeAssignment %/ + <<RAChangeExcludeAssignment>> + <<RAChangeApplyAssignment>> + <<RAChangeExcludeFacility>> + <<else>> + /% nothing to do here really... %/ + <</if>> + <<RAChangeAssignFacility>> + <<RARuleModified>> +<</switch>> +<</widget>> + +/% + % Call as <<RAChangeApplyAssignment>> + %/ +<<widget "RAChangeApplyAssignment">> +<<if (ndef $currentRule.assignment)>><<set $currentRule.assignment = []>><</if>> +<<if (ndef $currentRule.excludeAssignment)>><<set $currentRule.excludeAssignment = []>><</if>> + +<<set _rest = _whore = _fucktoy = _milked = _servant = _classes = _confined = _public = _gloryhole = _subordinate = false>> +<<for _a = 0; _a < $currentRule.assignment.length; _a++>> + <<switch $currentRule.assignment[_a]>> + <<case "rest">> <<set _rest = true>> + <<case "whore">> <<set _whore = true>> + <<case "please you">> <<set _fucktoy = true>> + <<case "get milked">> <<set _milked = true>> + <<case "be a servant">> <<set _servant = true>> + <<case "take classes">> <<set _classes = true>> + <<case "stay confined">> <<set _confined = true>> + <<case "serve the public">> <<set _public = true>> + <<case "work a glory hole">> <<set _gloryhole = true>> + <<case "be a subordinate slave">> <<set _subordinate = true>> + <</switch>> +<</for>> + +<<replace #applyassignment>> <<if _rest || _fucktoy || _servant || _confined || _whore || _public || _milked || _subordinate || _gloryhole || _classes>> - Apply to assignments: + Apply to assignments: <<link "All">> <<set $currentRule.assignment = []>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> - <</link>> | + <<RANormalizeAssignments "assignment">> + <</link>> <<else>> - @@.gray;Apply to assignments:@@ - ''All'' | + @@.gray;Apply to assignments:@@ ''All'' <</if>> - +| <<if !_rest>> <<link "Rest">> <<set $currentRule.assignment.push("rest")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Rest'' <<link Stop>> <<set $currentRule.assignment.delete("rest")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_fucktoy>> <<link "Fucktoy">> <<set $currentRule.assignment.push("please you")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Fucktoy'' <<link Stop>> <<set $currentRule.assignment.delete("please you")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_subordinate>> <<link "Subordinate Slave">> <<set $currentRule.assignment.push("be a subordinate slave")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Subordinate Slave'' <<link Stop>> <<set $currentRule.assignment.delete("be a subordinate slave")>> - <<RAChangeSetAssignment>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | - <<if !_servant>> <<link "House Servant">> <<set $currentRule.assignment.push("be a servant")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''House Servant'' <<link Stop>> <<set $currentRule.assignment.delete("be a servant")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_confined>> <<link "Confined">> <<set $currentRule.assignment.push("stay confined")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Confined'' <<link Stop>> <<set $currentRule.assignment.delete("stay confined")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_whore>> <<link "Whore">> <<set $currentRule.assignment.push("whore")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Whore'' <<link Stop>> <<set $currentRule.assignment.delete("whore")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_public>> <<link "Public Servant">> <<set $currentRule.assignment.push("serve the public")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Public Servant'' <<link Stop>> <<set $currentRule.assignment.delete("serve the public")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_classes>> <<link "Classes">> <<set $currentRule.assignment.push("take classes")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Classes'' <<link Stop>> <<set $currentRule.assignment.delete("take classes")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_milked>> <<link "Milked">> <<set $currentRule.assignment.push("get milked")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Milking'' <<link Stop>> <<set $currentRule.assignment.delete("get milked")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> | <<if !_gloryhole>> <<link "Gloryhole">> <<set $currentRule.assignment.push("work a glory hole")>> - <<set $currentRule.excludeAssignment = []>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <<else>> ''Gloryhole'' <<link Stop>> <<set $currentRule.assignment.delete("work a glory hole")>> - <<RAChangeApplyAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "assignment">> <</link>> <</if>> <</replace>> <</widget>> + /% - Call as <<RAChangeExcludeAssignment>> -%/ + % Call as <<RAChangeExcludeAssignment>> + %/ <<widget "RAChangeExcludeAssignment">> +<<if (ndef $currentRule.assignment)>><<set $currentRule.assignment = []>><</if>> +<<if (ndef $currentRule.excludeAssignment)>><<set $currentRule.excludeAssignment = []>><</if>> + +<<set _rest = _whore = _fucktoy = _milked = _servant = _classes = _confined = _public = _gloryhole = _subordinate = false>> +<<for _a = 0; _a < $currentRule.excludeAssignment.length; _a++>> + <<switch $currentRule.excludeAssignment[_a]>> + <<case "rest">> <<set _rest = true>> + <<case "whore">> <<set _whore = true>> + <<case "please you">> <<set _fucktoy = true>> + <<case "get milked">> <<set _milked = true>> + <<case "be a servant">> <<set _servant = true>> + <<case "take classes">> <<set _classes = true>> + <<case "stay confined">> <<set _confined = true>> + <<case "serve the public">> <<set _public = true>> + <<case "work a glory hole">> <<set _gloryhole = true>> + <<case "be a subordinate slave">> <<set _subordinate = true>> + <</switch>> +<</for>> + <<replace #excludeassignment>> <br> -<<set _rest = false>> -<<set _fucktoy = false>> -<<set _servant = false>> -<<set _confined = false>> -<<set _whore = false>> -<<set _public = false>> -<<set _milked = false>> -<<set _subordinate = false>> -<<set _gloryhole = false>> -<<set _classes = false>> -<<if def $currentRule.excludeAssignment>> - <<for _a = $currentRule.excludeAssignment.length; _a >= 0; _a-->> - <<if $currentRule.excludeAssignment[_a] == "rest">> - <<set _rest = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "please you">> - <<set _fucktoy = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "be a servant">> - <<set _servant = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "whore">> - <<set _whore = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "work a glory hole">> - <<set _gloryhole = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "get milked">> - <<set _milked = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "serve the public">> - <<set _public = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "be a subordinate slave">> - <<set _subordinate = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "stay confined">> - <<set _confined = true>> - <</if>> - <<if $currentRule.excludeAssignment[_a] == "take classes">> - <<set _classes = true>> - <</if>> - <</for>> -<</if>> <<if _rest || _fucktoy || _servant || _confined || _whore || _public || _milked || _subordinate || _gloryhole || _classes>> - Include all assignments except: + Include all assignments except: <<link "None">> <<set $currentRule.excludeAssignment = []>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> - <</link>> | -<<elseif (def $currentRule.assignment) && ($currentRule.assignment.length > 0)>> - @@.gray;Exclude assignments:@@ - ''None'' | + <<RANormalizeAssignments "excludeAssignment">> + <</link>> +<<elseif ($currentRule.assignment.length > 0)>> + @@.gray;Exclude assignments:@@ ''None'' <<else>> - Excluded assignments: - ''None'' | + Excluded assignments: ''None'' <</if>> +| <<if !_rest>> <<link "Rest">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("rest")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Rest'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("rest")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_fucktoy>> <<link "Fucktoy">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("please you")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Fucktoy'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("please you")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_subordinate>> <<link "Subordinate Slave">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("be a subordinate slave")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Subordinate Slave'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("be a subordinate slave")>> - <<RAChangeSetAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_servant>> <<link "House Servant">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("be a servant")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''House Servant'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("be a servant")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_confined>> <<link "Confined">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("stay confined")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Confined'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("stay confined")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_whore>> <<link "Whore">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("whore")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Whore'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("whore")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_public>> <<link "Public Servant">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("serve the public")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Public Servant'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("serve the public")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_classes>> <<link "Classes">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("take classes")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Classes'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("take classes")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_milked>> <<link "Milked">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("get milked")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Milking'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("get milked")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> | <<if !_gloryhole>> <<link "Gloryhole">> - <<set $currentRule.assignment = []>> <<set $currentRule.excludeAssignment.push("work a glory hole")>> - <<set $currentRule.setAssignment = "none">> - <<RAChangeApplyAssignment>> - <<RAChangeExcludeAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <<else>> ''Gloryhole'' <<link Stop>> <<set $currentRule.excludeAssignment.delete("work a glory hole")>> - <<RAChangeExcludeAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeAssignment">> <</link>> <</if>> <</replace>> <</widget>> /% - Call as <<RAChangeApplyFacility>> -%/ + % Call as <<RAChangeApplyFacility>> + %/ <<widget "RAChangeApplyFacility">> +<<if (ndef $currentRule.facility)>><<set $currentRule.facility = []>><</if>> +<<if (ndef $currentRule.excludeFacility)>><<set $currentRule.excludeFacility = []>><</if>> <<replace #applyfacility>> <<if ($HGSuite > 0) || ($brothel > 0) || ($club > 0) || ($arcade > 0) || ($dairy > 0) || ($servantsQuarters > 0) || ($masterSuite > 0) || ($schoolroom > 0) || ($spa > 0) || ($clinic > 0) || ($cellblock > 0)>> <br><br> -<<if (def $currentRule.facility) && ($currentRule.facility.length > 0)>> - Apply to facilities: +<<if ($currentRule.facility.length > 0)>> + Apply to facilities: <<link "All">> <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> - @@.gray;Apply to facilities:@@ - ''All'' + @@.gray;Apply to facilities:@@ ''All'' <</if>> <<if ($HGSuite > 0)>> | -<<if !ruleFacility($currentRule.facility,"hgsuite")>> +<<if !$currentRule.facility.includes("live with your Head Girl")>> <<link $HGSuiteNameCaps>> - <<set $currentRule.facility.push("hgsuite")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("live with your Head Girl")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$HGSuiteNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("hgsuite")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("live with your Head Girl")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($brothel > 0)>> | -<<if !ruleFacility($currentRule.facility,"brothel")>> +<<if !$currentRule.facility.includes("work in the brothel")>> <<link $brothelNameCaps>> - <<set $currentRule.facility.push("brothel")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("work in the brothel")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$brothelNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("brothel")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("work in the brothel")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($club > 0)>> | -<<if !ruleFacility($currentRule.facility,"club")>> +<<if !$currentRule.facility.includes("serve in the club")>> <<link $clubNameCaps>> - <<set $currentRule.facility.push("club")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("serve in the club")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$clubNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("club")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("serve in the club")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($arcade > 0)>> | -<<if !ruleFacility($currentRule.facility,"arcade")>> +<<if !$currentRule.facility.includes("be confined in the arcade")>> <<link $arcadeNameCaps>> - <<set $currentRule.facility.push("arcade")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("be confined in the arcade")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$arcadeNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("arcade")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("be confined in the arcade")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($dairy > 0)>> | -<<if !ruleFacility($currentRule.facility,"dairy")>> +<<if !$currentRule.facility.includes("work in the dairy")>> <<link $dairyNameCaps>> - <<set $currentRule.facility.push("dairy")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("work in the dairy")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$dairyNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("dairy")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("work in the dairy")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($servantsQuarters > 0)>> | -<<if !ruleFacility($currentRule.facility,"servantsquarters")>> +<<if !$currentRule.facility.includes("work as a servant")>> <<link $servantsQuartersNameCaps>> - <<set $currentRule.facility.push("servantsquarters")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("work as a servant")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$servantsQuartersNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("servantsquarters")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("work as a servant")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($masterSuite > 0)>> | -<<if !ruleFacility($currentRule.facility,"mastersuite")>> +<<if !$currentRule.facility.includes("serve in the master suite")>> <<link $masterSuiteNameCaps>> - <<set $currentRule.facility.push("mastersuite")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("serve in the master suite")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$masterSuiteNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("mastersuite")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("serve in the master suite")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($schoolroom > 0)>> | -<<if !ruleFacility($currentRule.facility,"schoolroom")>> +<<if !$currentRule.facility.includes("learn in the schoolroom")>> <<link $schoolroomNameCaps>> - <<set $currentRule.facility.push("schoolroom")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("learn in the schoolroom")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$schoolroomNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("schoolroom")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("learn in the schoolroom")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($spa > 0)>> | -<<if !ruleFacility($currentRule.facility,"spa")>> +<<if !$currentRule.facility.includes("rest in the spa")>> <<link $spaNameCaps>> - <<set $currentRule.facility.push("spa")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("rest in the spa")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$spaNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("spa")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("rest in the spa")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($clinic > 0)>> | -<<if !ruleFacility($currentRule.facility,"clinic")>> +<<if !$currentRule.facility.includes("get treatment in the clinic")>> <<link $clinicNameCaps>> - <<set $currentRule.facility.push("clinic")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("get treatment in the clinic")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> -''$clinicNameCaps'' + ''$clinicNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("clinic")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("get treatment in the clinic")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <<if ($cellblock > 0)>> | -<<if !ruleFacility($currentRule.facility,"cellblock")>> +<<if !$currentRule.facility.includes("be confined in the cellblock")>> <<link $cellblockNameCaps>> - <<set $currentRule.facility.push("cellblock")>> - <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.push("be confined in the cellblock")>> + <<RANormalizeAssignments "facility">> <</link>> <<else>> ''$cellblockNameCaps'' <<link Stop>> - <<set $currentRule.facility.delete("cellblock")>> - <<RAChangeApplyFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.facility.delete("be confined in the cellblock")>> + <<RANormalizeAssignments "facility">> <</link>> <</if>> <</if>> <</if>> <</replace>> <</widget>> + /% - Call as <<RAChangeExcludeFacility>> -%/ + % Call as <<RAChangeExcludeFacility>> + %/ <<widget "RAChangeExcludeFacility">> +<<if (ndef $currentRule.facility)>><<set $currentRule.facility = []>><</if>> +<<if (ndef $currentRule.excludeFacility)>><<set $currentRule.excludeFacility = []>><</if>> + <<replace #excludefacility>> <<if ($HGSuite > 0) || ($brothel > 0) || ($club > 0) || ($arcade > 0) || ($dairy > 0) || ($servantsQuarters > 0) || ($masterSuite > 0) || ($schoolroom > 0) || ($spa > 0) || ($clinic > 0) || ($cellblock > 0)>> <br> -<<if (def $currentRule.excludeFacility) && ($currentRule.excludeFacility.length > 0)>> - Applying to all facilities except: +<<if ($currentRule.excludeFacility.length > 0)>> + Applying to all facilities except: <<link "None">> <<set $currentRule.excludeFacility = []>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "excludeFacility">> <</link>> -<<elseif (def $currentRule.facility) && ($currentRule.facility.length > 0)>> - @@.gray;Exclude facilities:@@ - ''None'' +<<elseif ($currentRule.facility.length > 0)>> + @@.gray;Exclude facilities:@@ ''None'' <<else>> - Excluded facilities: - ''None'' + Excluded facilities: ''None'' <</if>> <<if ($HGSuite > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"hgsuite")>> +<<if !$currentRule.excludeFacility.includes("live with your Head Girl")>> <<link $HGSuiteNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("hgsuite")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("live with your Head Girl")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$HGSuiteNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("hgsuite")>> - <<if $currentRule.assignFacility == "hgsuite">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("live with your Head Girl")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($brothel > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"brothel")>> +<<if !$currentRule.excludeFacility.includes("work in the brothel")>> <<link $brothelNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("brothel")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("work in the brothel")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$brothelNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("brothel")>> - <<if $currentRule.assignFacility == "brothel">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("work in the brothel")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($club > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"club")>> +<<if !$currentRule.excludeFacility.includes("serve in the club")>> <<link $clubNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("club")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("serve in the club")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$clubNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("club")>> - <<if $currentRule.assignFacility == "club">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("serve in the club")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($arcade > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"arcade")>> +<<if !$currentRule.excludeFacility.includes("be confined in the arcade")>> <<link $arcadeNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("arcade")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("be confined in the arcade")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$arcadeNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("arcade")>> - <<if $currentRule.assignFacility == "arcade">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("be confined in the arcade")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($dairy > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"dairy")>> +<<if !$currentRule.excludeFacility.includes("work in the dairy")>> <<link $dairyNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("dairy")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("work in the dairy")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$dairyNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("dairy")>> - <<if $currentRule.assignFacility == "dairy">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("work in the dairy")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($servantsQuarters > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"servantsquarters")>> +<<if !$currentRule.excludeFacility.includes("work as a servant")>> <<link $servantsQuartersNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("servantsquarters")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("work as a servant")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$servantsQuartersNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("servantsquarters")>> - <<if $currentRule.assignFacility == "servantsquarters">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("work as a servant")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($masterSuite > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"mastersuite")>> +<<if !$currentRule.excludeFacility.includes("serve in the master suite")>> <<link $masterSuiteNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("mastersuite")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("serve in the master suite")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$masterSuiteNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("mastersuite")>> - <<if $currentRule.assignFacility == "mastersuite">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("serve in the master suite")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($schoolroom > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"schoolroom")>> +<<if !$currentRule.excludeFacility.includes("learn in the schoolroom")>> <<link $schoolroomNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("schoolroom")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("learn in the schoolroom")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$schoolroomNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("schoolroom")>> - <<if $currentRule.assignFacility == "schoolroom">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("learn in the schoolroom")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($spa > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"spa")>> +<<if !$currentRule.excludeFacility.includes("rest in the spa")>> <<link $spaNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("spa")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("rest in the spa")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$spaNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("spa")>> - <<if $currentRule.assignFacility == "spa">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("rest in the spa")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($clinic > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"clinic")>> +<<if !$currentRule.excludeFacility.includes("get treatment in the clinic")>> <<link $clinicNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("clinic")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("get treatment in the clinic")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> -''$clinicNameCaps'' + ''$clinicNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("clinic")>> - <<if $currentRule.assignFacility == "clinic">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("get treatment in the clinic")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> <<if ($cellblock > 0)>> | -<<if !ruleFacility($currentRule.excludeFacility,"cellblock")>> +<<if !$currentRule.excludeFacility.includes("be confined in the cellblock")>> <<link $cellblockNameCaps>> - <<set $currentRule.facility = []>> - <<set $currentRule.excludeFacility.push("cellblock")>> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyFacility>> - <<RAChangeExcludeFacility>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.push("be confined in the cellblock")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <<else>> ''$cellblockNameCaps'' <<link Stop>> - <<set $currentRule.excludeFacility.delete("cellblock")>> - <<if $currentRule.assignFacility == "cellblock">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <</if>> - <<RAChangeExcludeFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.excludeFacility.delete("be confined in the cellblock")>> + <<RANormalizeAssignments "excludeFacility">> <</link>> <</if>> <</if>> @@ -1340,36 +993,30 @@ <</widget>> /% - Call as <<RAChangeSetAssignment>> -%/ + % Call as <<RAChangeSetAssignment>> + %/ <<widget "RAChangeSetAssignment">> +<<RACommonAssignmentVariables>> + +<<if (ndef $currentRule.assignment)>><<set $currentRule.assignment = []>><</if>> +<<if (ndef $currentRule.excludeAssignment)>><<set $currentRule.excludeAssignment = []>><</if>> <<replace #setassignment>> <br><br> -<<if ($currentRule.setAssignment != "none")>> - Automatically set assignment: +<<if _assignments.includes($currentRule.setAssignment)>> + Automatically set assignment: <<link "None">> - <<set $currentRule.setAssignment = "none">> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "no default setting">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> - @@.gray;Automatically set assignment:@@ - ''None'' + @@.gray;Automatically set assignment:@@ ''None'' <</if>> | <<if ($currentRule.setAssignment != "rest")>> <<link "Rest">> - <<set $currentRule.assignment.delete("rest")>> <<set $currentRule.setAssignment = "rest">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Rest'' @@ -1377,15 +1024,8 @@ | <<if ($currentRule.setAssignment != "please you")>> <<link "Fucktoy">> - <<set $currentRule.assignment.delete("please you")>> <<set $currentRule.setAssignment = "please you">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Fucktoy'' @@ -1393,15 +1033,8 @@ | <<if ($currentRule.setAssignment != "be a servant")>> <<link "House Servant">> - <<set $currentRule.assignment.delete("be a servant")>> <<set $currentRule.setAssignment = "be a servant">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''House Servant'' @@ -1409,15 +1042,8 @@ | <<if ($currentRule.setAssignment != "stay confined")>> <<link "Confined">> - <<set $currentRule.assignment.delete("stay confined")>> <<set $currentRule.setAssignment = "stay confined">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Confined'' @@ -1425,15 +1051,8 @@ | <<if ($currentRule.setAssignment != "whore")>> <<link "Whore">> - <<set $currentRule.assignment.delete("whore")>> <<set $currentRule.setAssignment = "whore">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Whore'' @@ -1441,15 +1060,8 @@ | <<if ($currentRule.setAssignment != "serve the public")>> <<link "Public Servant">> - <<set $currentRule.assignment.delete("serve the public")>> <<set $currentRule.setAssignment = "serve the public">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Public Servant'' @@ -1457,49 +1069,26 @@ | <<if ($currentRule.setAssignment != "take classes")>> <<link "Classes">> - <<set $currentRule.assignment.delete("take classes")>> <<set $currentRule.setAssignment = "take classes">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Classes'' <</if>> | -/* disabled until we add a lactation check in DefaultRules when applying this <<if ($currentRule.setAssignment != "get milked")>> <<link "Milking">> - <<set $currentRule.assignment.delete("get milked")>> <<set $currentRule.setAssignment = "get milked">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Milking'' <</if>> | -*/ <<if ($currentRule.setAssignment != "work a glory hole")>> <<link "Gloryhole">> - <<set $currentRule.assignment.delete("work a glory hole")>> <<set $currentRule.setAssignment = "work a glory hole">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeApplyAssignment>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Gloryhole'' @@ -1508,12 +1097,7 @@ <<if ($currentRule.setAssignment != "choose her own job")>> <<link "Let her choose">> <<set $currentRule.setAssignment = "choose her own job">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeSetAssignment>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''Let her choose'' @@ -1522,43 +1106,32 @@ <</widget>> /% - Call as <<RAChangeAssignFacility>> -%/ + % Call as <<RAChangeAssignFacility>> + %/ <<widget "RAChangeAssignFacility">> +<<RACommonAssignmentVariables>> + +<<if (ndef $currentRule.facility)>><<set $currentRule.facility = []>><</if>> +<<if (ndef $currentRule.excludeFacility)>><<set $currentRule.excludeFacility = []>><</if>> <<replace #assignfacility>> <<if ($HGSuite > 0) || ($brothel > 0) || ($club > 0) || ($arcade > 0) || ($dairy > 0) || ($servantsQuarters > 0) || ($masterSuite > 0) || ($schoolroom > 0) || ($spa > 0) || ($clinic > 0) || ($cellblock > 0)>> <br> -<<if ($currentRule.assignFacility != "none")>> - Automatically assigning slaves to facility (when possible): +<<if _facilityAssignments.includes($currentRule.setAssignment)>> + Automatically assigning slaves to facility (when possible): <<link "None">> - <<set $currentRule.assignFacility = "none">> - <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "no default setting">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> - @@.gray;Automatically assign slaves to facility:@@ - ''None'' + @@.gray;Automatically assign slaves to facility:@@ ''None'' <</if>> <<if ($HGSuite > 0)>> | -<<if ($currentRule.assignFacility != "hgsuite")>> +<<if ($currentRule.setAssignment != "live with your Head Girl")>> <<link $HGSuiteNameCaps>> - <<set $currentRule.assignFacility = "hgsuite">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("hgsuite")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("hgsuite")>> - <<set $currentRule.facility.push("hgsuite")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "live with your Head Girl">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$HGSuiteNameCaps''<<if $HGSuiteSlaves >= $HGSuite>> @@.red;(full)@@<</if>> @@ -1566,21 +1139,10 @@ <</if>> <<if ($brothel > 0)>> | -<<if ($currentRule.assignFacility != "brothel")>> +<<if ($currentRule.setAssignment != "work in the brothel")>> <<link $brothelNameCaps>> - <<set $currentRule.assignFacility = "brothel">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("brothel")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("brothel")>> - <<set $currentRule.facility.push("brothel")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "work in the brothel">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$brothelNameCaps''<<if $brothelSlaves >= $brothel>> @@.red;(full)@@<</if>> @@ -1588,21 +1150,10 @@ <</if>> <<if ($club > 0)>> | -<<if ($currentRule.assignFacility != "club")>> +<<if ($currentRule.setAssignment != "serve in the club")>> <<link $clubNameCaps>> - <<set $currentRule.assignFacility = "club">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("club")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("club")>> - <<set $currentRule.facility.push("club")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "serve in the club">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$clubNameCaps''<<if $clubSlaves >= $club>> @@.red;(full)@@<</if>> @@ -1610,21 +1161,10 @@ <</if>> <<if ($arcade > 0)>> | -<<if ($currentRule.assignFacility != "arcade")>> +<<if ($currentRule.setAssignment != "be confined in the arcade")>> <<link $arcadeNameCaps>> - <<set $currentRule.assignFacility = "arcade">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("arcade")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("arcade")>> - <<set $currentRule.facility.push("arcade")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "be confined in the arcade">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$arcadeNameCaps''<<if $arcadeSlaves >= $arcade>> @@.red;(full)@@<</if>> @@ -1632,21 +1172,10 @@ <</if>> <<if ($dairy > 0)>> | -<<if ($currentRule.assignFacility != "dairy")>> +<<if ($currentRule.setAssignment != "work in the dairy")>> <<link $dairyNameCaps>> - <<set $currentRule.assignFacility = "dairy">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("dairy")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("dairy")>> - <<set $currentRule.facility.push("dairy")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "work in the dairy">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$dairyNameCaps''<<if $dairySlaves >= $dairy>> @@.red;(full)@@<</if>> @@ -1654,21 +1183,10 @@ <</if>> <<if ($servantsQuarters > 0)>> | -<<if ($currentRule.assignFacility != "servantsquarters")>> +<<if ($currentRule.setAssignment != "work as a servant")>> <<link $servantsQuartersNameCaps>> - <<set $currentRule.assignFacility = "servantsquarters">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("servantsquarters")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("servantsquarters")>> - <<set $currentRule.facility.push("servantsquarters")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "work as a servant">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$servantsQuartersNameCaps''<<if $servantsQuartersSlaves >= $servantsQuarters>> @@.red;(full)@@<</if>> @@ -1676,21 +1194,10 @@ <</if>> <<if ($masterSuite > 0)>> | -<<if ($currentRule.assignFacility != "mastersuite")>> +<<if ($currentRule.setAssignment != "serve in the master suite")>> <<link $masterSuiteNameCaps>> - <<set $currentRule.assignFacility = "mastersuite">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("mastersuite")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("mastersuite")>> - <<set $currentRule.facility.push("mastersuite")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "serve in the master suite">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$masterSuiteNameCaps''<<if $masterSuiteSlaves >= $masterSuite>> @@.red;(full)@@<</if>> @@ -1698,21 +1205,10 @@ <</if>> <<if ($schoolroom > 0)>> | -<<if ($currentRule.assignFacility != "schoolroom")>> +<<if ($currentRule.setAssignment != "learn in the schoolroom")>> <<link $schoolroomNameCaps>> - <<set $currentRule.assignFacility = "schoolroom">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("schoolroom")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("schoolroom")>> - <<set $currentRule.facility.push("schoolroom")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "learn in the schoolroom">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$schoolroomNameCaps''<<if $schoolroomSlaves >= $schoolroom>> @@.red;(full)@@<</if>> @@ -1720,21 +1216,10 @@ <</if>> <<if ($spa > 0)>> | -<<if ($currentRule.assignFacility != "spa")>> +<<if ($currentRule.setAssignment != "rest in the spa")>> <<link $spaNameCaps>> - <<set $currentRule.assignFacility = "spa">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("spa")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("spa")>> - <<set $currentRule.facility.push("spa")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "rest in the spa">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$spaNameCaps''<<if $spaSlaves >= $spa>> @@.red;(full)@@<</if>> @@ -1742,21 +1227,10 @@ <</if>> <<if ($clinic > 0)>> | -<<if ($currentRule.assignFacility != "clinic")>> +<<if ($currentRule.setAssignment != "get treatment in the clinic")>> <<link $clinicNameCaps>> - <<set $currentRule.assignFacility = "clinic">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("clinic")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("clinic")>> - <<set $currentRule.facility.push("clinic")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "get treatment in the clinic">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$clinicNameCaps''<<if $clinicSlaves >= $clinic>> @@.red;(full)@@<</if>> @@ -1764,102 +1238,82 @@ <</if>> <<if ($cellblock > 0)>> | -<<if ($currentRule.assignFacility != "cellblock")>> +<<if ($currentRule.setAssignment != "be confined in the cellblock")>> <<link $cellblockNameCaps>> - <<set $currentRule.assignFacility = "cellblock">> - <<set $currentRule.setAssignment = "none">> - <<if $currentRule.excludeFacility.length > 0>> - <<set $currentRule.excludeFacility.delete("cellblock")>> - <<RAChangeExcludeFacility>> - <<elseif $currentRule.facility.length > 0 && !$currentRule.facility.includes("cellblock")>> - <<set $currentRule.facility.push("cellblock")>> - <<RAChangeApplyFacility>> - <</if>> - <<RAChangeAssignFacility>> - <<RAChangeSetAssignment>> - <<RAChangeSave>> - <<RAChangeApply>> + <<set $currentRule.setAssignment = "be confined in the cellblock">> + <<RANormalizeAssignments "setAssignment">> <</link>> <<else>> ''$cellblockNameCaps''<<if $cellblockSlaves >= $cellblock>> @@.red;(full)@@<</if>> <</if>> <</if>> -<<if $currentRule.assignFacility != "none">> + +<<if _facilityAssignments.includes($currentRule.setAssignment)>> <br> -Automatically remove from facility when rule no longer applies (only if it was applied before): +Automatically remove from facility when rule stops applying: <<if $currentRule.facilityRemove>> ''True'' | <<link False>> <<set $currentRule.facilityRemove = false>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "facilityRemove">> <</link>> <<else>> ''False'' | <<link True>> <<set $currentRule.facilityRemove = true>> - <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RANormalizeAssignments "facilityRemove">> <</link>> <</if>> + <br> -Assignment on removal: $currentRule.removalAssignment +Assignment on removal: ''$currentRule.removalAssignment'' <<if ($currentRule.removalAssignment != "rest")>> | <<link "Rest">> <<set $currentRule.removalAssignment = "rest">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($currentRule.removalAssignment != "please you")>> | <<link "Fucktoy">> <<set $currentRule.removalAssignment = "please you">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($currentRule.removalAssignment != "be a servant")>> | <<link "House Servant">> <<set $currentRule.removalAssignment = "be a servant">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($currentRule.removalAssignment != "stay confined")>> | <<link "Confined">> <<set $currentRule.removalAssignment = "stay confined">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($currentRule.removalAssignment != "whore")>> | <<link "Whore">> <<set $currentRule.removalAssignment = "whore">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($currentRule.removalAssignment != "serve the public")>> | <<link "Public Servant">> <<set $currentRule.removalAssignment = "serve the public">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <<if ($currentRule.removalAssignment != "work a glory hole")>> | <<link "Gloryhole">> <<set $currentRule.removalAssignment = "work a glory hole">> <<RAChangeAssignFacility>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <</if>> @@ -1879,8 +1333,7 @@ Assignment on removal: $currentRule.removalAssignment <<link False>> <<set $currentRule.excludeSpecialSlaves = false>> <<RASpecialSlaves>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <<else>> @@.gray;Exclude special slaves:@@ @@ -1888,8 +1341,7 @@ Assignment on removal: $currentRule.removalAssignment <<link True>> <<set $currentRule.excludeSpecialSlaves = true>> <<RASpecialSlaves>> - <<RAChangeSave>> - <<RAChangeApply>> + <<RARuleModified>> <</link>> <</if>> <</replace>> @@ -1931,7 +1383,7 @@ Shoes: ''$currentRule.shoes.'' %/ <<widget "RAChangeBelly">> <<replace #baccessory>> -Corsetage: ''$currentRule.bellyAccessory. +Corsetage: ''$currentRule.bellyAccessory.'' <</replace>> <</widget>> @@ -2518,6 +1970,14 @@ Relationship rules: ''$currentRule.relationshipRules.'' <</replace>> <</widget>> +/% + % <<RARuleModified>> + %/ +<<widget "RARuleModified">> + <<RAChangeSave>> + <<RAChangeApply>> +<</widget>> + /% Call as <<RAChangeEyewear>> %/ @@ -3277,14 +2737,14 @@ Your brand design is ''$brandDesign.'' %/ <<widget "RAFacilityRemove">> <<if $args[1].facilityRemove>> - <<switch $args[1].assignFacility>> - <<case "arcade">> + <<switch $args[1].setAssignment>> + <<case "be confined in the arcade">> <<if $args[0].assignment == "be confined in the arcade">> <br>$args[0].slaveName has been removed from $arcadeName and has been assigned to $args[1].removalAssignment. <<assignJob $args[0] $args[1].removalAssignment>> <</if>> - <<case "brothel">> + <<case "work in the brothel">> <<if $args[0].assignment == "work in the brothel">> <<if ($Madam == 0) || ($Madam.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $brothelName and has been assigned to $args[1].removalAssignment. @@ -3292,7 +2752,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "club">> + <<case "serve in the club">> <<if $args[0].assignment == "serve in the club">> <<if ($DJ == 0) || ($DJ.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $clubName and has been assigned to $args[1].removalAssignment. @@ -3300,7 +2760,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "dairy">> + <<case "work in the dairy">> <<if $args[0].assignment == "work in the dairy">> <<if ($Milkmaid == 0) || ($Milkmaid.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $dairyName and has been assigned to $args[1].removalAssignment. @@ -3308,7 +2768,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "spa">> + <<case "rest in the spa">> <<if $args[0].assignment == "rest in the spa">> <<if ($Attendant == 0) || ($Attendant.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $spaName and has been assigned to $args[1].removalAssignment. @@ -3316,7 +2776,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "clinic">> + <<case "get treatment in the clinic">> <<if $args[0].assignment == "get treatment in the clinic">> <<if ($Nurse == 0) || ($Nurse.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $clinicName and has been assigned to $args[1].removalAssignment. @@ -3324,7 +2784,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "mastersuite">> + <<case "serve in the master suite">> <<if $args[0].assignment == "serve in the master suite">> <<if ($Concubine == 0) || ($Concubine.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $masterSuiteName and has been assigned to $args[1].removalAssignment. @@ -3332,7 +2792,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "hgsuite">> + <<case "live with your Head Girl">> <<if $args[0].assignment == "live with your Head Girl">> <<if ($HeadGirl == 0) || ($HeadGirl.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $HGSuiteName and has been assigned to $args[1].removalAssignment. @@ -3340,7 +2800,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "servantsquarters">> + <<case "work as a servant">> <<if $args[0].assignment == "work as a servant">> <<if ($Stewardess == 0) || ($Stewardess.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $servantsQuartersName and has been assigned to $args[1].removalAssignment. @@ -3348,7 +2808,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "schoolroom">> + <<case "learn in the schoolroom">> <<if $args[0].assignment == "learn in the schoolroom">> <<if ($Schoolteacher == 0) || ($Schoolteacher.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $schoolroomName and has been assigned to $args[1].removalAssignment. @@ -3356,7 +2816,7 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "cellblock">> + <<case "be confined in the cellblock">> <<if $args[0].assignment == "be confined in the cellblock">> <<if ($Wardeness == 0) || ($Wardeness.ID != $args[0].ID)>> <br>$args[0].slaveName has been removed from $cellblockName and has been assigned to $args[1].removalAssignment. @@ -3398,75 +2858,62 @@ Your brand design is ''$brandDesign.'' <<set _combinedRule = mergeRules([_combinedRule, _currentRule])>> - /% apply assignment changes for each rule (_currentRule) we process; _combinedRule will be used later %/ - <<switch _currentRule.assignFacility>> - <<case "hgsuite">> - <<if ($HGSuiteSlaves == 0) && ($args[0].indentureRestrictions <= 0) && ($args[0].assignment != "live with your Head Girl")>> - <br>$args[0].slaveName has been automatically assigned to live in your Head Girl's private suite. - <<assignJob $args[0] _currentRule.assignFacility>> + /% We merge assignments here %/ + <<if _currentRule.setAssignment == "no default setting">> + <<continue>> + <</if>> + + <<switch _currentRule.setAssignment>> + <<case "live with your Head Girl">> + <<if ($HGSuiteSlaves < 1 && $args[0].indentureRestrictions <= 0)>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "arcade">> - <<if ($arcade > $arcadeSlaves) && ($args[0].indentureRestrictions <= 0) && ($args[0].assignment != "be confined in the arcade") && $args[0].breedingMark != 1>> - <br>$args[0].slaveName has been automatically assigned to be confined in $arcadeName. - <<assignJob $args[0] _currentRule.assignFacility>> + <<case "be confined in the arcade">> + <<if ($arcadeSlaves < $arcade && $args[0].indentureRestrictions <= 0 && $args[0].breedingMark != 1)>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "mastersuite">> - <<if ($masterSuite > $masterSuiteSlaves) && (($args[0].devotion > 20) || (($args[0].devotion >= -50) && ($args[0].trust < -20)) || ($args[0].trust < -50))>> - <<if ($args[0].assignment != "serve in the master suite")>> - <br>$args[0].slaveName has been automatically assigned to $masterSuiteName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "serve in the master suite">> + <<if ($masterSuiteSlaves < $masterSuite && ($args[0].devotion > 20 || $args[0].trust < -50 || ($args[0].devotion >= -50 && $args[0].trust < -20)))>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "clinic">> - <<if ($clinic > $clinicSlaves) && (($args[0].health < 20) || (($Nurse != 0) && ($args[0].chem > 15) && ($clinicUpgradeFilters == 1)) || (($args[0].bellyImplant > -1) && ($bellyImplants == 1)) || $args[0].preg > 1)>> - <<if ($args[0].assignment != "get treatment in the clinic")>> - <br>$args[0].slaveName has been automatically assigned to get treatment in $clinicName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "get treatment in the clinic">> + <<if ($clinicSlaves < $clinic && ($args[0].health < 20 || ($args[0].chem > 15 && $Nurse != 0 && $clinicUpgradeFilters == 1)) || (($args[0].bellyImplant > -1) && ($bellyImplants == 1)) || $args[0].preg > 1))>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "spa">> - <<if ($spa > $spaSlaves) && (($args[0].health < 20) || ($args[0].trust < 60) || ($args[0].devotion <= 60) || ($args[0].fetish == "mindbroken") && ($args[0].devotion >= -20))>> - <<if ($args[0].assignment != "rest in the spa")>> - <br>$args[0].slaveName has been automatically assigned to rest in $spaName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "rest in the spa">> + <<if ($spaSlaves < $spa) && ($args[0].health < 20) || ($args[0].trust < 60) || ($args[0].devotion <= 60) || ($args[0].fetish == "mindbroken") && ($args[0].devotion >= -20)>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "brothel">> - <<if ($brothel > $brothelSlaves) && (($args[0].devotion > 50) || ($args[0].trust > 50) || (($args[0].devotion >= -50) && ($args[0].trust < -20)) || ($args[0].trust < -50)) && $args[0].breedingMark != 1>> - <<if ($args[0].assignment != "work in the brothel")>> - <br>$args[0].slaveName has been automatically assigned to work in $brothelName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "work in the brothel">> + <<if ($brothelSlaves < $brothel && ($args[0].devotion > 50 || $args[0].trust > 50 || $args[0].trust < -50 || ($args[0].devotion >= -50 && $args[0].trust < -20)) && $args[0].breedingMark != 1)>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "club">> - <<if ($club > $clubSlaves) && (($args[0].devotion > 50) || ($args[0].trust > 50) || (($args[0].devotion >= -50) && ($args[0].trust < -20)) || ($args[0].trust < -50)) && $args[0].breedingMark != 1>> - <<if ($args[0].assignment != "serve in the club")>> - <br>$args[0].slaveName has been automatically assigned to serve in $clubName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "serve in the club">> + <<if ($clubSlaves < $club && ($args[0].devotion > 50 || $args[0].trust > 50 || $args[0].trust < -50 || ($args[0].devotion >= -50 && $args[0].trust < -20)) && $args[0].breedingMark != 1)>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "dairy">> + <<case "work in the dairy">> <<if ($dairy > $dairySlaves+$bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren)>> <<if ($args[0].indentureRestrictions > 0) && ($dairyRestraintsSetting > 1)>> <<elseif (($args[0].indentureRestrictions > 1) && ($dairyRestraintsSetting > 0)) || ($args[0].breedingMark == 1 && $dairyRestriantsSettings > 0) || (($dairyPregSetting > 0) && ((_Slave.bellyImplant != -1) || (_Slave.pregType >= 50)))>> @@ -3475,10 +2922,7 @@ Your brand design is ''$brandDesign.'' <<if ($args[0].devotion > 20) || (($args[0].devotion >= -50) && ($args[0].trust < -20)) || ($args[0].trust < -50) || ($args[0].amp == 1) || ($dairyRestraintsUpgrade == 1)>> <<if ($dairyStimulatorsSetting < 2) || ($args[0].anus > 2) || ($dairyPrepUpgrade == 1)>> <<if ($dairyPregSetting < 2) || ($args[0].vagina > 2) || ($args[0].ovaries == 0) || ($dairyPrepUpgrade == 1)>> - <<if ($args[0].assignment != "work in the dairy")>> - <br>$args[0].slaveName has been automatically assigned to be milked in $dairyName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> @@ -3494,23 +2938,17 @@ Your brand design is ''$brandDesign.'' <</if>> <</if>> - <<case "servantsquarters">> - <<if ($servantsQuarters > $servantsQuartersSlaves) && (($args[0].devotion >= -20) || (($args[0].devotion >= -50) && ($args[0].trust <= 20)) || ($args[0].trust < -20)) && canSee($args[0]) && canWalk($args[0])>> - <<if ($args[0].assignment != "work as a servant")>> - <br>$args[0].slaveName has been automatically assigned to work in $servantsQuartersName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "work as a servant">> + <<if ($servantsQuartersSlaves < $servantsQuarters && canSee($args[0]) && canWalk($args[0]) && ($args[0].devotion >= -20 || $args[0].trust < -20 || ($args[0].devotion >= -50 && $args[0].trust <= 20)))>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "schoolroom">> - <<if ($schoolroom > $schoolroomSlaves) && ($args[0].fetish != "mindbroken") && ($args[0].devotion >= -20 || ($args[0].devotion >= -50 && $args[0].trust < -20) || $args[0].trust < -50)>> + <<case "learn in the schoolroom">> + <<if ($schoolroomSlaves < $schoolroom && $args[0].fetish != "mindbroken" && ($args[0].devotion >= -20 || $args[0].trust < -50 || ($args[0].devotion >= -50 && $args[0].trust < -20)))>> <<if ($args[0].intelligenceImplant < 1) || ($args[0].voice != 0 && $args[0].accent+$schoolroomUpgradeLanguage > 2) || ($args[0].oralSkill <= 10+$schoolroomUpgradeSkills*20) || ($args[0].whoreSkill <= 10+$schoolroomUpgradeSkills*20) || ($args[0].entertainSkill <= 10+$schoolroomUpgradeSkills*20) || ($args[0].analSkill < 10+$schoolroomUpgradeSkills*20) || (($args[0].vagina >= 0) && ($args[0].vaginalSkill < 10+$schoolroomUpgradeSkills*20))>> - <<if ($args[0].assignment != "learn in the schoolroom")>> - <br>$args[0].slaveName has been automatically assigned to study in $schoolroomName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> @@ -3518,37 +2956,90 @@ Your brand design is ''$brandDesign.'' <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <<case "cellblock">> - <<if ($cellblock > $cellblockSlaves) && (($args[0].devotion < -20) && ($args[0].trust >= -20)) || (($args[0].devotion < -50) && ($args[0].trust >= -50))>> - <<if ($args[0].assignment != "be confined in the cellblock")>> - <br>$args[0].slaveName has been automatically assigned to be confined in $cellblockName. - <<assignJob $args[0] _currentRule.assignFacility>> - <</if>> + <<case "be confined in the cellblock">> + <<if ($cellblockSlaves < $cellblock && (($args[0].devotion < -20 && $args[0].trust >= -20) || ($args[0].devotion < -50 && $args[0].trust >= -50))>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <<else>> <<RAFacilityRemove $args[0] _currentRule>> <</if>> - <</switch>> - <<if (_currentRule.setAssignment !== "none")>> - <<if (_currentRule.setAssignment == "choose her own job")>> - <<if ($args[0].choosesOwnAssignment == 0) && ($args[0].fetish != "mindbroken")>> - <br>$args[0].slaveName is now allowed to select her own assignments. - <<assignJob $args[0] _currentRule.setAssignment>> + <<case "take classes">> + <<if (!$args[0].intelligenceImplant && $args[0].fetish != "mindbroken" && ($args[0].devotion >= -20 || $args[0].trust < -50 || ($args[0].trust < -20 && $args[0].devotion >= -50)))>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> <</if>> - <<elseif ($args[0].assignment !== _currentRule.setAssignment)>> - <br>$args[0].slaveName has been automatically assigned to _currentRule.setAssignment. - <<assignJob $args[0] _currentRule.setAssignment>> - <</if>> - <</if>> -<</for>> /* done merging rules; from here onwards, we should only use _combinedRule */ + <<case "choose her own job">> + <<if ($args[0].fetish != "mindbroken")>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> + <</if>> -/% In case a slave has no rules applying to them, _combinedRule would (should) -be an empty object, and that would wreck havoc to the rest of the code. So, we -check if a rule attribute, any one, is defined and otherwise skip everything. -%/ + <<case "get milked">> + <<if ($args[0].lactation > 0 || $args[0].balls > 0)>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> + <</if>> + + <<case "be a servant">> + <<if (canWalk($args[0]) && canSee($args[0]) && ($args[0].devotion >= -20 || $args[0].trust < -50 || ($args[0].trust < -20 && $args[0].devotion >= -50)))>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> + <</if>> + + <<case "work a glory hole">> + <<if $args[0].indentureRestrictions <= 0 && $args[0].breedingMark != 1>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> + <</if>> + + <<case "whore" "serve the public" "stay confined">> + <<if ($args[0].fuckdoll == 0) && $args[0].breedingMark != 1>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> + <</if>> -<<if (def _combinedRule.clothes)>> /* we have at least one non-default rule setting */ + <<default>> + <<set _combinedRule.setAssignment = _currentRule.setAssignment>> + <</switch>> + +<</for>> /* done merging rules; from here onwards, we should only use _combinedRule */ + +/% If a slave has no rules applying to them, _combinedRule would (should) be an + % empty object, and that would wreak havoc on the rest of the code. So we + % check if a rule property, any one, is defined and otherwise skip everything. + %/ +<<if (def _combinedRule.clothes)>> + +<<if (def _combinedRule.setAssignment && _combinedRule.setAssignment != "no default setting")>> +<<if ((_combinedRule.setAssignment == "choose her own job" && !$args[0].choosesOwnAssignment) || _combinedRule.setAssignment != $args[0].assignment)>> + <<switch _combinedRule.setAssignment>> + <<case "live with your Head Girl">> + <br>$args[0].slaveName has been automatically assigned to live in your Head Girl's private suite. + <<case "be confined in the arcade">> + <br>$args[0].slaveName has been automatically assigned to be confined in $arcadeName. + <<case "serve in the master suite">> + <br>$args[0].slaveName has been automatically assigned to $masterSuiteName. + <<case "get treatment in the clinic">> + <br>$args[0].slaveName has been automatically assigned to get treatment in $clinicName. + <<case "rest in the spa">> + <br>$args[0].slaveName has been automatically assigned to rest in $spaName. + <<case "work in the brothel">> + <br>$args[0].slaveName has been automatically assigned to work in $brothelName. + <<case "serve in the club">> + <br>$args[0].slaveName has been automatically assigned to serve in $clubName. + <<case "work in the dairy">> + <br>$args[0].slaveName has been automatically assigned to be milked in $dairyName. + <<case "work as a servant">> + <br>$args[0].slaveName has been automatically assigned to work in $servantsQuartersName. + <<case "work as a servant">> + <br>$args[0].slaveName has been automatically assigned to work in $servantsQuartersName. + <<case "learn in the schoolroom">> + <br>$args[0].slaveName has been automatically assigned to study in $schoolroomName. + <<case "be confined in the cellblock">> + <br>$args[0].slaveName has been automatically assigned to be confined in $cellblockName. + <<case "choose her own job">> + <br>$args[0].slaveName is now allowed to select her own assignments. + <<default>> + <br>$args[0].slaveName has been automatically assigned to _combinedRule.setAssignment. + <</switch>> + <<assignJob $args[0] _combinedRule.setAssignment>> +<</if>> +<</if>> <<if $args[0].fuckdoll == 0>> @@ -4993,7 +4484,7 @@ is now _combinedRule.hLength cm long. <<set _ruleAppliesToThisSlave = evalExpr(_currentRule.condition, $args[0])>> - <<if _ruleAppliesToThisSlave == true && _currentRule.excludeSpecialSlaves>> /* passed activation conditions - check inclusion/exclusion rules */ + <<if _ruleAppliesToThisSlave && _currentRule.excludeSpecialSlaves>> <<for _L = 0; _L < _leaders.length; _L++>> <<if (def _leaders[_L].ID) && (_leaders[_L].ID == $args[0].ID)>> <<set _ruleAppliesToThisSlave = false>> @@ -5002,35 +4493,57 @@ is now _combinedRule.hLength cm long. <</for>> <</if>> - <<if _ruleAppliesToThisSlave == true>> /* check more inclusion/exclusion rules */ - <<if (def _currentRule.excludedSlaves && _currentRule.excludedSlaves.length > 0 && ruleSlaveExcluded($args[0], _currentRule)) - || (def _currentRule.selectedSlaves && _currentRule.selectedSlaves.length > 0 && !ruleSlaveSelected($args[0], _currentRule))>> - <<set _ruleAppliesToThisSlave = false>> - <<elseif $args[0].assignmentVisible == 0>> /* assignment is not visible, so check facilities assignments */ - <<if (def _currentRule.excludeFacility && _currentRule.excludeFacility.length > 0 && ruleExcludeSlaveFacility(_currentRule, $args[0])) - || (def _currentRule.facility && _currentRule.facility.length > 0 && !ruleAppliedToSlaveFacility(_currentRule, $args[0]))>> - <<set _ruleAppliesToThisSlave = false>> - <</if>> - <<else>> /* assignment is visible, so check non-facilities assignments */ - <<if (def _currentRule.excludeAssignment && _currentRule.excludeAssignment.length > 0 && ruleAssignment(_currentRule.excludeAssignment, $args[0].assignment)) - || (def _currentRule.assignment && _currentRule.assignment.length > 0 && !ruleAssignment(_currentRule.assignment, $args[0].assignment))>> - <<set _ruleAppliesToThisSlave = false>> - <</if>> + /% facility and excludeFacility only include some of the + % assignments we're searching for; namely, they don't include + % the leader roles, so we fill these out temporarily + %/ + <<if (def _currentRule.facility)>> + <<set _facility = expandFacilityAssignments(_currentRule.facility)>> + <</if>> + <<if (def _currentRule.excludeFacility)>> + <<set _excludeFacility = expandFacilityAssignments(_currentRule.excludeFacility)>> + <</if>> + + /% check exclusion/inclusion %/ + <<if _ruleAppliesToThisSlave>> + /% first we check if a slave is in a facility she shouldn't be in %/ + <<if (_facility.length > 0)>> + <<set _ruleAppliesToThisSlave = _facility.includes($args[0].assignment)>> + <<elseif (_excludeFacility.length > 0)>> + <<set _ruleAppliesToThisSlave = !_excludeFacility.includes($args[0].assignment)>> <</if>> - <</if>> /* done with all checks for this rule */ - <<if _ruleAppliesToThisSlave == true>> + /% and same thing with the assignments; since actual + % assignments and facility assignments are different + % either the previous if was executed or this one will + % be but not both + %/ + <<if (def _currentRule.assignment && _currentRule.assignment.length > 0)>> + <<set _ruleAppliesToThisSlave = _currentRule.assignment.includes($args[0].assignment)>> + <<elseif (def _currentRule.excludeAssignment && _currentRule.excludeAssignment.length > 0)>> + <<set _ruleAppliesToThisSlave = !_currentRule.excludeAssignment.includes($args[0].assignment)>> + <</if>> + + /% last but not least, we make sure the slave herself is not excluded %/ + <<if (def _currentRule.selectedSlaves && _currentRule.selectedSlaves.length > 0)>> + <<set _ruleAppliesToThisSlave = ruleSlaveSelected($args[0], _currentRule)>> + <<elseif (def _currentRule.excludedSlaves && _currentRule.excludedSlaves.length > 0)>> + <<set _ruleAppliesToThisSlave = !ruleSlaveExcluded($args[0], _currentRule)>> + <</if>> + <</if>> + + <<if _ruleAppliesToThisSlave>> <<if !ruleApplied($args[0], _currentRule.ID)>> /* rule applies now, but did not apply before */ <<set $args[0].currentRules.push(_currentRule.ID)>> <br>//@@.tan;Rule _rule (_currentRule.name) now applies to $args[0].slaveName, who is assigned to $args[0].assignment.@@// <</if>> - /* this rule has been applied to this slave now (or was already), so we are done with this rule */ <<elseif ruleApplied($args[0], _currentRule.ID)>> /* rule does not apply now, but did before */ <<RARemoveRule $args[0]>> /* RARemoveRule prints message and includes Rules Facilities Remove check, so we are done with this rule */ <</if>> - <</for>> /* done with this rule - continue looping through all the rules defined in the rules assistant */ + <</for>> /* done checking/applying/removing rules - sort this slave's updated applied rules to match the current priority order in the rules assistant */ - <<set $args[0].currentRules = $args[0].currentRules.sort(function(a, b) { return a-b; });>> /* sort this slave's applied rules to match the current priority order in the rules assistant */ + <<set $args[0].currentRules = $args[0].currentRules.sort(function(a, b) { return a-b; });>> + +<</widget>> -<</widget>> \ No newline at end of file