FuckingUnit.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /// <reference path="../ContentUnit.ts" />
  2. /// <reference path="../../Things/Person.ts" />
  3. /// <reference path="../../Things/Bodypart/SexHole.ts" />
  4. /// <reference path="../../Things/Bodypart/SexStick.ts" />
  5. class FuckingUnit extends ContentUnit {
  6. private fucker : ContentDifferential = new ContentDifferential(Person);
  7. private fucked : ContentDifferential = new ContentDifferential(Person);
  8. private hole : ContentDifferential = new ContentDifferential(SexHole);
  9. private stick : ContentDifferential = new ContentDifferential(SexStick);
  10. private markers : ContentDifferential = new ContentDifferential();
  11. public constructor () {
  12. super();
  13. }
  14. public setFucker (it : Thing | typeof Thing) {
  15. this.fucker = new ContentDifferential(it);
  16. return this;
  17. }
  18. public setFucked (it : Thing | typeof Thing) {
  19. this.fucked = new ContentDifferential(it);
  20. return this;
  21. }
  22. public setHole (it : Thing | typeof Thing) {
  23. this.hole = new ContentDifferential(it);
  24. return this;
  25. }
  26. public setStick (it : Thing | typeof Thing) {
  27. this.stick = new ContentDifferential(it);
  28. return this;
  29. }
  30. public addMarker (marker : ContentMarker) {
  31. this.markers.addNoun(marker);
  32. return this;
  33. }
  34. public getScore () {
  35. return this.fucker.getScore() + this.fucked.getScore() + this.hole.getScore() + this.stick.getScore() + this.markers.getScore();
  36. }
  37. public isMatch (fu : FuckingUnit) {
  38. if (fu instanceof FuckingUnit) {
  39. return this.fucker.isMatch(fu.fucker) && this.fucked.isMatch(fu.fucked) &&
  40. this.hole.isMatch(fu.hole) && this.stick.isMatch(fu.stick) && this.markers.isMatch(fu.markers);
  41. }
  42. return false;
  43. }
  44. }