Posting here first before making a github issue, but as I play through the game again in Clojurescript, when I get to the end of the Kithgaard Dungeon realm I wanted to play the “skip” level as well, Kithgaard Mastery, but am unable to complete it due to lacking a cast functionality in clojurescript.
The my code is at the bottom of this post, but the pertinent parts are:
;; Count how many gems you pick up, and then say the current count when near a fireball trap to disable it.
(.say this gems) ;which fails
I am no clojure expert, but I believe clojure requires explicit casting to cast to a string. Since gems is an integer, that expression fails. But there is no cast functionality in any of the equipment received in Kithgaard Mastery.
Is there just something else I’m missing?
;; Count how many gems you pick up, and then say the current count when near a fireball trap to disable it. ;; The raven at the start will give you a password. Say the password near a door to open it. ;; Kill ogres when you get near them. ;; You can use a loop to repeat all of the instructions as needed. ;; If you beat this level, you can skip to the Forest World! (if (not gems) (def gems 0)) (.moveRight this) (dotimes [n 2] (.moveUp this)) (dotimes [n 2] (def enemy (.findNearestEnemy this)) (if enemy (.attack this enemy))) (.moveLeft this) (dotimes [n 2] (.moveUp this)) (dotimes [n 2] (.moveRight this)) (.moveUp this) (inc gems) (.moveDown this) (.moveRight this) (dotimes [n 2] (.moveDown this)) (.say this gems)