"README.md" did not exist on "2faf3f8e3b6c5b72e771891687bde35e5ce9d57c"
Newer
Older
// WARNING This file defines objects referenced in slaveSummaryWidgets.js.
// Either keep this file above the slaveSummaryWidgets.js in the name ordered list
// (tweego process them in this order), or rework the references.
/* eslint-disable camelcase */
App.UI.SlaveSummaryImpl = function() {
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
const helpers = function() {
/**
* @param {HTMLElement} element
* @param {string|string[]} [classNames]
*/
function _addClassNames(element, classNames) {
if (classNames != undefined) { /* eslint-disable-line eqeqeq */
if (Array.isArray(classNames)) {
element.classList.add(...classNames);
} else {
element.classList.add(classNames);
}
}
}
/**
* @param {Node} container
* @param {string} text
* @param {string|string[]} [classNames]
* @param {boolean} [stdDecor=false]
* @param {number} [value]
*/
function makeSpan(container, text, classNames, stdDecor = false, value) {
let r = document.createElement("span");
r.classList.add("ssi");
_addClassNames(r, classNames);
if (value != undefined && V.summaryStats) { /* eslint-disable-line eqeqeq */
text += `[${value}]`;
}
r.textContent = stdDecor ? `${capFirstChar(text)}.` : text;
if (container) {
container.appendChild(r);
}
return r;
}
/**
* @param {Node} container
* @param {string} text
* @returns {Text}
*/
function addText(container, text) {
const r = document.createTextNode(text);
if (container) {
container.appendChild(r);
}
return r;
}
/**
* @param {Node} [container]
* @param {string|string[]} [classNames]
*/
function makeBlock(container, classNames) {
let r = document.createElement("span");
r.classList.add("ssb");
_addClassNames(r, classNames);
if (container) {
container.appendChild(r);
}
return r;
}
/**
* @param {Node} container
* @param {string|string[]} [classNames]
* @returns {HTMLParagraphElement}
*/
function makeParagraph(container, classNames) {
let r = document.createElement("p");
r.classList.add("si");
_addClassNames(r, classNames);
if (container) {
container.appendChild(r);
}
return r;
}
/**
* @param {object} dict
* @param {*} value
* @param {*} [defaultValue]
* @returns {*|null}
*/
function getExactRating(dict, value, defaultValue = null) {
const res = dict[value];
return res ? res : defaultValue;
}
/**
* @param {object} ratings
* @param {number} value
* @returns {*|null}
*/
function getNumericRating(ratings, value) {
for (const key in ratings) {
if (parseInt(key) >= value) {
return ratings[key];
return null;
}
/**
* @param {object} ratings
* @param {number[]} values
* @returns {*|null}
*/
function getMultiNumericRating(ratings, values) {
const firstRating = getNumericRating(ratings, values[0]);
if (firstRating === null || typeof firstRating === "string" || firstRating.hasOwnProperty("desc")) {
return firstRating;
}
return getMultiNumericRating(firstRating, values.slice(1));
/**
* @typedef {object} StyledDesc
* @property {string} desc
* @property {string|string[]} [style]
*/
/** @typedef {Object.<string, StyledDesc>} StyledRatings */
/**
* @param {Node} container
* @param {StyledRatings} ratings
* @param {number} [value]
* @param {number} [offset] value offset in the ratings dictionary (to eliminate negative values)
* @param {boolean} [stdDecor=false]
*/
function makeRatedStyledSpan(container, ratings, value, offset = 0, stdDecor = false) {
/** @type {StyledDesc} */
const d = getNumericRating(ratings, value + offset);
if (d) {
makeSpan(container, d.desc, d.style, stdDecor, value);
}
}
/**
* @param {Node} container
* @param {StyledDesc} styledDesc
* @param {number} [value]
* @param {boolean} [stdDecor]
*/
function makeStyledSpan(container, styledDesc, value, stdDecor = false) {
if (styledDesc) {
makeSpan(container, styledDesc.desc, styledDesc.style, stdDecor, value);
}
}
/**
* @param {Node} container
* @param {StyledRatings} ratings
* @param {string|number} value
*/
function makeMappedStyledSpan(container, ratings, value) {
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
const d = ratings[value];
if (d) {
makeSpan(container, d.desc, d.style);
}
}
/**
* @param {Node} container
* @param {Object.<string, string>} ratings
* @param {string|number} value
* @param {string|string[]} [classNames]
*/
function makeMappedSpan(container, ratings, value, classNames) {
const d = ratings[value];
if (d) {
makeSpan(container, d, classNames);
}
}
/**
* Returns first three string characters with the first one uppercased (string -> Str)
* @param {string} s
* @returns {string}
*/
function firstThreeUc(s) {
return s.charAt(0).toUpperCase() + s.charAt(1) + s.charAt(2);
}
/**
* @param {FC.ArcologyState} arcology
*/
function syncFSData(arcology) {
arcology = arcology || V.arcologies[0];
for (const fsp of App.Data.misc.FutureSocieties) {
/** @type {FC.FSPolicy} */
const policy = arcology[fsp];
const p = fsp.slice(2);
FSData.policy[p] = {
active: policy === "unset" ? 0 : 1,
strength: Math.trunc(policy === "unset" ? 0: policy / 10)
};
}
const dislikeBigButts = (FSData.policy.TransformationFetishist.strength < 2) && (FSData.policy.HedonisticDecadence.strength < 2) && (FSData.policy.AssetExpansionist.strength < 2) && (arcology.FSIntellectualDependencyLawBeauty === 0);
FSData.bigButts = dislikeBigButts ? -1 : 0;
/**
* @typedef {Object} FSDatum
* @property {number} active FS policy is active (0,1)
* @property {number} strength FS decoration level divided by 10
*/
const FSData = {
/** @type {Object.<string, FSDatum>} */
policy: {},
bigButts: 0,
};
return {
addText: addText,
makeSpan: makeSpan,
makeBlock: makeBlock,
makeParagraph: makeParagraph,
getExactRating: getExactRating,
getMultiNumericRating: getMultiNumericRating,
makeRatedStyledSpan: makeRatedStyledSpan,
makeMappedStyledSpan: makeMappedStyledSpan,
syncFSData: syncFSData,
FSData: FSData,
};
}();
const bits = function() {
const addText = helpers.addText;
const makeSpan = helpers.makeSpan;
const makeBlock = helpers.makeBlock;
const makeRatedStyledSpan = helpers.makeRatedStyledSpan;
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
/**
* Returns index in the hips-ass rating table
* @param {App.Entity.SlaveState} slave
* @returns {number} 0 if butt is considered too small, 1 is too big, -1 otherwise.
*/
function hipsAssRating(slave) {
const FSData = helpers.FSData;
if (slave.hips < -1) {
if (slave.butt > 2 && FSData.bigButts <= 0) {
return 1;
}
} else if (slave.hips < 0) {
if (slave.butt > 4 && FSData.bigButts <= 0) {
return 1;
}
} else if (slave.hips > 2) {
if (slave.butt <= 8) {
return 0;
}
} else if (slave.hips > 1) {
if (slave.butt <= 3 && (FSData.policy.SlimnessEnthusiast.active === 0 || (slave.boobs >= 500))) {
return 0;
}
} else if (slave.hips > 0) {
if (slave.butt > 8) {
if (FSData.bigButts <= 0) {
return 1;
}
} else if (slave.butt <= 2 && ((FSData.policy.SlimnessEnthusiast.active === 0) || (slave.boobs >= 500))) {
return 0;
}
} else {
if (slave.butt > 6) {
if (FSData.bigButts <= 0) {
return 1;
}
} else if (slave.butt <= 1 && (FSData.policy.SlimnessEnthusiast.active === 0 || (slave.boobs >= 500))) {
return 0;
}
}
return -1;
}
/**
* @param {App.Entity.SlaveState} slave
* @param {App.Data.SlaveSummary.SmartPiercing} spData
* @returns {string}
*/
function smartFetishStr(slave, spData) {
if (slave.fetishKnown === 1) {
if (slave.clitSetting === "off") {
return spData.setting.off;
} else if ((slave.energy <= 95) && (slave.clitSetting === "all")) {
return spData.setting.all;
} else if ((slave.energy > 5) && (slave.clitSetting === "none")) {
return spData.setting.none;
} else if (((slave.fetish !== "none") && (slave.clitSetting === "vanilla"))) {
return spData.setting.vanilla;
} else if (slave.fetishStrength <= 95 || slave.fetish !== slave.clitSetting) {
const s = spData.setting[slave.clitSetting];
if (s) {
return s;
}
}
if (!["anti-men", "anti-women", "men", "women"].includes(slave.clitSetting)) {
return spData.setting.monitoring;
}
} else {
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
}
return null;
}
/**
* @param {App.Entity.SlaveState} slave
* @param {App.Data.SlaveSummary.SmartPiercing} spData
* @returns {string}
*/
function smartAttractionStr(slave, spData) {
const sps = spData.setting;
const cs = slave.clitSetting;
if (slave.attrKnown === 1) {
switch (cs) {
case "women":
if (slave.attrXX < 95) {
return sps.women;
} else {
return sps.monitoring;
}
case "men":
if (slave.attrXY < 95) {
return sps.men;
} else {
return sps.monitoring;
}
case "anti-women":
if (slave.attrXX > 0) {
return sps["anti-women"];
} else {
return sps.monitoring;
}
case "anti-men":
if (slave.attrXY > 0) {
return sps["anti-men"];
} else {
return sps.monitoring;
}
}
} else {
switch (cs){
// fall-through
case "women":
case "men":
case "anti-women":
case "anti-men":
return sps[cs];
}
}
return null;
}
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_health(slave, c) {
if (slave.health.health < -20) {
makeSpan(c, "H", ["red", "strong"], true, slave.health.health);
} else if (slave.health.health <= 20) {
makeSpan(c, "H", ["yellow", "strong"], true, slave.health.health);
} else if (slave.health.health > 20) {
makeSpan(c, "H", ["green", "strong"], true, slave.health.health);
}
if (passage() === "Clinic" && V.clinicUpgradeScanner) {
if (slave.chem > 15) {
makeSpan(c, `C${Math.ceil(slave.chem / 10)}`, ["cyan", "strong"]);
} else if (slave.chem <= 15 && slave.assignment === "get treatment in the clinic") {
makeSpan(c, `CSafe`, ["green", "strong"]);
}
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_illness(slave, c) {
makeSpan(c, `Ill${slave.health.illness}`, ["red", "strong"], true, slave.health.illness);
} else if (slave.health.illness > 0) {
makeSpan(c, `Ill${slave.health.illness}`, ["yellow", "strong"], true, slave.health.illness);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_tired(slave, c) {
helpers.makeRatedStyledSpan(c, data.short.health.tiredness, slave.health.tired, 0, true);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_health(slave, c) {
helpers.makeRatedStyledSpan(c, data.long.health.health, slave.health.health, 100, true);
if (passage() === "Clinic" && V.clinicUpgradeScanner) {
if (slave.chem > 15) {
makeSpan(c, `Carcinogen buildup: ${Math.ceil(slave.chem / 10)}.`, "cyan");
} else if (slave.chem <= 15 && slave.assignment === "get treatment in the clinic") {
makeSpan(c, `Safe chem levels.`, "green");
}
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_illness(slave, c) {
makeRatedStyledSpan(c, data.long.health.illness, slave.health.illness, 0, true);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_tired(slave, c) {
makeRatedStyledSpan(c, data.long.health.tiredness, slave.health.tired, 0, true);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_age(slave, c) {
let r = makeSpan(c, "", "pink");
if (V.showAgeDetail === 1) {
r.textContent += `Age ` + `${slave.actualAge}` + `.`;
} else {
r.textContent += helpers.getNumericRating(data.long.body.age, slave.actualAge);
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
}
/*
** No NCS, then do the standard, However because of the wrinkles of Incubators, as long as visual age is greater
** than or equal to physical age, we do the old physical body/Looks for fresh out of the can NCS slaves.
*/
if (((slave.geneMods.NCS === 0) || (slave.visualAge >= slave.physicalAge))) {
if (slave.actualAge !== slave.physicalAge) {
r.textContent += ` ${slave.physicalAge}` + ` year old body.`;
}
if (slave.visualAge !== slave.physicalAge) {
r.textContent += ` Looks ` + `${slave.visualAge}` + `.`;
}
} else {
/*
** Now the rub. The use of physical Age for the year old body above, basically conflicts with the changes
** that NCS introduces, so here to *distinguish* the changes, we use visual age with the 'year old body'
** and appears, for example: Slave release from incubator at age 10, Her summary would show, 'Age 0. 10
** year old body.' But if she's given NCS a few weeks after release, while she's still before her first
** birthday, it'll appear the same. But once her birthday fires, if we ran with the above code it would
** say: 'Age 1. 11 year old body.' -- this conflicts with the way NCS works though, because she hasn't
** visually aged, so our change here makes it say 'Age 1. Appears to have a 10 year old body.'
*/
r.textContent += ` Appears to have a ` + `${slave.visualAge}` + ` year old body.`;
}
if (slave.geneMods.NCS === 1) {
makeSpan(r, "NCS", "orange");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_face(slave, c) {
const r = helpers.getNumericRating(data.long.body.face, slave.face + 100);
makeSpan(c, `${r.desc} ${slave.faceShape} face`, r.style, true, slave.face);
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_eyes(slave, c) {
if (!canSee(slave)) {
makeSpan(c, "Blind.", "red");
} else if (!canSeePerfectly(slave)) {
makeSpan(c, "Nearsighted.", "yellow");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_ears(slave, c) {
if (slave.hears <= -2) {
makeSpan(c, "Deaf.", "red");
} else if ((slave.hears === -1) && (slave.earwear !== "hearing aids")) {
makeSpan(c, "Hard of hearing.", "yellow");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_lips(slave, c) {
makeRatedStyledSpan(c, data.long.body.lips, slave.lips, 0, true);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_teeth(slave, c) {
helpers.makeMappedStyledSpan(c, data.long.body.teeth, slave.teeth);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_muscles(slave, c) {
h.makeStyledSpan(c, h.getMultiNumericRating(data.long.body.muscles, [slave.muscles + 100, h.FSData.policy.PhysicalIdealist.active]), slave.muscles);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_voice(slave, c) {
if (slave.voice === 0) {
makeSpan(c, "Mute.", "red");
} else {
helpers.makeMappedStyledSpan(c, data.long.accent, slave.accent);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_tits_ass(slave, c) {
const h = helpers;
h.makeStyledSpan(c,
h.getMultiNumericRating(data.long.body.titsAss,
[slave.boobs, slave.butt, h.FSData.policy.AssetExpansionist.active, slave.weight + 100, slave.muscles + 100]));
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_hips(slave, c) {
const di = hipsAssRating(slave);
if (di >= 0) {
helpers.makeMappedStyledSpan(c, data.long.body.hipsAss, di);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_waist(slave, c) {
makeRatedStyledSpan(c, data.long.body.waist, slave.waist, 100, true);
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_implants(slave, c) {
const styles = "pink";
if ((slave.boobsImplant !== 0) || (slave.buttImplant !== 0) || (slave.lipsImplant !== 0) || (slave.bellyImplant !== -1)) {
makeSpan(c, "Implants.", styles);
} else if ((slave.faceImplant >= 30) || (slave.waist < -95)) {
makeSpan(c, "Surgery enhanced.", styles);
} else {
makeSpan(c, "All natural.", styles);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_lactation(slave, c) {
if (slave.lactation === 1) {
makeSpan(c, "Lactating naturally.", "pink");
} else if (slave.lactation === 2) {
makeSpan(c, "Heavy lactation.", "pink");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_mods(slave, c) {
V.modScore = SlaveStatsChecker.modScore(slave);
if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) {
return;
} else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
makeSpan(c, "Extensive body mods.");
} else if (V.modScore > 7) {
makeSpan(c, "Noticeable body mods.");
} else {
makeSpan(c, "Light body mods.");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_age(slave, c) {
let r = makeSpan(c, "", "pink");
if (V.showAgeDetail === 1) {
r.textContent += slave.actualAge.toString();
} else if (slave.actualAge >= 18) {
r.textContent += helpers.getNumericRating(data.short.body.age, slave.actualAge);
if (slave.actualAge !== slave.physicalAge) {
r.textContent += ` w ${slave.physicalAge}y-bdy`;
}
if (slave.visualAge !== slave.physicalAge) {
r.textContent += ` Lks${slave.visualAge}`;
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_face(slave, c) {
makeRatedStyledSpan(c, data.short.body.face, slave.face, 100, true);
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_eyes(slave, c) {
if (!canSee(slave)) {
makeSpan(c, "Blind", "red");
} else if (!canSeePerfectly(slave)) {
makeSpan(c, "Sight-", "yellow");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_ears(slave, c) {
if (slave.hears === -2) {
makeSpan(c, "Deaf", "red");
} else if ((slave.hears === -1) && (slave.earwear !== "hearing aids")) {
makeSpan(c, "Hearing-", "yellow");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_lips(slave, c) {
makeRatedStyledSpan(c, data.short.body.lips, slave.lips, 0, true);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_teeth(slave, c) {
helpers.makeMappedStyledSpan(c, data.short.body.teeth, slave.teeth);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_muscles(slave, c) {
h.makeStyledSpan(c, h.getMultiNumericRating(data.short.body.muscles, [slave.muscles + 100, h.FSData.policy.PhysicalIdealist.active]), slave.muscles, true);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_voice(slave, c) {
if (slave.voice === 0) {
makeSpan(c, "Mute", "red");
} else {
helpers.makeMappedStyledSpan(c, data.short.accent, slave.accent);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_tits_ass(slave, c) {
const h = helpers;
h.makeStyledSpan(c,
h.getMultiNumericRating(data.short.body.titsAss,
[slave.boobs, slave.butt, h.FSData.policy.AssetExpansionist.active, slave.weight + 100, slave.muscles + 100]));
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_hips(slave, c) {
const di = hipsAssRating(slave);
if (di >= 0) {
helpers.makeMappedStyledSpan(c, data.short.body.hipsAss, di);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_waist(slave, c) {
makeRatedStyledSpan(c, data.short.body.waist, slave.waist, 100, false);
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_implants(slave, c) {
if ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.waist >= -95) && (slave.lipsImplant === 0) && (slave.faceImplant <= 5) && (slave.bellyImplant === -1)) {
makeSpan(c, "Natr", "pink");
} else {
makeSpan(c, "Impl", "pink");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_lactation(slave, c) {
if (slave.lactation === 1) {
makeSpan(c, "Lact", "pink");
} else if (slave.lactation === 2) {
makeSpan(c, "Lact", "pink");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_mods(slave, c) {
V.modScore = SlaveStatsChecker.modScore(slave);
if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) {
return;
} else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
makeSpan(c, "Mods++");
} else if (V.modScore > 7) {
makeSpan(c, "Mods+");
} else {
makeSpan(c, "Mods");
}
if (!jQuery.isEmptyObject(slave.brand)) {
makeSpan(c, "Br");
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_intelligence(slave, c) {
if (slave.fetish === "mindbroken") {
return;
}
const intelligence = slave.intelligence + slave.intelligenceImplant;
const educationStr = helpers.getNumericRating(data.short.mental.education, slave.intelligenceImplant + 15);
const intelligenceRating = helpers.getNumericRating(data.short.mental.intelligence, intelligence + 100);
makeSpan(c, `${intelligenceRating.desc}${educationStr}`, intelligenceRating.style, true, intelligence);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_skills(slave, c) {
const sd = data.short.skills;
let _SSkills = (slave.skill.anal + slave.skill.oral);
if (((_SSkills + slave.skill.whoring + slave.skill.entertainment) >= 400) && ((slave.vagina < 0) || (slave.skill.vaginal >= 100))) {
helpers.makeStyledSpan(c, sd.mss);
} else {
_SSkills += slave.skill.vaginal;
helpers.makeStyledSpan(c, helpers.getMultiNumericRating(sd.sex, [_SSkills, slave.vagina >= 0 ? 1 : 0]), Math.trunc(_SSkills), true);
helpers.makeRatedStyledSpan(c, sd.whoring, slave.skill.whoring, 0, true);
helpers.makeRatedStyledSpan(c, sd.entertainment, slave.skill.entertainment, 0, true);
helpers.makeStyledSpan(c, sd.fighter);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_prestige(slave, c) {
helpers.makeMappedStyledSpan(c, data.short.prestige, slave.prestige);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function short_porn_prestige(slave, c) {
helpers.makeMappedStyledSpan(c, data.short.pornPrestige, slave.porn.prestige);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_intelligence(slave, c) {
if (slave.fetish === "mindbroken") {
return;
}
const intelligence = slave.intelligence + slave.intelligenceImplant;
const educationStr = helpers.getNumericRating(data.long.mental.education, slave.intelligenceImplant + 15);
const intelligenceRating = helpers.getNumericRating(data.long.mental.intelligence, intelligence + 100);
makeSpan(c, `${intelligenceRating.desc}${educationStr}`, intelligenceRating.style, true, intelligence);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_skills(slave, c) {
let _SSkills = (slave.skill.anal + slave.skill.oral);
if (((_SSkills + slave.skill.whoring + slave.skill.entertainment) >= 400) && ((slave.vagina < 0) || (slave.skill.vaginal >= 100))) {
helpers.makeStyledSpan(c, sd.mss);
} else {
_SSkills += slave.skill.vaginal;
helpers.makeStyledSpan(c, helpers.getMultiNumericRating(sd.sex, [_SSkills, slave.vagina >= 0 ? 1 : 0]), Math.trunc(_SSkills), true);
helpers.makeRatedStyledSpan(c, sd.whoring, slave.skill.whoring, 0, true);
helpers.makeRatedStyledSpan(c, sd.entertainment, slave.skill.entertainment, 0, true);
helpers.makeStyledSpan(c, sd.fighter);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_prestige(slave, c) {
helpers.makeMappedStyledSpan(c, data.long.prestige, slave.prestige);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_porn_prestige(slave, c) {
helpers.makeMappedStyledSpan(c, data.long.pornPrestige, slave.porn.prestige);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_clothes(slave, c) {
makeSpan(c, helpers.getExactRating(data.long.clothes, slave.clothes, 'Naked.'));
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_collar(slave, c) {
helpers.makeMappedSpan(c, data.long.accessory.collar, slave.collar);
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_mask(slave, c) {
helpers.makeMappedSpan(c, data.long.accessory.faceAccessory, slave.faceAccessory);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_mouth(slave, c) {
helpers.makeMappedSpan(c, data.long.accessory.mouthAccessory, slave.mouthAccessory);
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_belly(slave, c) {
helpers.makeMappedSpan(c, data.long.accessory.belly, slave.bellyAccessory);
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_arms(slave, c) {
if (["hand gloves", "elbow gloves"].includes(slave.armAccessory)) {
makeSpan(c, slave.armAccessory, undefined, true);
}
}
/**
* @param {App.Entity.SlaveState} slave
* @param {Node} c
* @returns {void}
*/
function long_legs(slave, c) {
if (slave.legAccessory === "short stockings") {
makeSpan(c, "Short stockings.");
} else if (slave.legAccessory === "long stockings") {
makeSpan(c, "Long stockings.");
}
}
/**
* @param {App.Entity.SlaveState} slave