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

;; name: palent-part.gc
;; name in dgo: palent-part
;; dgos: PAE

;; DECOMP BEGINS

(deftype palent-part (part-spawner)
  ()
  )


(defpartgroup group-palent-yellow-light
  :id 1129
  :flags (unk-4)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 4887 :fade-after (meters 160) :flags (bit6 bit7))
    (sp-item 4888 :fade-after (meters 180) :flags (bit6 bit7))
    )
  )

(defpart 4887
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:y (meters -1))
    (:scale-x (meters 3) (meters 0.1))
    (:rot-x (degrees 4.5))
    (:rot-z (degrees 17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 0.0 32.0)
    (:a 20.0 4.0)
    (:omega (degrees 3615.75))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    (:rotate-y (degrees 0))
    )
  )

(defpart 4888
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:y (meters -1))
    (:scale-x (meters 12) (meters 0.1))
    (:rot-x (degrees 4.5))
    (:rot-z (degrees 17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 0.0 32.0)
    (:a 8.0)
    (:omega (degrees 4061.25))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-palent-yellow-up-light
  :id 1130
  :bounds (static-bspherem 0 0 0 4)
  :parts ((sp-item 4889 :flags (is-3d bit6)) (sp-item 4890 :fade-after (meters 80) :flags (bit6)))
  )

(defpart 4889
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:y (meters 0))
    (:scale-x (meters 4))
    (:rot-x (degrees 0))
    (:scale-y (meters 4))
    (:r 255.0)
    (:g 255.0)
    (:b 128.0 32.0)
    (:a 4.0 2.0)
    (:timer (seconds 0.05))
    (:flags (sp-cpuinfo-flag-3))
    )
  )

(defpart 4890
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:y (meters 0.05))
    (:scale-x (meters 3) (meters 0.1))
    (:rot-x (degrees 4.5))
    (:rot-z (degrees 17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 128.0 32.0)
    (:a 8.0 2.0)
    (:omega (degrees 1815.7499))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 0.0)
    )
  )

(defpartgroup group-pal-grind-ring-energy
  :id 1131
  :bounds (static-bspherem 0 0 0 10)
  :parts ((sp-item 4891 :flags (is-3d bit6)))
  )

(defpart 4891
  :init-specs ((:texture (water-ring effects))
    (:num 0.075)
    (:y (meters 0))
    (:scale-x (meters 1))
    (:rot-x (degrees 0))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 0.0)
    (:b 128.0 32.0)
    (:a 225.0)
    (:scalevel-x (meters 0.16666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -1.0)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-3))
    )
  )

(defpartgroup group-pal-grind-ring-explode
  :id 1132
  :duration (seconds 2)
  :linger-duration (seconds 1)
  :flags (use-local-clock unk-6)
  :bounds (static-bspherem 0 0 0 8)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4892 :flags (bit6) :period (seconds 3) :length (seconds 0.017))
    (sp-item 4893 :flags (bit6) :period (seconds 3) :length (seconds 0.017))
    (sp-item 4894 :period (seconds 3) :length (seconds 0.05))
    (sp-item 4895 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10)
    (sp-item 4896 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20)
    )
  )

(defpart 4893
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:scale-x (meters 2))
    (:rot-x (degrees 11.25))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 48.0)
    (:scalevel-x (meters 0.13333334))
    (:rotvel-z (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -8.5)
    (:fade-g -2.1333334)
    (:fade-b 0.0)
    (:fade-a 0.0)
    (:timer (seconds 0.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
    (:next-time (seconds 0.25))
    (:next-launcher 4897)
    )
  )

(defpart 4897
  :init-specs ((:scalevel-x (meters 0))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.0)
    (:fade-g -2.6133332)
    (:fade-b -1.7066667)
    (:fade-a -0.64)
    )
  )

