;;-*-Lisp-*-
(in-package goal)

;; definition (debug) for function task-status->string
(defun-debug task-status->string ((arg0 task-status))
  (case arg0
    (((task-status need-resolution))
     "need-resolution"
     )
    (((task-status need-reward-speech))
     "need-reward-speech"
     )
    (((task-status need-reminder))
     "need-reminder"
     )
    (((task-status need-reminder-a))
     "need-reminder-a"
     )
    (((task-status need-introduction))
     "need-introduction"
     )
    (((task-status need-hint))
     "need-hint"
     )
    (((task-status unknown))
     "unknown"
     )
    (((task-status invalid))
     "invalid"
     )
    (else
      "*unknown*"
      )
    )
  )

;; definition for method 9 of type task-cstage
(defmethod get-task task-cstage ((obj task-cstage))
  (-> obj game-task)
  )

;; definition for method 10 of type task-cstage
(defmethod get-status task-cstage ((obj task-cstage))
  (-> obj status)
  )

;; definition for method 12 of type task-cstage
(defmethod closed? task-cstage ((obj task-cstage))
  (logtest? (-> obj flags) (task-flags closed))
  )

;; definition for method 13 of type task-cstage
(defmethod closed-by-default? task-cstage ((obj task-cstage))
  (logtest? (-> obj flags) (task-flags closed-by-default))
  )

;; definition for method 11 of type task-cstage
(defmethod task-available? task-cstage ((obj task-cstage) (arg0 task-control))
  (let ((a0-1 obj))
    (cond
      ((logtest? (-> a0-1 flags) (task-flags closed))
       #f
       )
      ((>= (the-as int (-> (get-entity-task-perm *game-info* (-> obj game-task)) user-uint8 0))
           (the-as int (-> obj status))
           )
       (logior! (-> obj flags) (task-flags closed))
       #f
       )
      ((task-complete? *game-info* (-> obj game-task))
       (logior! (-> obj flags) (task-flags closed))
       #f
       )
      (else
        ((-> obj condition) arg0)
        )
      )
    )
  )

