mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
d1ece445d4
Relates to #1353 This adds no new functionality or overhead to the compiler, yet. This is the preliminary work that has: - added code to the compiler in several spots to flag when something is used without being properly required/imported/whatever (disabled by default) - that was used to generate project wide file dependencies (some circulars were manually fixed) - then that graph underwent a transitive reduction and the result was written to all `jak1` source files. The next step will be making this actually produce and use a dependency graph. Some of the reasons why I'm working on this: - eliminates more `game.gp` boilerplate. This includes the `.gd` files to some extent (`*-ag` files and `tpage` files will still need to be handled) this is the point of the new `bundles` form. This should make it even easier to add a new file into the source tree. - a build order that is actually informed from something real and compiler warnings that tell you when you are using something that won't be available at build time. - narrows the search space for doing LSP actions -- like searching for references. Since it would be way too much work to store in the compiler every location where every symbol/function/etc is used, I have to do ad-hoc searches. By having a dependency graph i can significantly reduce that search space. - opens the doors for common shared code with a legitimate pattern. Right now jak 2 shares code from the jak 1 folder. This is basically a hack -- but by having an explicit require syntax, it would be possible to reference arbitrary file paths, such as a `common` folder. Some stats: - Jak 1 has about 2500 edges between files, including transitives - With transitives reduced at the source code level, each file seems to have a modest amount of explicit requirements. Known issues: - Tracking the location for where `defmacro`s and virtual state definitions were defined (and therefore the file) is still problematic. Because those forms are in a macro environment, the reader does not track them. I'm wondering if a workaround could be to search the reader's text_db by not just the `goos::Object` but by the text position. But for the purposes of finishing this work, I just statically analyzed and searched the code with throwaway python code.
2888 lines
101 KiB
Common Lisp
2888 lines
101 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
(bundles "FIN.DGO")
|
|
|
|
(require "levels/finalboss/light-eco.gc")
|
|
(require "levels/finalboss/robotboss-misc.gc")
|
|
(require "levels/finalboss/robotboss-weapon.gc")
|
|
(require "levels/finalboss/green-eco-lurker.gc")
|
|
|
|
;; name: robotboss.gc
|
|
;; name in dgo: robotboss
|
|
;; dgos: FIN, L1
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(defmethod ease-loc-t ((this robotboss))
|
|
(parameter-ease-sin-clamp (-> this loc-t))
|
|
)
|
|
|
|
(defskelgroup *robotboss-blueeco-sg* robotboss-blueeco robotboss-blueeco-lod0-jg robotboss-blueeco-idle-ja
|
|
((robotboss-blueeco-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 200)
|
|
)
|
|
|
|
(defskelgroup *robotboss-redeco-sg* robotboss-redeco robotboss-redeco-lod0-jg robotboss-redeco-idle-ja
|
|
((robotboss-redeco-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 200)
|
|
)
|
|
|
|
(defskelgroup *robotboss-yelloweco-sg* robotboss-yelloweco robotboss-yelloweco-lod0-jg robotboss-yelloweco-idle-ja
|
|
((robotboss-yelloweco-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 200)
|
|
)
|
|
|
|
(defbehavior robotboss-cut-cam-exit robotboss ()
|
|
(set! (-> self valid-frames) 0)
|
|
(if (and *target* (logtest? (-> *target* state-flags) (state-flags grabbed)))
|
|
(process-release? *target*)
|
|
)
|
|
(logclear! (-> self skel status) (janim-status inited))
|
|
(set! (-> self skip-cut) #f)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-cut-cam robotboss ((arg0 float) (arg1 float) (arg2 int))
|
|
(let ((f0-0 (ja-aframe-num 0)))
|
|
(cond
|
|
((or (not (ja-group? arg2)) (< f0-0 arg0) (< arg1 f0-0))
|
|
(robotboss-cut-cam-exit)
|
|
)
|
|
((or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
|
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
|
)
|
|
(-> self skip-cut)
|
|
)
|
|
(set! (-> self skip-cut) #t)
|
|
)
|
|
(else
|
|
(logior! (-> self skel status) (janim-status inited))
|
|
(process-grab? *target*)
|
|
(set! (-> *camera-other-root* quad) (-> self root trans quad))
|
|
(let ((s5-1 (-> self node-list data 88 bone transform))
|
|
(gp-1 (-> self node-list data 88 bone scale))
|
|
)
|
|
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! s4-1 (joint-node robotboss-basic-lod0-jg camera))
|
|
(set! (-> *camera-other-trans* quad) (-> s4-1 quad))
|
|
)
|
|
(vector-normalize-copy!
|
|
(the-as vector (-> *camera-other-matrix* vector))
|
|
(the-as vector (-> s5-1 vector))
|
|
(the-as float -1.0)
|
|
)
|
|
(set! (-> *camera-other-matrix* vector 0 w) 0.0)
|
|
(vector-normalize-copy! (-> *camera-other-matrix* vector 1) (-> s5-1 vector 1) (the-as float 1.0))
|
|
(set! (-> *camera-other-matrix* vector 1 w) 0.0)
|
|
(vector-normalize-copy! (-> *camera-other-matrix* vector 2) (-> s5-1 vector 2) (the-as float -1.0))
|
|
(set! (-> *camera-other-matrix* vector 2 w) 0.0)
|
|
(vector-reset! (-> *camera-other-matrix* vector 3))
|
|
(othercam-calc (-> gp-1 x))
|
|
)
|
|
(hide-hud-quick)
|
|
(set! *camera-look-through-other* 2)
|
|
(when (< (-> self valid-frames) 2)
|
|
(set-blackout-frames (seconds 0.035))
|
|
(+! (-> self valid-frames) 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-always-trans robotboss ((arg0 (state robotboss)))
|
|
(when (-> self blue-smoke)
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! s5-0 (joint-node robotboss-basic-lod0-jg blue_eco_piece))
|
|
(spawn (-> self particle 2) s5-0)
|
|
)
|
|
)
|
|
(when (-> self red-smoke)
|
|
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! s5-1 (joint-node robotboss-basic-lod0-jg rArmTopWireC))
|
|
(spawn (-> self particle 3) s5-1)
|
|
(vector<-cspace! s5-1 (joint-node robotboss-basic-lod0-jg rArmBotWireC))
|
|
(spawn (-> self particle 3) s5-1)
|
|
)
|
|
)
|
|
(when (-> self yellow-smoke)
|
|
(let ((s5-2 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! s5-2 (joint-node robotboss-basic-lod0-jg Lyellow_ecoTubeA))
|
|
(spawn (-> self particle 4) s5-2)
|
|
)
|
|
)
|
|
(let* ((f0-1 (- 0.0 (-> self palette-val)))
|
|
(f0-2 (if (< 0.0 f0-1)
|
|
(fmin 0.1 f0-1)
|
|
(fmax -0.1 f0-1)
|
|
)
|
|
)
|
|
)
|
|
(+! (-> self palette-val) f0-2)
|
|
)
|
|
(set! (-> *palette-fade-controls* control 2 fade) (-> self palette-val))
|
|
(b! (not (-> self ignore-camera)) cfg-11 :delay (empty-form))
|
|
(b! #t cfg-66 :delay (nop!))
|
|
(label cfg-11)
|
|
(b! *target* cfg-13 :delay (empty-form))
|
|
(b! #t cfg-66 :delay (nop!))
|
|
(label cfg-13)
|
|
(let ((a1-8 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-8 from) self)
|
|
(set! (-> a1-8 num-params) 1)
|
|
(set! (-> a1-8 message) 'query-state)
|
|
(set! (-> a1-8 param 0) (the-as uint cam-eye))
|
|
(b! (not (send-event-function *camera* a1-8)) cfg-15 :delay (empty-form))
|
|
)
|
|
(b! #t cfg-66 :delay (nop!))
|
|
(label cfg-15)
|
|
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-9 from) self)
|
|
(set! (-> a1-9 num-params) 1)
|
|
(set! (-> a1-9 message) 'query-state)
|
|
(set! (-> a1-9 param 0) (the-as uint cam-launcher-longfall))
|
|
(b! (not (send-event-function *camera* a1-9)) cfg-19 :delay (empty-form))
|
|
)
|
|
(when (-> *camera* cam-entity)
|
|
(let ((s5-4 *camera-base-mode*))
|
|
(set! *camera-base-mode* cam-launcher-longfall)
|
|
(send-event *camera* 'clear-entity)
|
|
(set! *camera-base-mode* s5-4)
|
|
)
|
|
)
|
|
(b! #t cfg-66 :delay (nop!))
|
|
(label cfg-19)
|
|
(b!
|
|
(not (and (-> self des-cam-entity)
|
|
(or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 188416.0)
|
|
(and *target* (>= 290816.0 (vector-vector-xz-distance (-> self root trans) (-> *target* control trans))))
|
|
)
|
|
)
|
|
)
|
|
cfg-37
|
|
:delay (empty-form)
|
|
)
|
|
(if (or (not (-> *camera* cam-entity))
|
|
(not (string=
|
|
(-> self des-cam-entity)
|
|
(res-lump-struct (-> *camera* cam-entity) 'name string :time (the-as float -1000000000.0))
|
|
)
|
|
)
|
|
)
|
|
(send-event *camera* 'change-to-entity-by-name (-> self des-cam-entity))
|
|
)
|
|
(b! #t cfg-66 :delay (nop!))
|
|
(label cfg-37)
|
|
(b!
|
|
(not (or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 73728.0)
|
|
(and *target* (>= 290816.0 (vector-vector-xz-distance (-> self root trans) (-> *target* control trans))))
|
|
)
|
|
)
|
|
cfg-49
|
|
:delay (empty-form)
|
|
)
|
|
(when (not (send-event *camera* 'query-state cam-robotboss))
|
|
(send-event *camera* 'change-state cam-robotboss (seconds 1))
|
|
(send-event *camera* 'clear-entity)
|
|
)
|
|
(b! #t cfg-66 :delay (nop!))
|
|
(label cfg-49)
|
|
(when (and (< 196608.0 (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)))
|
|
(< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 614400.0)
|
|
(not (and *target* (>= 299008.0 (vector-vector-xz-distance (-> self root trans) (-> *target* control trans))))
|
|
)
|
|
)
|
|
(when (not (send-event *camera* 'query-state cam-string))
|
|
(send-event *camera* 'point-of-interest #f)
|
|
(send-event *camera* 'force-blend (seconds 1))
|
|
(send-event *camera* 'clear-entity)
|
|
(send-event *camera* 'change-state cam-string (seconds 1))
|
|
)
|
|
)
|
|
(label cfg-66)
|
|
(cond
|
|
((send-event *camera* 'query-state cam-string)
|
|
)
|
|
((-> self use-interesting)
|
|
(let ((s5-10 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! s5-10 (joint-node robotboss-basic-lod0-jg interesting))
|
|
(send-event *camera* 'point-of-interest s5-10)
|
|
)
|
|
)
|
|
)
|
|
(when (and arg0 *debug-segment* (cpad-pressed? 0 l3)) ;; og:preserve-this changed from (cpad-pressed? 1 x)
|
|
(cpad-clear! 0 l3)
|
|
(go arg0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-shooting-trans robotboss ((arg0 int))
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (-> self node-list data arg0))
|
|
(send-event (handle->process (-> self shot-attractor)) 'trans gp-0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-setup-for-hits robotboss ((arg0 int) (arg1 int))
|
|
(set! (-> self took-hit) #f)
|
|
(set! (-> self hits-to-go) arg1)
|
|
(set! (-> self vulnerable) arg0)
|
|
(let ((gp-0 (new 'stack 'sphere)))
|
|
(set! (-> gp-0 w) 4096.0)
|
|
(set! (-> self shot-attractor)
|
|
(ppointer->handle (manipy-spawn (-> self root trans) (-> self entity) *redring-sg* gp-0 :to self))
|
|
)
|
|
)
|
|
(send-event (handle->process (-> self shot-attractor)) 'attackable #t)
|
|
(send-event (handle->process (-> self shot-attractor)) 'draw #f)
|
|
)
|
|
|
|
(defbehavior robotboss-yellow-eco-off robotboss ()
|
|
;; patches the one frame of ghost yellow eco bug that can
|
|
;; occcur under certain conditions when robot-boss-yellow-eco-off is called.
|
|
(#when PC_PORT
|
|
(logclear! (-> self alts 7 extra perm status) (entity-perm-status bit-3))
|
|
(logclear! (-> self alts 8 extra perm status) (entity-perm-status bit-3))
|
|
(logclear! (-> self alts 9 extra perm status) (entity-perm-status bit-3))
|
|
(logclear! (-> self alts 10 extra perm status) (entity-perm-status bit-3))
|
|
)
|
|
|
|
(logior! (-> self alts 7 extra perm status) (entity-perm-status bit-9))
|
|
(logior! (-> self alts 8 extra perm status) (entity-perm-status bit-9))
|
|
(logior! (-> self alts 9 extra perm status) (entity-perm-status bit-9))
|
|
(logior! (-> self alts 10 extra perm status) (entity-perm-status bit-9))
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-yellow-eco-on robotboss ()
|
|
(logclear! (-> self alts 7 extra perm status) (entity-perm-status bit-9))
|
|
(logclear! (-> self alts 8 extra perm status) (entity-perm-status bit-9))
|
|
(logclear! (-> self alts 9 extra perm status) (entity-perm-status bit-9))
|
|
(logclear! (-> self alts 10 extra perm status) (entity-perm-status bit-9))
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-anim-blend-loop robotboss ((arg0 art-joint-anim))
|
|
(let ((s5-0 (ja-group)))
|
|
(ja-channel-push! 2 0)
|
|
(ja :group! arg0 :num! min)
|
|
(ja :chan 1 :group! s5-0 :num! min)
|
|
)
|
|
(loop
|
|
(ja :num! (loop!))
|
|
(ja :chan 1 :num! (chan 0) :frame-interp (- 1.0 (ease-loc-t self)))
|
|
(suspend)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-position robotboss ()
|
|
(let ((s5-0 (-> self entity extra trans))
|
|
(gp-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
|
(set! (-> self loc-t) (/ (the float (- (-> *display* game-frame-counter) (-> self loc-t-start)))
|
|
(the float (-> self loc-t-duration))
|
|
)
|
|
)
|
|
(set! (-> self loc-t) (fmin 1.0 (-> self loc-t)))
|
|
(vector-lerp! gp-0 (-> self old-loc) (-> self desired-loc) (ease-loc-t self))
|
|
(matrix-rotate-y! s4-0 (-> gp-0 x))
|
|
(set! (-> gp-0 x) 0.0)
|
|
(vector-matrix*! gp-0 gp-0 s4-0)
|
|
(vector+! (-> self root trans) gp-0 (-> self entity extra trans))
|
|
(vector-negate! (the-as vector (-> s4-0 vector)) (the-as vector (-> s4-0 vector)))
|
|
(vector-negate! (-> s4-0 vector 2) (-> s4-0 vector 2))
|
|
(matrix->quaternion (-> self root quat) s4-0)
|
|
)
|
|
(vector-! gp-0 s5-0 (-> self root trans))
|
|
(set! (-> gp-0 y) 0.0)
|
|
(vector-normalize! gp-0 (the-as float 204800.0))
|
|
(set! (-> gp-0 y) 32768.0)
|
|
(vector+! gp-0 gp-0 s5-0)
|
|
(send-event *camera* 'set-pivot gp-0)
|
|
)
|
|
(when (-> self alts 6)
|
|
(let ((a0-16 (-> self alts 6 extra process))
|
|
(f0-10 (+ (-> self entity extra trans y) (-> self desired-pool-y)))
|
|
)
|
|
(when a0-16
|
|
(let ((v1-23 (new 'stack-no-clear 'vector)))
|
|
(set! (-> v1-23 quad) (-> (the-as process-drawable a0-16) root trans quad))
|
|
(cond
|
|
((< (-> v1-23 y) (+ -204.8 f0-10))
|
|
(+! (-> v1-23 y) 20.48)
|
|
)
|
|
((< (+ 204.8 f0-10) (-> v1-23 y))
|
|
(+! (-> v1-23 y) -20.48)
|
|
)
|
|
)
|
|
(send-event a0-16 'move-to v1-23)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior robotboss-darkecobomb robotboss ((arg0 vector) (arg1 float))
|
|
(+! (-> self children-spawned) 1)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg darkbombD))
|
|
(set! (-> s4-0 quad) (-> self entity extra trans quad))
|
|
(vector+! s4-0 s4-0 arg0)
|
|
(process-spawn darkecobomb gp-0 s4-0 61440.0 300 arg1 :to self)
|
|
)
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 638)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-0
|
|
:to *entity-pool*
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior robotboss-bomb-handler robotboss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
(local-vars (v0-0 object))
|
|
(case arg2
|
|
(('flash)
|
|
(set! (-> self palette-val) (* 0.0078125 (the-as float (-> arg3 param 0))))
|
|
)
|
|
(('bomb-done)
|
|
(set! (-> self des-cam-entity) #f)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 0)
|
|
(set! (-> a1-1 message) 'hide)
|
|
(let ((t9-0 send-event-function)
|
|
(v1-4 (-> self alts 11))
|
|
)
|
|
(t9-0
|
|
(if v1-4
|
|
(-> v1-4 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(set! v0-0 (+ (-> self children-spawned) -2))
|
|
(set! (-> self children-spawned) (the-as int v0-0))
|
|
v0-0
|
|
)
|
|
(('bomb-going)
|
|
(set! (-> self des-cam-entity) #f)
|
|
(set! v0-0 #t)
|
|
(set! (-> self ignore-camera) (the-as symbol v0-0))
|
|
v0-0
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior robotboss-handler robotboss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
(case arg2
|
|
(('flash)
|
|
(set! (-> self palette-val) (* 0.0078125 (the-as float (-> arg3 param 0))))
|
|
)
|
|
(('attack)
|
|
(when (>= arg1 2)
|
|
(case (-> arg3 param 1)
|
|
(('eco-yellow)
|
|
(let ((a0-5 (-> arg3 param 0)))
|
|
(when (and a0-5 ((method-of-type touching-shapes-entry prims-touching?)
|
|
(the-as touching-shapes-entry a0-5)
|
|
(-> self root)
|
|
(the-as uint (-> self vulnerable))
|
|
)
|
|
)
|
|
(when (> (-> self hits-to-go) 0)
|
|
(set! (-> self took-hit) #t)
|
|
(let ((v0-0 (the-as number (+ (-> self hits-to-go) -1))))
|
|
(set! (-> self hits-to-go) (the-as int v0-0))
|
|
v0-0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defstate robotboss-yellow-dark-bomb-wait (robotboss)
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
(case message
|
|
(('white-eco-picked-up)
|
|
(close-specific-task! (game-task finalboss-movies) (task-status unknown))
|
|
(entity-birth-no-kill (-> self alts 5))
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 0)
|
|
(set! (-> a1-2 message) 'play-anim)
|
|
(let ((t9-2 send-event-function)
|
|
(v1-2 (-> self alts 5))
|
|
)
|
|
(t9-2
|
|
(if v1-2
|
|
(-> v1-2 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(cleanup-for-death self)
|
|
(deactivate self)
|
|
)
|
|
(else
|
|
(robotboss-bomb-handler proc argc message block)
|
|
)
|
|
)
|
|
)
|
|
:enter (behavior ()
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(set! (-> self children-spawned) 0)
|
|
0
|
|
)
|
|
:exit (behavior ()
|
|
(set! (-> self des-cam-entity) #f)
|
|
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-0 from) self)
|
|
(set! (-> a1-0 num-params) 0)
|
|
(set! (-> a1-0 message) 'beam-off)
|
|
(let ((t9-0 send-event-function)
|
|
(v1-1 (-> self alts 3))
|
|
)
|
|
(t9-0
|
|
(if v1-1
|
|
(-> v1-1 extra process)
|
|
)
|
|
a1-0
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 0)
|
|
(set! (-> a1-1 message) 'beam-off)
|
|
(let ((t9-1 send-event-function)
|
|
(v1-5 (-> self alts 2))
|
|
)
|
|
(t9-1
|
|
(if v1-5
|
|
(-> v1-5 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 0)
|
|
(set! (-> a1-2 message) 'beam-off)
|
|
(let ((t9-2 send-event-function)
|
|
(v1-9 (-> self alts 1))
|
|
)
|
|
(t9-2
|
|
(if v1-9
|
|
(-> v1-9 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-3 from) self)
|
|
(set! (-> a1-3 num-params) 0)
|
|
(set! (-> a1-3 message) 'beam-off)
|
|
(let ((t9-3 send-event-function)
|
|
(v1-13 (-> self alts 4))
|
|
)
|
|
(t9-3
|
|
(if v1-13
|
|
(-> v1-13 extra process)
|
|
)
|
|
a1-3
|
|
)
|
|
)
|
|
)
|
|
(send-event (handle->process (-> self white-eco)) 'beam-off)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans (the-as (state robotboss) #f))
|
|
(spool-push *art-control* "green-sagecage-outro-beat-boss-a" 0 self (the-as float -1.0))
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-no-yellow-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
|
|
(robotboss-darkecobomb (new 'static 'vector :y 40960.0 :z 81920.0) (-> self dda yellow-bomb-time))
|
|
(play-ambient (-> self ambient) "GOL-AM20" #t (the-as vector #f))
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-no-yellow-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(if (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 2))
|
|
(robotboss-darkecobomb (new 'static 'vector :y 40960.0 :z -81920.0) (+ -150.0 (-> self dda yellow-bomb-time)))
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-no-yellow-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(if (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 3))
|
|
(robotboss-darkecobomb (new 'static 'vector :x 81920.0 :y 40960.0) (+ -300.0 (-> self dda yellow-bomb-time)))
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-no-yellow-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 4))
|
|
(robotboss-darkecobomb (new 'static 'vector :x -81920.0 :y 40960.0) (+ -450.0 (-> self dda yellow-bomb-time)))
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
(set! (-> self des-cam-entity) "camera-365")
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(when (not (ja-group? robotboss-idle-hover-no-yellow-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-yellow-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-daxter-sacrifice-movie (robotboss)
|
|
:code (behavior ()
|
|
(set-blackout-frames (seconds 100))
|
|
(entity-birth-no-kill (-> self alts 5))
|
|
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-0 from) self)
|
|
(set! (-> a1-0 num-params) 0)
|
|
(set! (-> a1-0 message) 'play-anim)
|
|
(let ((t9-2 send-event-function)
|
|
(v1-1 (-> self alts 5))
|
|
)
|
|
(t9-2
|
|
(if v1-1
|
|
(-> v1-1 extra process)
|
|
)
|
|
a1-0
|
|
)
|
|
)
|
|
)
|
|
(suspend)
|
|
(while (movie?)
|
|
(suspend)
|
|
)
|
|
(set-blackout-frames 0)
|
|
(go robotboss-yellow-dark-bomb-wait)
|
|
)
|
|
)
|
|
|
|
(defstate robotboss-white-eco-movie (robotboss)
|
|
:enter (behavior ()
|
|
(logior! (-> self draw status) (draw-status hidden))
|
|
(set! (-> self children-spawned) 0)
|
|
(set-time! (-> self state-time))
|
|
(ja-post)
|
|
)
|
|
:exit (behavior ()
|
|
(logclear! (-> self draw status) (draw-status hidden))
|
|
)
|
|
:trans (behavior ()
|
|
(spool-push *art-control* "green-sagecage-daxter-sacrifice" 0 self (the-as float -1.0))
|
|
(when (and (< (-> self children-spawned) 1) (time-elapsed? (-> self state-time) (seconds 0.95)))
|
|
(+! (-> self children-spawned) 1)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(set! (-> gp-0 quad) (-> self entity extra trans quad))
|
|
(+! (-> gp-0 y) 81920.0)
|
|
(set! (-> self white-eco) (ppointer->handle (process-spawn light-eco-mother (-> self entity) gp-0 :to self)))
|
|
)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-0 from) self)
|
|
(set! (-> a1-0 num-params) 1)
|
|
(set! (-> a1-0 message) 'open)
|
|
(set! (-> a1-0 param 0) (the-as uint (-> *part-group-id-table* 674)))
|
|
(let ((t9-0 send-event-function)
|
|
(v1-4 (-> self alts 3))
|
|
)
|
|
(t9-0
|
|
(if v1-4
|
|
(-> v1-4 extra process)
|
|
)
|
|
a1-0
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 1)
|
|
(set! (-> a1-1 message) 'open)
|
|
(set! (-> a1-1 param 0) (the-as uint (-> *part-group-id-table* 675)))
|
|
(let ((t9-1 send-event-function)
|
|
(v1-11 (-> self alts 2))
|
|
)
|
|
(t9-1
|
|
(if v1-11
|
|
(-> v1-11 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 1)
|
|
(set! (-> a1-2 message) 'open)
|
|
(set! (-> a1-2 param 0) (the-as uint (-> *part-group-id-table* 676)))
|
|
(let ((t9-2 send-event-function)
|
|
(v1-18 (-> self alts 1))
|
|
)
|
|
(t9-2
|
|
(if v1-18
|
|
(-> v1-18 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-3 from) self)
|
|
(set! (-> a1-3 num-params) 1)
|
|
(set! (-> a1-3 message) 'open)
|
|
(set! (-> a1-3 param 0) (the-as uint (-> *part-group-id-table* 677)))
|
|
(let ((t9-3 send-event-function)
|
|
(v1-25 (-> self alts 4))
|
|
)
|
|
(t9-3
|
|
(if v1-25
|
|
(-> v1-25 extra process)
|
|
)
|
|
a1-3
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-4 from) self)
|
|
(set! (-> a1-4 num-params) 3)
|
|
(set! (-> a1-4 message) 'beam-on)
|
|
(set! (-> a1-4 param 0) (the-as uint (-> *part-group-id-table* 666)))
|
|
(set! (-> a1-4 param 1) (the-as uint (-> *part-group-id-table* 666)))
|
|
(set! (-> a1-4 param 2) (the-as uint (-> self entity extra trans)))
|
|
(let ((t9-4 send-event-function)
|
|
(v1-37 (-> self alts 3))
|
|
)
|
|
(t9-4
|
|
(if v1-37
|
|
(-> v1-37 extra process)
|
|
)
|
|
a1-4
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-5 from) self)
|
|
(set! (-> a1-5 num-params) 3)
|
|
(set! (-> a1-5 message) 'beam-on)
|
|
(set! (-> a1-5 param 0) (the-as uint (-> *part-group-id-table* 672)))
|
|
(set! (-> a1-5 param 1) (the-as uint (-> *part-group-id-table* 672)))
|
|
(set! (-> a1-5 param 2) (the-as uint (-> self entity extra trans)))
|
|
(let ((t9-5 send-event-function)
|
|
(v1-49 (-> self alts 2))
|
|
)
|
|
(t9-5
|
|
(if v1-49
|
|
(-> v1-49 extra process)
|
|
)
|
|
a1-5
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-6 from) self)
|
|
(set! (-> a1-6 num-params) 3)
|
|
(set! (-> a1-6 message) 'beam-on)
|
|
(set! (-> a1-6 param 0) (the-as uint (-> *part-group-id-table* 668)))
|
|
(set! (-> a1-6 param 1) (the-as uint (-> *part-group-id-table* 668)))
|
|
(set! (-> a1-6 param 2) (the-as uint (-> self entity extra trans)))
|
|
(let ((t9-6 send-event-function)
|
|
(v1-61 (-> self alts 1))
|
|
)
|
|
(t9-6
|
|
(if v1-61
|
|
(-> v1-61 extra process)
|
|
)
|
|
a1-6
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-7 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-7 from) self)
|
|
(set! (-> a1-7 num-params) 3)
|
|
(set! (-> a1-7 message) 'beam-on)
|
|
(set! (-> a1-7 param 0) (the-as uint (-> *part-group-id-table* 670)))
|
|
(set! (-> a1-7 param 1) (the-as uint (-> *part-group-id-table* 670)))
|
|
(set! (-> a1-7 param 2) (the-as uint (-> self entity extra trans)))
|
|
(let ((t9-7 send-event-function)
|
|
(v1-73 (-> self alts 4))
|
|
)
|
|
(t9-7
|
|
(if v1-73
|
|
(-> v1-73 extra process)
|
|
)
|
|
a1-7
|
|
)
|
|
)
|
|
)
|
|
(let ((gp-1 (ppointer->handle (process-spawn finalbosscam (-> self entity) :to self))))
|
|
(send-event (handle->process gp-1) 'play-anim)
|
|
(suspend)
|
|
(while (movie?)
|
|
(suspend)
|
|
)
|
|
;; og:preserve-this
|
|
(#when PC_PORT
|
|
(-! (-> self state-time) (seconds 0.95))
|
|
((-> self state trans))
|
|
)
|
|
(let ((a0-18 (handle->process gp-1)))
|
|
(if a0-18
|
|
(deactivate a0-18)
|
|
)
|
|
)
|
|
)
|
|
(case (get-task-status (game-task finalboss-movies))
|
|
(((task-status unknown))
|
|
(go robotboss-daxter-sacrifice-movie)
|
|
)
|
|
(else
|
|
(go robotboss-yellow-dark-bomb-wait)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defstate robotboss-yellow-dark-bomb (robotboss)
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 16384.0 -81920.0 716800.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 4))
|
|
(set! (-> self desired-pool-y) -16384.0)
|
|
(play-ambient (-> self ambient) "GOL-AM01" #t (the-as vector #f))
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans (the-as (state robotboss) #f))
|
|
(spool-push *art-control* "finalbosscam-white-eco" 0 self (the-as float -1.0))
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-white-eco-movie)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-reveal-no-yellow-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (not (ja-group? robotboss-idle-hover-no-yellow-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-yellow-ja)
|
|
)
|
|
(loop
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defbehavior robotboss-yellowshot robotboss ()
|
|
(+! (-> self children-spawned) 1)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg Lyellow_ecoBarrell))
|
|
(set! (-> gp-0 y) 1972633.6)
|
|
(if *target*
|
|
(set! (-> s5-0 quad) (-> (target-pos 0) quad))
|
|
(set! (-> s5-0 quad) (-> self entity extra trans quad))
|
|
)
|
|
(set! (-> s5-0 y) (+ 8192.0 (-> self entity extra trans y)))
|
|
(vector-! s5-0 s5-0 gp-0)
|
|
(vector-normalize! s5-0 (the-as float 819200.0))
|
|
(vector+! s5-0 s5-0 gp-0)
|
|
(process-spawn yellowshot gp-0 s5-0 0.0 750 :to self)
|
|
)
|
|
(send-event self 'flash 255.0)
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 642)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-0
|
|
:to *entity-pool*
|
|
)
|
|
)
|
|
(sound-play "bfg-fire")
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-is-yellow-hit robotboss ()
|
|
(or (ja-group? robotboss-yellow-hit-ja) (ja-group? robotboss-yellow-last-hit-ja))
|
|
)
|
|
|
|
(defbehavior robotboss-time-to-shoot-yellow robotboss ()
|
|
(>= (- (-> *display* game-frame-counter) (-> self state-time)) (+ (-> self till-next-shot) 750))
|
|
)
|
|
|
|
(defstate robotboss-yellow-wait (robotboss)
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
(case message
|
|
(('hit-jak)
|
|
(let ((f0-2 (rand-float-gen)))
|
|
(cond
|
|
((< 0.75 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
|
|
)
|
|
((< 0.5 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM12" #t (the-as vector #f))
|
|
)
|
|
((< 0.25 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM15" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('missed-jak)
|
|
(let ((f0-5 (rand-float-gen)))
|
|
(if (< 0.5 f0-5)
|
|
(play-ambient (-> self ambient) "GOL-AM14" #t (the-as vector #f))
|
|
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(robotboss-handler proc argc message block)
|
|
)
|
|
)
|
|
)
|
|
:enter (behavior ()
|
|
(set! (-> self hits-to-go) -1)
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(set! (-> self till-next-shot) 300)
|
|
(set! (-> self use-interesting) #t)
|
|
(set! (-> self keep-charging) #f)
|
|
)
|
|
:exit (behavior ()
|
|
(let ((a0-1 (handle->process (-> self shot-attractor))))
|
|
(if a0-1
|
|
(deactivate a0-1)
|
|
)
|
|
)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 1)
|
|
(set! (-> a1-1 message) 'open)
|
|
(set! (-> a1-1 param 0) (the-as uint (-> *part-group-id-table* 677)))
|
|
(let ((t9-1 send-event-function)
|
|
(v1-10 (-> self alts 4))
|
|
)
|
|
(t9-1
|
|
(if v1-10
|
|
(-> v1-10 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 1)
|
|
(set! (-> a1-2 message) 'open)
|
|
(set! (-> a1-2 param 0) (the-as uint 0.4))
|
|
(let ((t9-2 send-event-function)
|
|
(v1-17 (-> self alts 0))
|
|
)
|
|
(t9-2
|
|
(if v1-17
|
|
(-> v1-17 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 3 collide-with) (collide-kind))
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 3 prim-core collide-as)
|
|
(collide-kind)
|
|
)
|
|
(set! (-> self use-interesting) #f)
|
|
(send-event *camera* 'point-of-interest #f)
|
|
(if (nonzero? (-> self yellow-gun))
|
|
(set-mode! (-> self yellow-gun) (joint-mod-handler-mode flex-blend))
|
|
)
|
|
(robotboss-yellow-eco-off)
|
|
(robotboss-cut-cam-exit)
|
|
(stop! (-> self looping-sound 3))
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-yellow-dark-bomb)
|
|
(robotboss-shooting-trans 21)
|
|
(cond
|
|
((zero? (-> self hits-to-go))
|
|
(set! (-> self keep-charging) #f)
|
|
(stop! (-> self looping-sound 3))
|
|
(robotboss-yellow-eco-off)
|
|
(set! (-> self took-hit) #f)
|
|
(+! (-> self hits-to-go) -1)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-yellow-last-hit-ja)
|
|
(set! (-> self yellow-smoke) #t)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg Lyellow_ecoTubeA))
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 653)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-0
|
|
:to *entity-pool*
|
|
)
|
|
)
|
|
(let ((gp-1 (manipy-spawn (-> self root trans) (-> self entity) *robotboss-yelloweco-sg* #f :to self)))
|
|
(send-event (ppointer->process (-> self parent)) 'flash 255.0)
|
|
(send-event (ppointer->process gp-1) 'anim-mode 'play1)
|
|
(send-event (ppointer->process gp-1) 'rot-quat (-> self root quat))
|
|
;; og:preserve-this the zero passed here was missing in the original game, but is a bug that causes undefined behavior
|
|
(send-event (ppointer->process gp-1) 'art-joint-anim "robotboss-yelloweco-yellow-last-hit" 0)
|
|
)
|
|
)
|
|
((and (> (-> self hits-to-go) 0) (-> self took-hit))
|
|
(if (not (play-ambient (-> self ambient) "GOL-AM17" #t (the-as vector #f)))
|
|
(play-ambient (-> self ambient) "MAI-AM06" #t (the-as vector #f))
|
|
)
|
|
(set! (-> self took-hit) #f)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-yellow-hit-ja)
|
|
)
|
|
)
|
|
(robotboss-position)
|
|
(robotboss-cut-cam (the-as float 5.0) (the-as float 50.0) (the-as int robotboss-yellow-roar-ja))
|
|
(when (and (-> self keep-charging)
|
|
(>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
|
|
)
|
|
(let ((gp-2 (new 'stack-no-clear 'vector)))
|
|
(update! (-> self looping-sound 3))
|
|
(vector<-cspace! gp-2 (joint-node robotboss-basic-lod0-jg Lyellow_ecoBarrell))
|
|
(spawn (-> self particle 6) gp-2)
|
|
)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(robotboss-setup-for-hits 8 (-> self dda yellow-gun-hits))
|
|
(if (nonzero? (-> self yellow-gun))
|
|
(set-mode! (-> self yellow-gun) (joint-mod-handler-mode look-at))
|
|
)
|
|
(loop
|
|
(when (not (robotboss-time-to-shoot-yellow))
|
|
(when (not (ja-group? robotboss-yellow-idle-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-yellow-idle-ja)
|
|
)
|
|
(if (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
|
|
(ja :num-func num-func-identity :frame-num 15.0)
|
|
)
|
|
(while (not (or (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
|
|
(ja-group? robotboss-yellow-last-hit-ja)
|
|
)
|
|
)
|
|
(when (not (ja-group? robotboss-yellow-idle-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-yellow-idle-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(if (robotboss-is-yellow-hit)
|
|
(goto cfg-36)
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
(label cfg-36)
|
|
(when (not (robotboss-is-yellow-hit))
|
|
(when (not (ja-group? robotboss-yellow-idle-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-yellow-idle-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(if (robotboss-is-yellow-hit)
|
|
(goto cfg-55)
|
|
)
|
|
(if (< 15.0 (ja-aframe-num 0))
|
|
(set! (-> self keep-charging) #t)
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
(label cfg-55)
|
|
(when (and (not (ja-group? robotboss-yellow-last-hit-ja))
|
|
(or (robotboss-time-to-shoot-yellow) (not (ja-group? robotboss-yellow-hit-ja)))
|
|
)
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(let ((f30-1 (-> self dda yellow-shot-time-min))
|
|
(f28-0 (-> self dda yellow-shot-time-rnd))
|
|
)
|
|
(set! (-> self till-next-shot) (the int (+ f30-1 (the float (the int (* f28-0 (rand-float-gen)))))))
|
|
)
|
|
(stop! (-> self looping-sound 3))
|
|
(robotboss-yellowshot)
|
|
(robotboss-yellow-eco-on)
|
|
(let ((f0-29 (rand-float-gen)))
|
|
(cond
|
|
((< 0.8333333 f0-29)
|
|
(play-ambient (-> self ambient) "GOL-AM04" #t (the-as vector #f))
|
|
)
|
|
((< 0.6666667 f0-29)
|
|
(play-ambient (-> self ambient) "GOL-AM09" #t (the-as vector #f))
|
|
)
|
|
((< 0.5 f0-29)
|
|
(play-ambient (-> self ambient) "GOL-AM08" #t (the-as vector #f))
|
|
)
|
|
((< 0.33333334 f0-29)
|
|
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
|
|
)
|
|
((< 0.16666667 f0-29)
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.05))
|
|
(ja :group! robotboss-yellow-blast-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (ja-group? robotboss-yellow-last-hit-ja)
|
|
(ja-no-eval :group! robotboss-yellow-roar-ja :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(go robotboss-yellow-dark-bomb)
|
|
)
|
|
)
|
|
)
|
|
:post (behavior ()
|
|
(when *target*
|
|
(if (nonzero? (-> self yellow-gun))
|
|
(set-target! (-> self yellow-gun) (target-pos 5))
|
|
)
|
|
)
|
|
(transform-post)
|
|
)
|
|
)
|
|
|
|
(defstate robotboss-yellow (robotboss)
|
|
:event robotboss-handler
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 13653.333 77824.0 491520.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -18432.0)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-yellow-wait)
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-yellow-wait)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-return-after-red-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(cond
|
|
((and *target* (< (+ 81920.0 (-> self entity extra trans y)) (-> (target-pos 0) y)))
|
|
(when (not (ja-group? robotboss-idle-hover-lookup-no-red-ja))
|
|
(ja-channel-push! 1 (seconds 0.8))
|
|
(ja :group! robotboss-idle-hover-lookup-no-red-ja)
|
|
)
|
|
)
|
|
((not (ja-group? robotboss-idle-hover-no-red-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-red-ja)
|
|
)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-red-dark-bomb-wait (robotboss)
|
|
:event robotboss-bomb-handler
|
|
:enter (behavior ()
|
|
(set! (-> self children-spawned) 0)
|
|
(logior! (-> self alts 11 extra perm status) (entity-perm-status bit-3))
|
|
)
|
|
:exit (behavior ()
|
|
(set! (-> self ignore-camera) #f)
|
|
(set! (-> self des-cam-entity) #f)
|
|
(logclear! (-> self alts 11 extra perm status) (entity-perm-status bit-3))
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-yellow)
|
|
(if (and (< (-> self children-spawned) 0)
|
|
(or (not *target*) (!= (-> *target* control unknown-surface00 name) 'launch-jump))
|
|
)
|
|
(go robotboss-yellow)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-no-red-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
|
|
(robotboss-darkecobomb (new 'static 'vector :y 32768.0) (-> self dda red-bomb-time))
|
|
(set! (-> self des-cam-entity) "camera-365")
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(when (not (ja-group? robotboss-idle-hover-no-red-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-red-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-red-dark-bomb (robotboss)
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 0.0 -81920.0 716800.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -20480.0)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-red-dark-bomb-wait)
|
|
(robotboss-position)
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-red-dark-bomb-wait)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-reveal-no-red-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (not (ja-group? robotboss-idle-hover-no-red-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-red-ja)
|
|
)
|
|
(loop
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(deftype redshot-launch-info (structure)
|
|
((dest vector :inline)
|
|
(flight-time time-frame)
|
|
(stall-time time-frame)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype redshot-launch-array (structure)
|
|
((info redshot-launch-info 6 :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(defbehavior robotboss-redshot-fill-array robotboss ((arg0 redshot-launch-array))
|
|
(let ((s2-0 0)
|
|
(s4-0 (new 'stack-no-clear 'vector))
|
|
(s5-0 (new-stack-vector0))
|
|
)
|
|
0.0
|
|
(dotimes (s3-0 6)
|
|
(let ((s1-0 (-> arg0 info s3-0)))
|
|
(let ((f30-0 -40960.0)
|
|
(f28-0 81920.0)
|
|
)
|
|
(set! (-> s1-0 dest x) (+ f30-0 (* f28-0 (rand-float-gen))))
|
|
)
|
|
(set! (-> s1-0 dest y) 0.0)
|
|
(let ((f30-1 -40960.0)
|
|
(f28-1 81920.0)
|
|
)
|
|
(set! (-> s1-0 dest z) (+ f30-1 (* f28-1 (rand-float-gen))))
|
|
)
|
|
(set! (-> s1-0 dest w) 1.0)
|
|
)
|
|
(dotimes (s1-1 s3-0)
|
|
(vector-! s4-0 (the-as vector (-> arg0 info s3-0)) (the-as vector (-> arg0 info s1-1)))
|
|
(let ((f0-13 (vector-length-squared s4-0)))
|
|
(if (< f0-13 1073741800.0)
|
|
(vector+float*!
|
|
(the-as vector (-> arg0 info s3-0))
|
|
(the-as vector (-> arg0 info s1-1))
|
|
s4-0
|
|
(/ 32768.0 (sqrtf f0-13))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(vector+! s5-0 s5-0 (the-as vector (-> arg0 info s3-0)))
|
|
(let* ((f30-2 60.0)
|
|
(v1-27 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
|
(v1-28 (the-as number (logior #x3f800000 v1-27)))
|
|
)
|
|
(set! (-> arg0 info s3-0 flight-time)
|
|
(the-as time-frame (+ (the int (* f30-2 (+ -1.0 (the-as float v1-28)))) 180))
|
|
)
|
|
)
|
|
(let ((s1-3 (max 150 (- (the-as time-frame s2-0) (-> arg0 info s3-0 flight-time))))
|
|
(f30-3 60.0)
|
|
)
|
|
(set! (-> arg0 info s3-0 stall-time) (the-as time-frame (+ (the int (* f30-3 (rand-float-gen))) 300 s1-3)))
|
|
)
|
|
(set! s2-0 (the-as int (+ (-> arg0 info s3-0 flight-time) (-> arg0 info s3-0 stall-time))))
|
|
)
|
|
(vector-float*! s5-0 s5-0 0.16666667)
|
|
(vector-! s5-0 (-> self entity extra trans) s5-0)
|
|
(dotimes (v1-53 6)
|
|
(vector+! (the-as vector (-> arg0 info v1-53)) (the-as vector (-> arg0 info v1-53)) s5-0)
|
|
(+! (-> arg0 info v1-53 dest y) 2048.0)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Stack slot load at 64 mismatch: defined as size 4, got size 16
|
|
(defbehavior robotboss-redshot robotboss ((arg0 redshot-launch-info) (arg1 symbol))
|
|
(local-vars (sv-32 redshot-launch-info) (sv-48 vector) (sv-64 float) (sv-80 time-frame) (sv-96 time-frame))
|
|
(set! sv-32 arg0)
|
|
(let ((s5-0 arg1))
|
|
(+! (-> self children-spawned) 1)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg red_ecoTip))
|
|
(let ((s4-0 (get-process *default-dead-pool* redshot #x4000)))
|
|
(when s4-0
|
|
(let ((t9-2 (method-of-type redshot activate)))
|
|
(t9-2 (the-as redshot s4-0) self 'redshot (the-as pointer #x70004000))
|
|
)
|
|
(let ((s3-0 run-function-in-process)
|
|
(s2-0 s4-0)
|
|
(s1-0 redshot-init-by-other)
|
|
(s0-0 gp-0)
|
|
)
|
|
(set! sv-48 (-> sv-32 dest))
|
|
(let ((f30-0 20480.0)
|
|
(f28-0 12288.0)
|
|
)
|
|
(set! sv-64 (+ f30-0 (* f28-0 (rand-float-gen))))
|
|
)
|
|
(set! sv-80 (-> sv-32 flight-time))
|
|
(set! sv-96 (-> sv-32 stall-time))
|
|
(let* ((f30-1 300.0)
|
|
(v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
|
(v1-20 (the-as number (logior #x3f800000 v1-19)))
|
|
(t3-0 (the int (* f30-1 (+ -1.0 (the-as float v1-20)))))
|
|
)
|
|
((the-as (function object object object object object object object object none) s3-0)
|
|
s2-0
|
|
s1-0
|
|
s0-0
|
|
sv-48
|
|
sv-64
|
|
sv-80
|
|
sv-96
|
|
t3-0
|
|
)
|
|
)
|
|
)
|
|
(-> s4-0 ppointer)
|
|
)
|
|
)
|
|
(when s5-0
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 641)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-0
|
|
:to *entity-pool*
|
|
)
|
|
(sound-play "red-fire")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior robotboss-is-red-hit robotboss ()
|
|
(or (ja-group? robotboss-red-hit-ja) (ja-group? robotboss-red-last-hit-ja))
|
|
)
|
|
|
|
(defstate robotboss-red-wait (robotboss)
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
(case message
|
|
(('hit-jak)
|
|
(let ((f0-2 (rand-float-gen)))
|
|
(cond
|
|
((< 0.75 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
|
|
)
|
|
((< 0.5 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM12" #t (the-as vector #f))
|
|
)
|
|
((< 0.25 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM15" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('missed-jak)
|
|
(let ((f0-5 (rand-float-gen)))
|
|
(if (< 0.5 f0-5)
|
|
(play-ambient (-> self ambient) "GOL-AM14" #t (the-as vector #f))
|
|
(play-ambient (-> self ambient) "MAI-AM01" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(robotboss-handler proc argc message block)
|
|
)
|
|
)
|
|
)
|
|
:enter (behavior ()
|
|
(set! (-> self hits-to-go) -1)
|
|
(set! (-> self des-cam-entity) "camera-390")
|
|
(set! (-> self use-interesting) #t)
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(set! (-> self till-next-shot) 0)
|
|
0
|
|
)
|
|
:exit (behavior ()
|
|
(let ((a0-1 (handle->process (-> self shot-attractor))))
|
|
(if a0-1
|
|
(deactivate a0-1)
|
|
)
|
|
)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 1)
|
|
(set! (-> a1-1 message) 'open)
|
|
(set! (-> a1-1 param 0) (the-as uint (-> *part-group-id-table* 676)))
|
|
(let ((t9-1 send-event-function)
|
|
(v1-10 (-> self alts 1))
|
|
)
|
|
(t9-1
|
|
(if v1-10
|
|
(-> v1-10 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 1)
|
|
(set! (-> a1-2 message) 'open)
|
|
(set! (-> a1-2 param 0) (the-as uint 0.3))
|
|
(let ((t9-2 send-event-function)
|
|
(v1-17 (-> self alts 0))
|
|
)
|
|
(t9-2
|
|
(if v1-17
|
|
(-> v1-17 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 5 collide-with) (collide-kind))
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 5 prim-core collide-as)
|
|
(collide-kind)
|
|
)
|
|
(set! (-> self use-interesting) #f)
|
|
(set! (-> self des-cam-entity) #f)
|
|
(robotboss-yellow-eco-off)
|
|
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-3 from) self)
|
|
(set! (-> a1-3 num-params) 0)
|
|
(set! (-> a1-3 message) 'show)
|
|
(let ((t9-4 send-event-function)
|
|
(v1-27 (-> self alts 11))
|
|
)
|
|
(t9-4
|
|
(if v1-27
|
|
(-> v1-27 extra process)
|
|
)
|
|
a1-3
|
|
)
|
|
)
|
|
)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-red-dark-bomb)
|
|
(robotboss-shooting-trans 40)
|
|
(cond
|
|
((zero? (-> self hits-to-go))
|
|
(robotboss-yellow-eco-off)
|
|
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-0 from) self)
|
|
(set! (-> a1-0 num-params) 0)
|
|
(set! (-> a1-0 message) 'show)
|
|
(let ((t9-3 send-event-function)
|
|
(v1-3 (-> self alts 11))
|
|
)
|
|
(t9-3
|
|
(if v1-3
|
|
(-> v1-3 extra process)
|
|
)
|
|
a1-0
|
|
)
|
|
)
|
|
)
|
|
(set! (-> self took-hit) #f)
|
|
(+! (-> self hits-to-go) -1)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-red-last-hit-ja)
|
|
(set! (-> self red-smoke) #t)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg rArmBotWireC))
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 649)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-0
|
|
:to *entity-pool*
|
|
)
|
|
)
|
|
(let ((gp-1 (manipy-spawn (-> self root trans) (-> self entity) *robotboss-redeco-sg* #f :to self)))
|
|
(send-event (ppointer->process (-> self parent)) 'flash 255.0)
|
|
(send-event (ppointer->process gp-1) 'anim-mode 'play1)
|
|
(send-event (ppointer->process gp-1) 'rot-quat (-> self root quat))
|
|
;; og:preserve-this the zero passed here was missing in the original game, but is a bug that causes undefined behavior
|
|
(send-event (ppointer->process gp-1) 'art-joint-anim "robotboss-redeco-red-last-hit" 0)
|
|
)
|
|
)
|
|
((and (> (-> self hits-to-go) 0) (-> self took-hit))
|
|
(if (not (play-ambient (-> self ambient) "GOL-AM17" #t (the-as vector #f)))
|
|
(play-ambient (-> self ambient) "MAI-AM06" #t (the-as vector #f))
|
|
)
|
|
(set! (-> self took-hit) #f)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-red-hit-ja)
|
|
)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(robotboss-setup-for-hits 1 5)
|
|
(loop
|
|
(until (or (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
|
|
(ja-group? robotboss-red-last-hit-ja)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-red-idle-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(if (ja-group? robotboss-red-last-hit-ja)
|
|
(goto cfg-24)
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
(label cfg-24)
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(let ((f30-0 (-> self dda red-shot-time-min))
|
|
(f28-0 (-> self dda red-shot-time-rnd))
|
|
)
|
|
(set! (-> self till-next-shot) (the int (+ f30-0 (the float (the int (* f28-0 (rand-float-gen)))))))
|
|
)
|
|
(when (not (robotboss-is-red-hit))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-red-charge-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(update! (-> self looping-sound 2))
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg red_ecoTip))
|
|
(spawn (-> self particle 5) gp-0)
|
|
)
|
|
(if (robotboss-is-red-hit)
|
|
(goto cfg-37)
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(label cfg-37)
|
|
(stop! (-> self looping-sound 2))
|
|
)
|
|
(when (not (ja-group? robotboss-red-last-hit-ja))
|
|
(let ((f30-1 (rand-float-gen))
|
|
(gp-1 (new 'stack-no-clear 'redshot-launch-array))
|
|
(s5-0 (-> self dda red-shots-min))
|
|
)
|
|
(robotboss-yellow-eco-on)
|
|
(robotboss-redshot-fill-array gp-1)
|
|
(robotboss-redshot (the-as redshot-launch-info (-> gp-1 info)) #t)
|
|
(let* ((v1-127 (+ s5-0 (the int (* f30-1 (the float (-> self dda red-shots-rnd))))))
|
|
(s5-1 (+ (min 6 v1-127) -1))
|
|
)
|
|
(dotimes (s4-0 s5-1)
|
|
(robotboss-redshot (-> gp-1 info (+ s4-0 1)) #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (not (robotboss-is-red-hit))
|
|
(let ((f0-33 (rand-float-gen)))
|
|
(cond
|
|
((< 0.8333333 f0-33)
|
|
(play-ambient (-> self ambient) "GOL-AM04" #t (the-as vector #f))
|
|
)
|
|
((< 0.6666667 f0-33)
|
|
(play-ambient (-> self ambient) "GOL-AM05" #t (the-as vector #f))
|
|
)
|
|
((< 0.5 f0-33)
|
|
(play-ambient (-> self ambient) "GOL-AM08" #t (the-as vector #f))
|
|
)
|
|
((< 0.33333334 f0-33)
|
|
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
|
|
)
|
|
((< 0.16666667 f0-33)
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
(ja :group! robotboss-red-blast-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (ja-group? robotboss-red-last-hit-ja)
|
|
(ja-no-eval :group! robotboss-red-roar-ja :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(go robotboss-red-dark-bomb)
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-red (robotboss)
|
|
:event robotboss-handler
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 8192.0 -40960.0 327680.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -22528.0)
|
|
(set-setting! 'sound-flava #f 40.0 (music-flava finalboss-end))
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-red-wait)
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-red-wait)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-return-after-green-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-green-dark-bomb-wait (robotboss)
|
|
:event robotboss-bomb-handler
|
|
:enter (behavior ()
|
|
(set! (-> self children-spawned) 0)
|
|
0
|
|
)
|
|
:exit (behavior ()
|
|
(set! (-> self ignore-camera) #f)
|
|
(set! (-> self des-cam-entity) #f)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-red)
|
|
(if (and (< (-> self children-spawned) 0)
|
|
(or (not *target*) (!= (-> *target* control unknown-surface00 name) 'launch-jump))
|
|
)
|
|
(go robotboss-red)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
|
|
(robotboss-darkecobomb (new 'static 'vector :y 32768.0) (-> self dda green-bomb-time))
|
|
(set! (-> self des-cam-entity) "camera-365")
|
|
(play-ambient (-> self ambient) "GOL-AM11" #t (the-as vector #f))
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-green-dark-bomb (robotboss)
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 16384.0 -81920.0 716800.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -24576.0)
|
|
(play-ambient (-> self ambient) "MAI-AM01" #t (the-as vector #f))
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-green-dark-bomb-wait)
|
|
(robotboss-position)
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-green-dark-bomb-wait)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-reveal-green-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
(loop
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defbehavior robotboss-greenshot robotboss ((arg0 vector) (arg1 float) (arg2 int) (arg3 symbol))
|
|
(+! (-> self children-spawned) 1)
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-0 (joint-node robotboss-basic-lod0-jg green_eco))
|
|
(set! (-> s2-0 quad) (-> self entity extra trans quad))
|
|
(+! (-> s2-0 y) -40960.0)
|
|
(vector+! s2-0 s2-0 arg0)
|
|
(process-spawn greenshot gp-0 s2-0 arg1 arg2 :to self)
|
|
)
|
|
(when arg3
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 640)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-0
|
|
:to *entity-pool*
|
|
)
|
|
(sound-play "green-fire")
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defstate robotboss-green-wait (robotboss)
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
(case message
|
|
(('trigger)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-green-roar-ja)
|
|
(robotboss-yellow-eco-off)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 0)
|
|
(set! (-> a1-2 message) 'show)
|
|
(let ((t9-2 send-event-function)
|
|
(v1-5 (-> self alts 11))
|
|
)
|
|
(t9-2
|
|
(if v1-5
|
|
(-> v1-5 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('hit-jak)
|
|
(let ((f0-2 (rand-float-gen)))
|
|
(cond
|
|
((< 0.75 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
|
|
)
|
|
((< 0.5 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM12" #t (the-as vector #f))
|
|
)
|
|
((< 0.25 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM15" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('blob-died)
|
|
(let ((f0-5 (rand-float-gen)))
|
|
(cond
|
|
((< 0.75 f0-5)
|
|
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
|
|
)
|
|
((< 0.5 f0-5)
|
|
(play-ambient (-> self ambient) "GOL-AM03" #t (the-as vector #f))
|
|
)
|
|
((< 0.25 f0-5)
|
|
(play-ambient (-> self ambient) "GOL-AM14" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "GOL-AM02" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(robotboss-handler proc argc message block)
|
|
)
|
|
)
|
|
)
|
|
:enter (behavior ()
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(set! (-> self children-spawned) 0)
|
|
(robotboss-setup-for-hits 2 5)
|
|
(set! (-> self des-cam-entity) "camera-385")
|
|
)
|
|
:exit (behavior ()
|
|
(let ((a0-1 (handle->process (-> self shot-attractor))))
|
|
(if a0-1
|
|
(deactivate a0-1)
|
|
)
|
|
)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 1)
|
|
(set! (-> a1-1 message) 'open)
|
|
(set! (-> a1-1 param 0) (the-as uint (-> *part-group-id-table* 675)))
|
|
(let ((t9-1 send-event-function)
|
|
(v1-10 (-> self alts 2))
|
|
)
|
|
(t9-1
|
|
(if v1-10
|
|
(-> v1-10 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 1)
|
|
(set! (-> a1-2 message) 'open)
|
|
(set! (-> a1-2 param 0) (the-as uint 0.2))
|
|
(let ((t9-2 send-event-function)
|
|
(v1-17 (-> self alts 0))
|
|
)
|
|
(t9-2
|
|
(if v1-17
|
|
(-> v1-17 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 9 collide-with) (collide-kind))
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 9 prim-core collide-as)
|
|
(collide-kind)
|
|
)
|
|
(set! (-> self des-cam-entity) #f)
|
|
(robotboss-yellow-eco-off)
|
|
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-3 from) self)
|
|
(set! (-> a1-3 num-params) 0)
|
|
(set! (-> a1-3 message) 'show)
|
|
(let ((t9-4 send-event-function)
|
|
(v1-27 (-> self alts 11))
|
|
)
|
|
(t9-4
|
|
(if v1-27
|
|
(-> v1-27 extra process)
|
|
)
|
|
a1-3
|
|
)
|
|
)
|
|
)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-green-dark-bomb)
|
|
(cond
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 0.4))
|
|
(< (-> self children-spawned) 1)
|
|
)
|
|
(robotboss-greenshot (new 'static 'vector) (the-as float 24576.0) 600 #t)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-green-spawn-ja)
|
|
)
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 1.2))
|
|
(< (-> self children-spawned) 3)
|
|
)
|
|
(robotboss-greenshot (new 'static 'vector :x 8192.0) (the-as float 16384.0) 600 #t)
|
|
(robotboss-greenshot (new 'static 'vector :z 8192.0) (the-as float 32768.0) 660 #f)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-green-spawn-ja)
|
|
)
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 2.6))
|
|
(< (-> self children-spawned) 6)
|
|
)
|
|
(robotboss-greenshot (new 'static 'vector :z 12288.0) (the-as float 20480.0) 600 #t)
|
|
(robotboss-greenshot (new 'static 'vector :x 8192.0) (the-as float 8192.0) 660 #f)
|
|
(robotboss-greenshot (new 'static 'vector) (the-as float 36864.0) 720 #f)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-green-spawn-ja)
|
|
)
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 4))
|
|
(< (-> self children-spawned) 7)
|
|
)
|
|
(robotboss-greenshot (new 'static 'vector) (the-as float 24576.0) 600 #t)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-green-spawn-ja)
|
|
)
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 5.5))
|
|
(< (-> self children-spawned) 9)
|
|
)
|
|
(robotboss-greenshot (new 'static 'vector) (the-as float 12288.0) 600 #t)
|
|
(robotboss-greenshot (new 'static 'vector :x 4096.0 :z 12288.0) (the-as float 32768.0) 600 #f)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-green-spawn-ja)
|
|
)
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 8))
|
|
(< (-> self children-spawned) 10)
|
|
)
|
|
(+! (-> self children-spawned) 1)
|
|
(process-spawn
|
|
green-eco-lurker-gen
|
|
(-> self entity)
|
|
(-> self entity extra trans)
|
|
(-> self dda num-blobs)
|
|
:to self
|
|
)
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 24576.0 0.0 655360.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -26624.0)
|
|
)
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 8.2))
|
|
(< (-> self children-spawned) 11)
|
|
)
|
|
(+! (-> self children-spawned) 1)
|
|
(robotboss-yellow-eco-on)
|
|
)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(loop
|
|
(cond
|
|
((ja-group? robotboss-green-roar-ja)
|
|
(go robotboss-green-dark-bomb)
|
|
)
|
|
((not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-green (robotboss)
|
|
:event robotboss-handler
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 24576.0 0.0 245760.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -26624.0)
|
|
(play-ambient (-> self ambient) "GOL-AM01" #t (the-as vector #f))
|
|
(set-setting! 'sound-flava #f 40.0 (music-flava finalboss-middle))
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-green-wait)
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-green-wait)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-return-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-blue-dark-bomb-wait (robotboss)
|
|
:event robotboss-bomb-handler
|
|
:enter (behavior ()
|
|
(set! (-> self children-spawned) 0)
|
|
0
|
|
)
|
|
:exit (behavior ()
|
|
(set! (-> self ignore-camera) #f)
|
|
(set! (-> self des-cam-entity) #f)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-green)
|
|
(if (and (< (-> self children-spawned) 0)
|
|
(or (not *target*) (!= (-> *target* control unknown-surface00 name) 'launch-jump))
|
|
)
|
|
(go robotboss-green)
|
|
)
|
|
(robotboss-position)
|
|
)
|
|
:code (behavior ()
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-dark-shoot-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
|
|
(robotboss-darkecobomb (new 'static 'vector :y 32768.0) (the-as float 3600.0))
|
|
(set! (-> self des-cam-entity) "camera-365")
|
|
(play-ambient (-> self ambient) "MAI-AM04" #t (the-as vector #f))
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(cond
|
|
((and *target* (< (+ 81920.0 (-> self entity extra trans y)) (-> (target-pos 0) y)))
|
|
(when (not (ja-group? robotboss-idle-hover-lookup-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.8))
|
|
(ja :group! robotboss-idle-hover-lookup-no-blue-ja)
|
|
)
|
|
)
|
|
((not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defstate robotboss-blue-dark-bomb (robotboss)
|
|
:enter (behavior ()
|
|
(set! (-> self old-loc quad) (-> self desired-loc quad))
|
|
(set-vector! (-> self desired-loc) 16384.0 -118784.0 614400.0 1.0)
|
|
(set! (-> self loc-t) 0.0)
|
|
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
|
|
(set! (-> self loc-t-duration) (seconds 3))
|
|
(set! (-> self desired-pool-y) -28672.0)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-blue-dark-bomb-wait)
|
|
(robotboss-position)
|
|
(if (>= (-> self loc-t) 1.0)
|
|
(go robotboss-blue-dark-bomb-wait)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-dark-reveal-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-hover-no-blue-ja)
|
|
)
|
|
(loop
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defbehavior robotboss-blue-beam robotboss ((arg0 int) (arg1 symbol))
|
|
(let ((s4-0 (new 'stack-no-clear 'vector))
|
|
(gp-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
|
(set! (-> gp-0 quad) (-> self entity extra trans quad))
|
|
(vector<-cspace! s4-0 (-> self node-list data arg0))
|
|
(vector-! s3-0 gp-0 s4-0)
|
|
(let ((f30-0 (vector-y-angle s3-0))
|
|
(f0-1 (- 16384.0 (vector-x-angle s3-0)))
|
|
)
|
|
(set! (-> *part-id-table* 2546 init-specs 14 initial-valuef) f30-0)
|
|
(set! (-> *part-id-table* 2546 init-specs 13 initial-valuef) f0-1)
|
|
(set! (-> *part-id-table* 2548 init-specs 14 initial-valuef) f30-0)
|
|
(set! (-> *part-id-table* 2548 init-specs 13 initial-valuef) f0-1)
|
|
(set! (-> *part-id-table* 2545 init-specs 14 initial-valuef) f30-0)
|
|
(set! (-> *part-id-table* 2545 init-specs 13 initial-valuef) f0-1)
|
|
)
|
|
)
|
|
(cond
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 0.4))
|
|
(ja-group? robotboss-idle-blue-ja)
|
|
)
|
|
(spawn (-> self particle 0) s4-0)
|
|
(when (and arg1 (nonzero? (-> self looping-sound 0)))
|
|
(update! (-> self looping-sound 0))
|
|
(when (and *target*
|
|
(not (logtest? (-> *target* state-flags)
|
|
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
|
)
|
|
)
|
|
)
|
|
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result))
|
|
(a2-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(vector-! a2-0 gp-0 s4-0)
|
|
(if (>= (fill-and-probe-using-line-sphere
|
|
*collide-cache*
|
|
s4-0
|
|
a2-0
|
|
(the-as float 4096.0)
|
|
(collide-kind target)
|
|
self
|
|
t2-0
|
|
(new 'static 'pat-surface :noentity #x1)
|
|
)
|
|
0.0
|
|
)
|
|
(send-event *target* 'attack #f (static-attack-info ((shove-up (meters 2.5)) (shove-back (meters 7.5)))))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((nonzero? (-> self looping-sound 0))
|
|
(stop! (-> self looping-sound 0))
|
|
)
|
|
)
|
|
(cond
|
|
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) (seconds 1.4))
|
|
(not (ja-group? robotboss-blue-roar-ja))
|
|
)
|
|
(spawn (-> self particle 1) gp-0)
|
|
(when (and arg1 (nonzero? (-> self looping-sound 1)))
|
|
(update! (-> self looping-sound 1))
|
|
(if (and *target*
|
|
(not (logtest? (-> *target* state-flags)
|
|
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
|
)
|
|
)
|
|
(>= 8192.0 (vector-vector-distance gp-0 (target-pos 0)))
|
|
)
|
|
(send-event *target* 'attack #f (static-attack-info ((shove-up (meters 2.5)) (shove-back (meters 7.5)))))
|
|
)
|
|
)
|
|
)
|
|
((nonzero? (-> self looping-sound 1))
|
|
(stop! (-> self looping-sound 1))
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-set-dda robotboss ()
|
|
0
|
|
(let ((gp-0 (-> self entity extra perm)))
|
|
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
|
|
(seekl! (-> gp-0 user-int8 0) 255 1)
|
|
(let ((v1-5 (-> gp-0 user-int8 0)))
|
|
(set! (-> self dda) (cond
|
|
((< 15 v1-5)
|
|
(new 'static 'robotboss-dda
|
|
:blue-bomb-time 4800.0
|
|
:num-blobs 8
|
|
:green-bomb-time 4200.0
|
|
:red-shots-min 3
|
|
:red-shot-time-min 5400.0
|
|
:red-shot-time-rnd 600.0
|
|
:red-bomb-time 3600.0
|
|
:yellow-shot-time-min 1800.0
|
|
:yellow-gun-hits 7
|
|
:yellow-bomb-time 4800.0
|
|
)
|
|
)
|
|
((< 10 v1-5)
|
|
(new 'static 'robotboss-dda
|
|
:blue-bomb-time 4800.0
|
|
:num-blobs 10
|
|
:green-bomb-time 4200.0
|
|
:red-shots-min 4
|
|
:red-shot-time-min 4800.0
|
|
:red-shot-time-rnd 600.0
|
|
:red-bomb-time 3600.0
|
|
:yellow-shot-time-min 1500.0
|
|
:yellow-gun-hits 10
|
|
:yellow-bomb-time 4800.0
|
|
)
|
|
)
|
|
((< 5 v1-5)
|
|
(new 'static 'robotboss-dda
|
|
:blue-bomb-time 4800.0
|
|
:num-blobs 11
|
|
:green-bomb-time 4200.0
|
|
:red-shots-min 4
|
|
:red-shot-time-min 4200.0
|
|
:red-shot-time-rnd 600.0
|
|
:red-bomb-time 3600.0
|
|
:yellow-shot-time-min 1200.0
|
|
:yellow-gun-hits 13
|
|
:yellow-bomb-time 4800.0
|
|
)
|
|
)
|
|
(else
|
|
(new 'static 'robotboss-dda
|
|
:blue-bomb-time 4800.0
|
|
:num-blobs 12
|
|
:green-bomb-time 4200.0
|
|
:red-shots-min 5
|
|
:red-shot-time-min 3600.0
|
|
:red-shot-time-rnd 600.0
|
|
:red-bomb-time 3600.0
|
|
:yellow-shot-time-min 900.0
|
|
:yellow-gun-hits 16
|
|
:yellow-bomb-time 4800.0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior robotboss-blue-done robotboss ()
|
|
(robotboss-yellow-eco-off)
|
|
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-0 from) self)
|
|
(set! (-> a1-0 num-params) 0)
|
|
(set! (-> a1-0 message) 'show)
|
|
(let ((t9-1 send-event-function)
|
|
(v1-1 (-> self alts 11))
|
|
)
|
|
(t9-1
|
|
(if v1-1
|
|
(-> v1-1 extra process)
|
|
)
|
|
a1-0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defstate robotboss-blue-wait (robotboss)
|
|
:event robotboss-handler
|
|
:enter (behavior ()
|
|
(set! (-> self state-time) (-> *display* game-frame-counter))
|
|
(robotboss-setup-for-hits 4 5)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 0)
|
|
(set! (-> a1-1 message) 'hide)
|
|
(let ((t9-1 send-event-function)
|
|
(v1-3 (-> self alts 11))
|
|
)
|
|
(t9-1
|
|
(if v1-3
|
|
(-> v1-3 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
(set! (-> self use-interesting) #t)
|
|
(robotboss-yellow-eco-on)
|
|
)
|
|
:exit (behavior ()
|
|
(let ((a0-1 (handle->process (-> self shot-attractor))))
|
|
(if a0-1
|
|
(deactivate a0-1)
|
|
)
|
|
)
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) self)
|
|
(set! (-> a1-1 num-params) 1)
|
|
(set! (-> a1-1 message) 'open)
|
|
(set! (-> a1-1 param 0) (the-as uint (-> *part-group-id-table* 674)))
|
|
(let ((t9-1 send-event-function)
|
|
(v1-10 (-> self alts 3))
|
|
)
|
|
(t9-1
|
|
(if v1-10
|
|
(-> v1-10 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) self)
|
|
(set! (-> a1-2 num-params) 1)
|
|
(set! (-> a1-2 message) 'open)
|
|
(set! (-> a1-2 param 0) (the-as uint 0.1))
|
|
(let ((t9-2 send-event-function)
|
|
(v1-17 (-> self alts 0))
|
|
)
|
|
(t9-2
|
|
(if v1-17
|
|
(-> v1-17 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 collide-with) (collide-kind))
|
|
(set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core collide-as)
|
|
(collide-kind)
|
|
)
|
|
(set! (-> self use-interesting) #f)
|
|
(send-event *camera* 'point-of-interest #f)
|
|
(robotboss-blue-done)
|
|
(if (nonzero? (-> self looping-sound 0))
|
|
(stop! (-> self looping-sound 0))
|
|
)
|
|
(if (nonzero? (-> self looping-sound 1))
|
|
(stop! (-> self looping-sound 1))
|
|
)
|
|
(robotboss-set-dda)
|
|
(robotboss-cut-cam-exit)
|
|
)
|
|
:trans (behavior ()
|
|
(robotboss-always-trans robotboss-blue-dark-bomb)
|
|
(robotboss-shooting-trans 9)
|
|
(cond
|
|
((zero? (-> self hits-to-go))
|
|
(play-ambient (-> self ambient) "GOL-AM06" #t (the-as vector #f))
|
|
(robotboss-blue-done)
|
|
(set! (-> self took-hit) #f)
|
|
(+! (-> self hits-to-go) -1)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-blue-last-hit-ja)
|
|
(sound-play "explod-eye")
|
|
(set! (-> self blue-smoke) #t)
|
|
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
|
(vector<-cspace! gp-1 (joint-node robotboss-basic-lod0-jg blue_eco_piece))
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(-> *part-group-id-table* 644)
|
|
300
|
|
#f
|
|
#f
|
|
#f
|
|
gp-1
|
|
:to *entity-pool*
|
|
)
|
|
)
|
|
(let ((gp-2 (manipy-spawn (-> self root trans) (-> self entity) *robotboss-blueeco-sg* #f :to self)))
|
|
(send-event (ppointer->process (-> self parent)) 'flash 255.0)
|
|
(send-event (ppointer->process gp-2) 'anim-mode 'play1)
|
|
(send-event (ppointer->process gp-2) 'rot-quat (-> self root quat))
|
|
;; og:preserve-this the zero passed here was missing in the original game, but is a bug that causes undefined behavior
|
|
(send-event (ppointer->process gp-2) 'art-joint-anim "robotboss-blueeco-blue-last-hit" 0)
|
|
)
|
|
)
|
|
((-> self took-hit)
|
|
(if (not (play-ambient (-> self ambient) "GOL-AM17" #t (the-as vector #f)))
|
|
(play-ambient (-> self ambient) "MAI-AM06" #t (the-as vector #f))
|
|
)
|
|
(set! (-> self took-hit) #f)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-blue-hit-ja)
|
|
)
|
|
)
|
|
(when (not (or (ja-group? robotboss-blue-roar-ja) (ja-group? robotboss-blue-last-hit-ja)))
|
|
)
|
|
(robotboss-blue-beam 8 #t)
|
|
(robotboss-blue-beam 9 #f)
|
|
(when (ambient-control-method-10
|
|
(-> self ambient)
|
|
(new 'stack-no-clear 'vector)
|
|
(seconds 10)
|
|
(the-as float 327680.0)
|
|
self
|
|
)
|
|
(let ((f0-2 (rand-float-gen)))
|
|
(cond
|
|
((< 0.8 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM02" #t (the-as vector #f))
|
|
)
|
|
((< 0.6 f0-2)
|
|
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
|
|
)
|
|
((< 0.4 f0-2)
|
|
(play-ambient (-> self ambient) "MAI-AM08" #t (the-as vector #f))
|
|
)
|
|
((< 0.2 f0-2)
|
|
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
|
|
)
|
|
(else
|
|
(play-ambient (-> self ambient) "GOL-AM07" #t (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(robotboss-position)
|
|
(robotboss-cut-cam (the-as float 5.0) (the-as float 50.0) (the-as int robotboss-blue-roar-ja))
|
|
)
|
|
:code (behavior ()
|
|
(ja-channel-push! 1 (seconds 0.4))
|
|
(ja-no-eval :group! robotboss-idle-blue-ja :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(loop
|
|
(when (not (ja-group? robotboss-idle-blue-ja))
|
|
(ja-channel-push! 1 (seconds 0.2))
|
|
(ja :group! robotboss-idle-blue-ja)
|
|
)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(when (<= (-> self hits-to-go) 0)
|
|
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-6 from) self)
|
|
(set! (-> a1-6 num-params) 1)
|
|
(set! (-> a1-6 message) 'target)
|
|
(set! (-> a1-6 param 0) (the-as uint 0.0))
|
|
(let ((t9-8 send-event-function)
|
|
(v1-69 (-> self alts 12))
|
|
)
|
|
(t9-8
|
|
(if v1-69
|
|
(-> v1-69 extra process)
|
|
)
|
|
a1-6
|
|
)
|
|
)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(ja :group! robotboss-blue-roar-ja)
|
|
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
(go robotboss-blue-dark-bomb)
|
|
)
|
|
)
|
|
)
|
|
:post transform-post
|
|
)
|
|
|
|
(defmethod init-from-entity! ((this robotboss) (arg0 entity-actor))
|
|
(stack-size-set! (-> this main-thread) 512)
|
|
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
|
|
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
|
|
(set! (-> s4-0 reaction) default-collision-reaction)
|
|
(set! (-> s4-0 no-reaction)
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
)
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 19) 0)))
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
|
(set! (-> s3-0 prim-core action) (collide-action solid))
|
|
(set! (-> s3-0 transform-index) 0)
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 368640.0)
|
|
(set-root-prim! s4-0 s3-0)
|
|
(let ((s2-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 4))))
|
|
(set! (-> s2-0 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-0 collide-with) (collide-kind target))
|
|
(set! (-> s2-0 prim-core action) (collide-action solid))
|
|
(set! (-> s2-0 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-0 transform-index) 7)
|
|
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 32768.0)
|
|
(append-prim s3-0 s2-0)
|
|
)
|
|
(let ((s2-1 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
|
|
(set! (-> s2-1 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-1 collide-with) (collide-kind target))
|
|
(set! (-> s2-1 prim-core action) (collide-action solid))
|
|
(set! (-> s2-1 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-1 transform-index) 6)
|
|
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 57344.0)
|
|
(append-prim s3-0 s2-1)
|
|
)
|
|
(let ((s2-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0))))
|
|
(set! (-> s2-2 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-2 collide-with) (collide-kind target))
|
|
(set! (-> s2-2 prim-core action) (collide-action solid))
|
|
(set! (-> s2-2 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-2 transform-index) 6)
|
|
(set-vector! (-> s2-2 local-sphere) 0.0 -57344.0 61440.0 73728.0)
|
|
(append-prim s3-0 s2-2)
|
|
)
|
|
(let ((s2-3 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 8))))
|
|
(set! (-> s2-3 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-3 collide-with) (collide-kind target))
|
|
(set! (-> s2-3 prim-core action) (collide-action solid))
|
|
(set! (-> s2-3 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-3 transform-index) 16)
|
|
(set-vector! (-> s2-3 local-sphere) 0.0 -20480.0 69632.0 237568.0)
|
|
(append-prim s3-0 s2-3)
|
|
)
|
|
(let ((s2-4 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0))))
|
|
(set! (-> s2-4 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-4 collide-with) (collide-kind target))
|
|
(set! (-> s2-4 prim-core action) (collide-action solid))
|
|
(set! (-> s2-4 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-4 transform-index) 14)
|
|
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 81920.0)
|
|
(append-prim s3-0 s2-4)
|
|
)
|
|
(let ((s2-5 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 1))))
|
|
(set! (-> s2-5 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-5 collide-with) (collide-kind target))
|
|
(set! (-> s2-5 prim-core action) (collide-action solid))
|
|
(set! (-> s2-5 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-5 transform-index) 39)
|
|
(set-vector! (-> s2-5 local-sphere) 0.0 0.0 0.0 69632.0)
|
|
(append-prim s3-0 s2-5)
|
|
)
|
|
(let ((s2-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0))))
|
|
(set! (-> s2-6 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-6 collide-with) (collide-kind target))
|
|
(set! (-> s2-6 prim-core action) (collide-action solid))
|
|
(set! (-> s2-6 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-6 transform-index) 31)
|
|
(set-vector! (-> s2-6 local-sphere) 0.0 -57344.0 0.0 90112.0)
|
|
(append-prim s3-0 s2-6)
|
|
)
|
|
(let ((s2-7 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0))))
|
|
(set! (-> s2-7 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-7 collide-with) (collide-kind target))
|
|
(set! (-> s2-7 prim-core action) (collide-action solid))
|
|
(set! (-> s2-7 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-7 transform-index) 30)
|
|
(set-vector! (-> s2-7 local-sphere) 0.0 24576.0 0.0 81920.0)
|
|
(append-prim s3-0 s2-7)
|
|
)
|
|
(let ((s2-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0))))
|
|
(set! (-> s2-8 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-8 collide-with) (collide-kind target))
|
|
(set! (-> s2-8 prim-core action) (collide-action solid))
|
|
(set! (-> s2-8 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-8 transform-index) 57)
|
|
(set-vector! (-> s2-8 local-sphere) 0.0 0.0 0.0 81920.0)
|
|
(append-prim s3-0 s2-8)
|
|
)
|
|
(let ((s2-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 2))))
|
|
(set! (-> s2-9 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-9 collide-with) (collide-kind target))
|
|
(set! (-> s2-9 prim-core action) (collide-action solid))
|
|
(set! (-> s2-9 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-9 transform-index) 68)
|
|
(set-vector! (-> s2-9 local-sphere) 0.0 0.0 0.0 49152.0)
|
|
(append-prim s3-0 s2-9)
|
|
)
|
|
(let ((s2-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0))))
|
|
(set! (-> s2-10 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-10 collide-with) (collide-kind target))
|
|
(set! (-> s2-10 prim-core action) (collide-action solid))
|
|
(set! (-> s2-10 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-10 transform-index) 4)
|
|
(set-vector! (-> s2-10 local-sphere) 0.0 24576.0 0.0 102400.0)
|
|
(append-prim s3-0 s2-10)
|
|
)
|
|
(let ((s2-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0))))
|
|
(set! (-> s2-11 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-11 collide-with) (collide-kind target))
|
|
(set! (-> s2-11 prim-core action) (collide-action solid))
|
|
(set! (-> s2-11 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-11 transform-index) 77)
|
|
(set-vector! (-> s2-11 local-sphere) 0.0 0.0 0.0 73728.0)
|
|
(append-prim s3-0 s2-11)
|
|
)
|
|
(let ((s2-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0))))
|
|
(set! (-> s2-12 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-12 collide-with) (collide-kind target))
|
|
(set! (-> s2-12 prim-core action) (collide-action solid))
|
|
(set! (-> s2-12 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-12 transform-index) 75)
|
|
(set-vector! (-> s2-12 local-sphere) 0.0 24576.0 0.0 81920.0)
|
|
(append-prim s3-0 s2-12)
|
|
)
|
|
(let ((s2-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0))))
|
|
(set! (-> s2-13 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-13 collide-with) (collide-kind target))
|
|
(set! (-> s2-13 prim-core action) (collide-action solid))
|
|
(set! (-> s2-13 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-13 transform-index) 74)
|
|
(set-vector! (-> s2-13 local-sphere) 0.0 40960.0 0.0 73728.0)
|
|
(append-prim s3-0 s2-13)
|
|
)
|
|
(let ((s2-14 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0))))
|
|
(set! (-> s2-14 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-14 collide-with) (collide-kind target))
|
|
(set! (-> s2-14 prim-core action) (collide-action solid))
|
|
(set! (-> s2-14 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-14 transform-index) 73)
|
|
(set-vector! (-> s2-14 local-sphere) 0.0 32768.0 0.0 61440.0)
|
|
(append-prim s3-0 s2-14)
|
|
)
|
|
(let ((s2-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0))))
|
|
(set! (-> s2-15 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-15 collide-with) (collide-kind target))
|
|
(set! (-> s2-15 prim-core action) (collide-action solid))
|
|
(set! (-> s2-15 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-15 transform-index) 84)
|
|
(set-vector! (-> s2-15 local-sphere) 0.0 40960.0 -8192.0 98304.0)
|
|
(append-prim s3-0 s2-15)
|
|
)
|
|
(let ((s2-16 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0))))
|
|
(set! (-> s2-16 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-16 collide-with) (collide-kind target))
|
|
(set! (-> s2-16 prim-core action) (collide-action solid))
|
|
(set! (-> s2-16 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-16 transform-index) 83)
|
|
(set-vector! (-> s2-16 local-sphere) 0.0 65536.0 0.0 73728.0)
|
|
(append-prim s3-0 s2-16)
|
|
)
|
|
(let ((s2-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0))))
|
|
(set! (-> s2-17 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-17 collide-with) (collide-kind target))
|
|
(set! (-> s2-17 prim-core action) (collide-action solid))
|
|
(set! (-> s2-17 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-17 transform-index) 82)
|
|
(set-vector! (-> s2-17 local-sphere) 0.0 32768.0 0.0 61440.0)
|
|
(append-prim s3-0 s2-17)
|
|
)
|
|
(let ((s2-18 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0))))
|
|
(set! (-> s2-18 prim-core collide-as) (collide-kind ground-object))
|
|
(set! (-> s2-18 collide-with) (collide-kind target))
|
|
(set! (-> s2-18 prim-core action) (collide-action solid))
|
|
(set! (-> s2-18 prim-core offense) (collide-offense indestructible))
|
|
(set! (-> s2-18 transform-index) 3)
|
|
(set-vector! (-> s2-18 local-sphere) 0.0 0.0 0.0 61440.0)
|
|
(append-prim s3-0 s2-18)
|
|
)
|
|
)
|
|
(set! (-> s4-0 nav-radius) 4096.0)
|
|
(backup-collide-with-as s4-0)
|
|
(set! (-> this root) s4-0)
|
|
)
|
|
(process-drawable-from-entity! this arg0)
|
|
(initialize-skeleton this *robotboss-sg* '())
|
|
(aybabtu 2)
|
|
(set! (-> this nav) (new 'process 'nav-control (-> this root) 16 (the-as float 40960.0)))
|
|
(logior! (-> this nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
|
(logclear! (-> this root nav-flags) (nav-flags navf0))
|
|
(set! (-> this path) (new 'process 'path-control this 'path (the-as float 0.0)))
|
|
(logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text))
|
|
(logclear! (-> this mask) (process-mask actor-pause))
|
|
(set! (-> this root pause-adjust-distance) 1228800.0)
|
|
(set-vector! (-> this old-loc) 8192.0 0.0 245760.0 1.0)
|
|
(set! (-> this desired-loc quad) (-> this old-loc quad))
|
|
(set! (-> this loc-t) 1.0)
|
|
(set! (-> this loc-t-duration) 1)
|
|
(set! (-> this loc-t-start) 0)
|
|
(set! (-> this shot-attractor) (the-as handle #f))
|
|
(set! (-> this white-eco) (the-as handle #f))
|
|
(set! (-> this desired-pool-y) -30720.0)
|
|
(set! (-> this des-cam-entity) #f)
|
|
(set! (-> this use-interesting) #f)
|
|
(set! (-> this ignore-camera) #f)
|
|
(dotimes (v1-211 13)
|
|
(set! (-> this alts v1-211) #f)
|
|
)
|
|
(let ((s5-1 (entity-actor-count (-> this entity) 'alt-actor)))
|
|
(dotimes (s4-1 (min 13 s5-1))
|
|
(set! (-> this alts s4-1) (entity-actor-lookup (-> this entity) 'alt-actor s4-1))
|
|
)
|
|
)
|
|
(set! (-> this particle 0) (create-launch-control (-> *part-group-id-table* 636) this))
|
|
(set! (-> this particle 1) (create-launch-control (-> *part-group-id-table* 637) this))
|
|
(set! (-> this particle 2) (create-launch-control (-> *part-group-id-table* 645) this))
|
|
(set! (-> this particle 3) (create-launch-control (-> *part-group-id-table* 650) this))
|
|
(set! (-> this particle 4) (create-launch-control (-> *part-group-id-table* 654) this))
|
|
(set! (-> this particle 5) (create-launch-control (-> *part-group-id-table* 646) this))
|
|
(set! (-> this particle 6) (create-launch-control (-> *part-group-id-table* 651) this))
|
|
(set! (-> this looping-sound 0)
|
|
(new 'process 'ambient-sound (static-sound-spec "robo-blue-lp" :fo-max 80) (-> this root trans))
|
|
)
|
|
(set! (-> this looping-sound 1)
|
|
(new 'process 'ambient-sound (static-sound-spec "eco-torch" :fo-max 80) (-> this root trans))
|
|
)
|
|
(set! (-> this looping-sound 2)
|
|
(new 'process 'ambient-sound (static-sound-spec "red-buzz" :fo-max 80) (-> this root trans))
|
|
)
|
|
(set! (-> this looping-sound 3)
|
|
(new 'process 'ambient-sound (static-sound-spec "bfg-buzz" :fo-max 80) (-> this root trans))
|
|
)
|
|
(set! (-> this blue-smoke) #f)
|
|
(set! (-> this red-smoke) #f)
|
|
(set! (-> this yellow-smoke) #f)
|
|
(ambient-control-method-9 (-> this ambient))
|
|
(set! (-> this yellow-gun) (new 'process 'joint-mod (joint-mod-handler-mode flex-blend) this 16))
|
|
(set-vector! (-> this yellow-gun twist-max) 8192.0 8192.0 0.0 1.0)
|
|
(set! (-> this yellow-gun up) (the-as uint 1))
|
|
(set! (-> this yellow-gun nose) (the-as uint 2))
|
|
(set! (-> this yellow-gun ear) (the-as uint 0))
|
|
(set! (-> this yellow-gun max-dist) 819200.0)
|
|
(set! (-> this yellow-gun ignore-angle) 16384.0)
|
|
(set! (-> this palette-val) 0.0)
|
|
(set! (-> this dda) (new 'static 'robotboss-dda
|
|
:blue-bomb-time 4200.0
|
|
:num-blobs 12
|
|
:green-bomb-time 4200.0
|
|
:red-shots-min 5
|
|
:red-shot-time-min 3600.0
|
|
:red-shot-time-rnd 600.0
|
|
:red-bomb-time 3600.0
|
|
:yellow-shot-time-min 900.0
|
|
:yellow-shot-time-rnd 600.0
|
|
:yellow-gun-hits 5
|
|
:yellow-bomb-time 3600.0
|
|
)
|
|
)
|
|
(go robotboss-blue-wait)
|
|
(none)
|
|
)
|