summaryrefslogtreecommitdiff
path: root/src/gizmo/wasp-hex.el
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-12-02 17:40:36 -0500
committerLLLL Colonq <llll@colonq>2024-12-02 17:40:36 -0500
commit6628a49b953842a3c358bdf3f5e45284480db0c3 (patch)
treee0fdff71394c667f01199be997d11fee14ed50c2 /src/gizmo/wasp-hex.el
parent0b95071fe628d91238549b062961e724088d3b8b (diff)
Update :5
Diffstat (limited to 'src/gizmo/wasp-hex.el')
-rw-r--r--src/gizmo/wasp-hex.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gizmo/wasp-hex.el b/src/gizmo/wasp-hex.el
index e0681065..81aa4f12 100644
--- a/src/gizmo/wasp-hex.el
+++ b/src/gizmo/wasp-hex.el
@@ -47,13 +47,14 @@
"Add HEX to the active hexes for USER."
(let* ((key (s-downcase user))
(cur (ht-get w/hex-users key)))
- (cl-case (w/hex-type hex)
- (decurse
- (ht-set! w/hex-users key nil))
- (otherwise
- (if-let ((defender (--find (eq 'counterspell (w/hex-type it)) cur)))
- (w/write-chat-event (format "%s counterspelled %s's hex on %s!" (w/hex-caster defender) (w/hex-caster hex) user))
- (ht-set! w/hex-users key (cons hex cur)))))))
+ (unless (> (length cur) 10)
+ (cl-case (w/hex-type hex)
+ (decurse
+ (ht-set! w/hex-users key nil))
+ (otherwise
+ (if-let ((defender (--find (eq 'counterspell (w/hex-type it)) cur)))
+ (w/write-chat-event (format "%s counterspelled %s's hex on %s!" (w/hex-caster defender) (w/hex-caster hex) user))
+ (ht-set! w/hex-users key (cons hex cur))))))))
(defun w/hex-clear (user)
"Decurse USER."
@@ -197,7 +198,7 @@
(w/hex-transform-helper msg (cdr hexes) k))
"Please censor all profanity in the given message and respond with the censored version. Censor by rewriting in a very polite way like Ned Flanders. Do not provide any other text, only a censored version of the message. If there is no profanity respond with the given message verbatim."))
(pokemon
- (w/audio-play (w/asset (format "palcries/%d.mp3" (w/hex-data (car hexes)))) nil 75)
+ (w/audio-play (w/asset (format "palcries/%d.mp3" (w/hex-data (car hexes)))) nil 50)
(setf
(w/chat-message-user msg)
(s-titleize (nth (- (w/hex-data (car hexes)) 1) w/hex-pokemon)))