Skip to content
Snippets Groups Projects
minorInjuryResponse.js 3.22 KiB
Newer Older
  • Learn to ignore specific revisions
  • brickode's avatar
    brickode committed
    /**
     * @param {App.Entity.SlaveState} slave
    
    brickode's avatar
    brickode committed
     * @returns {string}
    
    brickode's avatar
    brickode committed
     */
    
    brickode's avatar
    brickode committed
    window.minorInjuryResponse = function minorInjuryResponse(slave) {
    
    Pregmodder's avatar
    Pregmodder committed
    	const arcology = State.variables.arcologies[0];
    	const arcologyUpgrade = State.variables.arcologyUpgrade;
    
    	const {he, himself, He} = getPronouns(slave);
    
    	let trackedCategory = "";
    
    Skriv's avatar
    Skriv committed
    
    
    	switch (slave.assignment) {
    		case window.Job.WHORE:
    
    			trackedCategory = "slaveAssignmentWhore";
    
    			trackedCategory = "slaveAssignmentMadam";
    
    			trackedCategory = "slaveAssignmentBrothel"
    
    			trackedCategory = "slaveAssignmentPublic"
    
    			trackedCategory = "slaveAssignmentDj";
    
    			trackedCategory = "slaveAssignmentClub";
    
    			trackedCategory = "slaveAssignmentUndefined";
    
    	r = responseWithTracking(slave, trackedCategory);
    	
    	function responseWithTracking(s, category) {
    		let o = "";
    		if (arcology.FSDegradationist > 20) {
    			o += ` ${He} carries on, knowing that in your degradationist arcology, this is accepted behavior.`;
    		} else if (arcology.FSPaternalist > 20) {
    			if (arcologyUpgrade.drones === 1 && jsRandom(1, 100) > 50) {
    				o += ` The security drones successfully detain him and oblige him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`;
    				cashX(50, category, slave);
    			} else if (arcologyUpgrade.grid === 1 && jsRandom(1, 100) > 50) {
    				o += ` The computer systems successfully detain him and require him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`;
    				cashX(50, category, slave);
    			} else if (slave.skill.whoring > jsRandom(1, 100)) {
    				o += ` ${slave.slaveName} is used to this sort of thing, and convinces him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`;
    				cashX(50, category, slave);
    			} else if (slave.skill.combat > 0) {
    				o += ` ${slave.slaveName} can take care of ${himself}, and ${he} successfully forces him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`;
    				cashX(50, category, slave);
    			}
    		} else {
    			if (arcologyUpgrade.drones === 1 && jsRandom(1, 100) > 50) {
    				o += ` The security drones successfully detain him and oblige him to pay minor <span class="yellowgreen">compensation.</span>`;
    				cashX(10, category, slave);
    			} else if (arcologyUpgrade.grid === 1 && jsRandom(1, 100) > 50) {
    				o += ` The computer systems successfully detain him and require him to pay minor <span class="yellowgreen">compensation.</span>`;
    				cashX(10, category, slave);
    			} else if (slave.skill.whoring > jsRandom(1, 100)) {
    				o += ` ${slave.slaveName} is used to this sort of thing, and convinces him to pay minor <span class="yellowgreen">compensation.</span>`;
    				cashX(10, category, slave);
    			} else if (slave.skill.combat > 0) {
    				o += ` ${slave.slaveName} can take care of ${himself}, and ${he} successfully forces him to pay minor <span class="yellowgreen">compensation.</span>`;
    				cashX(10, category, slave);
    			}
    		}
    		return o;
    	}
    	
    
    Skriv's avatar
    Skriv committed
    };