aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-07-14 18:05:37 -0500
committerGravatar Pouar <pouar@pouar.net>2020-07-14 18:05:37 -0500
commit2adf7b225af7743bf6bb5f3c3463dcf5de9a2757 (patch)
tree9e9af30a9ebcd066cb3d50ad5f8639d1bb864a9e
parentavoid non tail recursive function (diff)
make use of the new API in case these moves ever gain a element type
-rw-r--r--data/moves/dbz.lisp2
-rw-r--r--data/moves/regular.lisp6
2 files changed, 4 insertions, 4 deletions
diff --git a/data/moves/dbz.lisp b/data/moves/dbz.lisp
index 6387c21..e7ee486 100644
--- a/data/moves/dbz.lisp
+++ b/data/moves/dbz.lisp
@@ -7,7 +7,7 @@
:energy-cost 12
:power 200))
(defmethod attack ((target base-character) (user base-character) (attack kamehameha))
- (let ((a (calculate-damage target user (power-of attack))))
+ (let ((a (calculate-damage target user attack)))
(format t "~a used ~a~%" (name-of user) (name-of attack))
(format t "KAM-E-HAM-E-HA!!! *loud energy blast noise*~%OK, not as dramatic in a text based game~%")
(decf (health-of target) a)
diff --git a/data/moves/regular.lisp b/data/moves/regular.lisp
index 5c38ad8..5d0b209 100644
--- a/data/moves/regular.lisp
+++ b/data/moves/regular.lisp
@@ -140,7 +140,7 @@
:power 60
:description "Breathes fire at the enemy"))
(defmethod attack ((target base-character) (user base-character) (self fire-breath))
- (let ((a (calculate-damage target user (power-of self))))
+ (let ((a (calculate-damage target user self)))
(format t "~a used ~a~%" (name-of user) (name-of self))
(decf (health-of target) a)
a))
@@ -154,7 +154,7 @@
(format t "~a used ~a~%" (name-of user) (name-of self))
(let* ((m (mess :messer user))
(c (calculate-diaper-usage user))
- (a (calculate-damage target user (power-of self))))
+ (a (calculate-damage target user self)))
(if (> (getf m :mess-amount) 0)
(format t "~a sits on ~a's face and messes~%" (name-of user) (name-of target))
(format t "~a sits on ~a's face~%" (name-of user) (name-of target)))
@@ -255,7 +255,7 @@
:power 10
:description "Breathes fire at the enemy"))
(defmethod attack ((target base-character) (user base-character) (self spank))
- (let ((a (calculate-damage target user (power-of self)))
+ (let ((a (calculate-damage target user self))
(times (random 10)))
(f:fmt t
(name-of user) " bends " (name-of target) " over " (if (malep user) "his" "her") " knee and gives " (name-of target) " a spanking" #\Newline