1
0

cumarrput 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # cumarrput
  2. !{
  3. ARGS[0]: name
  4. ARGS[1]:
  5. ARGS[2]: max potential
  6. ARGS[3]: current potential
  7. ARGS[4]: knowledge of person (-2 not known sex act; -1 not known deposit (precum); 0 unknown/nameless person; 1 known person)
  8. ARGS[5]: [not necessary to set] age of cum deposit
  9. }
  10. argc = arrsize('ARGS')
  11. if argc < 5:
  12. 'ERROR: cumarrput called incorrectly. report this to the maintainers'
  13. end
  14. !{'cumarr boy <<$ARGS[0]>> con <<ARGS[1]>> ppt <<ARGS[2]>> cpt <<ARGS[3]>> know <<ARGS[4]>> age <<ARGS[5]>>'}
  15. stat['cum_count'] += 1
  16. cacon = ARGS[1]
  17. i = arrsize('$cumarrnam')
  18. !{Check for existing non-protected deposit by same guy}
  19. i2 = 0
  20. :cumarrputloop
  21. if i2 < i:
  22. if $cumarrnam[i2] = $ARGS[0] and cumarrdel[i2] = 0:
  23. !{The following little horror lets us not override a "higher priority" contraceptive method with a lower-priority one. So if PC has unprotected sex with a guy once and then uses a condom next time and the condom breaks, the list will still show the cum deposit as being from unprotected sex.}
  24. !{In brief, we create an array of contraceptive methods in order of decreasting priority, and set effcontra to the first value matched by either sexcontra or the relevant cumarrcon entry.}
  25. cacon = func('sexcontraprio', ARGS[1], cumarrcon[i2])
  26. i = i2
  27. else
  28. i2 += 1
  29. jump 'cumarrputloop'
  30. end
  31. end
  32. $cumarrnam[i] = $ARGS[0]
  33. cumarrcnt[i] = stat['cum_count']
  34. cumarrcon[i] = cacon
  35. if cumarrppt[i] < ARGS[2] or ARGS[2] = -1:
  36. cumarrppt[i] = ARGS[2]
  37. end
  38. if ARGS[3] < cumarrppt[i] or cumarrcpt[i] = 0:
  39. c = ARGS[3]
  40. if c < 0: c *= -1
  41. cumarrcpt[i] += ARGS[3]
  42. end
  43. if ARGS[4]:
  44. cumarrkno[i] = ARGS[4]
  45. end
  46. if argc > 5:
  47. if cumarrage[i] < ARGS[5]: cumarrage[i] = ARGS[5]
  48. else
  49. cumarrage[i] = 0
  50. end
  51. RESULT = i
  52. --- cumarrput ---------------------------------