summaryrefslogtreecommitdiff
path: root/src/wasp-user-talents.el
blob: 8b251c9fb2831c732de579194d82bfd054b7dcdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;;; wasp-user-talents --- skills and perks and talents -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:

(require 'wasp-utils)
(require 'wasp-db)

;; talent:name -> hashmap from tids to names
;; talent:desc -> hashmap from tids to description
;; talent:icon -> hashmap from tids to image bytes
(defun w/talent-create (tid name desc iconpath)
  "Create a new talent TID called NAME with DESC and ICONPATH."
  (let ((icon (or (f-read-bytes iconpath) (error "Failed to open icon path: %s" iconpath))))
    (progn
      (w/db-hset "talent:name" tid name)
      (w/db-hset "talent:desc" tid desc)
      (w/db-hset "talent:icon" tid icon))))

;; (w/talent-create "bigjoel" "Bigger Joels" "Increase the size of Joels posted." (w/asset "talents/bigjoel.png"))
;; (w/talent-create "shaderopacity" "Opacity" "Make shaders more opaque." (w/asset "talents/shaderopacity.png"))
;; (w/talent-create "bonuscard" "Bonus Cards" "Gain a chance to draw extra cards." (w/asset "talents/bonuscard.png"))
;; (w/talent-create "rarityboost" "Rarity Boost" "Cards you draw have higher rarity." (w/asset "talents/rarityboost.png"))
;; (w/talent-create "beastmaster" "Beastmaster" "Friend likes you more." (w/asset "talents/beastmaster.png"))
;; (w/talent-create "multicast" "Multi-cast" "Hexes have a chance to cast on an additional target." (w/asset "talents/multicast.png"))

(provide 'wasp-user-talents)
;;; wasp-user-talents.el ends here