aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-09-16 17:05:09 -0500
committerGravatar Pouar <pouar@pouar.net>2020-09-16 17:05:09 -0500
commit7f4f868707b5b9b905fa2529ce4d9be5139eab27 (patch)
treece5449337bf50ffe6ef30ea4c580b51640f44aad
parentoptimization (diff)
indent
-rw-r--r--core/libexec/methods.lisp345
-rw-r--r--data/enemies/haunted.lisp24
-rw-r--r--data/enemies/navy.lisp16
-rw-r--r--data/enemies/pirates.lisp4
-rw-r--r--data/enemies/rpgmaker.lisp2
-rw-r--r--data/moves/pokemon.lisp18
-rw-r--r--data/moves/regular.lisp40
7 files changed, 225 insertions, 224 deletions
diff --git a/core/libexec/methods.lisp b/core/libexec/methods.lisp
index 5251025..71cad12 100644
--- a/core/libexec/methods.lisp
+++ b/core/libexec/methods.lisp
@@ -6,54 +6,54 @@
(let ((class (slot-value (class-of o) 'name)))
(if class
(print-unreadable-object-with-prefix (o s :type t :identity t)
- (write class :stream s))
+ (write class :stream s))
(call-next-method))))
(defmethod print-object ((o element-type-class) s)
(let ((class (slot-value o 'name)))
(if class
(print-unreadable-object-with-prefix (o s :type t :identity nil)
- (f:fmt s (:s class) " " (:s (class-name o))))
+ (f:fmt s (:s class) " " (:s (class-name o))))
(call-next-method))))
(defmethod print-object ((obj ally) stream)
(print-unreadable-object-with-prefix (obj stream :type t :identity t)
- (print-slot obj 'name stream)))
+ (print-slot obj 'name stream)))
(defmethod print-object ((obj zone) stream)
(print-unreadable-object-with-prefix (obj stream :type t :identity t)
- (print-slot obj 'position stream)
- (write-string " " stream)
- (print-slot obj 'name stream)))
+ (print-slot obj 'position stream)
+ (write-string " " stream)
+ (print-slot obj 'name stream)))
(defmethod print-object ((obj prop) stream)
(print-unreadable-object-with-prefix (obj stream :type t :identity t)
- (print-slot obj 'name stream)))
+ (print-slot obj 'name stream)))
(defmethod print-object ((obj enemy) stream)
(print-unreadable-object-with-prefix (obj stream :type t :identity t)
- (cond ((not (slot-boundp obj 'male))
- (print-slot obj 'male stream))
- ((slot-value obj 'male)
- (write "Male" :stream stream))
- (t (write "Female" :stream stream)))
- (write-string " " stream)
- (print-slot obj 'species stream)))
+ (cond ((not (slot-boundp obj 'male))
+ (print-slot obj 'male stream))
+ ((slot-value obj 'male)
+ (write "Male" :stream stream))
+ (t (write "Female" :stream stream)))
+ (write-string " " stream)
+ (print-slot obj 'species stream)))
(defmethod process-potty-dance ((character base-character) attack (item item) reload (selected-target base-character))
(declare (ignore item reload selected-target))
(when (process-potty-dance-check character attack)
(format t "~a is too busy doing a potty dance to fight~%" (name-of character))
t))
#.`(progn ,@(iter (for i in '("BLADDER" "BOWELS"))
- (appending (iter (for j in '("CONTENTS-OF" "FILL-RATE-OF"))
- (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
- (declare (ignore object))
- 0))
- (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
- (declare (ignore object newval))
- 0))))
- (appending (iter (for j in '("NEED-TO-POTTY-LIMIT-OF" "POTTY-DANCE-LIMIT-OF" "POTTY-DESPERATE-LIMIT-OF" "MAXIMUM-LIMIT-OF"))
- (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
- (declare (ignore object))
- 1))
- (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
- (declare (ignore object newval))
- 1))))))
+ (appending (iter (for j in '("CONTENTS-OF" "FILL-RATE-OF"))
+ (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
+ (declare (ignore object))
+ 0))
+ (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
+ (declare (ignore object newval))
+ 0))))
+ (appending (iter (for j in '("NEED-TO-POTTY-LIMIT-OF" "POTTY-DANCE-LIMIT-OF" "POTTY-DESPERATE-LIMIT-OF" "MAXIMUM-LIMIT-OF"))
+ (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
+ (declare (ignore object))
+ 1))
+ (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
+ (declare (ignore object newval))
+ 1))))))
(defmethod toggle-onesie (onesie clothes user)
(error 'invalid-user-input :format-control "That's not a onesie"))
(defmethod toggle-onesie ((onesie onesie/opened) clothes (user base-character))
@@ -68,8 +68,8 @@
(toggle-onesie% onesie)))
(defmethod get-babyish-padding ((user team-member))
#.`(cond ,@(iter (for i in '(diaper pullup closed-bottoms))
- (collect `((filter-items (wear-of user) ',i)
- ',i)))
+ (collect `((filter-items (wear-of user) ',i)
+ ',i)))
(t nil)))
(defmethod output-process-potty-text (user padding type action had-accident &key (stream *standard-output*))
(declare (ignore user padding type action had-accident stream)))
@@ -93,28 +93,28 @@
&key (stream *standard-output*))
(format stream "~a~%"
(let ((j (a:switch ((getf (car had-accident) :accident) :test 'eq)
- (:dribble `("You gasp in horror as a little leaks out"
- "You think you just leaked a little"
- ,(format nil "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
- (a:random-elt '("groan" "whine")))))
- (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
- (:all (let ((a `(,(format nil
- "LOOK EVERYBODY!!!! ~a IS WETTING ~a DIAPERS!!!!~%~%*~a eeps and hides ~a soggy padding in embarrassment*"
- (string-upcase (name-of user))
- (if (malep user) "HIS" "HER")
- (name-of user)
- (if (malep user) "his" "her"))
- "After doing a potty dance like a 5 year old, you freeze and pee yourself"
- "Grabbing your crotch you pause and blush as you flood yourself like an infant"
- "You cross your legs in a vain attempt to hold it in but fail miserably"
- "You gasp in embarrassment as you flood yourself like a toddler"
- "You let out a groan as your bladder empties itself"
- "You fall to your knees clutching the front of your diapers struggling to keep your diapers dry and flood yourself")))
- (unless (malep user)
- (push "You press your legs together while fidgeting and squirming until your flood your pamps like the baby girl you are" a))
- (when (s:memq (car (tail-of user)) '(:medium :large :lizard))
- "You clutch the front of your diaper with your legs crossed and your tail between your legs in vain as you flood your pamps")
- a)))))
+ (:dribble `("You gasp in horror as a little leaks out"
+ "You think you just leaked a little"
+ ,(format nil "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
+ (a:random-elt '("groan" "whine")))))
+ (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
+ (:all (let ((a `(,(format nil
+ "LOOK EVERYBODY!!!! ~a IS WETTING ~a DIAPERS!!!!~%~%*~a eeps and hides ~a soggy padding in embarrassment*"
+ (string-upcase (name-of user))
+ (if (malep user) "HIS" "HER")
+ (name-of user)
+ (if (malep user) "his" "her"))
+ "After doing a potty dance like a 5 year old, you freeze and pee yourself"
+ "Grabbing your crotch you pause and blush as you flood yourself like an infant"
+ "You cross your legs in a vain attempt to hold it in but fail miserably"
+ "You gasp in embarrassment as you flood yourself like a toddler"
+ "You let out a groan as your bladder empties itself"
+ "You fall to your knees clutching the front of your diapers struggling to keep your diapers dry and flood yourself")))
+ (unless (malep user)
+ (push "You press your legs together while fidgeting and squirming until your flood your pamps like the baby girl you are" a))
+ (when (s:memq (car (tail-of user)) '(:medium :large :lizard))
+ "You clutch the front of your diaper with your legs crossed and your tail between your legs in vain as you flood your pamps")
+ a)))))
(when (>= (getf (car had-accident) :wet-amount) 300)
(push (format nil "Aww, the baby is using ~a diapers?" (if (malep user) "his" "her")) j))
(a:random-elt j)))
@@ -131,25 +131,25 @@
&key (stream *standard-output*))
(format stream "~a~%"
(a:random-elt (a:switch ((getf (car had-accident) :accident) :test 'eq)
- (:dribble `(,(format nil "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
- (a:random-elt '("groan" "whine")))
- "You gasp in horror as a little leaks out"
- "You think you just leaked a little"))
- (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
- (:all `(,(format nil "Naughty ~a wetting your pullups. You know you're supposed to use the toilet like a big kid."
- (if (malep user) "boy" "girl"))
- ,(format nil "LOOK EVERYBODY!!!! ~A IS WETTING ~a PULLUPS!!!!!!~%~%*~a eeps and hides ~a soggy pullups in embarrassment*"
- (string-upcase (name-of user))
- (if (malep user) "HIS" "HER")
- (name-of user)
- (if (malep user) "his" "her"))
- "After doing a potty dance like a 5 year old, you freeze and pee yourself"
- "Grabbing your crotch you pause and blush as you flood yourself like an infant"
- "You cross your legs in a vain attempt to hold it in but fail miserably"
- "You gasp in embarrassment as you flood yourself like a toddler"
- "You let out a groan as your bladder empties itself"
- "You fall to your knees clutching the front of your pullups struggling to keep them dry and flood yourself"
- "The little pictures on the front of your pullups fade showing everyone what you did")))))
+ (:dribble `(,(format nil "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
+ (a:random-elt '("groan" "whine")))
+ "You gasp in horror as a little leaks out"
+ "You think you just leaked a little"))
+ (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
+ (:all `(,(format nil "Naughty ~a wetting your pullups. You know you're supposed to use the toilet like a big kid."
+ (if (malep user) "boy" "girl"))
+ ,(format nil "LOOK EVERYBODY!!!! ~A IS WETTING ~a PULLUPS!!!!!!~%~%*~a eeps and hides ~a soggy pullups in embarrassment*"
+ (string-upcase (name-of user))
+ (if (malep user) "HIS" "HER")
+ (name-of user)
+ (if (malep user) "his" "her"))
+ "After doing a potty dance like a 5 year old, you freeze and pee yourself"
+ "Grabbing your crotch you pause and blush as you flood yourself like an infant"
+ "You cross your legs in a vain attempt to hold it in but fail miserably"
+ "You gasp in embarrassment as you flood yourself like a toddler"
+ "You let out a groan as your bladder empties itself"
+ "You fall to your knees clutching the front of your pullups struggling to keep them dry and flood yourself"
+ "The little pictures on the front of your pullups fade showing everyone what you did")))))
(format stream "~a~%"
(let ((out '("Your face turns red as you leak everywhere"
"Your pullups leak. There goes the carpet."
@@ -162,18 +162,18 @@
&key (stream *standard-output*))
(format stream "~a~%"
(a:random-elt (a:switch ((getf (car had-accident) :accident) :test 'eq)
- (:dribble `(,(format nil
- "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
- (a:random-elt '("groan" "whine")))
- "You gasp in horror as a little leaks out"
- "You think you just leaked a little"))
- (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
- (:all '("After doing a potty dance like a 5 year old, you freeze and pee yourself"
- "Grabbing your crotch you pause and blush as you flood yourself like an infant"
- "You cross your legs in a vain attempt to hold it in but fail miserably"
- "You gasp in embarrassment as you flood yourself like a toddler"
- "You let out a groan as your bladder empties itself"
- "You fall to your knees holding your crotch struggling to keep your pants dry and flood yourself")))))
+ (:dribble `(,(format nil
+ "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
+ (a:random-elt '("groan" "whine")))
+ "You gasp in horror as a little leaks out"
+ "You think you just leaked a little"))
+ (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
+ (:all '("After doing a potty dance like a 5 year old, you freeze and pee yourself"
+ "Grabbing your crotch you pause and blush as you flood yourself like an infant"
+ "You cross your legs in a vain attempt to hold it in but fail miserably"
+ "You gasp in embarrassment as you flood yourself like a toddler"
+ "You let out a groan as your bladder empties itself"
+ "You fall to your knees holding your crotch struggling to keep your pants dry and flood yourself")))))
(when (and (car had-accident) (> (getf (car had-accident) :leak-amount) 0))
(format stream "~a~%"
(a:random-elt `(,(format nil "Bad ~a! No going potty in the house!" (if (= (random 2) 0) (species-of user) (name-of user)))
@@ -190,16 +190,16 @@
(format stream "~a~%"
(let
((j (a:switch ((getf (car had-accident) :accident) :test 'eq)
- (:dribble `(,(format nil "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
- (a:random-elt '("groan" "whine")))
- "You gasp in horror as a little leaks out"
- "You think you just leaked a little"))
- (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
- (:all '("After doing a potty dance like a 5 year old, you freeze and pee yourself"
- "Grabbing your crotch you pause and blush as you flood yourself like an infant"
- "You cross your legs in a vain attempt to hold it in but fail miserably"
- "You gasp in embarrassment as you flood yourself like a toddler"
- "You let out a groan as your bladder empties itself")))))
+ (:dribble `(,(format nil "A little squirts out. You quickly grab yourself with a ~a, but manage to stop the flood"
+ (a:random-elt '("groan" "whine")))
+ "You gasp in horror as a little leaks out"
+ "You think you just leaked a little"))
+ (:some '("You gasp in horror as you flood yourself, but manage to stop yourself"))
+ (:all '("After doing a potty dance like a 5 year old, you freeze and pee yourself"
+ "Grabbing your crotch you pause and blush as you flood yourself like an infant"
+ "You cross your legs in a vain attempt to hold it in but fail miserably"
+ "You gasp in embarrassment as you flood yourself like a toddler"
+ "You let out a groan as your bladder empties itself")))))
(a:random-elt j)))
(when (and (car had-accident) (> (getf (car had-accident) :leak-amount) 0))
(format stream "~a~%"
@@ -1607,54 +1607,55 @@ randomrange is @code{(random-from-range 85 100)}"
(user-element-types (element-types-of user)))
(s:mvlet ((super-effective not-very-effective no-effect (funcall (lambda ()
(iter (with (the fixnum super-effective) = 0)
- (with (the fixnum not-very-effective) = 0)
- (with (the fixnum no-effect) = 0)
- (for attack-element-type in attack-element-types)
- (iter (for target-element-type in target-element-types)
- (case (type-match attack-element-type target-element-type)
- (:super-effective (incf super-effective))
- (:not-very-effective (incf not-very-effective))
- (:no-effect (incf no-effect))))
- (finally (return (values super-effective not-very-effective no-effect))))))))
- (round (u:$ (u:$ (u:$ (u:$ (u:$ (u:$ (u:$ 2 * (level-of user)) / 5) + 2) * (power-of attack) * (u:$ (calculate-stat user :attack) / (calculate-stat target :defense)))
- / 50)
- + 2)
- * (* (u:$ (random-from-range 85 100) / 100)
- (if (> no-effect 0)
- 0
- (expt 2 (- super-effective not-very-effective)))
- (if (intersection user-element-types attack-element-types
- :key (lambda (o)
- (class-of (coerce-element-type o)))
- :test 'subtypep)
- 1.5
- 1)))))))
+ (with (the fixnum not-very-effective) = 0)
+ (with (the fixnum no-effect) = 0)
+ (for attack-element-type in attack-element-types)
+ (iter (for target-element-type in target-element-types)
+ (case (type-match attack-element-type target-element-type)
+ (:super-effective (incf super-effective))
+ (:not-very-effective (incf not-very-effective))
+ (:no-effect (incf no-effect))))
+ (finally (return (values super-effective not-very-effective no-effect))))))))
+ (round (u:$ (u:$ (u:$ (u:$ (u:$ (u:$ (u:$ 2 * (level-of user)) / 5) + 2) * (power-of attack) *
+ (u:$ (calculate-stat user :attack) / (calculate-stat target :defense)))
+ / 50)
+ + 2)
+ * (* (u:$ (random-from-range 85 100) / 100)
+ (if (> no-effect 0)
+ 0
+ (expt 2 (- super-effective not-very-effective)))
+ (if (intersection user-element-types attack-element-types
+ :key (lambda (o)
+ (class-of (coerce-element-type o)))
+ :test 'subtypep)
+ 1.5
+ 1)))))))
(defmethod describe-diaper-wear-usage (item))
(defmethod describe-diaper-inventory-usage (item))
(defmethod describe-diaper-usage (item))
(defmethod describe-diaper-inventory-usage ((item closed-bottoms))
(iter (for (a b) on (wet-text-of item) by #'cddr)
- (when (>= (sogginess-of item) a)
- (f:fmt* t #\Space b #\Newline)
- (finish)))
+ (when (>= (sogginess-of item) a)
+ (f:fmt* t #\Space b #\Newline)
+ (finish)))
(iter (for (a b) on (mess-text-of item) by #'cddr)
- (when (>= (messiness-of item) a)
- (f:fmt* t #\Space b #\Newline)
- (finish))))
+ (when (>= (messiness-of item) a)
+ (f:fmt* t #\Space b #\Newline)
+ (finish))))
(defmethod describe-diaper-wear-usage ((item closed-bottoms))
(iter (for (a b) on (wear-wet-text-of item) by #'cddr)
- (when (>= (sogginess-of item) a)
- (f:fmt* t #\Space b #\Newline)
- (finish)))
+ (when (>= (sogginess-of item) a)
+ (f:fmt* t #\Space b #\Newline)
+ (finish)))
(iter (for (a b) on (wear-mess-text-of item) by #'cddr)
- (when (>= (messiness-of item) a)
- (f:fmt* t #\Space b #\Newline)
- (finish)))
+ (when (>= (messiness-of item) a)
+ (f:fmt* t #\Space b #\Newline)
+ (finish)))
(iter (for (a b) on (bulge-text-of item) by #'cddr)
- (when (>= (total-thickness item) a)
- (f:fmt* t #\Space b #\Newline)
- (finish))))
+ (when (>= (total-thickness item) a)
+ (f:fmt* t #\Space b #\Newline)
+ (finish))))
(defmethod describe-diaper-usage ((item closed-bottoms))
(f:fmt t
"Sogginess: " (sogginess-of item) #\Newline
@@ -1663,13 +1664,13 @@ randomrange is @code{(random-from-range 85 100)}"
"Messiness Capacity: " (messiness-capacity-of item) #\Newline))
(defmethod process-battle-turn ((character npc) attack item reload selected-target)
(iter (for i in (getf (status-conditions-of *battle*) character))
- (when (or (eq (duration-of i) t) (> (duration-of i) 0))
- (condition-script character i)
- (when (typep (duration-of i) 'real)
- (decf (duration-of i))))
- (removef-if (getf (status-conditions-of *battle*) character)
- (lambda (a) (and (not (eq a t)) (<= a 0)))
- :key #'duration-of))
+ (when (or (eq (duration-of i) t) (> (duration-of i) 0))
+ (condition-script character i)
+ (when (typep (duration-of i) 'real)
+ (decf (duration-of i))))
+ (removef-if (getf (status-conditions-of *battle*) character)
+ (lambda (a) (and (not (eq a t)) (<= a 0)))
+ :key #'duration-of))
(run-equip-effects character)
(when (<= (health-of character) 0)
(unless (s:memq character (fainted-of *battle*))
@@ -1689,8 +1690,8 @@ randomrange is @code{(random-from-range 85 100)}"
(cond ((process-battle-accident character attack item reload selected-target)
nil)
((iter (for j in (getf (status-conditions-of *battle*) character))
- (when (blocks-turn-of j)
- (leave t))))
+ (when (blocks-turn-of j)
+ (leave t))))
((process-potty-dance character attack item reload selected-target) t)
((and (wield-of character)
(ammo-type-of (wield-of character))
@@ -1698,8 +1699,8 @@ randomrange is @code{(random-from-range 85 100)}"
(> (ammo-capacity-of (wield-of character)) 0)
(ammo-type-of (wield-of character))
(iter (for i in (inventory-of character))
- (when (typep i (ammo-type-of (wield-of character)))
- (leave t))))
+ (when (typep i (ammo-type-of (wield-of character)))
+ (leave t))))
(format t "~a reloaded ~a ~a"
(name-of character)
(if (malep character)
@@ -1707,27 +1708,27 @@ randomrange is @code{(random-from-range 85 100)}"
"her")
(name-of (wield-of character)))
(iter (with count = 0)
- (for item in (inventory-of character))
- (when (or (list-length-<= (ammo-capacity-of (wield-of character)) (ammo-of (wield-of character)))
- (and (reload-count-of (wield-of character)) (>= count (reload-count-of (wield-of character)))))
- (leave t))
- (when (typep item (ammo-type-of (wield-of character)))
- (incf count)
- (push item (ammo-of (wield-of character)))
- (a:deletef item (inventory-of character) :count 1))))
+ (for item in (inventory-of character))
+ (when (or (list-length-<= (ammo-capacity-of (wield-of character)) (ammo-of (wield-of character)))
+ (and (reload-count-of (wield-of character)) (>= count (reload-count-of (wield-of character)))))
+ (leave t))
+ (when (typep item (ammo-type-of (wield-of character)))
+ (incf count)
+ (push item (ammo-of (wield-of character)))
+ (a:deletef item (inventory-of character) :count 1))))
(t
(battle-script character (a:random-elt (if (typep character 'enemy)
(team-of *game*)
(enemies-of *battle*)))))))
(defmethod process-battle-turn ((character base-character) attack item reload selected-target)
(iter (for status-condition in (getf (status-conditions-of *battle*) character))
- (when (or (eq (duration-of status-condition) t) (> (duration-of status-condition) 0))
- (condition-script character status-condition)
- (when (typep (duration-of status-condition) 'real)
- (decf (duration-of status-condition))))
- (removef-if (getf (status-conditions-of *battle*) character)
- (lambda (a) (and (not (eq a t)) (<= a 0)))
- :key #'duration-of))
+ (when (or (eq (duration-of status-condition) t) (> (duration-of status-condition) 0))
+ (condition-script character status-condition)
+ (when (typep (duration-of status-condition) 'real)
+ (decf (duration-of status-condition))))
+ (removef-if (getf (status-conditions-of *battle*) character)
+ (lambda (a) (and (not (eq a t)) (<= a 0)))
+ :key #'duration-of))
(run-equip-effects character)
(when (<= (health-of character) 0)
(setf (health-of character) 0)
@@ -1747,8 +1748,8 @@ randomrange is @code{(random-from-range 85 100)}"
(cond ((process-battle-accident character attack item reload selected-target)
nil)
((iter (for j in (getf (status-conditions-of *battle*) character))
- (when (blocks-turn-of j)
- (leave t))))
+ (when (blocks-turn-of j)
+ (leave t))))
((process-potty-dance character attack item reload selected-target) t)
(item
(format t "~a used ~a ~a on ~a~%"
@@ -1764,20 +1765,20 @@ randomrange is @code{(random-from-range 85 100)}"
"her")
(name-of (wield-of character)))
(iter (with count = 0)
- (for item in (inventory-of (player-of *game*)))
- (when (or
- (list-length-<= (ammo-capacity-of (wield-of character))
- (ammo-of (wield-of character)))
- (and
- (reload-count-of (wield-of character))
- (>=
- count
- (reload-count-of (wield-of character)))))
- (leave t))
- (when (and (typep item reload) (typep item (ammo-type-of (wield-of character))))
- (incf count)
- (push item (ammo-of (wield-of character)))
- (a:deletef item (inventory-of (player-of *game*)) :count 1))))
+ (for item in (inventory-of (player-of *game*)))
+ (when (or
+ (list-length-<= (ammo-capacity-of (wield-of character))
+ (ammo-of (wield-of character)))
+ (and
+ (reload-count-of (wield-of character))
+ (>=
+ count
+ (reload-count-of (wield-of character)))))
+ (leave t))
+ (when (and (typep item reload) (typep item (ammo-type-of (wield-of character))))
+ (incf count)
+ (push item (ammo-of (wield-of character)))
+ (a:deletef item (inventory-of (player-of *game*)) :count 1))))
((eq attack t)
(if (wield-of character)
(progn (attack selected-target character (wield-of character))
diff --git a/data/enemies/haunted.lisp b/data/enemies/haunted.lisp
index 82edab6..7d8b337 100644
--- a/data/enemies/haunted.lisp
+++ b/data/enemies/haunted.lisp
@@ -24,16 +24,16 @@
(iter (for i in (if (typep user 'team-member)
(enemies-of *battle*)
(team-of *game*)))
- (with j = nil)
- (when (>= (bladder/contents-of i) (bladder/need-to-potty-limit-of i))
- (format t "~a wets ~aself in fear~%" (name-of i) (if (malep i) "him" "her"))
- (wet :wetter i)
- (set-status-condition 'yadfa-status-conditions:wetting i)
- (setf j t))
- (when (>= (bowels/contents-of i) (bowels/need-to-potty-limit-of i))
- (format t "~a messes ~aself in fear~%" (name-of i) (if (malep i) "him" "her"))
- (mess :messer i)
- (set-status-condition 'yadfa-status-conditions:messing i)
- (setf j t))
- (finally (return j))))
+ (with j = nil)
+ (when (>= (bladder/contents-of i) (bladder/need-to-potty-limit-of i))
+ (format t "~a wets ~aself in fear~%" (name-of i) (if (malep i) "him" "her"))
+ (wet :wetter i)
+ (set-status-condition 'yadfa-status-conditions:wetting i)
+ (setf j t))
+ (when (>= (bowels/contents-of i) (bowels/need-to-potty-limit-of i))
+ (format t "~a messes ~aself in fear~%" (name-of i) (if (malep i) "him" "her"))
+ (mess :messer i)
+ (set-status-condition 'yadfa-status-conditions:messing i)
+ (setf j t))
+ (finally (return j))))
(write-line "it had no effect")))
diff --git a/data/enemies/navy.lisp b/data/enemies/navy.lisp
index 0a38117..72c9b4f 100644
--- a/data/enemies/navy.lisp
+++ b/data/enemies/navy.lisp
@@ -17,12 +17,12 @@
(declare (ignore attack item reload selected-target))
(let* ((male (malep character))
(pamps (iter (for i in (wear-of character))
- (let ((i (typecase i
- (diaper 'diaper)
- (pullup 'pullup)
- (closed-bottoms 'closed-bottoms))))
- (when i
- (leave i)))))
+ (let ((i (typecase i
+ (diaper 'diaper)
+ (pullup 'pullup)
+ (closed-bottoms 'closed-bottoms))))
+ (when i
+ (leave i)))))
(pampspronoun (if male
(if pamps
"his "
@@ -94,9 +94,9 @@
:watersport-chance (random-from-range 1 3)
:mudsport-chance (random-from-range 1 3)
:inventory (nconc (iter (for i from 0 to (random 5))
- (collect (make-instance 'yadfa-items:navy-pullups)))
+ (collect (make-instance 'yadfa-items:navy-pullups)))
(iter (for i from 0 to (random 15))
- (collect (make-instance 'yadfa-items:cloth-incontinence-pad))))))
+ (collect (make-instance 'yadfa-items:cloth-incontinence-pad))))))
(defmethod initialize-instance :after
((c navy-officer*) &key (watersport-limit nil watersportp) (mudsport-limit nil mudsportp) (wear nil wearp) &allow-other-keys)
(declare (ignore watersport-limit mudsport-limit wear))
diff --git a/data/enemies/pirates.lisp b/data/enemies/pirates.lisp
index ee3cb17..04bd21e 100644
--- a/data/enemies/pirates.lisp
+++ b/data/enemies/pirates.lisp
@@ -27,9 +27,9 @@
(:default-initargs
:description "A variant of the Diaper Pirate that wears 3 layers of padding. A stuffer, a normal diaper, and a super thick diaper."
:inventory (nconc (iter (for i from 0 to (random 20))
- (collect (make-instance 'yadfa-items:incontinence-pad)))
+ (collect (make-instance 'yadfa-items:incontinence-pad)))
(iter (for i from 0 to (random 20))
- (collect (make-instance 'yadfa-items:cloth-diaper)))
+ (collect (make-instance 'yadfa-items:cloth-diaper)))
(iter (for i from 0 to (random 20))
(collect (make-instance 'yadfa-items:thick-rubber-diaper))))))
(defmethod initialize-instance :after ((c thickly-diaper-pirate) &key (wear nil wearp) &allow-other-keys)
diff --git a/data/enemies/rpgmaker.lisp b/data/enemies/rpgmaker.lisp
index 45f3d8d..cfe7fb2 100644
--- a/data/enemies/rpgmaker.lisp
+++ b/data/enemies/rpgmaker.lisp
@@ -10,7 +10,7 @@
:bowels/contents (random 700)
:bitcoins-per-level 100
:inventory (iter (for i from 0 to (random 10))
- (collect (make-instance 'yadfa-items:cloth-diaper)))))
+ (collect (make-instance 'yadfa-items:cloth-diaper)))))
(setf (get 'diapered-kobold 'change-class-target) 'yadfa-allies:diapered-kobold)
(defmethod initialize-instance :after
((c diapered-kobold) &key (wear nil wearp) &allow-other-keys)
diff --git a/data/moves/pokemon.lisp b/data/moves/pokemon.lisp
index cfd1882..23ab55b 100644
--- a/data/moves/pokemon.lisp
+++ b/data/moves/pokemon.lisp
@@ -57,8 +57,8 @@
(iter (for i in (if (typep user 'team-member)
(enemies-of *battle*)
(team-of *game*)))
- (set-status-condition 'yadfa-status-conditions:skunked i)
- (format t "~a is grossed out by the smell~%" (name-of i))))
+ (set-status-condition 'yadfa-status-conditions:skunked i)
+ (format t "~a is grossed out by the smell~%" (name-of i))))
(defclass tickle (move debuff) ()
(:default-initargs
:name "Tickle"
@@ -83,13 +83,13 @@
(unless (iter (for i in (if (typep user 'team-member)
(enemies-of *battle*)
(team-of *game*)))
- (with j = nil)
- (when (>= (bladder/contents-of i) (bladder/need-to-potty-limit-of i))
- (format t "~a jumps and wets ~aself~%" (name-of i) (if (malep i) "him" "her"))
- (wet :wetter i)
- (set-status-condition 'yadfa-status-conditions:wetting i)
- (setf j t))
- (finally (return j)))
+ (with j = nil)
+ (when (>= (bladder/contents-of i) (bladder/need-to-potty-limit-of i))
+ (format t "~a jumps and wets ~aself~%" (name-of i) (if (malep i) "him" "her"))
+ (wet :wetter i)
+ (set-status-condition 'yadfa-status-conditions:wetting i)
+ (setf j t))
+ (finally (return j)))
(write-line "it had no effect")))
(defclass bite (damage-move) ()
(:default-initargs
diff --git a/data/moves/regular.lisp b/data/moves/regular.lisp
index 54c6478..157e402 100644
--- a/data/moves/regular.lisp
+++ b/data/moves/regular.lisp
@@ -59,15 +59,15 @@
(stat
(when pants
(iter (for i in (wear-of target))
- (when (typep i '(or diaper pullup))
- (let ((severity (cond ((and (> (sogginess-of i) 300) (> (messiness-of i) 4000))
- 'both)
- ((> (messiness-of i) 4000)
- 'messy)
- ((> (sogginess-of i) 300)
- 'soggy)))
- (padding i))
- (leave `(padding ,padding severity ,severity)))))))
+ (when (typep i '(or diaper pullup))
+ (let ((severity (cond ((and (> (sogginess-of i) 300) (> (messiness-of i) 4000))
+ 'both)
+ ((> (messiness-of i) 4000)
+ 'messy)
+ ((> (sogginess-of i) 300)
+ 'soggy)))
+ (padding i))
+ (leave `(padding ,padding severity ,severity)))))))
(old-condition (find 'yadfa-status-conditions:pantsed (getf (status-conditions-of *battle*) target)
:test (lambda (o e)
(typep e o)))))
@@ -98,8 +98,8 @@
(let ((audience (iter (for i in (if (typep target 'enemy)
(enemies-of *battle*)
(team-of *game*)))
- (unless (eq target i)
- (collect i)))))
+ (unless (eq target i)
+ (collect i)))))
(when audience
(format t (if (> (list-length audience) 1)
"~a's team mates start laughing at ~a~%"
@@ -110,7 +110,7 @@
"her"))
(unless old-condition
(iter (for i in audience)
- (set-status-condition 'yadfa-status-conditions:laughing i))))))
+ (set-status-condition 'yadfa-status-conditions:laughing i))))))
(progn
(format t "~a tries to pants ~a~%" (name-of user) (name-of target))
(format t "The attack has no effect on ~a~%" (name-of target))))))
@@ -118,14 +118,14 @@
(format t "~a used ~a~%" (name-of user) (name-of attack))
(let ((amount 50))
(iter (while (> amount 0))
- (for i in (reverse (wear-of user)))
- (when (typep i 'closed-bottoms)
- (cond ((> amount (- (sogginess-capacity-of i) (sogginess-of i)))
- (decf amount (- (sogginess-capacity-of i) (sogginess-of i)))
- (setf (sogginess-of i) (sogginess-capacity-of i)))
- ((> amount 0)
- (incf (sogginess-of i) amount)
- (setf amount 0))))))
+ (for i in (reverse (wear-of user)))
+ (when (typep i 'closed-bottoms)
+ (cond ((> amount (- (sogginess-capacity-of i) (sogginess-of i)))
+ (decf amount (- (sogginess-capacity-of i) (sogginess-of i)))
+ (setf (sogginess-of i) (sogginess-capacity-of i)))
+ ((> amount 0)
+ (incf (sogginess-of i) amount)
+ (setf amount 0))))))
(let ((clothing (filter-items (wear-of user) 'closed-bottoms)))
(cond
((filter-items clothing 'incontinence-product)