;; definition for method 14 of type task-cstage
(defmethod close-task! task-cstage ((obj task-cstage))
  (if (= (-> obj game-task) (game-task none))
      (return (the-as int #f))
      )
  (logior! (-> obj flags) (task-flags closed))
  (when (logtest? (-> obj flags) (task-flags has-entity))
    (let ((v1-9 (get-entity-task-perm *game-info* (-> obj game-task))))
      (logior! (-> v1-9 status) (entity-perm-status user-set-from-cstage))
      (if (< (-> v1-9 user-uint8 0) (the-as uint (-> obj status)))
          (set! (-> v1-9 user-int8 0) (the-as int (-> obj status)))
          )
      )
    )
  0
  )

;; definition for method 15 of type task-cstage
(defmethod open-task! task-cstage ((obj task-cstage))
  (logclear! (-> obj flags) (task-flags closed))
  0
  )

;; definition for symbol *null-task-control*, type task-control
(define *null-task-control*
  (new 'static 'task-control :current-stage -1 :stage (new 'static 'boxed-array :type task-cstage))
  )

;; definition for method 9 of type task-control
;; INFO: Return type mismatch int vs game-task.
(defmethod current-task task-control ((obj task-control))
  (the-as game-task (cond
                      ((= obj *null-task-control*)
                       (format 0 "ERROR<GMJ>: current-task received *null-task-control*~%")
                       0
                       )
                      ((= (-> obj current-stage) -1)
                       0
                       )
                      (else
                        (the-as int (-> obj stage (-> obj current-stage) game-task))
                        )
                      )
          )
  )

;; definition for method 10 of type task-control
;; INFO: Return type mismatch int vs task-status.
(defmethod current-status task-control ((obj task-control))
  (the-as task-status (cond
                        ((= obj *null-task-control*)
                         (format 0 "ERROR<GMJ>: current-status received self of *null-task-control*~%~%")
                         0
                         )
                        ((= (-> obj current-stage) -1)
                         0
                         )
                        (else
                          (the-as int (-> obj stage (-> obj current-stage) status))
                          )
                        )
          )
  )

;; definition for method 11 of type task-control
(defmethod close-current! task-control ((obj task-control))
  (cond
    ((= obj *null-task-control*)
     (format 0 "ERROR<GMJ>: close-current! received self of *null-task-control*~%~%")
     )
    ((= (-> obj current-stage) -1)
     )
    (else
      (close-task! (-> obj stage (-> obj current-stage)))
      )
    )
  (first-any obj #t)
  )

;; definition for method 12 of type task-control
;; INFO: Return type mismatch int vs game-task.
(defmethod close-status! task-control ((obj task-control) (arg0 task-status))
  (let ((a0-2 (current-task obj)))
    (dotimes (v1-1 (-> obj stage length))
      (when (and (= a0-2 (-> obj stage v1-1 game-task)) (= arg0 (-> obj stage v1-1 status)))
        (close-task! (-> obj stage v1-1))
        (return (the-as game-task (first-any obj #t)))
        )
      )
    (format
      0
      "ERROR<GMJ>: close-status! received non-existent task-cstage(~S ~S)--returning #t.~%"
      (game-task->string a0-2)
      (task-status->string arg0)
      )
    )
  (the-as game-task 0)
  )

;; definition for method 13 of type task-control
;; INFO: Return type mismatch int vs game-task.
(defmethod first-any task-control ((obj task-control) (arg0 symbol))
  (when (= obj *null-task-control*)
    (if arg0
        (format 0 "ERROR<GMJ>: first-any received self of *null-task-control*~%~%")
        )
    (return (game-task none))
    )
  (dotimes (s5-0 (-> obj stage length))
    (when (task-available? (-> obj stage s5-0) obj)
      (set! (-> obj current-stage) s5-0)
      (return (the-as game-task (-> obj stage s5-0 game-task)))
      )
    )
  (set! (-> obj current-stage) -1)
  (the-as game-task 0)
  )

;; definition for method 14 of type task-control
(defmethod reset! task-control ((obj task-control) (arg0 symbol) (arg1 symbol))
  (when (= obj *null-task-control*)
    (if arg1
        (format 0 "ERROR<GMJ>: reset! received self of *null-task-control*~%~%")
        )
    (return 0)
    )
  (dotimes (s4-0 (-> obj stage length))
    (if (or (= arg0 'game) (let ((a0-4 (-> obj stage s4-0)))
                             (not (logtest? (-> a0-4 flags) (task-flags closed-by-default)))
                             )
            )
        (open-task! (-> obj stage s4-0))
        )
    (let ((a0-10 (-> obj stage s4-0)))
      (if (logtest? (-> a0-10 flags) (task-flags closed))
          (close-task! (-> obj stage s4-0))
          )
      )
    )
  (the-as int #f)
  )

;; definition for method 15 of type task-control
(defmethod closed? task-control ((obj task-control) (arg0 game-task) (arg1 task-status))
  (when (= obj *null-task-control*)
    (format 0 "ERROR<GMJ>: closed? received self of *null-task-control*~%~%")
    (return #f)
    )
  (dotimes (v1-3 (-> obj stage length))
    (when (and (= arg0 (-> obj stage v1-3 game-task)) (= arg1 (-> obj stage v1-3 status)))
      (let ((a0-3 (-> obj stage v1-3)))
        (return (logtest? (-> a0-3 flags) (task-flags closed)))
        )
      )
    )
  (format
    0
    "ERROR<GMJ>: closed? received non-existent task-cstage(~S ~S)--returning #t.~%"
    (game-task->string arg0)
    (task-status->string arg1)
    )
  #t
  )

;; definition for method 18 of type task-control
(defmethod exists? task-control ((obj task-control) (arg0 game-task) (arg1 task-status))
  (when (= obj *null-task-control*)
    (format 0 "ERROR<GMJ>: exists? received self of *null-task-control*~%~%")
    (return #f)
    )
  (dotimes (v1-3 (-> obj stage length))
    (if (and (= arg0 (-> obj stage v1-3 game-task)) (= arg1 (-> obj stage v1-3 status)))
        (return #t)
        )
    )
  #f
  )

;; definition for method 16 of type task-control
(defmethod get-reminder task-control ((obj task-control) (arg0 int))
  (when (= obj *null-task-control*)
    (format 0 "ERROR<GMJ>: get-reminder received self of *null-task-control*~%~%")
    (return 0)
    )
  (let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task))))
    (the-as int (-> v1-4 user-uint8 (+ arg0 1)))
    )
  )

;; definition for method 17 of type task-control
(defmethod save-reminder task-control ((obj task-control) (arg0 int) (arg1 int))
  (when (= obj *null-task-control*)
    (format 0 "ERROR<GMJ>: save-reminder received self of *null-task-control*~%~%")
    (return 0)
    )
  (let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task))))
    (logior! (-> v1-4 status) (entity-perm-status user-set-from-cstage))
    (set! (-> v1-4 user-int8 (+ arg1 1)) arg0)
    )
  0
  )

;; definition for symbol *assistant-tasks*, type task-control
(define *assistant-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task jungle-eggtop)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-eggtop)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-bike)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (or (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder))
              (and (closed? arg0 (game-task jungle-eggtop) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-bike)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (or (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder))
              (and (closed? arg0 (game-task jungle-eggtop) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-eggtop)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-bike)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-bike)
        :status (task-status need-reminder-a)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-bike)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :status (task-status unknown)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (task-closed? (game-task village4-button) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-eggtop)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-bike)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *assistant-village2-tasks*, type task-control
