Browse Source

Start writing define-asset-path

Getty Ritter 3 years ago
parent
commit
aab4308c1d
2 changed files with 9 additions and 2 deletions
  1. 1 1
      assets.rkt
  2. 8 1
      core.rkt

+ 1 - 1
assets.rkt

@@ -2,7 +2,7 @@
 
 (require "core.rkt")
 
-(define-asset-path "Animal-Kin"
+(define-asset-path animal-kin
   (basic "When you make a move to pacify, calm, control, aid, or fend off an animal"
          "(or an animal or beast companion), add +1 and take +1 momentum on a hit.")
   (advance "You may add or upgrade an animal or beast companion asset for 1 fewer"

+ 8 - 1
core.rkt

@@ -82,7 +82,14 @@
 (define-syntax-rule [define-oracle name . table]
   (define name (oracle (quote table))))
 
+(define (asset name table)
+  (define (mk-feature feature)
+    (list (car feature) (apply string-append (cdr feature))))
+  (let [(stuff (map mk-feature table))]
+    `(asset ,name ,stuff)))
+  
+
 (define-syntax-rule [define-asset-path name . table]
-  #f)
+  (define name (asset (quote name) (quote table))))
 
 (provide judge-outcome roll-plus-mod oracle define-oracle define-asset-path)