aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-10-02 12:05:59 -0500
committerGravatar Pouar <pouar@pouar.net>2020-10-02 12:05:59 -0500
commitfa6aa26025899c940b08a9a379b9bb92e7bf9c54 (patch)
tree445744f9fed79c75f8b7e503f98924cb7548c3ef
parentadd new function for getting the effective type effectiveness (diff)
use fmt
-rw-r--r--core/libexec/generic-functions.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/libexec/generic-functions.lisp b/core/libexec/generic-functions.lisp
index 0cb2c8a..b0827df 100644
--- a/core/libexec/generic-functions.lisp
+++ b/core/libexec/generic-functions.lisp
@@ -168,10 +168,11 @@
(:super-effective (:fmt "It's super effective" #\Newline))
(:no-effect (:fmt "It had no effect" #\Newline))))))
(:method :after ((target base-character) (user base-character) (item weapon))
- (format t "~a received ~a damage~%" (name-of target) (calculate-damage target user
- (if (first (ammo-of item))
- (ammo-power-of (first (ammo-of item)))
- (power-of item)))))
+ (f:fmt t (name-of target) " received " (calculate-damage target user
+ (if (first (ammo-of item))
+ (ammo-power-of (first (ammo-of item)))
+ (power-of item)))
+ " damage" #\Newline))
(:method :after ((target base-character) (user base-character) (item damage-wield))
(format t "~a received ~a damage~%" (name-of target) (calculate-damage target user (power-of item))))
(:method ((target base-character) (user base-character) (attack null))