(define *assistant-village2-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task village2-levitator)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-levitator)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-levitator)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-levitator)
        :status (task-status need-reminder-a)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-levitator)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 45)
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task sunken-room)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task sunken-room)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-flutflut)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (and (task-closed? (game-task beach-flutflut) (task-status need-reminder))
               (or (closed? arg0 (game-task sunken-room) (task-status need-reminder))
                   (and (closed? arg0 (game-task sunken-room) (task-status need-introduction))
                        (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                            (+ (get-reminder arg0 1) 3)
                            )
                        )
                   )
               )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-flutflut)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (and (task-closed? (game-task beach-flutflut) (task-status need-reminder))
               (or (closed? arg0 (game-task sunken-room) (task-status need-reminder))
                   (and (closed? arg0 (game-task sunken-room) (task-status need-introduction))
                        (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                            (+ (get-reminder arg0 1) 3)
                            )
                        )
                   )
               )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-robbers)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (if (task-closed? (game-task beach-flutflut) (task-status need-reminder))
              (or (closed? arg0 (game-task swamp-flutflut) (task-status need-reminder))
                  (and (closed? arg0 (game-task swamp-flutflut) (task-status need-introduction))
                       (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                           (+ (get-reminder arg0 1) 3)
                           )
                       )
                  )
              (or (closed? arg0 (game-task sunken-room) (task-status need-reminder))
                  (and (closed? arg0 (game-task sunken-room) (task-status need-introduction))
                       (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                           (+ (get-reminder arg0 1) 3)
                           )
                       )
                  )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-robbers)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (if (task-closed? (game-task beach-flutflut) (task-status need-reminder))
              (or (closed? arg0 (game-task swamp-flutflut) (task-status need-reminder))
                  (and (closed? arg0 (game-task swamp-flutflut) (task-status need-introduction))
                       (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                           (+ (get-reminder arg0 1) 3)
                           )
                       )
                  )
              (or (closed? arg0 (game-task sunken-room) (task-status need-reminder))
                  (and (closed? arg0 (game-task sunken-room) (task-status need-introduction))
                       (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                           (+ (get-reminder arg0 1) 3)
                           )
                       )
                  )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task sunken-room)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task sunken-room)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-flutflut)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (task-closed? (game-task beach-flutflut) (task-status need-reminder))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-flutflut)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (task-closed? (game-task beach-flutflut) (task-status need-reminder))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-robbers)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-robbers)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task sunken-room)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-robbers)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-flutflut)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-levitator)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *gambler-tasks*, type task-control
(define *gambler-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task rolling-race)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-race)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-gambler-money)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-gambler-money)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-race)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-race) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-gambler-money)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task village2-gambler-money) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-race)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-race) (task-status need-reminder))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-gambler-money)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-race)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-race) (task-status need-introduction))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-gambler-money)
        :status (task-status need-reminder)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-race) (task-status need-introduction))
          )
        )
      )
    )
  )

