diff options
author | 2020-08-09 18:48:30 -0500 | |
---|---|---|
committer | 2020-08-09 18:50:51 -0500 | |
commit | f4367a4f286332974199590f8baf3cc9ada48f54 (patch) | |
tree | 11a710aa06ae0e80fe42471e7399f27acde915f3 | |
parent | changed my mind (diff) |
refactor
-rw-r--r-- | data/enemies/eggbots.lisp | 2 | ||||
-rw-r--r-- | data/enemies/fursuiters.lisp | 8 | ||||
-rw-r--r-- | data/enemies/navy.lisp | 2 | ||||
-rw-r--r-- | data/enemies/pirates.lisp | 2 | ||||
-rw-r--r-- | data/enemies/pokemon.lisp | 2 | ||||
-rw-r--r-- | data/enemies/raccoon-bandits.lisp | 3 | ||||
-rw-r--r-- | data/enemies/rpgmaker.lisp | 29 | ||||
-rw-r--r-- | data/prolog/enemies.lisp | 7 |
8 files changed, 22 insertions, 33 deletions
diff --git a/data/enemies/eggbots.lisp b/data/enemies/eggbots.lisp index 19d4ba1..5b474a1 100644 --- a/data/enemies/eggbots.lisp +++ b/data/enemies/eggbots.lisp @@ -8,4 +8,4 @@ :male t :attributes (list :not-ticklish t) :bitcoins-per-level 40 - :element-types (list (make-instance 'yadfa-element-types:steel)))) + :element-types (make-instances yadfa-element-types:steel))) diff --git a/data/enemies/fursuiters.lisp b/data/enemies/fursuiters.lisp index d4d804d..69770ee 100644 --- a/data/enemies/fursuiters.lisp +++ b/data/enemies/fursuiters.lisp @@ -8,8 +8,7 @@ :species "Fox" :bladder/contents (random 500) :bowels/contents (random 700) - :wear (list (make-instance 'yadfa-items:fursuit) - (make-instance 'yadfa-items:kurikia-thick-diaper)))) + :wear (make-instances yadfa-items:fursuit yadfa-items:kurikia-thick-diaper))) (defmethod process-battle-accident ((character padded-fursuiter-servant) attack (item item) reload (selected-target base-character)) (declare (ignore attack item reload selected-target)) (let* ((male (malep character)) @@ -63,7 +62,4 @@ :species "Fox" :bladder/contents (random 500) :bowels/contents (random 700) - :wear (list (make-instance 'yadfa-items:watertight-fursuit) - (make-instance 'yadfa-items:tshirt) - (make-instance 'yadfa-items:jeans) - (make-instance 'yadfa-items:boxers)))) + :wear (make-instances yadfa-items:watertight-fursuit yadfa-items:tshirt yadfa-items:jeans yadfa-items:boxers))) diff --git a/data/enemies/navy.lisp b/data/enemies/navy.lisp index 53eaca2..a5fd595 100644 --- a/data/enemies/navy.lisp +++ b/data/enemies/navy.lisp @@ -10,7 +10,7 @@ :mudsport-chance 3 :bladder/contents (random 500) :bowels/contents (random 700) - :element-types (list (make-instance 'yadfa-element-types:water)) + :element-types (make-instances yadfa-element-types:water) :inventory (iter (for i from 0 to (random 5)) (collect (make-instance 'yadfa-items:navy-pullups))) :bitcoins-per-level 60)) (defmethod process-battle-accident ((character navy-officer) attack (item item) reload (selected-target base-character)) diff --git a/data/enemies/pirates.lisp b/data/enemies/pirates.lisp index 85de5f9..c8218ea 100644 --- a/data/enemies/pirates.lisp +++ b/data/enemies/pirates.lisp @@ -8,7 +8,7 @@ :male (a:random-elt '(t nil)) :bladder/contents (random 500) :bowels/contents (random 700) - :element-types (list (make-instance 'yadfa-element-types:water)) + :element-types (make-instances yadfa-element-types:water) :watersport-limit 300 :mudsport-limit 400 :inventory (iter (for i from 0 to (random 20)) (collect (make-instance 'yadfa-items:diaper))))) diff --git a/data/enemies/pokemon.lisp b/data/enemies/pokemon.lisp index 696b644..391c127 100644 --- a/data/enemies/pokemon.lisp +++ b/data/enemies/pokemon.lisp @@ -7,7 +7,7 @@ :species "Magikarp" :male (a:random-elt '(t nil)) :bitcoins-per-level 10 - :element-types (list (make-instance 'yadfa-element-types:water)))) + :element-types (make-instances yadfa-element-types:water))) (defmethod attack ((target team-member) (user magikarp) (attack null)) (declare (ignore target attack)) (format t "~a uses Splash, obviously it had no effect. What did you think was going to happen?" (name-of user))) diff --git a/data/enemies/raccoon-bandits.lisp b/data/enemies/raccoon-bandits.lisp index 74643a7..62c9a23 100644 --- a/data/enemies/raccoon-bandits.lisp +++ b/data/enemies/raccoon-bandits.lisp @@ -8,8 +8,7 @@ :male t :bladder/contents (random 500) :bowels/contents (random 700) - :wear (list (make-instance 'yadfa-items:bandit-uniform-tunic) - (make-instance 'yadfa-items:bandit-adjustable-diaper)) + :wear (make-instances yadfa-items:bandit-uniform-tunic yadfa-items:bandit-adjustable-diaper) :inventory (let ((a ())) (iter (for i from 0 to (random 5)) (push (make-instance 'yadfa-items:bandit-diaper) a)) diff --git a/data/enemies/rpgmaker.lisp b/data/enemies/rpgmaker.lisp index 2916c47..88d2e2a 100644 --- a/data/enemies/rpgmaker.lisp +++ b/data/enemies/rpgmaker.lisp @@ -37,8 +37,8 @@ :bitcoins-per-level 100 :inventory (iter (for i from 0 to (random 10)) (collect (make-instance 'yadfa-items:high-capacity-diaper))) - :element-types (list (make-instance 'yadfa-element-types:poison)) - :moves (list (make-instance 'yadfa-moves:spray) (make-instance 'yadfa-moves:face-sit)))) + :element-types (make-instances yadfa-element-types:poison) + :moves (make-instances yadfa-moves:spray yadfa-moves:face-sit))) (defmethod initialize-instance :after ((c diapered-skunk) &rest args &key &allow-other-keys) (destructuring-bind (&key (watersport-limit nil watersportp) (mudsport-limit nil mudsportp) @@ -109,8 +109,8 @@ :watersport-chance 3 :mudsport-chance 3 :bitcoins-per-level 100 - :element-types (list (make-instance 'yadfa-element-types:poison)) - :moves (list (make-instance 'yadfa-moves:spray) (make-instance 'yadfa-moves:face-sit)))) + :element-types (make-instances yadfa-element-types:poison) + :moves (make-instances yadfa-moves:spray yadfa-moves:face-sit))) (defmethod initialize-instance :after ((c diapered-skunk*) &rest args &key &allow-other-keys) (destructuring-bind (&key (watersport-limit nil watersportp) (mudsport-limit nil mudsportp) @@ -188,18 +188,12 @@ (collect (make-instance 'yadfa-items:high-capacity-diaper))) (iter (for i from 0 to (random 20)) (collect (make-instance 'yadfa-items:kurikia-thick-diaper)))) - :element-types (list (make-instance 'yadfa-element-types:dragon) (make-instance 'yadfa-element-types:fire) - (make-instance 'yadfa-element-types:flying)) - :moves (list (make-instance 'yadfa-moves:tickle) - (make-instance 'yadfa-moves:roar) - (make-instance 'yadfa-moves:mush) - (make-instance 'yadfa-moves:fire-breath)))) + :element-types (make-instances yadfa-element-types:dragon yadfa-element-types:fire yadfa-element-types:flying) + :moves (make-instances yadfa-moves:tickle yadfa-moves:roar yadfa-moves:mush yadfa-moves:fire-breath))) (defclass diapered-dragon* (diapered-dragon pantsable-character) () (:default-initargs :description "Keeps kobolds as pets. Wears pants to hide {his,her} padding. Waits until the last minute because \"{,s}he's not some hatchling that has to use the potty all the time\"" - :wear (list (make-instance 'yadfa-items:black-leather-jacket) - (make-instance 'yadfa-items:baggy-jeans) - (make-instance 'yadfa-items:high-capacity-diaper)))) + :wear (make-instances yadfa-items:black-leather-jacket yadfa-items:baggy-jeans yadfa-items:high-capacity-diaper))) (defclass dergy (bladder-enemy) () (:default-initargs :name "Dergy" @@ -211,10 +205,8 @@ :wear (list (make-instance 'yadfa-items:kurikia-thick-rubber-diaper)) :inventory (iter (for i from 0 to (random 20)) (collect (make-instance 'yadfa-items:kurikia-thick-rubber-diaper))) - :moves (list (make-instance 'yadfa-moves:tickle) - (make-instance 'yadfa-moves:roar) - (make-instance 'yadfa-moves:mush) - (make-instance 'yadfa-moves:fire-breath)))) + :element-types (list (make-instance 'yadfa-element-types:dragon)) + :moves (make-instances yadfa-moves:tickle yadfa-moves:roar yadfa-moves:mush yadfa-moves:fire-breath))) ;;; Raptors would most likely not have bladders irl, but I already threw ;;; scientific accuracy out the window when I gave them scales instead of feathers. @@ -223,8 +215,7 @@ :name "Raptor" :malep (a:random-elt '(t nil)) :description "Biologically inaccurate velociraptor. The kind you see in Jurassic Park that looks more like a lizard than a prehistoric bird." - :moves (list (make-instance 'yadfa-moves:roar) - (make-instance 'yadfa-moves:bite)) + :moves (make-instances yadfa-moves:roar yadfa-moves:bite) :species "Raptor")) (setf (get 'diapered-kobold 'change-class-target) 'yadfa-allies:raptor) (defmethod change-class-text ((class raptor)) diff --git a/data/prolog/enemies.lisp b/data/prolog/enemies.lisp index a9c7fdf..bcc6557 100644 --- a/data/prolog/enemies.lisp +++ b/data/prolog/enemies.lisp @@ -1,5 +1,8 @@ ;;;; -*- mode: Common-Lisp; sly-buffer-package: "yadfa-enemies"; coding: utf-8-unix; -*- (in-package :yadfa-enemies) +(defmacro make-instances (&rest symbols) + `(list ,@(iter (for symbol in symbols) + (collect `(make-instance ',symbol))))) (defclass catchable-enemy (enemy) ((catch-chance :initarg :catch-chance @@ -28,5 +31,5 @@ :defense float-features:long-float-positive-infinity :energy most-positive-fixnum :speed 120) - :element-types (list (make-instance 'yadfa-element-types:ghost)) - :moves (list (make-instance 'yadfa-moves:ghost-tickle) (make-instance 'yadfa-moves:ghost-mush) (make-instance 'yadfa-moves:ghost-squish)))) + :element-types (make-instances yadfa-element-types:ghost) + :moves (make-instances yadfa-moves:ghost-tickle yadfa-moves:ghost-mush yadfa-moves:ghost-squish))) |