1w6 - Ein Würfel System - Einfach saubere, freie Rollenspiel-Regeln
Just for fun: This implements the ±d6 in Guile Scheme, including critical rolls.
(define* (roll-1d6) (let* ((numbers '(-5 -3 -1 2 4 6)) (rolld6 (lambda () (list-ref numbers (random 6))))) (let rolling ((rolled (cons (rolld6) '()))) (cond ((and (= 1 (length rolled)) (member (car rolled) '(-5 6))) (rolling (cons (rolld6) rolled))) ((and (> (length rolled) 1) (equal? (car rolled) (car (cdr rolled)))) (rolling (cons (rolld6) rolled))) ((= 1 (length rolled)) (car rolled)) (else (apply + (cdr rolled)))))))
Kommentar hinzufügen