;; definition for symbol *geologist-tasks*, type task-control
(define *geologist-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task rolling-moles)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-moles)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-geologist-money)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-geologist-money)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-moles)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-moles) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-geologist-money)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task village2-geologist-money) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-moles)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-moles) (task-status need-reminder))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-geologist-money)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-moles)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-moles) (task-status need-introduction))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-geologist-money)
        :status (task-status need-reminder)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task rolling-moles) (task-status need-introduction))
          )
        )
      )
    )
  )

;; definition for symbol *mayor-tasks*, type task-control
(define *mayor-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task jungle-lurkerm)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-lurkerm)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-mayor-money)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-mayor-money)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-lurkerm)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task jungle-lurkerm) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-mayor-money)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task village1-mayor-money) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-lurkerm)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task jungle-lurkerm) (task-status need-reminder))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-mayor-money)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-lurkerm)
        :status (task-status need-reminder-a)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task jungle-lurkerm)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction))
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-mayor-money)
        :status (task-status need-reminder)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction))
          )
        )
      )
    )
  )

;; definition for symbol *sage-tasks*, type task-control
(define *sage-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task intro)
        :status (task-status need-introduction)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task intro)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task intro)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task beach-ecorocks)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task beach-ecorocks)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-cannon)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task beach-ecorocks) (task-status need-reminder))
              (and (closed? arg0 (game-task beach-ecorocks) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-cannon)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task beach-ecorocks) (task-status need-reminder))
              (and (closed? arg0 (game-task beach-ecorocks) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task beach-ecorocks)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-cannon)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-cannon)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :status (task-status unknown)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (task-closed? (game-task village4-button) (task-status need-reward-speech))
          )
        )
      (new 'static 'task-cstage
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task beach-ecorocks)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task misty-cannon)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *sage-bluehut-tasks*, type task-control
(define *sage-bluehut-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task rolling-plants)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-plants)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-arm)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task rolling-plants) (task-status need-reminder))
              (and (closed? arg0 (game-task rolling-plants) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-arm)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task rolling-plants) (task-status need-reminder))
              (and (closed? arg0 (game-task rolling-plants) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-plants)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-arm)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-arm)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task rolling-plants)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task swamp-arm)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *oracle-village1-tasks*, type task-control
(define *oracle-village1-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money1)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money1)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money2)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money2)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money1)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-oracle-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money1)
        :status (task-status need-reminder)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money1)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money2)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-oracle-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money2)
        :status (task-status need-reminder)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village1-oracle-money2)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *oracle-village2-tasks*, type task-control
(define *oracle-village2-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money1)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money1)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money2)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money2)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money1)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-oracle-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money1)
        :status (task-status need-reminder)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money1)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money2)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-oracle-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money2)
        :status (task-status need-reminder)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village2-oracle-money2)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *oracle-village3-tasks*, type task-control
(define *oracle-village3-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money1)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money1)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money2)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money2)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money1)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-oracle-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money1)
        :status (task-status need-reminder)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money1)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money2)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-oracle-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money2)
        :status (task-status need-reminder)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-oracle-money2)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *miners-tasks*, type task-control
(define *miners-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money1)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money1)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money2)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money2)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money3)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money3)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money4)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money4)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money1)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money2)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money3)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money4)
        :status (task-status need-reward-speech)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable
          ((arg0 task-control))
          (the-as
            symbol
            (and *target*
                 (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                 )
            )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-gnawers)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task village3-miner-money4) (task-status need-reminder))
              (and (closed? arg0 (game-task village3-miner-money4) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-gnawers)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task village3-miner-money4) (task-status need-reminder))
              (and (closed? arg0 (game-task village3-miner-money4) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-eggtop)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task cave-gnawers) (task-status need-reminder))
              (and (closed? arg0 (game-task cave-gnawers) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-eggtop)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task cave-gnawers) (task-status need-reminder))
              (and (closed? arg0 (game-task cave-gnawers) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money1)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money1)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money2)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money2)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money3)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money3)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money4)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money4)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-gnawers)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-gnawers)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-eggtop)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-eggtop)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money1)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money2)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money3)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-miner-money4)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-gnawers)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-eggtop)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *sage-villagec-tasks*, type task-control
