Fixing bug where ridges cost half as much as they should.

logins
Thomas Hintz 5 years ago
parent d2349ff575
commit 3c48592b56

@ -343,17 +343,16 @@
))
(define (buy-crop crop unnormalized-crop amount cash-value player game)
;; TODO bug when buying ridge, the full amount isn't accounted for
;; because 'crop' is 'cows' not 'ridge-cows' or the ridge
(let ((total-cost (* amount (alist-ref crop '((hay . 2000) (grain . 2000)
(fruit . 5000) (cows . 500)
(ridge-cows . 1000)
(tractor . 10000)
(harvester . 10000)
(ridge4 . 1000)
(ridge3 . 1000)
(ridge2 . 1000)
(ridge1 . 1000)))))
(let ((total-cost (* amount (alist-ref unnormalized-crop
'((hay . 2000) (grain . 2000)
(fruit . 5000) (cows . 500)
(ridge-cows . 1000)
(tractor . 10000)
(harvester . 10000)
(ridge4 . 1000)
(ridge3 . 1000)
(ridge2 . 1000)
(ridge1 . 1000)))))
(ridges '(ridge1 ridge2 ridge3 ridge4)))
(cond ((and (member unnormalized-crop ridges)
(not (ridge-available? game unnormalized-crop)))

Loading…
Cancel
Save