From e7a961e5f246614b886d16d93492aeb63fd14ba5 Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Wed, 28 Mar 2018 23:35:00 -0400 Subject: [PATCH] Continued removal of RERelationshipSlave --- src/js/eventSelectionJS.tw | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/js/eventSelectionJS.tw b/src/js/eventSelectionJS.tw index 643515e93bd..d592884fd60 100644 --- a/src/js/eventSelectionJS.tw +++ b/src/js/eventSelectionJS.tw @@ -217,19 +217,19 @@ if(eventSlave.fetish != "mindbroken") { } if(eventSlave.relationship > 3) { - var index = State.variables.slaves.findIndex(function(s) { return s.ID == eventSlave.relationshipTarget; }); - if(State.variables.slaves[index].devotion > 20) { - if(canWalk(State.variables.slaves[index])) { - if(canTalk(State.variables.slaves[index])) { + var relationshipSlave = State.variables.slaves.find(function(s) { return s.ID == eventSlave.relationshipTarget; }); + if(relationshipSlave.devotion > 20) { + if(canWalk(relationshipSlave)) { + if(canTalk(relationshipSlave)) { if(eventSlave.devotion > 50) { if(eventSlave.trust > 50) { if(eventSlave.speechRules != "restrictive") { State.variables.RETSevent.push("date please"); } - if(State.variables.slaves[index].anus != 0) { - if(State.variables.slaves[index].dick != 1) { - if(State.variables.slaves[index].dick == 0 || canAchieveErection(State.variables.slaves[index])) { - if(State.variables.slaves[index].fetish == "dom" || State.variables.slaves[index].fetish == "sadist") { + if(relationshipSlave.anus != 0) { + if(relationshipSlave.dick != 1) { + if(relationshipSlave.dick == 0 || canAchieveErection(relationshipSlave)) { + if(relationshipSlave.fetish == "dom" || relationshipSlave.fetish == "sadist") { State.variables.RETSevent.push("top exhaustion"); } } @@ -1923,16 +1923,16 @@ if(eventSlave.fetish != "mindbroken") { } if(eventSlave.relationship > 3) { - var index = State.variables.slaves.findIndex(function(s) { return s.ID == eventSlave.relationshipTarget; }); - if(State.variables.slaves[index].devotion > 20) { - if(canWalk(State.variables.slaves[index])) { - if(canTalk(State.variables.slaves[index])) { + var relationshipSlave = State.variables.slaves.find(function(s) { return s.ID == eventSlave.relationshipTarget; }); + if(relationshipSlave.devotion > 20) { + if(canWalk(relationshipSlave)) { + if(canTalk(relationshipSlave)) { if(eventSlave.devotion > 50) { if(eventSlave.trust > 50) { - if(State.variables.slaves[index].anus != 0) { - if(State.variables.slaves[index].dick != 1) { - if(State.variables.slaves[index].dick == 0 || canAchieveErection(State.variables.slaves[index])) { - if(State.variables.slaves[index].fetish == "dom" || State.variables.slaves[index].fetish == "sadist") { + if(relationshipSlave.anus != 0) { + if(relationshipSlave.dick != 1) { + if(relationshipSlave.dick == 0 || canAchieveErection(relationshipSlave)) { + if(relationshipSlave.fetish == "dom" || relationshipSlave.fetish == "sadist") { State.variables.RETSevent.push("top exhaustion"); } } -- GitLab