(define *sage-villagec-tasks*
  (new 'static 'task-control
    :current-stage -1
    :stage (new 'static 'boxed-array :type task-cstage
      (new 'static 'task-cstage
        :game-task (game-task village3-button)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-button)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task village3-button)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-dark-crystals)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-dark-crystals)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-ram)
        :status (task-status need-hint)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task cave-dark-crystals) (task-status need-reminder))
              (and (closed? arg0 (game-task cave-dark-crystals) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-ram)
        :status (task-status need-introduction)
        :flags (task-flags has-entity closed-by-default)
        :condition (lambda ((arg0 task-control) (arg1 task-control))
          (or (closed? arg0 (game-task cave-dark-crystals) (task-status need-reminder))
              (and (closed? arg0 (game-task cave-dark-crystals) (task-status need-introduction))
                   (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell))))
                       (+ (get-reminder arg0 1) 3)
                       )
                   )
              )
          )
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-dark-crystals)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-ram)
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-ram)
        :status (task-status need-reminder-a)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-ram)
        :status (task-status need-reminder)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :status (task-status unknown)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task cave-dark-crystals)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      (new 'static 'task-cstage
        :game-task (game-task snow-ram)
        :status (task-status need-resolution)
        :flags (task-flags has-entity)
        :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
        )
      )
    )
  )

;; definition for symbol *citb-greensage-tasks*, type task-control
(define *citb-greensage-tasks* (new 'static 'task-control
                                 :current-stage -1
                                 :stage (new 'static 'boxed-array :type task-cstage
                                   (new 'static 'task-cstage
                                     :game-task (game-task citadel-sage-green)
                                     :status (task-status need-hint)
                                     :flags (task-flags has-entity closed-by-default)
                                     :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                     )
                                   (new 'static 'task-cstage
                                     :game-task (game-task citadel-sage-green)
                                     :status (task-status need-resolution)
                                     :flags (task-flags has-entity)
                                     :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                     )
                                   )
                                 )
        )

;; definition for symbol *citb-bluesage-tasks*, type task-control
(define *citb-bluesage-tasks* (new 'static 'task-control
                                :current-stage -1
                                :stage (new 'static 'boxed-array :type task-cstage
                                  (new 'static 'task-cstage
                                    :game-task (game-task citadel-sage-blue)
                                    :status (task-status need-hint)
                                    :flags (task-flags has-entity closed-by-default)
                                    :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                    )
                                  (new 'static 'task-cstage
                                    :game-task (game-task citadel-sage-blue)
                                    :status (task-status need-resolution)
                                    :flags (task-flags has-entity)
                                    :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                    )
                                  )
                                )
        )

;; definition for symbol *citb-redsage-tasks*, type task-control
(define *citb-redsage-tasks* (new 'static 'task-control
                               :current-stage -1
                               :stage (new 'static 'boxed-array :type task-cstage
                                 (new 'static 'task-cstage
                                   :game-task (game-task citadel-sage-red)
                                   :status (task-status need-hint)
                                   :flags (task-flags has-entity closed-by-default)
                                   :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                   )
                                 (new 'static 'task-cstage
                                   :game-task (game-task citadel-sage-red)
                                   :status (task-status need-resolution)
                                   :flags (task-flags has-entity)
                                   :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                   )
                                 )
                               )
        )

;; definition for symbol *citb-yellowsage-tasks*, type task-control
(define *citb-yellowsage-tasks* (new 'static 'task-control
                                  :current-stage -1
                                  :stage (new 'static 'boxed-array :type task-cstage
                                    (new 'static 'task-cstage
                                      :game-task (game-task citadel-sage-yellow)
                                      :status (task-status need-hint)
                                      :flags (task-flags has-entity closed-by-default)
                                      :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                      )
                                    (new 'static 'task-cstage
                                      :game-task (game-task citadel-sage-yellow)
                                      :status (task-status need-resolution)
                                      :flags (task-flags has-entity)
                                      :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
                                      )
                                    )
                                  )
        )

