HumanoidBreasts.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /// <reference path="../../Bodypart.ts" />
  2. /// <reference path="../../Humanoid/Humanoid.ts" />
  3. /// <reference path="../SexStick.ts" />
  4. /// <reference path="../SexHole.ts" />
  5. /// <reference path="../../../Measure.ts" />
  6. class HumanoidBreasts extends Bodypart {
  7. public size : number = 0;
  8. public silicone : number = 0;
  9. public milk : number = 0;
  10. public sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  11. public genderWeight = Bodypart.WEIGHT_HIGH;
  12. public slots : Array<number> = [Humanoid.SLOT_BREASTS];
  13. public sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  14. public sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  15. public constructor (options? : ThingOptions) {
  16. super(options);
  17. this.addGetAlterations((thing) => {
  18. return {
  19. Size : this.size,
  20. Silicone : this.silicone,
  21. Milk : this.milk
  22. }
  23. });
  24. this.addSetAlterations((thing, changes) => {
  25. this.size = changes.Size;
  26. this.silicone = changes.Silicone;
  27. this.milk = changes.Milk;
  28. });
  29. }
  30. public getSize () {
  31. return this.size + this.silicone + this.milk;
  32. }
  33. public getSizeText () {
  34. return HumanoidBreasts.getSizeText(this.getSize());
  35. }
  36. public static getSizeText (size : number) {
  37. let names = ["flat", "AA-cup", "A-cup", "B-cup", "C-cup", "D-cup", "E-cup", "F-cup", "G-cup", "H-cup"];
  38. if (size >= names.length) {
  39. return "HUGE";
  40. } else {
  41. return names[size];
  42. }
  43. }
  44. public getGenderValue () {
  45. return HumanoidBreasts.getGenderFromSize(this.getSize());
  46. }
  47. public getSluttiness () {
  48. return this.getGenderValue();
  49. }
  50. public static getGenderFromSize (size : number) {
  51. if (size <= 0) {
  52. return 20;
  53. } else if (size <= 3) {
  54. return 20 * size;
  55. } else {
  56. return 80;
  57. }
  58. }
  59. public arrangeGenderValue (gv : number) {
  60. if (gv <= 20) {
  61. this.size = 0;
  62. this.silicone = 0;
  63. this.milk = 0;
  64. } else if (gv < 80) {
  65. this.size = Math.round(gv / 20);
  66. } else {
  67. this.size = 4;
  68. }
  69. }
  70. }