Table of Contents
general-store - things to buy
The General Store is the only safe place to be, and you can hang-out here as long as you'd like. The general store-keep has wares for purchase (while supplies last) and will sometimes buy your spares and finds. The staff isn't chatty and doesn't barter.
1 General Store DATA
1.1 Comestibles :TABLE=comestibles:
10 | cheeeze |
100 | cracker-jacks |
1k | rare cheeeze |
15 | cheeze food product |
5 | hard tack |
7 | organic jerkey sticks |
10 | dried meat |
15 | tofu |
25 | pez |
100 | action figure |
75 | milk |
1.2 Boozamahol :TABLE=boozamahol:
1 | Local imports |
10 | Favorite red |
1k | (when available) Fine single-malt |
10k | (when available) Exceptional single-malt |
100k | (when available) Single-malt of Which We Do Not Speak Aloud |
1m | Tokay Essencia |
2 Design
The General Store is a top level table containing no spoilers sorting item groups by ascending cost.
#+name design
(dm-deftable general-store ((gold integer :label "g") (item dungeon-item)) :spoilers nil)
2.1 Usage
#+name usage
;; create/incr items of rcpt-c, deduct cost from payer-c (general-store-buy dungon-item rcpt-c payer-c) ;; decr/remove item(s) of rcpt-c (general-store-sell dungeon-item has-c-or-pty payee-c-or-pty) ;; returns cost in gold if the general store has DUNGON-ITEM (general-store dungeon-item) ;; return the general store table for CATEGORY-STRING if any (general-store category-string) ;; return the complete set of tables for the general store (general-store)
2.2 Implementation CODE
#+NAME implementation
(def-dungeon-table-fun general-store-buy (item rcpt-c payer-c) "create/incr items of rcpt-c, deduct cost from payer-c" ;; do some work right here ) (general-store-sell (item has-c-or-pty payee-c-or-pty) "Decr/remove item(s) of rcpt-c") (general-store (item) "returns cost in gold if the general store has ITEM") (general-store (category-string) "return the general store table for CATEGORY-STRING if any") (general-store () "return the complete set of tables for the general store")