;; definition for symbol *task-controls*, type (array task-control)
(define *task-controls*
  (the-as (array task-control)
    (new 'static 'boxed-array :type basic
      '*null-task-control*
      '*null-task-control*
      '*assistant-tasks*
      '*mayor-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task jungle-tower)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-tower)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-tower)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-tower)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task jungle-fishgame)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-fishgame)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-fishgame)
            :status (task-status need-reminder-a)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-fishgame)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-fishgame)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-fishgame)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :status (task-status need-reminder)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task jungle-plant)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-plant)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-plant)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-plant)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task jungle-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task jungle-canyon-end)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-canyon-end)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-canyon-end)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-canyon-end)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task jungle-temple-door)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-temple-door)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-temple-door)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task jungle-temple-door)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village1-yakow)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-yakow)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-yakow)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-yakow)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-yakow)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*mayor-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village1-uncle-money)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-uncle-money)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-uncle-money)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (the-as
                symbol
                (and *target*
                     (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                     )
                )
              )
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-uncle-money)
            :status (task-status need-reminder)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-uncle-money)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*oracle-village1-tasks*
      '*oracle-village1-tasks*
      '*sage-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-pelican)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-pelican)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-pelican)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-pelican)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-flutflut)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-flutflut)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-flutflut)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-flutflut)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-flutflut)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-seagull)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-seagull)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-seagull)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-seagull)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-cannon)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-cannon)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-cannon)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-cannon)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-gimmie)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-gimmie)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-gimmie)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-gimmie)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task beach-sentinel)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-sentinel)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-sentinel)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task beach-sentinel)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task misty-muse)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-muse)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-muse)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-muse)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-muse)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task misty-boat)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-boat)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-boat)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-boat)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task misty-warehouse)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-warehouse)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-warehouse)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-warehouse)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*sage-tasks*
      '*assistant-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task misty-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task misty-bike-jump)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-bike-jump)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-bike-jump)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-bike-jump)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task misty-eco-challenge)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-eco-challenge)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-eco-challenge)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task misty-eco-challenge)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*gambler-tasks*
      '*geologist-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village2-warrior-money)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (and (not (task-closed? (game-task ogre-boss) (task-status need-reminder)))
                   (not (task-closed? (game-task village2-levitator) (task-status need-reward-speech)))
                   )
              )
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-warrior-money)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (and (not (task-closed? (game-task ogre-boss) (task-status need-reminder)))
                   (not (task-closed? (game-task village2-levitator) (task-status need-reward-speech)))
                   )
              )
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-warrior-money)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (the-as
                symbol
                (and *target*
                     (>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
                     )
                )
              )
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-warrior-money)
            :status (task-status need-reminder)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-warrior-money)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*oracle-village2-tasks*
      '*oracle-village2-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-billy)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-billy)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-billy)
            :status (task-status need-reminder-a)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-billy)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-billy)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-billy)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*assistant-village2-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-battle)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-battle)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-battle)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-battle)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-1)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-1)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-1)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-1)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-2)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-2)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-2)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-2)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-3)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-3)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-3)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-3)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-4)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-4)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-4)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-tether-4)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task swamp-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task swamp-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-platforms)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-platforms)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-platforms)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-platforms)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-pipe)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-pipe)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-pipe)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-pipe)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-slide)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-slide)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-slide)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-slide)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*assistant-village2-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-sharks)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-sharks)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-sharks)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-sharks)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-top-of-helix)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-top-of-helix)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-top-of-helix)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-top-of-helix)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task sunken-spinning-room)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-spinning-room)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-spinning-room)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task sunken-spinning-room)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*gambler-tasks*
      '*assistant-village2-tasks*
      '*geologist-tasks*
      '*sage-bluehut-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task rolling-lake)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-lake)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-lake)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-lake)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task rolling-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-1)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-1)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-1)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-1)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-2)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-2)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-2)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task rolling-ring-chase-2)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*miners-tasks*
      '*sage-villagec-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task snow-fort)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-fort)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-fort)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-fort)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task snow-ball)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-ball)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-ball)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-ball)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task snow-bunnies)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-bunnies)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-bunnies)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-bunnies)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task snow-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task snow-bumpers)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-bumpers)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-bumpers)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-bumpers)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task snow-cage)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-cage)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-cage)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task snow-cage)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-end)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-end)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-end)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-end)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*citb-greensage-tasks*
      '*citb-bluesage-tasks*
      '*citb-redsage-tasks*
      '*citb-yellowsage-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village3-extra1)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village3-extra1)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village3-extra1)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village3-extra1)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village1-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village1-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village2-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village2-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village3-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village3-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village3-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village3-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*miners-tasks*
      '*sage-villagec-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task cave-dark-climb)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-dark-climb)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-dark-climb)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-dark-climb)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task cave-robot-climb)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-robot-climb)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-robot-climb)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-robot-climb)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task cave-swing-poles)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-swing-poles)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-swing-poles)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-swing-poles)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task cave-spider-tunnel)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-spider-tunnel)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-spider-tunnel)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-spider-tunnel)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task cave-platforms)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-platforms)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-platforms)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-platforms)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task cave-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task cave-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task ogre-boss)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-boss)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-boss)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-boss)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task ogre-end)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-end)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-end)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-end)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task ogre-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task lavatube-end)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-end)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-end)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-end)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task lavatube-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task citadel-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task citadel-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task citadel-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task citadel-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task training-gimmie)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-gimmie)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-gimmie)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-gimmie)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task training-door)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-door)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-door)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-door)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task training-climb)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-climb)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-climb)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-climb)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task training-buzzer)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-buzzer)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-buzzer)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task training-buzzer)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*miners-tasks*
      '*miners-tasks*
      '*miners-tasks*
      '*miners-tasks*
      '*oracle-village3-tasks*
      '*oracle-village3-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-assistant)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 20)
              )
            )
          (new 'static 'task-cstage
            :game-task (game-task firecanyon-assistant)
            :status (task-status unknown)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*assistant-village2-tasks*
      '*sage-bluehut-tasks*
      '*sage-villagec-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task red-eggtop)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task red-eggtop)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task red-eggtop)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task red-eggtop)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task lavatube-balls)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-balls)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-balls)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-balls)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task lavatube-start)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (>= (the int (the float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 72)
              )
            )
          (new 'static 'task-cstage
            :game-task (game-task lavatube-start)
            :status (task-status unknown)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      '*sage-tasks*
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task ogre-secret)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-secret)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-secret)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task ogre-secret)
            :status (task-status need-resolution)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task village4-button)
            :status (task-status unknown)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village4-button)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task village4-button)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task finalboss-movies)
            :status (task-status unknown)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task finalboss-movies)
            :status (task-status need-introduction)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task finalboss-movies)
            :status (task-status need-reminder-a)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task finalboss-movies)
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task finalboss-movies)
            :status (task-status need-reward-speech)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task plunger-lurker-hit)
            :status (task-status unknown)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task plunger-lurker-hit)
            :status (task-status need-hint)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :game-task (game-task leaving-misty)
            :status (task-status need-introduction)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          (new 'static 'task-cstage
            :game-task (game-task leaving-misty)
            :status (task-status need-reminder)
            :flags (task-flags has-entity closed-by-default)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      (new 'static 'task-control
        :current-stage -1
        :stage (new 'static 'boxed-array :type task-cstage
          (new 'static 'task-cstage
            :status (task-status unknown)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable
              ((arg0 task-control))
              (task-closed? (game-task village4-button) (task-status need-reward-speech))
              )
            )
          (new 'static 'task-cstage
            :status (task-status need-reminder)
            :flags (task-flags has-entity)
            :condition (lambda :behavior process-taskable ((arg0 task-control)) #t)
            )
          )
        )
      )
    )
  )

