jak-project/goal_src/jak3/levels/sewer/neo-juicer.gc
Hat Kid 36f1592b90
decomp3: lightning renderer, nav code, texture remap, fix progress menu crash (#3461)
Also adds:

- BLERC
- Minimap (with missing texture for the map, sprites work)
- Eco Mine files
- Precursor robot boss files
- Sewer files
- Vehicle files
2024-04-12 18:44:38 -04:00

1729 lines
65 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: neo-juicer.gc
;; name in dgo: neo-juicer
;; dgos: SEA
;; DECOMP BEGINS
(defpartgroup group-neo-juicer-shot-hit
:id 1524
:duration (seconds 0.017)
:flags (sp0)
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 5003))
)
(defpart 5003
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 1.0)
(:scale-x (meters 1) (meters 1))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 96.0 64.0)
(:g 64.0 32.0)
(:b 96.0 64.0)
(:a 64.0)
(:rotvel-z (degrees -0.2) (degrees 0.4))
(:fade-r -0.35555556)
(:fade-g -0.35555556)
(:fade-b 0.0)
(:fade-a -0.30476192)
(:accel-y (meters -0.00016666666) (meters 0.00016666666))
(:timer (seconds 0.7))
(:flags (sp-cpuinfo-flag-2))
(:next-time (seconds 0.2))
(:next-launcher 5004)
(:rotate-y (degrees 0) (degrees 180))
)
)
(defpart 5005
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:scale-x (meters 3.5))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 0.0)
(:b 0.0)
(:a 16.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 819.2)
)
)
(defpart 5006
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:scale-x (meters 1.5) (meters 1))
(:rot-x (degrees 2.25))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 0.0)
(:b 0.0)
(:a 48.0 16.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 819.2)
)
)
(defpart 5007
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 1.5) (meters 0.5))
(:rot-x (degrees 2.25))
(:rot-z (degrees 0) (degrees 16))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 0.0)
(:b 0.0)
(:a 16.0 16.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 819.2)
)
)
(defpart 5008
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 0.5) (meters 0.2))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 196.0 128.0)
(:b 64.0 64.0)
(:a 32.0 16.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 819.2)
)
)
(deftype neo-juicer-shot (projectile)
((lightning lightning-control 5)
(victim handle)
)
)
(defmethod proj-event-handler ((this neo-juicer-shot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('reset)
(let ((v1-1 (the-as object (-> arg3 param 0))))
(set! (-> this root trans quad) (-> (the-as (inline-array vector) v1-1) 0 quad))
(set! (-> this starting-pos quad) (-> (the-as (inline-array vector) v1-1) 0 quad))
(set! (-> this root transv quad) (-> (the-as (inline-array vector) v1-1) 1 quad))
(set! (-> this pre-move-transv quad) (-> (the-as (inline-array vector) v1-1) 1 quad))
)
(set! (-> this hits) 0)
(set-time! (-> this spawn-time))
(if (made-impact? this)
(go (method-of-object this impact))
(go (method-of-object this moving))
)
#t
)
(else
((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3)
)
)
)
(defstate dissipate (neo-juicer-shot)
:virtual #t
:enter (behavior ()
(go-virtual impact)
)
)
(defmethod deal-damage! ((this neo-juicer-shot) (arg0 process) (arg1 event-message-block))
(let ((a0-2 (if (type? arg0 process-focusable)
arg0
)
)
)
(when a0-2
(set! (-> this victim) (process->handle a0-2))
#t
)
)
)
(defmethod projectile-method-25 ((this neo-juicer-shot))
(let ((s5-0 (-> this starting-pos))
(s4-0 (-> this root trans))
)
(when (line-in-view-frustum? s5-0 s4-0)
(let ((s3-0 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'matrix))
)
(launch-particles (-> *part-id-table* 5007) s5-0)
(launch-particles (-> *part-id-table* 5008) s5-0)
(when (not (handle->process (-> this victim)))
(launch-particles (-> *part-id-table* 5007) s4-0)
(launch-particles (-> *part-id-table* 5008) s4-0)
)
(vector-! s2-0 s4-0 s5-0)
(vector-normalize! s2-0 1.0)
(matrix-axis-angle! s1-0 s2-0 13107.2)
(vector-reset! (-> s1-0 trans))
(set-vector! s3-0 (-> s2-0 z) 0.0 (- (-> s2-0 x)) 1.0)
(vector-normalize! s3-0 409.6)
(dotimes (s0-0 5)
(vector-matrix*! s3-0 s3-0 s1-0)
(vector+! s2-0 s3-0 s5-0)
(let ((a0-17 (-> this lightning s0-0))
(v1-21 s2-0)
)
(set! (-> a0-17 state meet data 0 quad) (-> v1-21 quad))
)
(let ((a0-20 (-> this lightning s0-0))
(v1-25 s4-0)
)
(set! (-> a0-20 state meet data (+ (-> a0-20 state points-to-draw) -1) quad) (-> v1-25 quad))
)
)
)
)
)
0
(none)
)
(defmethod projectile-method-26 ((this neo-juicer-shot))
(projectile-method-25 this)
(cond
((logtest? (-> *part-group-id-table* 1524 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1524))
)
(else
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1524))
)
)
0
(none)
)
(defmethod made-impact? ((this neo-juicer-shot))
(let ((gp-0 (-> this root))
(s5-0 (new 'stack-no-clear 'collide-query))
)
(let ((v1-0 s5-0))
(set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w))
(set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with))
(set! (-> v1-0 ignore-process0) this)
(set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent)))
(set! (-> v1-0 ignore-pat)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
(set! (-> v1-0 action-mask) (collide-action solid))
)
(let ((a0-2 (handle->process (-> this notify-handle))))
(when a0-2
(let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3)))
(f0-2 (- (vector-length s4-1)))
)
(fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0)
)
)
)
)
)
(defun neo-juicer-proj-move ((arg0 neo-juicer-shot))
(let ((s5-0 (handle->process (-> arg0 victim))))
(cond
(s5-0
(set! (-> arg0 root trans quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad))
((method-of-type projectile deal-damage!) arg0 s5-0 (the-as event-message-block #f))
)
(else
(projectile-move-fill-line-sphere arg0)
(if (logtest? (-> arg0 root status) (collide-status touch-surface))
(go (method-of-object arg0 impact))
)
)
)
)
0
(none)
)
(defmethod setup-collision! ((this neo-juicer-shot))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot))
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec projectile))
(set! (-> v1-7 prim-core collide-with)
(collide-spec backgnd jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list)
)
(set! (-> v1-7 prim-core action) (collide-action solid))
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-7)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-10 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
)
(set! (-> s5-0 event-self) 'touched)
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
(set! (-> this root) s5-0)
)
(set! (-> this root pat-ignore-mask)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
)
(none)
)
;; WARN: Return type mismatch projectile vs neo-juicer-shot.
(defmethod relocate ((this neo-juicer-shot) (offset int))
(dotimes (v1-0 5)
(if (nonzero? (-> this lightning v1-0))
(&+! (-> this lightning v1-0) offset)
)
)
(the-as neo-juicer-shot ((method-of-type projectile relocate) this offset))
)
(defmethod init-proj-settings! ((this neo-juicer-shot))
(logior! (-> this options) (projectile-options po17))
(set! (-> this move) neo-juicer-proj-move)
(set! (-> this root dynam gravity y) 0.0)
(set! (-> this root dynam gravity-length) 0.0)
(set! (-> this root dynam gravity-max) 0.0)
(set! (-> this attack-mode) 'neo-juicer-shot)
(dotimes (s5-0 5)
(set! (-> this lightning s5-0) (new
'process
'lightning-control
(new 'static 'lightning-spec
:name #f
:flags (lightning-spec-flags lsf0)
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture (new 'static 'texture-id :index #x40 :page #x4)
:reduction 0.42
:num-points 8
:box-size 8192.0
:merge-factor 0.5
:merge-count 2
:radius 1433.6
:duration -1.0
:sound #f
)
this
0.0
)
)
)
(set! (-> this victim) (the-as handle #f))
0
(none)
)
(defskelgroup skel-neo-juicer neo-juicer neo-juicer-lod0-jg -1
((neo-juicer-lod0-mg (meters 20)) (neo-juicer-lod1-mg (meters 40)) (neo-juicer-lod2-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5.3)
:shadow neo-juicer-shadow-mg
:origin-joint-index 21
)
(deftype neo-juicer-anim-info (structure)
((anim-index int32)
)
:pack-me
)
(deftype neo-juicer-global-info (basic)
((prev-yellow-hit int8)
(prev-blue-hit int8)
(idle-anim neo-juicer-anim-info 3 :inline)
(patrol-anim neo-juicer-anim-info 2 :inline)
(notice-anim neo-juicer-anim-info 2 :inline)
(charge-anim neo-juicer-anim-info 2 :inline)
(knocked-anim neo-juicer-anim-info 2 :inline)
(celebrate-anim neo-juicer-anim-info 2 :inline)
(yellow-hit-anim neo-juicer-anim-info 4 :inline)
(blue-hit-anim neo-juicer-anim-info 6 :inline)
)
)
(deftype neo-juicer (nav-enemy)
((los los-control :inline)
(intro-path path-control)
(joint joint-mod)
(joint-enable symbol)
(joint-blend float)
(last-fire-time time-frame)
(heading symbol)
(move-angle float)
(torso-track-player joint-mod)
(circle-backward? symbol :offset 832)
(using-turn-anim symbol)
(hit-focus focus)
(ambush-path-pt int8)
(charge-index int8)
(hostile-dest vector :inline)
(current-projectile handle)
)
(:state-methods
ambush-cont
attack
)
(:methods
(go-die-or-knocked (_type_) object)
(spawn-proj! (_type_ process-focusable uint) none)
(track-focus! (_type_) none)
(start-tracking (_type_) none)
(toggle-deadly-flag (_type_ symbol) none)
)
)
(define *neo-juicer-global-info* (new 'static 'neo-juicer-global-info
:idle-anim (new 'static 'inline-array neo-juicer-anim-info 3
(new 'static 'neo-juicer-anim-info :anim-index 5)
(new 'static 'neo-juicer-anim-info :anim-index 6)
(new 'static 'neo-juicer-anim-info :anim-index 7)
)
:patrol-anim (new 'static 'inline-array neo-juicer-anim-info 2
(new 'static 'neo-juicer-anim-info :anim-index 8)
(new 'static 'neo-juicer-anim-info :anim-index 23)
)
:notice-anim (new 'static 'inline-array neo-juicer-anim-info 2
(new 'static 'neo-juicer-anim-info :anim-index 21)
(new 'static 'neo-juicer-anim-info :anim-index 22)
)
:charge-anim (new 'static 'inline-array neo-juicer-anim-info 2
(new 'static 'neo-juicer-anim-info :anim-index 9)
(new 'static 'neo-juicer-anim-info :anim-index 20)
)
:knocked-anim (new 'static 'inline-array neo-juicer-anim-info 2
(new 'static 'neo-juicer-anim-info :anim-index 16)
(new 'static 'neo-juicer-anim-info :anim-index 18)
)
:celebrate-anim (new 'static 'inline-array neo-juicer-anim-info 2
(new 'static 'neo-juicer-anim-info :anim-index 24)
(new 'static 'neo-juicer-anim-info :anim-index 25)
)
:yellow-hit-anim (new 'static 'inline-array neo-juicer-anim-info 4
(new 'static 'neo-juicer-anim-info :anim-index 33)
(new 'static 'neo-juicer-anim-info :anim-index 34)
(new 'static 'neo-juicer-anim-info :anim-index 35)
(new 'static 'neo-juicer-anim-info :anim-index 36)
)
:blue-hit-anim (new 'static 'inline-array neo-juicer-anim-info 6
(new 'static 'neo-juicer-anim-info :anim-index 26)
(new 'static 'neo-juicer-anim-info :anim-index 27)
(new 'static 'neo-juicer-anim-info :anim-index 28)
(new 'static 'neo-juicer-anim-info :anim-index 29)
(new 'static 'neo-juicer-anim-info :anim-index 30)
(new 'static 'neo-juicer-anim-info :anim-index 31)
)
)
)
(define *fact-info-neo-juicer-defaults*
(new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9)
)
(define *neo-juicer-nav-enemy-info* (new 'static 'nav-enemy-info
:use-die-falling #t
:use-victory #t
:use-jump-blocked #t
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #t
:hover-if-no-ground #f
:idle-anim-script (new 'static 'inline-array idle-control-frame 2
(new 'static 'idle-control-frame
:command (idle-control-cmd play)
:anim #x5
:param0 1
:param1 1
:param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0))
)
(new 'static 'idle-control-frame)
)
:idle-anim 5
:notice-anim 21
:hostile-anim 9
:hit-anim 11
:knocked-anim 18
:knocked-land-anim 19
:die-anim 40
:die-falling-anim 41
:victory-anim 24
:jump-wind-up-anim 37
:jump-in-air-anim 38
:jump-land-anim 39
:neck-joint 34
:look-at-joint 34
:bullseye-joint 6
:sound-hit (static-sound-name "juicer-hit")
:sound-die (static-sound-name "juicer-die")
:notice-distance (meters 30)
:notice-distance-delta (meters 10)
:proximity-notice-distance (meters 24)
:default-hit-points 9.0
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:penetrate-knocked (penetrate
touch
generic-attack
lunge
flop
punch
spin
roll
uppercut
bonk
tube
vehicle
flut-attack
board
mech
mech-punch
mech-bonk
dark-skin
dark-punch
dark-bomb
dark-smack
flut
shield
explode
jak-yellow-shot
jak-red-shot
jak-blue-shot
jak-dark-shot
enemy-yellow-shot
enemy-dark-shot
eco-yellow
eco-red
eco-blue
eco-green
knocked
jak-red-shockwave
jak-dark-nuke
jak-dark-blackhole
emp-blast
penetrate38
penetrate39
penetrate40
penetrate41
penetrate42
penetrate43
penetrate44
penetrate45
penetrate46
penetrate47
penetrate48
penetrate49
penetrate50
penetrate51
penetrate52
penetrate53
penetrate54
penetrate55
penetrate56
penetrate57
penetrate58
penetrate59
penetrate60
penetrate61
penetrate64
penetrate63
)
:movement-gravity (meters -100)
:friction 0.9
:attack-shove-back (meters 3)
:attack-shove-up (meters 2)
:attack-mode 'shock-red
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:knocked-can-land-timeout (seconds 0.1)
:knocked-recover-timeout (seconds 2)
:ragdoll-blend-out-time (seconds 0.25)
:ragdoll-rotate-velocity-mult 1.0
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-seek-ry-clamp 6371.5557
:knocked-soft-vxz-lo 65536.0
:knocked-soft-vxz-hi 94208.0
:knocked-soft-vy-lo 77824.0
:knocked-soft-vy-hi 98304.0
:knocked-medium-vxz-lo 81920.0
:knocked-medium-vxz-hi 98304.0
:knocked-medium-vy-lo 81920.0
:knocked-medium-vy-hi 122880.0
:knocked-hard-vxz-lo 65536.0
:knocked-hard-vxz-hi 95846.4
:knocked-hard-vy-lo 122880.0
:knocked-hard-vy-hi 163840.0
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 24576.0
:knocked-red-vxz-hi 98304.0
:knocked-red-vy-lo 90112.0
:knocked-red-vy-hi 131072.0
:knocked-blue-vxz-lo 24576.0
:knocked-blue-vxz-hi 32768.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 73728.0
:ragdoll-info #f
:shadow-size (meters 2)
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:gem-joint 34
:gem-seg #x2
:gem-no-seg #x4
:gem-offset (new 'static 'sphere :y 942.08 :z 40.96 :r 163840.0)
:knocked-off #t
:callback-info #f
:use-momentum #f
:use-frustration #t
:use-stop-chase #f
:use-circling #t
:use-pacing #t
:walk-anim 8
:turn-anim 10
:run-anim 9
:taunt-anim -1
:run-travel-speed (meters 8)
:run-acceleration (meters 8)
:run-turning-acceleration (meters 20)
:walk-travel-speed (meters 2)
:walk-acceleration (meters 2)
:walk-turning-acceleration (meters 3)
:maximum-rotation-rate (degrees 360)
:notice-nav-radius (meters 7.5)
:frustration-distance (meters 8)
:frustration-time (seconds 4)
:blocked-time (seconds 0.3)
:circle-dist-lo 28672.0
:circle-dist-hi 53248.0
:nav-mesh #f
)
)
(set! (-> *neo-juicer-nav-enemy-info* fact-defaults) *fact-info-neo-juicer-defaults*)
(defmethod track-focus! ((this neo-juicer))
(let ((s3-0 (handle->process (-> this focus handle))))
(when s3-0
(let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4)))
(s5-0 (new 'stack-no-clear 'vector))
)
(set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable s3-0) 3) quad))
(let ((s3-1
(vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 4 bone transform fvec) 1.0)
)
)
(vector-! s5-0 s5-0 s4-0)
(vector-normalize! s5-0 1.0)
(quaternion-from-two-vectors-partial! (-> this joint quat) s3-1 s5-0 (-> this joint-blend))
)
)
)
)
0
(none)
)
(defmethod start-tracking ((this neo-juicer))
(cond
((-> this torso-track-player)
(set! (-> this joint-enable) #t)
(seek! (-> this joint-blend) 1.0 (* 2.0 (seconds-per-frame)))
(track-focus! this)
)
((-> this joint-enable)
(seek! (-> this joint-blend) 0.0 (* 4.0 (seconds-per-frame)))
(track-focus! this)
(if (= (-> this joint-blend) 0.0)
(set! (-> this joint-enable) #f)
)
)
)
0
(none)
)
(defmethod enemy-common-post ((this neo-juicer))
(let ((t9-0 (method-of-type nav-enemy enemy-common-post)))
(t9-0 this)
)
(los-control-method-9
(-> this los)
(the-as process-focusable (handle->process (-> this focus handle)))
(the-as vector #f)
819.2
4096.0
)
(start-tracking this)
(none)
)
(defmethod go-die-or-knocked ((this neo-juicer))
(if (and (= (-> this incoming knocked-type) (knocked-type yellow-shot))
(not (and (-> this next-state) (let ((v1-6 (-> this next-state name)))
(or (= v1-6 'knocked) (= v1-6 'jump) (= v1-6 'jump-land))
)
)
)
(zero? (rnd-int this 3))
(let ((f0-0 (vector-vector-distance-squared (-> this root trans) (target-pos 0)))
(f1-0 32768.0)
)
(>= f0-0 (* f1-0 f1-0))
)
)
(go-die this)
(go (method-of-object this knocked))
)
)
(defmethod event-handler ((this neo-juicer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('hit-flinch)
(cond
((= (-> this hit-points) 0.0)
(logclear! (-> this mask) (process-mask actor-pause))
(logclear! (-> this focus-status) (focus-status dangerous))
(logclear! (-> this enemy-flags) (enemy-flag use-notice-distance))
(logior! (-> this enemy-flags) (enemy-flag alert))
(logior! (-> this focus-status) (focus-status hit))
(if (= (-> this hit-points) 0.0)
(logior! (-> this focus-status) (focus-status dead))
)
(logclear! (-> this enemy-flags) (enemy-flag lock-focus))
(enemy-method-69 this)
(logior! (-> this enemy-flags) (enemy-flag lock-focus))
(process-contact-action arg0)
(send-event arg0 'get-attack-count 1)
(freeze-hit-begin)
(go-die-or-knocked this)
)
(else
(let ((v1-29 (ja-channel-float! (the-as art-joint-anim (-> this draw art-group data 11)) 0.0 0.0 0.0)))
(when v1-29
(set! (-> v1-29 param 0) 1.0)
(set! (-> v1-29 param 1) 0.75)
(set! (-> v1-29 param 2) 2.0)
(set! (-> v1-29 num-func) num-func-interp-play!)
)
)
)
)
#t
)
(('hit)
(logclear! (-> this mask) (process-mask actor-pause))
(logclear! (-> this focus-status) (focus-status dangerous))
(logclear! (-> this enemy-flags) (enemy-flag use-notice-distance))
(logior! (-> this enemy-flags) (enemy-flag alert))
(logior! (-> this focus-status) (focus-status hit))
(if (= (-> this hit-points) 0.0)
(logior! (-> this focus-status) (focus-status dead))
)
(logclear! (-> this enemy-flags) (enemy-flag lock-focus))
(enemy-method-69 this)
(logior! (-> this enemy-flags) (enemy-flag lock-focus))
(process-contact-action arg0)
(send-event arg0 'get-attack-count 1)
(freeze-hit-begin)
(if (= (-> this hit-points) 0.0)
(go-die-or-knocked this)
(go (method-of-object this hit))
)
#t
)
(('instant-death)
(when (< 0.0 (-> this hit-points))
(set! (-> this hit-points) 0.0)
(set! (-> this root penetrated-by) (get-penetrated-by this))
(let ((s4-0 (get-knockback-dir! this (new 'stack-no-clear 'vector))))
(vector-z-quaternion! s4-0 (-> this root quat))
(vector-float*! s4-0 s4-0 -1.0)
(vector-normalize! s4-0 1.0)
)
(logclear! (-> this mask) (process-mask actor-pause))
(logclear! (-> this focus-status) (focus-status dangerous))
(logclear! (-> this enemy-flags) (enemy-flag use-notice-distance))
(logior! (-> this enemy-flags) (enemy-flag alert))
(logior! (-> this focus-status) (focus-status hit))
(if (= (-> this hit-points) 0.0)
(logior! (-> this focus-status) (focus-status dead))
)
(logclear! (-> this enemy-flags) (enemy-flag lock-focus))
(enemy-method-69 this)
(logior! (-> this enemy-flags) (enemy-flag lock-focus))
(process-contact-action arg0)
(send-event arg0 'get-attack-count 1)
(freeze-hit-begin)
(go-die-or-knocked this)
)
#t
)
(('notify)
(if (and (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) (handle->process (-> this focus handle))))
(set! (-> this hit-focus) (the-as focus #t))
)
((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3)
)
(else
((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3)
)
)
)
(defstate active (neo-juicer)
:virtual #t
:code (behavior ()
(let ((v1-2 (ja-group)))
(when (or (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja)))
(let ((v1-8 (ja-group)))
(and v1-8 (or (= v1-8 neo-juicer-patrol0-ja) (= v1-8 neo-juicer-patrol1-ja)))
)
)
(ja-no-eval :num! (seek!))
(while (not (ja-done? 0))
(suspend)
(ja-eval)
)
)
)
(let ((f30-0 (rnd-float-range self 0.9 1.1)))
(until #f
(let ((gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* patrol-anim (rnd-int self 2) anim-index)))
(s5-0 (set-reaction-time! self 1 (seconds 0.027)))
)
(let ((v1-34 (ja-group)))
(if (not (and v1-34 (= v1-34 gp-0)))
(ja-channel-push! 1 (seconds 0.2))
)
)
(dotimes (s4-0 s5-0)
(ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
(when (zero? (rnd-int self 2))
(nav-enemy-method-182 self)
(ja-channel-push! 1 (seconds 0.3))
(let ((gp-1 0))
(until (not (enemy-method-134 self 0.4))
(let* ((v1-61 (enemy-method-131 self 3 gp-1))
(a1-15 (-> self draw art-group data (-> *neo-juicer-global-info* idle-anim v1-61 anim-index)))
)
(set! gp-1 (ash 1 v1-61))
(ja-no-eval :group! a1-15 :num! (seek! max f30-0) :frame-num 0.0)
)
(ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
(nav-enemy-method-181 self)
)
)
)
#f
)
)
(defmethod setup-jump! ((this neo-juicer) (arg0 enemy-jump-info))
((method-of-type nav-enemy setup-jump!) this arg0)
(none)
)
(defmethod go-directed2 ((this neo-juicer))
(case (-> this jump-why)
((2)
(go (method-of-object this ambush-cont))
)
(else
((method-of-type nav-enemy go-directed2) this)
)
)
)
(defstate ambush (neo-juicer)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy ambush) enter)))
(if t9-0
(t9-0)
)
)
(when (zero? (-> self intro-path))
(format 0 "ERROR: ~A has no intro path, skipping ambush~%" (-> self name))
(go-virtual notice)
)
(get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp)
)
:code (behavior ()
(set! (-> self ambush-path-pt) 1)
(until #f
(let ((gp-0 (new 'stack-no-clear 'vector)))
(get-point-in-path! (-> self intro-path) gp-0 1.0 'interp)
(set! (-> self enemy-flags)
(the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked)))
)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(let ((v1-5 (process->ppointer self)))
(set! (-> a1-1 from) v1-5)
)
(set! (-> a1-1 num-params) 2)
(set! (-> a1-1 message) 'jump)
(set! (-> a1-1 param 0) (the-as uint 2))
(set! (-> a1-1 param 1) (the-as uint gp-0))
(send-event-function self a1-1)
)
)
(suspend)
)
#f
)
)
(defstate ambush-cont (neo-juicer)
:virtual #t
:event enemy-event-handler
:code (behavior ()
(let ((a0-0 (-> self intro-path))
(v1-1 (+ (-> self ambush-path-pt) 1))
)
(if (< v1-1 (-> a0-0 curve num-cverts))
(set! (-> self ambush-path-pt) v1-1)
(go-best-state self)
)
)
(until #f
(let ((gp-0 (new 'stack-no-clear 'vector)))
(get-point-in-path! (-> self intro-path) gp-0 (the float (-> self ambush-path-pt)) 'interp)
(set! (-> self enemy-flags)
(the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked)))
)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(let ((v1-9 (process->ppointer self)))
(set! (-> a1-1 from) v1-9)
)
(set! (-> a1-1 num-params) 2)
(set! (-> a1-1 message) 'jump)
(set! (-> a1-1 param 0) (the-as uint 2))
(set! (-> a1-1 param 1) (the-as uint gp-0))
(send-event-function self a1-1)
)
)
(suspend)
)
#f
)
)
(defstate notice (neo-juicer)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.075))
(let ((s5-0 0))
(let ((s4-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))
(gp-1 (vector-!
(new 'stack-no-clear 'vector)
(get-trans (the-as process-focusable (handle->process (-> self focus handle))) 0)
(-> self root trans)
)
)
)
(vector-flatten! gp-1 gp-1 (-> s4-0 uvec))
(vector-normalize! gp-1 1.0)
(cond
((< (vector-dot gp-1 (-> s4-0 fvec)) (cos 8192.0))
)
(else
(set! s5-0 (logior s5-0 1))
)
)
)
(let ((f30-1 (rnd-float-range self 0.8 1.2))
(gp-2 (new 'stack-no-clear 'vector))
)
(let* ((a0-13 (enemy-method-131 self 2 s5-0))
(a1-8 (-> self draw art-group data (-> *neo-juicer-global-info* notice-anim a0-13 anim-index)))
)
(ja-no-eval :group! a1-8 :num! (seek! max f30-1) :frame-num 0.0)
)
(until (ja-done? 0)
(let ((a1-9 (-> self nav state)))
(set! (-> gp-2 quad) (-> a1-9 travel quad))
)
(seek-toward-heading-vec! (-> self root) gp-2 (-> self nav max-rotation-rate) (seconds 0.02))
(suspend)
(ja :num! (seek! max f30-1))
)
)
)
(go-best-state self)
)
)
(defstate victory (neo-juicer)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.15))
(let ((gp-1 (-> self draw art-group data (-> *neo-juicer-global-info* celebrate-anim (rnd-int self 2) anim-index)))
(f30-0 (rnd-float-range self 0.9 1.1))
)
(ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(go-best-state self)
)
)
(defstate hostile (neo-juicer)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) enter)))
(if t9-0
(t9-0)
)
)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) exit)))
(if t9-0
(t9-0)
)
)
)
:code (behavior ()
(let ((v1-2 (ja-group)))
(when (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja)))
(ja-no-eval :num! (seek!))
(while (not (ja-done? 0))
(suspend)
(ja-eval)
)
)
)
(let* ((v1-16 (rnd-int self 2))
(gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* charge-anim v1-16 anim-index)))
)
(set! (-> self charge-index) v1-16)
(let ((v1-19 (ja-group)))
(if (not (and v1-19 (= v1-19 gp-0)))
(ja-channel-push! 1 (seconds 0.2))
)
)
(set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-0))
)
(ja :num-func num-func-identity :frame-num 0.0)
(let ((f30-0 (rnd-float-range self 0.9 1.1)))
(until #f
(suspend)
(ja :num! (loop! f30-0))
)
)
#f
)
:post (behavior ()
(let ((a0-1 (handle->process (-> self focus handle))))
(when a0-1
(let* ((gp-0 (get-trans (the-as process-focusable a0-1) 1))
(f0-0 (vector-vector-xz-distance (-> self root trans) gp-0))
)
(let ((v1-8 (-> self nav state)))
(logclear! (-> v1-8 flags) (nav-state-flag directional-mode))
(logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty))
(set! (-> v1-8 target-pos quad) (-> gp-0 quad))
)
0
(if (and (>= 53248.0 f0-0) (should-check-los? (-> self los) 0) (get-focus! self))
(go-virtual attack)
)
)
)
)
(nav-enemy-travel-post)
)
)
(defmethod get-focus! ((this neo-juicer))
(let* ((t9-0 (method-of-type nav-enemy get-focus!))
(v1-1 (t9-0 this))
)
(if (and v1-1 (time-elapsed? (-> this last-fire-time) (seconds 7)))
v1-1
)
)
)
(defbehavior neo-juicer-face-player-post neo-juicer ()
(let ((gp-0 (handle->process (-> self focus handle))))
(when (and (nav-enemy-method-186 self) gp-0)
(let ((f0-1
(fabs
(deg-diff
(quaternion-y-angle (-> self root quat))
(vector-y-angle
(vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable gp-0) 0) (-> self root trans))
)
)
)
)
)
(cond
((or (< 5461.3335 f0-1) (and (-> self using-turn-anim) (< 910.2222 f0-1)))
(set! (-> self using-turn-anim) #t)
(seek-to-point-toward-point!
(-> self root)
(get-trans (the-as process-focusable gp-0) 0)
(-> self nav max-rotation-rate)
(seconds 0.2)
)
)
(else
(set! (-> self using-turn-anim) #f)
)
)
)
)
)
(nav-enemy-simple-post)
0
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod spawn-proj! ((this neo-juicer) (arg0 process-focusable) (arg1 uint))
(with-pp
(let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 20)))
(s5-0 (new 'stack-no-clear 'projectile-init-by-other-params))
)
(when (not (handle->process (-> this current-projectile)))
(set! (-> s5-0 ent) (-> this entity))
(set! (-> s5-0 charge) 1.0)
(set! (-> s5-0 options) (projectile-options))
(logclear! (-> s5-0 options) (projectile-options po14 po15 po16))
(set! (-> s5-0 notify-handle) (process->handle this))
(set! (-> s5-0 owner-handle) (the-as handle #f))
(set! (-> s5-0 target-handle) (the-as handle #f))
(set! (-> s5-0 target-pos quad) (the-as uint128 0))
(set! (-> s5-0 ignore-handle) (process->handle this))
(set! (-> s5-0 attack-id) arg1)
(set! (-> s5-0 timeout) (seconds 4))
)
(vector-normalize! (vector-! (-> s5-0 pos) (get-trans arg0 3) s4-0) 1.0)
(vector-float*! (-> s5-0 vel) (-> s5-0 pos) (* 24576.0 (-> pp clock frames-per-second)))
(vector+float*! (-> s5-0 pos) s4-0 (-> s5-0 pos) -1024.0)
(let ((a0-21 (handle->process (-> this current-projectile))))
(if a0-21
(send-event a0-21 'reset s5-0)
(set! (-> this current-projectile)
(ppointer->handle (spawn-projectile neo-juicer-shot s5-0 this *default-dead-pool*))
)
)
)
)
(none)
)
)
(defstate attack (neo-juicer)
:virtual #t
:event enemy-event-handler
:enter (behavior ()
(let ((v1-1 (-> self nav state))
(a0-1 (-> self root trans))
)
(logclear! (-> v1-1 flags) (nav-state-flag directional-mode))
(logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty))
(set! (-> v1-1 target-pos quad) (-> a0-1 quad))
)
0
(set! (-> self torso-track-player) (the-as joint-mod #t))
(logior! (-> self enemy-flags) (enemy-flag lock-focus))
(set! (-> self hit-focus) #f)
(logior! (-> self focus-status) (focus-status dangerous))
(let* ((v1-9 *game-info*)
(v0-0 (+ (-> v1-9 attack-id) 1))
)
(set! (-> v1-9 attack-id) v0-0)
(set! (-> self attack-id) v0-0)
)
)
:exit (behavior ()
(set! (-> self torso-track-player) #f)
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
(toggle-deadly-flag self #f)
(set-time! (-> self last-fire-time))
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
(logior! (-> self focus-status) (focus-status dangerous))
(logclear! (-> self focus-status) (focus-status dangerous))
)
(send-event (handle->process (-> self current-projectile)) 'die)
)
:trans (behavior ()
'()
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! neo-juicer-attack0-start-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (< 11.0 (ja-aframe-num 0))
(toggle-deadly-flag self #t)
)
(suspend)
(ja :num! (seek!))
)
0
(let* ((gp-0 #f)
(v1-29 *game-info*)
(s5-0 (+ (-> v1-29 attack-id) 1))
)
(set! (-> v1-29 attack-id) s5-0)
(let ((s4-0 (current-time)))
(until (time-elapsed? s4-0 (seconds 0.25))
(ja-no-eval :group! neo-juicer-attack0-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(let ((s3-0 (handle->process (-> self focus handle))))
(when s3-0
(when (< 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable s3-0) 0)))
(spawn-proj! self (the-as process-focusable s3-0) s5-0)
(current-time)
(if (not gp-0)
(set! gp-0 #t)
)
)
)
)
(if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory))
(go-virtual victory)
)
(b!
(not (and (-> self using-turn-anim) (let ((v1-73 (ja-group)))
(not (and v1-73 (= v1-73 neo-juicer-attack-turn-ja)))
)
)
)
cfg-31
:delay (empty-form)
)
(ja-channel-push! 1 (seconds 0.05))
(ja :group! neo-juicer-attack-turn-ja)
(b! #t cfg-42 :delay (nop!))
(label cfg-31)
(when (and (not (-> self using-turn-anim)) (let ((v1-84 (ja-group)))
(not (and v1-84 (= v1-84 neo-juicer-attack0-ja)))
)
)
(ja-channel-push! 1 (seconds 0.05))
(ja :group! neo-juicer-attack0-ja)
)
(label cfg-42)
(suspend)
(ja :num! (seek!))
)
(send-event (handle->process (-> self current-projectile)) 'die)
(let ((a0-37 (handle->process (-> self focus handle))))
(when a0-37
(if (>= 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-37) 0)))
(go-virtual circling)
)
)
)
(suspend)
)
)
)
(if (-> self hit-focus)
(go-virtual victory)
)
(go-hostile self)
)
:post neo-juicer-face-player-post
)
(defstate circling (neo-juicer)
:virtual #t
:code (behavior ()
(let ((v1-2 (ja-group)))
(when (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja)))
(ja-no-eval :num! (seek!))
(while (not (ja-done? 0))
(suspend)
(ja-eval)
)
)
)
(until #f
(nav-enemy-method-181 self)
(nav-enemy-method-183 self)
(nav-enemy-method-177 self)
(let* ((v1-22 (rnd-int self 2))
(gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* charge-anim v1-22 anim-index)))
)
(set! (-> self charge-index) v1-22)
(let ((v1-25 (ja-group)))
(if (not (and v1-25 (= v1-25 gp-0)))
(ja-channel-push! 1 (seconds 0.15))
)
)
(let ((s5-0 (+ (rnd-int self 6) 2))
(f30-0 (rnd-float-range self 0.9 1.1))
)
(while (nonzero? s5-0)
(+! s5-0 -1)
(ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
)
(when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)))
(nav-enemy-method-182 self)
(nav-enemy-method-184 self)
(vector-reset! (-> self root transv))
(ja-channel-push! 1 (seconds 0.1))
(let ((gp-2 (-> self draw art-group data (-> *neo-juicer-global-info* celebrate-anim (rnd-int self 2) anim-index)))
(f30-2 (rnd-float-range self 0.9 1.1))
)
(ja-no-eval :group! gp-2 :num! (seek! max f30-2) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-2))
)
)
)
)
#f
)
)
(defstate hit (neo-juicer)
:virtual #t
:code (behavior ()
(local-vars (v1-37 enemy-flag) (v1-39 enemy-flag) (v1-41 enemy-flag))
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (rnd-float-range self 0.9 1.1)))
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info hit-anim))
:num! (seek! max f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
(logior! (-> self focus-status) (focus-status dangerous))
(logclear! (-> self focus-status) (focus-status dangerous))
)
(let ((v1-36 (-> self enemy-flags)))
(if (logtest? v1-36 (enemy-flag vulnerable-backup))
(set! v1-37 (logior v1-36 (enemy-flag vulnerable)))
(set! v1-37 (logclear v1-36 (enemy-flag vulnerable)))
)
)
(set! (-> self enemy-flags) v1-37)
(let ((v1-38 (-> self enemy-flags)))
(if (logtest? v1-38 (enemy-flag attackable-backup))
(set! v1-39 (logior v1-38 (enemy-flag attackable)))
(set! v1-39 (logclear v1-38 (enemy-flag attackable)))
)
)
(set! (-> self enemy-flags) v1-39)
(let ((v1-40 (-> self enemy-flags)))
(if (logtest? (enemy-flag trackable-backup) v1-40)
(set! v1-41 (logior (enemy-flag trackable) v1-40))
(set! v1-41 (logclear v1-40 (enemy-flag trackable)))
)
)
(set! (-> self enemy-flags) v1-41)
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
(logclear! (-> self focus-status) (focus-status hit))
(go-virtual hostile)
)
)
(defstate stare (neo-juicer)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 1))
(let ((f30-0 (rnd-float-range self 0.9 1.1))
(gp-0 (-> self draw art-group data (-> self enemy-info idle-anim)))
)
(until #f
(ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
#f
)
)
(defstate taunt (neo-juicer)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.6))
(let ((f30-0 (rnd-float-range self 0.8 1.2)))
(let ((gp-0 (set-reaction-time! self (seconds 0.2) (seconds 0.7)))
(s5-0 (current-time))
(f28-0 f30-0)
)
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim))
:num! (loop! f28-0)
:frame-num 0.0
)
(until (time-elapsed? s5-0 gp-0)
(suspend)
(ja :num! (loop! f28-0))
)
)
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info taunt-anim))
:num! (seek! max f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(go-virtual stare)
)
)
(defmethod knocked-anim ((this neo-juicer) (arg0 enemy-knocked-info))
(local-vars (a2-2 int))
(case (-> this incoming knocked-type)
(((knocked-type yellow-shot))
(ja-channel-push! 1 0)
(let* ((a2-0 (ash 1 (-> *neo-juicer-global-info* prev-yellow-hit)))
(v1-3 (enemy-method-131 this 4 a2-0))
(a1-6 (-> this draw art-group data (-> *neo-juicer-global-info* yellow-hit-anim v1-3 anim-index)))
)
(set! (-> *neo-juicer-global-info* prev-yellow-hit) v1-3)
(let ((a0-13 (-> this skel root-channel 0)))
(set! (-> a0-13 frame-group) (the-as art-joint-anim a1-6))
(set! (-> a0-13 param 0) (the float (+ (-> (the-as art-joint-anim a1-6) frames num-frames) -1)))
(set! (-> a0-13 param 1) (-> arg0 anim-speed))
(set! (-> a0-13 frame-num) 0.0)
(joint-control-channel-group! a0-13 (the-as art-joint-anim a1-6) num-func-seek!)
)
)
)
(((knocked-type blue-shot))
(let ((v1-11 (ash 1 (-> *neo-juicer-global-info* prev-blue-hit))))
(if (zero? (-> this charge-index))
(set! a2-2 (logior v1-11 56))
(set! a2-2 (logior v1-11 7))
)
)
(let* ((v1-15 (enemy-method-131 this 6 a2-2))
(s5-1 (-> this draw art-group data (-> *neo-juicer-global-info* blue-hit-anim v1-15 anim-index)))
)
(set! (-> *neo-juicer-global-info* prev-blue-hit) v1-15)
(let ((v1-18 (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
)
)
(if (and v1-18 (= v1-18 (-> this draw art-group data 32)))
(ja-channel-push! 1 (seconds 0.17))
(ja-channel-push! 1 (seconds 0.02))
)
)
(let ((a0-32 (-> this skel root-channel 0)))
(set! (-> a0-32 frame-group) (the-as art-joint-anim s5-1))
(set! (-> a0-32 param 0) (the float (+ (-> (the-as art-joint-anim s5-1) frames num-frames) -1)))
(set! (-> a0-32 param 1) 1.0)
(set! (-> a0-32 frame-num) 0.0)
(joint-control-channel-group! a0-32 (the-as art-joint-anim s5-1) num-func-seek!)
)
)
)
(else
(let ((s4-1 (-> this draw art-group data (-> *neo-juicer-global-info* knocked-anim (rnd-int this 2) anim-index))))
(ja-channel-push! 1 (seconds 0.17))
(let ((a0-37 (-> this skel root-channel 0)))
(set! (-> a0-37 frame-group) (the-as art-joint-anim s4-1))
(set! (-> a0-37 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1)))
(set! (-> a0-37 param 1) (-> arg0 anim-speed))
(set! (-> a0-37 frame-num) 0.0)
(joint-control-channel-group! a0-37 (the-as art-joint-anim s4-1) num-func-seek!)
)
)
)
)
#t
)
(defmethod knocked-land-anim ((this neo-juicer) (arg0 enemy-knocked-info))
(cond
((= (-> this incoming knocked-type) (knocked-type blue-shot))
(when (>= (-> this incoming blue-juggle-count) (the-as uint 2))
(let ((s4-0 (-> this draw art-group data 32)))
(ja-channel-push! 1 (seconds 0.17))
(let ((a0-3 (-> this skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0))
(set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) frames num-frames) -1)))
(set! (-> a0-3 param 1) (-> arg0 anim-speed))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim s4-0) num-func-seek!)
)
)
#t
)
)
((!= (-> this incoming knocked-type) (knocked-type yellow-shot))
(let* ((v1-14 (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
)
(s4-1 (if (and v1-14 (= v1-14 (-> this draw art-group data 18)))
(-> this draw art-group data 19)
(-> this draw art-group data 17)
)
)
)
(ja-channel-push! 1 (seconds 0.17))
(let ((a0-10 (-> this skel root-channel 0)))
(set! (-> a0-10 frame-group) (the-as art-joint-anim s4-1))
(set! (-> a0-10 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1)))
(set! (-> a0-10 param 1) (-> arg0 anim-speed))
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group! a0-10 (the-as art-joint-anim s4-1) num-func-seek!)
)
)
#t
)
)
)
;; WARN: Return type mismatch symbol vs none.
(defmethod toggle-deadly-flag ((this neo-juicer) (arg0 symbol))
(let ((v1-1 (-> this root root-prim)))
(dotimes (a0-1 (the-as int (-> v1-1 specific 0)))
(let ((a2-1 (-> (the-as collide-shape-prim-group v1-1) child a0-1)))
(if arg0
(logior! (-> a2-1 prim-core action) (collide-action deadly))
(logclear! (-> a2-1 prim-core action) (collide-action deadly))
)
)
)
)
(none)
)
(defmethod enemy-method-108 ((this neo-juicer) (arg0 process-focusable))
(focus-test? arg0 invulnerable)
)
(defmethod init-enemy-collision! ((this neo-juicer))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate
generic-attack
lunge
flop
punch
spin
roll
uppercut
bonk
tube
flut-attack
board
mech-punch
dark-punch
dark-smack
flut
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0)))
(set! (-> s5-0 total-prims) (the-as uint 8))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker))
(set! (-> s4-0 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon))
(set! (-> s4-0 transform-index) 21)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 -4096.0 18432.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-14 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-14 prim-core action) (collide-action solid no-standon))
(set-vector! (-> v1-14 local-sphere) 0.0 6144.0 0.0 6144.0)
)
(let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-16 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-16 prim-core action) (collide-action solid))
(set! (-> v1-16 transform-index) 6)
(set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 6144.0)
)
(let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-18 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-18 prim-core action) (collide-action solid))
(set! (-> v1-18 transform-index) 16)
(set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 2048.0)
)
(let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-20 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-20 prim-core action) (collide-action solid))
(set! (-> v1-20 transform-index) 11)
(set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 2048.0)
)
(let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-22 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-22 prim-core action) (collide-action solid))
(set! (-> v1-22 transform-index) 34)
(set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 2048.0)
)
(let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-24 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-24 prim-core action) (collide-action solid))
(set! (-> v1-24 transform-index) 20)
(set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 2048.0)
)
(let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-26 prim-core collide-as) (collide-spec los-blocker))
(set! (-> v1-26 prim-core action) (collide-action solid))
(set-vector! (-> v1-26 local-sphere) 0.0 8192.0 0.0 8192.0)
)
(set! (-> s5-0 nav-radius) 8192.0)
(let ((v1-28 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-28 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-28 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> this root) s5-0)
)
0
(none)
)
(defmethod relocate ((this neo-juicer) (offset int))
(if (nonzero? (-> this intro-path))
(&+! (-> this intro-path) offset)
)
(if (nonzero? (-> this joint))
(&+! (-> this joint) offset)
)
(call-parent-method this offset)
)
(defmethod init-enemy! ((this neo-juicer))
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-neo-juicer" (the-as (pointer level) #f)))
(the-as pair 0)
)
(init-enemy-defaults! this *neo-juicer-nav-enemy-info*)
(let ((v1-5 (-> this neck)))
(set! (-> v1-5 up) (the-as uint 1))
(set! (-> v1-5 nose) (the-as uint 2))
(set! (-> v1-5 ear) (the-as uint 0))
(set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0)
(set! (-> v1-5 ignore-angle) 30947.555)
)
(let ((v1-7 (-> this nav)))
(set! (-> v1-7 speed-scale) 1.0)
)
0
(set-gravity-length (-> this root dynam) 573440.0)
(set! (-> this last-fire-time) 0)
(set! (-> this heading) (if (rand-vu-percent? 0.5)
#t
#f
)
)
(set! (-> this move-angle) 5461.3335)
(set! (-> this torso-track-player) #f)
(init-los! (-> this los) this (seconds 0.2) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker))
(set! (-> this joint) (new 'process 'joint-mod (joint-mod-mode polar-look-at) this 5))
(set! (-> this using-turn-anim) #f)
(let ((v1-18 (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t)))
(set! (-> this intro-path) v1-18)
(if (nonzero? v1-18)
(logior! (-> v1-18 flags) (path-control-flag display draw-line draw-point draw-text))
)
)
(add-connection
*part-engine*
this
34
this
468
(new 'static 'vector :x 901.12 :y -1146.88 :z 1269.76 :w 163840.0)
)
(add-connection
*part-engine*
this
34
this
468
(new 'static 'vector :x -901.12 :y -1146.88 :z 1269.76 :w 163840.0)
)
(add-connection *part-engine* this 20 this 5005 (new 'static 'vector :w 163840.0))
(set! (-> this root pause-adjust-distance) 81920.0)
(set! (-> this current-projectile) (the-as handle #f))
0
(none)
)