(defpart 4896
  :init-specs ((:texture (explosion-nebula effects))
    (:birth-func 'birth-func-texture-group)
    (:num 4.0 0.2)
    (:scale-x (meters 1) (meters 1))
    (:rot-z (degrees 0))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 32.0 32.0)
    (:vel-y (meters 0.02) (meters 0.01))
    (:scalevel-x (meters 0.4) (meters 0.2))
    (:rotvel-z (degrees -0.12) (degrees 0.24))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -4.24)
    (:fade-g -0.36)
    (:fade-b 0.0)
    (:fade-a -0.22068965)
    (:friction 0.95)
    (:timer (seconds 3.335))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #xc00000 #xc03300))
    (:next-time (seconds 0.117))
    (:next-launcher 4898)
    (:conerot-x (degrees 0) (degrees 360))
    )
  )

(defpart 4898
  :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 4899))
  )

(defpart 4899
  :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -2.64)
    (:fade-g -2.36)
    (:fade-b -0.44)
    (:next-time (seconds 0.117) (seconds 0.047))
    (:next-launcher 4900)
    )
  )

(defpart 4900
  :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.13076924)
    (:fade-g -0.9846154)
    (:fade-b -1.0230769)
    (:fade-a -0.06545454 -0.06545454)
    (:next-time (seconds 0.335) (seconds 0.097))
    (:next-launcher 4901)
    )
  )

(defpart 4901
  :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.225))
  )

(defpart 4892
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:scale-x (meters 5))
    (:rot-x (degrees 11.25))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 255.0)
    (:b 255.0)
    (:a 96.0)
    (:scalevel-x (meters 0.6666667))
    (:rotvel-z (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -2.56)
    (:fade-g -1.28)
    (:fade-b 0.0)
    (:fade-a 0.0)
    (:timer (seconds 0.217))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:next-time (seconds 0.1))
    (:next-launcher 4902)
    )
  )

(defpart 4902
  :init-specs ((:scalevel-x (meters -0.2857143))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.0)
    (:fade-g -3.6571429)
    (:fade-b 0.0)
    (:fade-a -2.7428572)
    )
  )

(defpart 4894
  :init-specs ((:texture (bigpuff effects))
    (:num 12.0 1.0)
    (:x (meters 0) (meters 0.6))
    (:scale-x (meters 2.5) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 70.0 20.0)
    (:g :copy r)
    (:b :copy g)
    (:a 0.0 40.0)
    (:vel-y (meters 0) (meters 0.1))
    (:scalevel-x (meters 0.1) (meters 0.02))
    (:rotvel-z (degrees -0.12) (degrees 0.24))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.98)
    (:fade-g 3.12)
    (:fade-b 3.3)
    (:fade-a 1.76)
    (:friction 0.88)
    (:timer (seconds 2.367))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:next-time (seconds 0.117) (seconds 0.047))
    (:next-launcher 4903)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4903
  :init-specs ((:scalevel-x (meters 0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -2.2)
    (:fade-g -1.9666667)
    (:fade-b -0.53333336)
    (:fade-a -0.41666666)
    (:next-time (seconds 0.15) (seconds 0.047))
    (:next-launcher 4904)
    )
  )

(defpart 4904
  :init-specs ((:scalevel-x (meters 0))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.028333334)
    (:fade-g -0.21333334)
    (:fade-b -0.38833332)
    (:fade-a -0.38833332)
    )
  )

(defpart 4895
  :init-specs ((:texture (flamingstick effects))
    (:num 8.0 2.0)
    (:scale-x (meters 0.4) (meters 0.5))
    (:rot-x 4)
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.2) (meters 0.1))
    (:r 64.0)
    (:g 96.0)
    (:b 128.0 128.0)
    (:a 64.0 64.0)
    (:scalevel-x (meters 0.4) (meters 0.02))
    (:fade-r 3.2)
    (:fade-g 1.6)
    (:fade-a -1.6)
    (:timer (seconds 0.3))
    (:flags (sp-cpuinfo-flag-2))
    )
  )

(defun palent-deactivate ()
  "Sets [[palshaft.bigmap-id]] to `20`"
  (set! (-> palshaft bigmap-id) (bigmap-id city))
  0
  (none)
  )

(defun palent-activate ()
  "Sets [[palshaft.bigmap-id]] to `12`"
  (set! (-> palshaft bigmap-id) (bigmap-id palent))
  0
  (none)
  )
