Introduction
Introduction Statistics Contact Development Disclaimer Help
andregarzia.com_pollenpub.atom.xml - sfeed_tests - sfeed tests and RSS and Atom…
git clone git://git.codemadness.org/sfeed_tests
Log
Files
Refs
README
LICENSE
---
andregarzia.com_pollenpub.atom.xml (130703B)
---
1 <?xml version="1.0" encoding="utf-8"?>
2 <feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>AndreG…
3 (check-required-attributes 'damage-chart '(label damage) attrs)
4 (define label (attr-val 'label attrs))
5 (define damage-values (attr-val 'damage attrs))
6 (define dice-values (range 1 (+ 1 (length damage-values))))
7 (define limit-natural (attr-val 'limit-natural attrs))
8 (define (zip a b)
9 (apply map list (list a b)))
10 (make-directory* "img")
11 (define path (build-path "img" (~a label (equal-hash-code damage-value…
12 (parameterize ([plot-x-label "Dice Roll"]
13 [plot-y-label "Damage"]
14 [plot-title (string-titlecase (~a #:separator " " label…
15 (plot-file
16 (list
17 (if limit-natural (vrule
18 limit-natural
19 #:style 'dot
20 #:color 2
21 #:label "Damage For Maximum Natural Dice Rol…
22 '())
23 (if limit-natural (hrule
24 (list-ref damage-values (- limit-natural 1))
25 #:style 'dot
26 #:color 2)
27 '())
28 (lines
29 (zip dice-values damage-values)
30 #:label (string-titlecase (~a #:separator " " label "damage"))))
31 path))</code></pre><p>This is plain old Racket using the <a href="h…
32 It can be built with a simple damage chart:
33
34 ◊damage-graph[
35 #:label "Spear of the Worthy"
36 #:damage '(4 4 6 6 8 8 20)
37 #:limit-natural 6
38 ]
39
40 That is remarkably similar to the standard spear damage chart from Troik…
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.