;; definition for function task-control-reset
;; INFO: Return type mismatch int vs none.
(defun task-control-reset ((arg0 symbol))
  (let ((s5-0 *task-controls*))
    (countdown (s4-0 (-> s5-0 length))
      (reset! (-> s5-0 s4-0) arg0 #f)
      (first-any (-> s5-0 s4-0) #f)
      )
    )
  0
  (none)
  )

;; definition for function get-task-control
(defun get-task-control ((arg0 game-task))
  (cond
    ((or (>= (the-as uint 1) (the-as uint arg0)) (>= (the-as uint arg0) (the-as uint 116)))
     (format 0 "ERROR<GMJ>: get-task-control received invalid task ~D/~S~%" arg0 (game-task->string arg0))
     *null-task-control*
     )
    (else
      (-> *task-controls* arg0)
      )
    )
  )

;; definition for function get-task-status
;; INFO: Return type mismatch int vs task-status.
(defun get-task-status ((arg0 game-task))
  (let ((gp-0 (get-task-control arg0)))
    (when gp-0
      (dotimes (s5-0 (-> gp-0 stage length))
        (when (and (= arg0 (-> gp-0 stage s5-0 game-task)) (task-available? (-> gp-0 stage s5-0) gp-0))
          (first-any gp-0 #t)
          (return (the-as task-status (-> gp-0 stage s5-0 status)))
          )
        )
      )
    (first-any gp-0 #t)
    )
  (the-as task-status 0)
  )

;; definition for function close-specific-task!
;; INFO: Return type mismatch int vs game-task.
(defun close-specific-task! ((arg0 game-task) (arg1 task-status))
  (let ((gp-0 (get-task-control arg0)))
    (when gp-0
      (dotimes (v1-1 (-> gp-0 stage length))
        (when (and (= arg0 (-> gp-0 stage v1-1 game-task)) (= arg1 (-> gp-0 stage v1-1 status)))
          (close-task! (-> gp-0 stage v1-1))
          (return (the-as game-task (first-any gp-0 #t)))
          )
        )
      (format
        0
        "ERROR<GMJ>: close-specific! received non-existent task-cstage(~S ~S)--returning #t.~%"
        (game-task->string arg0)
        (task-status->string arg1)
        )
      )
    )
  (the-as game-task 0)
  )

;; definition for function open-specific-task!
;; INFO: Return type mismatch int vs game-task.
(defun open-specific-task! ((arg0 game-task) (arg1 task-status))
  (let ((gp-0 (get-task-control arg0)))
    (when gp-0
      (dotimes (v1-1 (-> gp-0 stage length))
        (when (and (= arg0 (-> gp-0 stage v1-1 game-task)) (= arg1 (-> gp-0 stage v1-1 status)))
          (open-task! (-> gp-0 stage v1-1))
          (return (the-as game-task (first-any gp-0 #t)))
          )
        )
      (format
        0
        "ERROR<GMJ>: open-specific! received non-existent task-cstage(~S ~S)--returning #t.~%"
        (game-task->string arg0)
        (task-status->string arg1)
        )
      )
    )
  (the-as game-task 0)
  )

;; definition for function task-closed?
(defun task-closed? ((arg0 game-task) (arg1 task-status))
  (closed? (get-task-control arg0) arg0 arg1)
  )

;; definition for function task-exists?
(defun task-exists? ((arg0 game-task) (arg1 task-status))
  (exists? (get-task-control arg0) arg0 arg1)
  )

;; definition for function task-known?
(defun task-known? ((arg0 game-task))
  (case (get-task-status arg0)
    (((task-status need-reward-speech)
      (task-status need-introduction)
      (task-status need-reminder)
      (task-status need-reminder-a)
      (task-status need-resolution)
      (task-status invalid)
      )
     #t
     )
    (else
      #f
      )
    )
  )

;; definition for function sages-kidnapped?
(defun sages-kidnapped? ()
  (task-closed? (game-task village4-button) (task-status need-reward-speech))
  )

;; failed to figure out what this is:
(let ((gp-0 *task-controls*))
  (countdown (s5-0 (-> gp-0 length))
    (when (and (-> gp-0 s5-0) (= (-> gp-0 s5-0 type) symbol))
      (let ((s4-0 (-> (the-as symbol (-> gp-0 s5-0)) value)))
        (cond
          ((and (nonzero? s4-0) (type-type? (rtype-of s4-0) task-control))
           (set! (-> gp-0 s5-0) (the-as task-control s4-0))
           )
          (else
            (format 0 "ERROR<GMJ>: value of symbol ~A in task-controls is not a task-control~%")
            (set! (-> gp-0 s5-0) (the-as task-control '*null-task-control*))
            )
          )
        )
      )
    )
  )

;; failed to figure out what this is:
(task-control-reset 'game)
