r.push(`<span class="red">Error, rivalryTarget not found.</span>`);
}else{
if (slave.fuckdoll){
r.push(`${slave.slaveName} is a living sex toy, not a person, it <span class="rivalry dec">can't really maintain any meaningful rivalry</span> with ${SlaveFullName(rival)}.`);
reconciled=1;
reconcile(slave,rival);
}elseif (slave.fetish==="mindbroken"){
r.push(`Since ${slave.slaveName} is mindbroken, ${he} <span class="rivalry dec">can't really maintain any meaningful rivalry</span> with ${SlaveFullName(rival)}.`);
r.push(`Since ${slave.slaveName} and ${slave.slaveName} are in a committed sexual relationship, they <span class="rivalry dec">can't really maintain any meaningful rivalry;</span> most disputes just end in a quick hatefucking.`);
r.push(`${slave.slaveName} and ${SlaveFullName(rival)} share sexual interests, and in the sexual atmosphere of the arcology, it's <span class="rivalry dec">difficult for them to keep up their dislike</span> of one another with the mutual attraction.`);
decRivalry=1;
lightenedRivalry=1;
if (!changed&&roll>50){
if (rival.fetish===slave.fetish){
r.push(`${slave.slaveName} and ${SlaveFullName(rival)} share sexual interests, and in the sexual atmosphere of the arcology, it's <span class="rivalry dec">difficult for them to keep up their dislike</span> of one another with the mutual attraction.`);
reduce(slave,rival);
}
if (roll>80&&slave.rivalry>0){
if (!changed&&rival.trust<-20){
if (slave.trust<-20){
r.push(`Since both ${slave.slaveName} and ${SlaveFullName(rival)} are terrified of you, they work together to <span class="rivalry dec">get over their feud,</span> since it brings punishment on both of them.`);
reduce(slave,rival);
}
}
if (roll>80&&slave.rivalry>0){
if (rival.trust<-20){
if (slave.trust<-20){
r.push(`Since both ${slave.slaveName} and ${SlaveFullName(rival)} are terrified of you, they work together to <span class="rivalry dec">get over their feud,</span> since it brings punishment on both of them.`);
decRivalry=1;
lightenedRivalry=1;
}
if (!changed&&rival.devotion>50){
if (slave.devotion>50){
r.push(`Since both ${slave.slaveName} and ${SlaveFullName(rival)} are devoted to you, they work together to <span class="rivalry dec">get over their feud,</span> since it gets in the way of their duties.`);
reduce(slave,rival);
}
if (rival.devotion>50){
if (slave.devotion>50){
r.push(`Since both ${slave.slaveName} and ${SlaveFullName(rival)} are devoted to you, they work together to <span class="rivalry dec">get over their feud,</span> since it gets in the way of their duties.`);
decRivalry=1;
lightenedRivalry=1;
}
}
if (roll>90&&slave.rivalry>0){
if (!changed&&slave.energy>95){
r.push(`${slave.slaveName} lusts after ${SlaveFullName(rival)}, and does everything ${he} can to <span class="rivalry dec">patch up their differences.</span>`);
reduce(slave,rival);
}
if (roll>90&&slave.rivalry>0){
if (slave.energy>95){
if (!changed&&slave.attrXX>85){
if (rival.vagina>-1||rival.faceShape!=="masculine"){
r.push(`${slave.slaveName} lusts after ${SlaveFullName(rival)}, and does everything ${he} can to <span class="rivalry dec">patch up their differences.</span>`);
decRivalry=1;
lightenedRivalry=1;
lustyFix=1;
}
if (lustyFix!==1){
if (slave.attrXX>85){
if (rival.vagina>-1||rival.faceShape!=="masculine"){
r.push(`${slave.slaveName} lusts after ${SlaveFullName(rival)}, and does everything ${he} can to <span class="rivalry dec">patch up their differences.</span>`);
decRivalry=1;
lightenedRivalry=1;
lustyFix=1;
}
}
reduce(slave,rival);
}
if (lustyFix!==1){
if (slave.attrXY>85){
if (canAchieveErection(rival)||rival.faceShape==="masculine"){
r.push(`${slave.slaveName} lusts after ${SlaveFullName(rival)}, and does everything ${he} can to <span class="rivalry dec">patch up their differences.</span>`);
decRivalry=1;
lightenedRivalry=1;
lustyFix=1;
}
}
}
if (!changed&&slave.attrXY>85){
if (canAchieveErection(rival)||rival.faceShape==="masculine"){
r.push(`${slave.slaveName} lusts after ${SlaveFullName(rival)}, and does everything ${he} can to <span class="rivalry dec">patch up their differences.</span>`);
reduce(slave,rival);
}
if (lustyFix!==1){
if (rival.assignment!==slave.assignment){
if (slave.subTarget!==rival.ID&&rival.subTarget!==slave.ID){
r.push(`With time apart ${slave.slaveName} and ${SlaveFullName(rival)} <span class="rivalry dec">dislike each other less.</span>`);
decRivalry=1;
lightenedRivalry=1;
}
}
}
if (!changed&&rival.assignment!==slave.assignment){
if (slave.subTarget!==rival.ID&&rival.subTarget!==slave.ID){
r.push(`With time apart ${slave.slaveName} and ${SlaveFullName(rival)} <span class="rivalry dec">dislike each other less.</span>`);
reduce(slave,rival);
}
}
}
}
}
if (areRelated(slave,rival)){
if (roll>70&&slave.rivalry<3&&lightenedRivalry!==1){
if (!changed&&areRelated(slave,rival)){
if (roll>70&&slave.rivalry<3){
r.push(`${slave.slaveName} and ${SlaveFullName(rival)} <span class="rivalry inc">pursue their family rivalry.</span>`);
r.push(`${slave.slaveName} and ${SlaveFullName(rival)} <span class="rivalry dec">patch up their family relationship.</span>`);
decRivalry=1;
lightenedRivalry=1;
reduce(slave,rival);
}
}
if (rival.origBodyOwnerID===slave.ID&&lightenedRivalry!==1){
if (!changed&&rival.origBodyOwnerID===slave.ID){
if (slave.rivalry<3){
r.push(`${slave.slaveName} <span class="rivalry inc">refuses to accept ${SlaveFullName(rival)}'s control of ${his} former body,</span> worsening their rivalry.`);
r.push(`${slave.slaveName} does ${his} best to be nice to ${SlaveFullName(rival)}, and manages to <span class="rivalry dec">de-escalate their little feud.</span>`);
decRivalry=1;
reduce(slave,rival);
}
}
if (incRivalry!==0){
rival.rivalry++;
slave.rivalry++;
}elseif (decRivalry!==0){
rival.rivalry--;
slave.rivalry--;
if (slave.rivalry===0){
rival.rivalryTarget=0;
slave.rivalryTarget=0;
}
}elseif (reconciled!==0){
rival.rivalry=0;
rival.rivalryTarget=0;
slave.rivalry=0;
slave.rivalryTarget=0;
}
}
}
/**
* @param {App.Entity.SlaveState} slave
*
*/
functionrivalryValidation(slave){
// This will be obsoleted with multiple rivals system
rival=getSlave(slave.rivalryTarget);
constrival=getSlave(slave.rivalryTarget);
if (rival!==undefined&&slave.ID!==rival.rivalryTarget){