home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / VDUKE / MAG_HAND.ZIP / MAG_GAME.CON < prev    next >
Text File  |  1998-06-24  |  156KB  |  8,692 lines

  1. /*
  2. --------------------------------------------------------------------------------
  3. Duke Nukem 3D Version 1.4
  4. By Todd Replogle
  5. (c) 1996 3D Realms Entertainment
  6. --------------------------------------------------------------------------------
  7.  
  8. IMPORTANT NOTICE IF YOU USE MODIFIED .CON FILES
  9.  
  10. If you are playing a MULTIPLAY game (Dukematch or Co-op) and you are
  11. using *modified* .CON files (USER.CON, GAME.CON, DEFS.CON), then each
  12. multiplayer must be using the EXACT SAME .CON files, or the game might
  13. get out of sync and/or develop interesting problems.
  14.  
  15. 3D Realms encourages you to experiment freely with the parameters
  16. contained in this file, and to share your discoveries with the rest
  17. of the world.  However, BE ADVISED that 3D Realms does NOT offer 
  18. any technical support on how to use this file or other user-modifiable 
  19. features of this game.  Do NOT call 3D Realms or Apogee Software 
  20. for advice or help with this subject.  
  21.  
  22. You make modifications to this and other files at your own risk. 
  23. It is recommended that you first make a backup copy of this, or
  24. any .CON files before making any changes.
  25. --------------------------------------------------------------------------------
  26. */
  27.  
  28. include MAG_DEFS.CON
  29. include MAG_USER.CON
  30.  
  31. action ANULLACTION 0
  32.  
  33. // Below is example code that ADDS enemies/items in Duke Nukem 3D.
  34.  
  35. // "MYENEMY" is simply a three-framed object bouncing around in random angles
  36. // mindlessly shooting the freeze weapon towards at closest player.
  37. /*
  38. define MYENEMY 3590            // A position in .art file
  39. define MYENEMY_NORMAL_STRENGTH   100
  40. define MYENEMY_TOUGHER_STRENGTH  200
  41. define MYENEMY_DAMAGE_TO_PLAYER  -20
  42.  
  43. definesound MYENEMY_ROAM   my_eroam.voc   0 0 0 0 0
  44. definesound MYENEMY_HURT   my_ehurt.voc   0 0 0 0 0
  45. definesound MYENEMY_DEAD   my_edead.voc   0 0 0 0 0
  46. definesound MYENEMY_SHOOT  my_eshot.voc   0 0 0 0 0
  47.  
  48. action MYENEMY_ANIMATIONS  0  3  1  1  4
  49. move MYENEMY_SPEEDS 64
  50.  
  51. ai AIMYENEMY_BOUNCE   MYENEMY_ANIMATIONS MYENEMY_SPEEDS geth randomangle
  52.  
  53. useractor enemy MYENEMY
  54.  
  55.   ifai NO           // 'NO' is defined as '0'
  56.   {               // Prepare(Initialize) MyEnemy for battle...
  57.  
  58.     // Give 'MYENEMY' strength.  If it
  59.     // has a palette lookup other than
  60.     // 0, make it twice as strong!
  61.  
  62.     ifspritepal 0
  63.       strength MYENEMY_NORMAL_STRENGTH
  64.     else
  65.       strength MYENEMY_TOUGHER_STRENGTH
  66.  
  67.     sizeat 48 48      // Set the size of your actor
  68.  
  69.     cstator 257         // Force actor to block
  70.  
  71.     ai AIMYENEMY_BOUNCE   // Make it go!
  72.  
  73.   }
  74.  
  75.   ifrnd 8
  76.   {
  77.  
  78.     // Used with keyword 'shoot'.
  79.     // BLOODSPLAT1 ,BLOODSPLAT2 ,BLOODSPLAT3 ,BLOODSPLAT4 ,KNEE ,
  80.     // SHOTSPARK1 ,SHOTGUN ,CHAINGUN ,FIRELASER ,SPIT ,COOLEXPLOSION1 ,
  81.     // FREEZEBLAST ,RPG ,HANDHOLDINGLASER ,BOUNCEMINE ,MORTER ,SHRINKER
  82.     // GROWSPARK
  83.  
  84.     shoot FREEZEBLAST
  85.  
  86.  
  87.     // A sound effect to play for the shooting action.
  88.  
  89.     sound MYENEMY_SHOOT
  90.   }
  91.  
  92.   ifcount 48   // if after about a second and a half and...
  93.     ifrnd 16   // if a random value between 0-255 is less than 16...
  94.       ai AIMYENEMY_BOUNCE // reset everything, including all counters
  95.  
  96.   ifpdistl 1024
  97.     ifrnd 16
  98.   {
  99.     sound DUKE_GRUNT
  100.     palfrom 24 24
  101.     addphealth MYENEMY_DAMAGE_TO_PLAYER
  102.   }
  103.  
  104.   ifhitweapon         // Was it hit by a weapon?
  105.   {
  106.     debris SCRAP1 2       // OUCH!  Make some peices fall off
  107.  
  108.     ifdead          // Is it dead yet?
  109.     {             // If so, then...
  110.       addkills 1        //   Add 1 kill to player score
  111.       spawn EXPLOSION2      //   Make an explosion
  112.       sound MYENEMY_DEAD    //   The sound of death
  113.  
  114.                     // Damage anything within a close distance.
  115.       hitradius 2048 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  116.       killit          //   Delete sprite (CODE ABORTS HERE)
  117.     }
  118.  
  119.     sound MYENEMY_HURT    // No?, Make a hurt sound instead
  120.   }
  121. enda
  122. */
  123.  
  124.  
  125.  
  126. define SPACESHUTTLE 487
  127. move SHUTTLEVELS 16
  128. actor SPACESHUTTLE TOUGH
  129. //  ifmove 0          //  Init once
  130. //    move SHUTTLEVELS getv geth
  131. enda
  132.  
  133.  
  134. actor SATELLITE TOUGH
  135.   //  ifmove 0 move SHUTTLEVELS getv geth
  136.   //  ifcount 120 move SHUTTLEVELS getv geth randomangle
  137. enda
  138.  
  139. state jib_sounds
  140.   ifrnd SWEARFREQUENCY
  141.   {
  142.     ifrnd 128
  143.     {
  144.       ifrnd 128
  145.       {
  146.         ifrnd 128
  147.         {
  148.           ifrnd 128
  149.           {
  150.             ifrnd 128
  151.               globalsound JIBBED_ACTOR12
  152.             else
  153.               globalsound JIBBED_ACTOR1
  154.           }
  155.           else
  156.           {
  157.             ifrnd 128
  158.               globalsound JIBBED_ACTOR9
  159.             else
  160.               globalsound JIBBED_ACTOR14
  161.           }
  162.         }
  163.         else
  164.         {
  165.           ifrnd 128
  166.             globalsound SMACKED
  167.           else
  168.             globalsound JIBBED_ACTOR2
  169.         }
  170.       }
  171.       else
  172.       {
  173.         ifrnd 128
  174.           globalsound MDEVSPEECH
  175.         else
  176.           globalsound JIBBED_ACTOR5
  177.       }
  178.     }
  179.     else
  180.     {
  181.       ifrnd 128
  182.       {
  183.         ifrnd 128
  184.         {
  185.           ifrnd 128
  186.             globalsound JIBBED_ACTOR11
  187.           else
  188.             globalsound JIBBED_ACTOR13
  189.         }
  190.         else
  191.         {
  192.           ifrnd 128
  193.             globalsound JIBBED_ACTOR3
  194.           else
  195.             globalsound JIBBED_ACTOR8
  196.         }
  197.       }
  198.       else
  199.       {
  200.         ifrnd 128
  201.         {
  202.           ifrnd 128
  203.             globalsound JIBBED_ACTOR6
  204.           else
  205.             globalsound JIBBED_ACTOR4
  206.         }
  207.         else
  208.         {
  209.           ifrnd 128
  210.           {
  211.             ifrnd 128
  212.               globalsound JIBBED_ACTOR10
  213.             else
  214.               globalsound JIBBED_ACTOR15
  215.  
  216.           }
  217.           else
  218.             globalsound JIBBED_ACTOR7
  219.         }
  220.       }
  221.     }
  222.   }
  223. ends
  224.  
  225. state standard_jibs
  226.   guts JIBS2 1
  227.   guts JIBS3 2
  228.   guts JIBS4 3
  229.   guts JIBS5 2
  230.   guts JIBS6 3
  231.   ifrnd 6
  232.   {
  233.     guts JIBS1 1
  234.     spawn BLOODPOOL
  235.   }         // a badly drawn spine
  236.  
  237.   state jib_sounds
  238. ends
  239.  
  240. /*
  241. state genericgrowcode
  242.   ifcount 32
  243.   {
  244.     guts JIBS4 24
  245.     guts JIBS6 28
  246.     addkills 1
  247.     sound SQUISHED
  248.     sound PIPEBOMB_EXPLODE
  249.     hitradius 2048 60 70 80 90
  250.     spawn BLOODPOOL
  251.     spawn EXPLOSION2
  252.     killit
  253.   }
  254.   else
  255.   {
  256.     ifactor COMMANDER
  257.       sizeto 100 100
  258.     else
  259.       ifactor SHARK
  260.         sizeto 84 84
  261.     else
  262.       sizeto MAXXSTRETCH MAXYSTRETCH
  263.     break
  264.   }
  265. ends
  266. */
  267.  
  268. state genericgrowcode
  269.     ifcount 32
  270.     {
  271.         /*
  272.         state standard_jibs
  273.         sound PIPEBOMB_EXPLODE
  274.         spawn EXPLOSION2
  275.         hitradius 2048 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  276.         spawn BLOODPOOL
  277.         */
  278.         spawn TRANSPORTERSTAR
  279.         sound ACTOR_SHRINKING
  280.         sound TRANSFORM
  281.         addkills 1
  282.         ifrnd 64 spawn ATOMICHEALTH
  283.         else ifrnd 64 money 5
  284.         else ifrnd 64 spawn SIXPAK
  285.         else ifrnd 64 spawn COLA
  286.         else spawn SHIELD
  287.         killit
  288.     }
  289.     else
  290.     {
  291.         ifrnd 64 spritepal 6
  292.         else ifrnd 64 spritepal 1
  293.         else ifrnd 64 spritepal 2
  294.         else ifrnd 64 spritepal 7
  295.         else spritepal 8
  296.         sizeto MINXSTRETCH MINYSTRETCH
  297.         spawn FRAMEEFFECT1
  298.     }
  299. ends
  300.  
  301. state rats
  302.   ifrnd 128
  303.     spawn RAT
  304.   ifrnd 128
  305.     spawn RAT
  306.   ifrnd 128
  307.     spawn RAT
  308.   ifrnd 128
  309.     spawn RAT
  310.   ifrnd 128
  311.     spawn RAT
  312.   ifrnd 128
  313.     spawn RAT
  314.   ifrnd 128
  315.     spawn RAT
  316.   ifrnd 128
  317.     spawn RAT
  318. ends
  319.  
  320. // +++++++++++++++++++++BEGINNING OF "MAGIC HAND" CODE+++++++++++++++++++++
  321. // Turns the Shrinker into Duke's hand, which can now shoot unpredictable
  322. // magic blasts. Enemies turn into money, items, rats, etc...or just blow up!
  323.  
  324. // This code was rewritten for Duke3D v1.4/1.5 from original 1.3D code.
  325. // I'm not even sure if all the code works correctly; some things I've never
  326. // gotten to spawn like they should. E-mail me if you find any errors or
  327. // things that could be rewritten/optimized.
  328.  
  329. // Note: Some things like the "rats" state had to be moved to the top of the
  330. // file in order for this code to be as organized as possible, and some things
  331. // like the "genericshrunkcode" were modified to point to the "magiccode."
  332. // Make sure this file points to MAG_DEFS.CON and MAG_USER.CON at the top.
  333.  
  334. // Please don't use my code unless you give me credit for it.
  335.  
  336. // BMF54123 (bmf54123@hotmail.com)
  337.  
  338. state randspawn
  339.         ifrnd 32 { spawn FECES sound STEPNIT }
  340.         else ifrnd 32 spawn LIZTROOP
  341.         else ifrnd 32 spawn GREENSLIME
  342.         else ifrnd 32 spawn PIGCOP
  343.         else ifrnd 32 spawn RUBBERCAN
  344.         else ifrnd 32 spawn NUKEBARREL
  345.         else ifrnd 32 spawn LIZMAN
  346.         else ifrnd 32 spawn FIREBARREL
  347.         else spawn BLOODPOOL
  348. ends
  349.  
  350. state magicwords_a
  351.         ifrnd 64 quote 130
  352.         else ifrnd 64 quote 131
  353.         else ifrnd 64 quote 132
  354.         else ifrnd 64 quote 133
  355.         else { quote 134 addphealth -1 sound DUKE_GRUNT palfrom 32 0 32 wackplayer }
  356. ends
  357.  
  358. state magicwords_b
  359.         ifrnd 64 quote 136
  360.         else ifrnd 64 { quote 135 addphealth -5 sound DUKE_LONGTERM_PAIN palfrom 40 0 40 wackplayer }
  361.         else ifrnd 64 quote 137
  362.         else ifrnd 64 quote 138
  363.         else quote 140
  364. ends
  365.  
  366. state magicwords_c
  367.         ifrnd 64 quote 139
  368.         else ifrnd 64 { quote 142 addphealth -2 sound DUKE_GRUNT palfrom 36 0 36 wackplayer }
  369.         else ifrnd 64 quote 143
  370.         else ifrnd 64 quote 144
  371.         else quote 145
  372. ends
  373.  
  374. state magicwords_d
  375.         ifrnd 64 quote 146
  376.         else ifrnd 64 quote 147
  377.         else ifrnd 64 quote 148
  378.         else ifrnd 64 quote 149
  379.         else quote 150
  380. ends
  381.  
  382. state magicwords                          // just to annoy the player!
  383.         state randspawn
  384.         ifrnd 64 state magicwords_a
  385.         else ifrnd 64 state magicwords_b
  386.         else ifrnd 64 state magicwords_c
  387.         else state magicwords_d
  388. ends
  389.  
  390. state goodstuff
  391.         quote 128
  392.         spawn SIXPAK
  393.         spawn CRYSTALAMMO
  394.         spawn AMMOLOTS
  395.         spawn SHIELD
  396.         spawn STEROIDS
  397.         money 5
  398. ends
  399.  
  400. state badstuff
  401.         quote 129
  402.         state standard_jibs
  403.         spawn GREENSLIME
  404.         spawn LIZTROOP
  405.         shoot MORTER
  406.         state rats
  407.         ifrnd 64 spawn EXPLODINGBARREL
  408.         else spawn BURNING2
  409. ends
  410.  
  411. state absorbhealth
  412.     ifrnd 64 { addphealth 2 quote 141 }
  413.     else ifrnd 64 { addphealth 3 quote 126 }
  414.     else ifrnd 64 { addphealth 5 quote 127 }
  415.     else { addphealth 1 quote 125 }
  416. ends
  417.  
  418. state kaboomtalk
  419.         ifrnd 64 sound JIBBED_ACTOR2
  420.         else ifrnd 64 sound JIBBED_ACTOR3
  421.         else ifrnd 64 sound JIBBED_ACTOR4
  422.         else ifrnd 64 sound JIBBED_ACTOR7
  423.         else sound JIBBED_ACTOR8
  424. ends
  425.  
  426. state magiccode
  427.     sound SHRINKER_HIT
  428.     spawn EXPLOSION2
  429.     addkills 1
  430.     ifrnd 16 { sound SQUISHED state standard_jibs spawn BLOODPOOL } // else ifrnd 32 state shrinkcode
  431.     else ifrnd 16 { state rats }
  432.     else ifrnd 16 { spawn AMMO }
  433.     else ifrnd 16 { spawn COLA }
  434.     else ifrnd 16 { money 5 }
  435.     else ifrnd 16 { spawn BLOODPOOL }
  436.     else ifrnd 16 { spawn CRYSTALAMMO }
  437.     else ifrnd 16 { quote 151 spawn PIGCOP }
  438.     else ifrnd 16 { quote 151 spawn GREENSLIME }
  439.     else ifrnd 16 { quote 152 sound PIPEBOMB_EXPLODE hitradius 2048 WEAKEST WEAK MEDIUMSTRENGTH TOUGH state kaboomtalk }
  440.     else ifrnd 16 { quote 151 spawn LIZTROOP }
  441.     else ifrnd 16 { spawn EXPLODINGBARREL }
  442.     else ifrnd 16 { state goodstuff }
  443.     else ifrnd 16 { spawn ATOMICHEALTH }
  444.     else ifrnd 16 { state badstuff }
  445.     else ifrnd 16 { spawn GROWAMMO }
  446.     else ifrnd 16 { state absorbhealth }
  447.     else { state magicwords }
  448.     killit
  449. ends
  450.  
  451. state genericshrunkcode
  452.     state magiccode
  453. ends
  454.  
  455. // ++++++++++++++++++++++++END OF "MAGIC HAND" CODE++++++++++++++++++++++++
  456.  
  457.  
  458. action ASHARKCRUZING 0 8 5 1 24
  459. action ASHARKFLEE  0 8 5 1 10
  460. action ASHARKATACK   0 8 5 1 6
  461. action ASHARKSHRUNK  0 8 5 1 24
  462. action ASHARKGROW  0 8 5 1 24
  463. action ASHARKFROZEN  0 1 5 1 24
  464.  
  465. move SHARKVELS 24
  466. move SHARKFASTVELS 72
  467. move SHARKFLEEVELS 40
  468.  
  469. actor SHARK SHARKSTRENGTH ASHARKCRUZING SHARKVELS randomangle geth
  470.   ifaction ASHARKSHRUNK
  471.   {
  472.     ifcount SHRUNKDONECOUNT
  473.       action ASHARKCRUZING
  474.     else ifcount SHRUNKCOUNT
  475.       sizeto 60 60
  476.     else
  477.       state genericshrunkcode
  478.     break
  479.   }
  480.   else
  481.     ifaction ASHARKGROW
  482.   {
  483.     ifcount SHRUNKDONECOUNT
  484.       action ASHARKCRUZING
  485.     else
  486.       ifcount SHRUNKCOUNT
  487.         sizeto 24 24
  488.     else
  489.       state genericgrowcode
  490.   }
  491.   else
  492.     ifaction ASHARKFROZEN
  493.   {
  494.     fall
  495.  
  496.     ifp pfacing
  497.       ifpdistl FROZENQUICKKICKDIST
  498.         pkick
  499.  
  500.     ifcount THAWTIME
  501.     {
  502.       action ASHARKFLEE
  503.       getlastpal
  504.       break
  505.     }
  506.     else
  507.       ifcount FROZENDRIPTIME
  508.         ifactioncount 26
  509.           resetactioncount
  510.  
  511.     ifhitweapon
  512.     {
  513.       ifwasweapon FREEZEBLAST
  514.         break
  515.  
  516.       lotsofglass 30
  517.       sound GLASS_BREAKING
  518.       addkills 1
  519.       killit
  520.     }
  521.     break
  522.   }
  523.   else
  524.     ifaction ASHARKFLEE
  525.   {
  526.     ifcount 16
  527.       ifrnd 48
  528.     {
  529.       action ASHARKCRUZING
  530.       move SHARKVELS randomangle geth
  531.     }
  532.   }
  533.   else
  534.     ifaction ASHARKCRUZING
  535.   {
  536.     ifcansee
  537.       ifcount 48
  538.         ifrnd 2
  539.           ifcanshoottarget
  540.     {
  541.       action ASHARKATACK
  542.       move SHARKFASTVELS faceplayerslow getv break
  543.     }
  544.     ifcount 32
  545.       ifnotmoving
  546.     {
  547.       ifrnd 128
  548.         move SHARKVELS randomangle geth
  549.       else
  550.         move SHARKFASTVELS randomangle geth
  551.     }
  552.   }
  553.   else
  554.     ifaction ASHARKATACK
  555.   {
  556.     ifcount 4
  557.     {
  558.       ifpdistl 1280
  559.       {
  560.         ifp palive ifcanshoottarget
  561.         {
  562.           sound DUKE_GRUNT
  563.           palfrom 32 32
  564.           addphealth SHARKBITESTRENGTH
  565.         }
  566.         action ASHARKFLEE
  567.         move SHARKFLEEVELS fleeenemy
  568.       }
  569.     }
  570.     else
  571.       ifnotmoving
  572.     {
  573.       ifcount 32
  574.       {
  575.         action ASHARKCRUZING
  576.         move SHARKVELS randomangle geth
  577.       }
  578.     }
  579.     else
  580.       ifcount 48
  581.         ifrnd 2
  582.     {
  583.       action ASHARKCRUZING
  584.       move SHARKFASTVELS randomangle geth
  585.     }
  586.   }
  587.  
  588.   ifhitweapon
  589.   {
  590.     ifdead
  591.     {
  592.       ifwasweapon GROWSPARK
  593.       {
  594.         move 0
  595.         cstat 0
  596.         action ASHARKGROW
  597.         sound ACTOR_GROWING
  598.         break
  599.       }
  600.       else
  601.         ifwasweapon FREEZEBLAST
  602.       {
  603.         spritepal 1
  604.         strength 0
  605.         action ASHARKFROZEN
  606.         sound SOMETHINGFROZE
  607.       }
  608.       else
  609.       {
  610.         sound SQUISHED
  611.         guts JIBS6 5
  612.         addkills 1
  613.         killit
  614.       }
  615.     }
  616.     else
  617.     {
  618.       ifwasweapon SHRINKSPARK
  619.       {
  620.         action ASHARKSHRUNK
  621.         sound ACTOR_SHRINKING
  622.         move 0
  623.         break
  624.       }
  625.       else
  626.         ifwasweapon GROWSPARK
  627.           sound EXPANDERHIT
  628.  
  629.       move SHARKVELS randomangle geth
  630.     }
  631.   }
  632. enda
  633.  
  634.  
  635. action BLIMPWAITTORESPAWN
  636.  
  637. state blimphitstate
  638.   cstat 0
  639.   spawn FIRSTGUNSPRITE
  640.   spawn EXPLOSION2
  641.  
  642.   debris SCRAP1 40      // Weapons and ammo!
  643.   debris SCRAP2 32
  644.   debris SCRAP3 32
  645.   debris SCRAP4 32
  646.   debris SCRAP5 32
  647.  
  648.   sound PIPEBOMB_EXPLODE
  649.   ifrespawn
  650.   {
  651.     action BLIMPWAITTORESPAWN
  652.     count 0
  653.     cstat 32768
  654.   }
  655.   else
  656.     killit
  657. ends
  658.  
  659. actor BLIMP 1
  660.  
  661.   ifaction BLIMPWAITTORESPAWN
  662.   {
  663.     ifcount BLIMPRESPAWNTIME
  664.     {
  665.       action 0
  666.       cstat 0
  667.     }
  668.     break
  669.   }
  670.  
  671.   ifhitweapon
  672.   {
  673.     ifwasweapon RADIUSEXPLOSION
  674.       state blimphitstate
  675.     ifwasweapon RPG
  676.       state blimphitstate
  677.     strength 1
  678.   }
  679. enda
  680.  
  681. move RESPAWN_ACTOR_FLAG
  682. move MOUSEVELS 32
  683.  
  684. action RUBCANDENT 1 1 1 1 1
  685.  
  686. actor RUBBERCAN WEAK
  687.   ifaction RUBCANDENT
  688.   {
  689.     ifactioncount 16
  690.     {
  691.       strength 0
  692.       action ANULLACTION
  693.       break
  694.     }
  695.   }
  696.   else
  697.     ifhitweapon
  698.   {
  699.     ifwasweapon RADIUSEXPLOSION
  700.     {
  701.       state rats
  702.       ifrnd 48
  703.         spawn BURNING
  704.       debris SCRAP3 12
  705.       killit
  706.     }
  707.     else
  708.       action RUBCANDENT
  709.   }
  710. enda
  711.  
  712. state toughgalspeech
  713.   ifrnd 64
  714.   {
  715.     ifnosounds
  716.       soundonce TOUGHGALSND1
  717.   }
  718.   else
  719.     ifrnd 64
  720.   {
  721.     ifnosounds
  722.       soundonce TOUGHGALSND2
  723.   }
  724.   else
  725.     ifrnd 64
  726.   {
  727.     ifnosounds
  728.       soundonce TOUGHGALSND3
  729.   }
  730.   else
  731.     ifnosounds
  732.       soundonce TOUGHGALSND4
  733. ends
  734.  
  735. state jibfood
  736.   sound SQUISHED
  737.   guts JIBS6 3
  738.   killit
  739. ends
  740.  
  741. state breakobject
  742.   ifaction 0
  743.   {
  744.     action ANULLACTION
  745.     cstator 257
  746.     ifactor ROBOTMOUSE
  747.       clipdist 64
  748.   }
  749.   else
  750.     ifactor ROBOTMOUSE
  751.   {
  752.       ifdead
  753.       {
  754.         ifcount 32
  755.         {
  756.           globalsound MOUSEANNOY
  757.           killit
  758.         }
  759.         break
  760.       }
  761.       ifcount 64 ifrnd 6
  762.       {
  763.         ifrnd 128
  764.           move MOUSEVELS randomangle geth
  765.         else
  766.         {
  767.           ifrnd 64
  768.             soundonce HAPPYMOUSESND1
  769.           else
  770.             ifrnd 64
  771.               soundonce HAPPYMOUSESND2
  772.           else
  773.             ifrnd 64
  774.               soundonce HAPPYMOUSESND3
  775.           else
  776.             soundonce HAPPYMOUSESND4
  777.         }
  778.         resetcount
  779.       }
  780.   }
  781.  
  782.   ifhitweapon
  783.   {
  784.     ifdead
  785.     {
  786.       ifactor FOODOBJECT6
  787.         state jibfood
  788.       else
  789.         ifactor FOODOBJECT11
  790.           state jibfood
  791.       else
  792.         ifactor FOODOBJECT12
  793.           state jibfood
  794.       else
  795.         ifactor FOODOBJECT13
  796.           state jibfood
  797.       else
  798.         ifactor FOODOBJECT14
  799.           state jibfood
  800.       else
  801.         ifactor FOODOBJECT15
  802.           state jibfood
  803.       else
  804.         ifactor FOODOBJECT16
  805.           state jibfood
  806.       else
  807.         ifactor FOODOBJECT17
  808.           state jibfood
  809.       else
  810.         ifactor SKINNEDCHICKEN
  811.           state jibfood
  812.       else
  813.         ifactor SHOPPINGCART
  814.       {
  815.         debris SCRAP1 5
  816.         debris SCRAP2 5
  817.         debris SCRAP3 5
  818.         sound GLASS_HEAVYBREAK
  819.         killit
  820.       }
  821.       else
  822.         ifactor ROBOTDOG2
  823.       {
  824.         soundonce DEAD_DOG
  825.         guts JIBS2 1
  826.         guts JIBS3 2
  827.         guts JIBS6 3
  828.         killit
  829.       }
  830.       else
  831.         ifactor FEATHEREDCHICKEN
  832.           state jibfood
  833.       else
  834.         ifactor DOLPHIN1
  835.       {
  836.         guts JIBS2 1
  837.         guts JIBS3 2
  838.         guts JIBS4 3
  839.         guts JIBS5 2
  840.         state jibfood
  841.       }
  842.       else
  843.         ifactor DOLPHIN2
  844.       {
  845.         guts JIBS2 1
  846.         guts JIBS3 2
  847.         guts JIBS4 3
  848.         guts JIBS5 2
  849.         state jibfood
  850.       }
  851.       else
  852.         ifactor SNAKEP
  853.       {
  854.         guts JIBS2 1
  855.         guts JIBS3 2
  856.         guts JIBS4 3
  857.         guts JIBS5 2
  858.         state jibfood
  859.       }
  860.       else
  861.         ifactor DONUTS
  862.       {
  863.         spritepal 7
  864.         guts JIBS6 2
  865.         killit
  866.       }
  867.       else
  868.         ifactor DONUTS2
  869.       {
  870.         debris SCRAP1 1
  871.         spritepal 7
  872.         guts JIBS6 2
  873.         killit
  874.       }
  875.       else
  876.         ifactor MAILBAG
  877.         {
  878.           mail 30
  879.           debris SCRAP3 5
  880.           debris SCRAP4 3
  881.           killit
  882.         }
  883.       else
  884.         ifactor TEDDYBEAR
  885.       {
  886.         debris SCRAP3 5
  887.         spritepal 1
  888.         debris SCRAP3 6
  889.       }
  890.       else
  891.       {
  892.         ifrnd 128
  893.           sound GLASS_BREAKING
  894.         else
  895.           sound GLASS_HEAVYBREAK
  896.       }
  897.  
  898.       ifactor CLOCK
  899.       {
  900.         cactor BROKENCLOCK
  901.         break
  902.       }
  903.       else
  904.         ifactor JOLLYMEAL
  905.       {
  906.         spawn ATOMICHEALTH
  907.         debris SCRAP3 1
  908.         debris SCRAP4 2
  909.       }
  910.       else
  911.         ifactor GUMBALLMACHINE
  912.       {
  913.         cactor GUMBALLMACHINEBROKE
  914.         strength 1
  915.         debris SCRAP4 2
  916.         lotsofglass 10
  917.         break
  918.       }
  919.       else
  920.         ifactor GUMBALLMACHINEBROKE
  921.       {
  922.         debris SCRAP3 3
  923.         debris SCRAP4 2
  924.         lotsofglass 10
  925.       }
  926.       else
  927.         ifactor DUKEBURGER
  928.       {
  929.         debris SCRAP3 14
  930.         debris SCRAP1 13
  931.         debris SCRAP4 12
  932.         debris SCRAP2 12
  933.         debris SCRAP5 11
  934.       }
  935.       else
  936.         ifactor POLICELIGHTPOLE
  937.       {
  938.         debris SCRAP3 4
  939.         debris SCRAP1 3
  940.         debris SCRAP4 2
  941.         debris SCRAP2 2
  942.         debris SCRAP5 1
  943.       }
  944.       else
  945.         ifactor TOPSECRET
  946.           paper 10
  947.       else
  948.         ifactor GUNPOWDERBARREL
  949.       {
  950.         spawn EXPLOSION2
  951.         sound PIPEBOMB_EXPLODE
  952.         hitradius 2048 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  953.         ifpdistl 2048
  954.           wackplayer
  955.         debris SCRAP1 10      // Weapons and ammo!
  956.         debris SCRAP2 13
  957.         debris SCRAP3 4
  958.         debris SCRAP4 17
  959.         debris SCRAP5 6
  960.       }
  961.       else
  962.         ifactor FLOORBASKET
  963.       {
  964.         spawn PUKE
  965.         debris SCRAP1 2
  966.         debris SCRAP3 3
  967.         debris SCRAP4 2
  968.       }
  969.       else
  970.         ifactor ROBOTMOUSE
  971.       {
  972.         debris SCRAP2 10
  973.         spritepal 1
  974.         debris SCRAP3 4
  975.         resetcount
  976.         cstat 32768
  977.         break
  978.       }
  979.       else
  980.         ifactor ROBOTPIRATE
  981.       {
  982.         debris SCRAP2 10
  983.         debris SCRAP1 5
  984.         debris SCRAP3 3
  985.         lotsofglass 10
  986.       }
  987.       else
  988.         ifactor PIRATE1A
  989.       {
  990.         debris SCRAP2 10
  991.         debris SCRAP1 5
  992.         debris SCRAP3 3
  993.         lotsofglass 10
  994.       }
  995.       else
  996.         ifactor MAN
  997.       {
  998.         debris SCRAP2 10
  999.         debris SCRAP1 5
  1000.         debris SCRAP3 3
  1001.         lotsofglass 10
  1002.       }
  1003.       else
  1004.         ifactor MAN2
  1005.       {
  1006.         debris SCRAP2 10
  1007.         debris SCRAP1 5
  1008.         debris SCRAP3 3
  1009.         lotsofglass 10
  1010.       }
  1011.       else
  1012.         ifactor PIRATE2A
  1013.       {
  1014.         debris SCRAP2 10
  1015.         debris SCRAP1 5
  1016.         debris SCRAP3 3
  1017.         lotsofglass 10
  1018.       }
  1019.       else
  1020.         ifactor PIRATE3A
  1021.       {
  1022.         debris SCRAP2 10
  1023.         debris SCRAP1 5
  1024.         debris SCRAP3 3
  1025.         lotsofglass 10
  1026.       }
  1027.       else
  1028.         ifactor PIRATE4A
  1029.       {
  1030.         debris SCRAP2 10
  1031.         debris SCRAP1 5
  1032.         debris SCRAP3 3
  1033.         lotsofglass 10
  1034.       }
  1035.       else
  1036.         ifactor PIRATE4A
  1037.       {
  1038.         debris SCRAP2 10
  1039.         debris SCRAP1 5
  1040.         debris SCRAP3 3
  1041.         lotsofglass 10
  1042.       }
  1043.       else
  1044.         ifactor PIRATE5A
  1045.       {
  1046.         debris SCRAP2 10
  1047.         debris SCRAP1 5
  1048.         debris SCRAP3 3
  1049.         lotsofglass 10
  1050.       }
  1051.       else
  1052.         ifactor PIRATE6A
  1053.       {
  1054.         debris SCRAP2 10
  1055.         debris SCRAP1 5
  1056.         debris SCRAP3 3
  1057.         lotsofglass 10
  1058.       }
  1059.       else
  1060.       {
  1061.         lotsofglass 10
  1062.         debris SCRAP4 3
  1063.       }
  1064.       killit
  1065.     }
  1066.     else
  1067.       ifactor DOLPHIN1
  1068.     {
  1069.       guts JIBS6 1
  1070.       soundonce DOLPHINSND
  1071.       ifstrength TOUGH
  1072.       {
  1073.         cactor DOLPHIN2
  1074.         sound SQUISHED
  1075.       }
  1076.     }
  1077.     else
  1078.       ifactor DOLPHIN2
  1079.     {
  1080.       guts JIBS6 1
  1081.       soundonce DOLPHINSND
  1082.     }
  1083.     else
  1084.       ifactor ROBOTDOG2
  1085.     {
  1086.       guts JIBS6 1
  1087.       soundonce WHINING_DOG
  1088.     }
  1089.   }
  1090.   else
  1091.   {
  1092.     ifactor CLOCK
  1093.       nullop
  1094.     else
  1095.       ifactor TOPSECRET
  1096.         nullop
  1097.     else
  1098.       ifactor SKINNEDCHICKEN
  1099.         nullop
  1100.     else
  1101.       ifactor FEATHEREDCHICKEN
  1102.         nullop
  1103.     else
  1104.       ifactor FOODOBJECT2
  1105.         nullop
  1106.     else
  1107.       ifactor FOODOBJECT6
  1108.         nullop
  1109.     else
  1110.       ifactor DOLPHIN1
  1111.         nullop
  1112.     else
  1113.       ifactor DOLPHIN2
  1114.         nullop
  1115.     else
  1116.       fall
  1117.   }
  1118.  
  1119.  
  1120. ends
  1121.  
  1122. action ABURGERROTS 0 1 5
  1123. useractor notenemy DUKEBURGER PIRATEGALSTRENGTH ABURGERROTS state breakobject enda
  1124.  
  1125. useractor notenemy MOP WEAK state breakobject enda
  1126.  
  1127. useractor notenemy BROOM WEAK state breakobject enda
  1128.  
  1129. useractor notenemy WETFLOOR WEAK state breakobject enda
  1130.  
  1131. useractor notenemy DESKLAMP WEAK state breakobject enda
  1132.  
  1133. // useractor notenemy DUKECUTOUT WEAK state breakobject enda
  1134.  
  1135. useractor notenemy HATRACK WEAK state breakobject enda
  1136.  
  1137. useractor notenemy GUNPOWDERBARREL TOUGH state breakobject enda
  1138.  
  1139. useractor notenemy COFFEEMACHINE WEAK state breakobject enda
  1140.  
  1141. useractor notenemy TEDDYBEAR WEAK state breakobject enda
  1142.  
  1143. useractor notenemy TOPSECRET WEAK state breakobject enda
  1144.  
  1145. useractor notenemy ROBOTMOUSE ROBOTMOUSESTRENGTH state breakobject enda
  1146.  
  1147. useractor notenemy MAN PIRATEGALSTRENGTH state breakobject enda
  1148.  
  1149. useractor notenemy MAN2 PIRATEGALSTRENGTH state breakobject enda
  1150.  
  1151. useractor notenemy WOMAN PIRATEGALSTRENGTH state breakobject enda
  1152.  
  1153. useractor notenemy PIRATE1A PIRATEGALSTRENGTH state breakobject enda
  1154.  
  1155. useractor notenemy PIRATE2A PIRATEGALSTRENGTH state breakobject enda
  1156.  
  1157. useractor notenemy PIRATE3A PIRATEGALSTRENGTH state breakobject enda
  1158.  
  1159. useractor notenemy PIRATE4A PIRATEGALSTRENGTH state breakobject enda
  1160.  
  1161. useractor notenemy PIRATE5A PIRATEGALSTRENGTH state breakobject enda
  1162.  
  1163. useractor notenemy PIRATE6A PIRATEGALSTRENGTH state breakobject enda
  1164.  
  1165. useractor notenemy ROBOTPIRATE PIRATEGALSTRENGTH state breakobject enda
  1166.  
  1167. useractor notenemy PIRATEHALF TOUGH state breakobject enda
  1168.  
  1169. useractor notenemy CHESTOFGOLD WEAK state breakobject enda
  1170.  
  1171. useractor notenemy ROBOTDOG PIRATEGALSTRENGTH state breakobject enda
  1172.  
  1173. useractor notenemy ROBOTDOG2 TOUGH state breakobject enda
  1174.  
  1175. useractor notenemy PLEASEWAIT state breakobject enda
  1176.  
  1177. useractor notenemy FOODOBJECT1 WEAK state breakobject enda
  1178.  
  1179. useractor notenemy FOODOBJECT2 WEAK state breakobject enda
  1180.  
  1181. useractor notenemy FOODOBJECT3 WEAK state breakobject enda
  1182.  
  1183. useractor notenemy FOODOBJECT4 WEAK state breakobject enda
  1184.  
  1185. useractor notenemy FOODOBJECT5 WEAK state breakobject enda
  1186.  
  1187. useractor notenemy FOODOBJECT6 WEAK state breakobject enda
  1188.  
  1189. useractor notenemy FOODOBJECT7 WEAK state breakobject enda
  1190.  
  1191. useractor notenemy FOODOBJECT8 WEAK state breakobject enda
  1192.  
  1193. useractor notenemy FOODOBJECT9 WEAK state breakobject enda
  1194.  
  1195. useractor notenemy FOODOBJECT10 WEAK state breakobject enda
  1196.  
  1197. useractor notenemy FOODOBJECT11 WEAK state breakobject enda
  1198.  
  1199. useractor notenemy FOODOBJECT12 WEAK state breakobject enda
  1200.  
  1201. useractor notenemy FOODOBJECT13 WEAK state breakobject enda
  1202.  
  1203. useractor notenemy FOODOBJECT14 WEAK state breakobject enda
  1204.  
  1205. useractor notenemy FOODOBJECT15 WEAK state breakobject enda
  1206.  
  1207. useractor notenemy FOODOBJECT16 WEAK state breakobject enda
  1208.  
  1209. useractor notenemy FOODOBJECT17 WEAK state breakobject enda
  1210.  
  1211. useractor notenemy FOODOBJECT18 WEAK state breakobject enda
  1212.  
  1213. useractor notenemy FOODOBJECT19 WEAK state breakobject enda
  1214.  
  1215. useractor notenemy FOODOBJECT20 WEAK state breakobject enda
  1216.  
  1217. useractor notenemy JOLLYMEAL WEAK state breakobject enda
  1218.  
  1219. useractor notenemy GUMBALLMACHINE WEAK state breakobject enda
  1220.  
  1221. useractor notenemy GUMBALLMACHINEBROKE WEAK state breakobject enda
  1222.  
  1223. useractor notenemy POLICELIGHTPOLE TOUGH state breakobject enda
  1224.  
  1225. useractor notenemy CLOCK WEAK state breakobject enda
  1226.  
  1227. useractor notenemy MAILBAG WEAK state breakobject enda
  1228.  
  1229. useractor notenemy FEATHEREDCHICKEN WEAK state breakobject enda
  1230.  
  1231. useractor notenemy SKINNEDCHICKEN WEAK state breakobject enda
  1232.  
  1233. useractor notenemy HEADLAMP WEAK state breakobject enda
  1234.  
  1235. useractor notenemy DOLPHIN1 DOLPHINSTRENGTH state breakobject enda
  1236.  
  1237. useractor notenemy DOLPHIN2 DOLPHINSTRENGTH state breakobject enda
  1238.  
  1239. useractor notenemy SNAKEP MEDIUMSTRENGTH state breakobject enda
  1240.  
  1241. useractor notenemy DONUTS WEAK state breakobject enda
  1242.  
  1243. useractor notenemy GAVALS WEAK state breakobject enda
  1244.  
  1245. useractor notenemy GAVALS2 WEAK state breakobject enda
  1246.  
  1247. useractor notenemy CUPS WEAK state breakobject enda
  1248.  
  1249. useractor notenemy DONUTS2 WEAK state breakobject enda
  1250.  
  1251. useractor notenemy FLOORBASKET WEAK state breakobject enda
  1252.  
  1253. useractor notenemy METER WEAK state breakobject enda
  1254.  
  1255. useractor notenemy DESKPHONE WEAK state breakobject enda
  1256.  
  1257. useractor notenemy MACE WEAK state breakobject enda
  1258.  
  1259. useractor notenemy SHOPPINGCART WEAK state breakobject enda
  1260.  
  1261. useractor notenemy COFFEEMUG WEAK state breakobject enda
  1262.  
  1263.  
  1264.  
  1265. state headhitstate
  1266.  
  1267. // Unrem the following line to invoke screen tilting during
  1268. // low player hitpoint damage.
  1269.  
  1270. // wackplayer
  1271.  
  1272. ends
  1273.  
  1274.  
  1275. action EXPBARRELFRAME     0   2   1   1   15
  1276. actor EXPLODINGBARREL 26
  1277.   fall
  1278.   ifaction EXPBARRELFRAME
  1279.   {
  1280.     ifactioncount 2
  1281.     {
  1282.       hitradius 1024 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  1283.       spawn EXPLOSION2
  1284.       debris SCRAP2 2
  1285.       sound PIPEBOMB_EXPLODE
  1286.       killit
  1287.     }
  1288.     break
  1289.   }
  1290.   ifsquished
  1291.   {
  1292.     debris SCRAP1 5
  1293.     killit
  1294.     break
  1295.   }
  1296.   ifhitweapon
  1297.     action EXPBARRELFRAME
  1298. enda
  1299.  
  1300. action BURNING_FLAME  0   12   1   1   2
  1301. move BURNING_VELS 
  1302.  
  1303. state burningstate
  1304.  
  1305.   sleeptime 300
  1306.  
  1307.  
  1308.   ifspawnedby BURNING
  1309.   {
  1310.     ifgapzl 16
  1311.       break
  1312.   }
  1313.   else
  1314.     ifspawnedby BURNING2
  1315.   {
  1316.     ifgapzl 16
  1317.       break
  1318.   }
  1319.  
  1320.   ifpdistg 10240
  1321.     break
  1322.  
  1323.   ifcount 128
  1324.   {
  1325.     ifspawnedby TIRE
  1326.     {
  1327.       ifactioncount 512
  1328.         killit
  1329.       ifrnd 16
  1330.         sizeto 64 48
  1331.     }
  1332.     else
  1333.     {
  1334.       sizeto 8 8
  1335.       sizeto 8 8
  1336.       ifcount 192
  1337.         killit
  1338.     }
  1339.   }
  1340.   else
  1341.   {
  1342.     ifmove 0
  1343.       move BURNING_VELS
  1344.  
  1345.     sizeto 52 52
  1346.  
  1347.     ifp palive
  1348.       ifpdistl 844
  1349.         ifrnd 32
  1350.           ifcansee
  1351.     {
  1352.       soundonce DUKE_LONGTERM_PAIN
  1353.       addphealth -1
  1354.       palfrom 24 16
  1355.     }
  1356.   }
  1357.  
  1358. ends
  1359.  
  1360. actor BURNING WEAK BURNING_FLAME
  1361.   state burningstate
  1362. enda
  1363.  
  1364. actor BURNING2 WEAK BURNING_FLAME
  1365.   state burningstate
  1366. enda
  1367.  
  1368. action TOILETWATERFRAMES 0 4 1 1 1
  1369. actor TOILETWATER 0 TOILETWATERFRAMES
  1370.   ifpdistl 8192
  1371.   {
  1372.     soundonce WATER_GURGLE
  1373.     ifspawnedby TOILET
  1374.       sizeto 34 34
  1375.     else
  1376.     {
  1377.       ifspawnedby WATERFOUNTAINBROKE
  1378.         sizeto 6 15
  1379.       else
  1380.         ifspawnedby TOILETWATER
  1381.           nullop
  1382.       else
  1383.         sizeto 24 32
  1384.     }
  1385.  
  1386.     ifp palive
  1387.       ifpdistl RETRIEVEDISTANCE
  1388.         ifp pfacing
  1389.           ifactioncount 32
  1390.             ifphealthl MAXPLAYERHEALTH
  1391.               ifhitspace
  1392.                 ifcansee
  1393.     {
  1394.       addphealth 1
  1395.       globalsound DUKE_DRINKING
  1396.       resetactioncount
  1397.     }
  1398.   }
  1399. enda
  1400.  
  1401. action WOODENHORSEFRAME  0   1   4
  1402. action WOODENFALLFRAME  122  1   5
  1403.  
  1404. actor HORSEONSIDE WEAKEST
  1405.   cactor WOODENHORSE
  1406.   action WOODENFALLFRAME
  1407. enda
  1408. actor WOODENHORSE WEAK WOODENHORSEFRAME
  1409.   fall
  1410.   ifhitweapon
  1411.   {
  1412.     ifdead
  1413.     {
  1414.       debris SCRAP1 4
  1415.       debris SCRAP2 3
  1416.       killit
  1417.     }
  1418.     else
  1419.       action WOODENFALLFRAME
  1420.   }
  1421. enda
  1422.  
  1423. state steamcode
  1424.   ifpdistl 6144
  1425.     soundonce STEAM_HISSING
  1426.  
  1427.   ifcount 20
  1428.     {
  1429.       resetcount
  1430.       ifp palive
  1431.         ifpdistl 1024
  1432.       {
  1433.         addphealth -1
  1434.         palfrom 16 16
  1435.       }
  1436.     }
  1437.   else
  1438.   {
  1439.     ifspawnedby STEAM
  1440.       break
  1441.     else
  1442.       ifspawnedby CEILINGSTEAM
  1443.         break
  1444.  
  1445.     sizeto 24 24
  1446.   }
  1447. ends
  1448.  
  1449. action STEAMFRAMES    0     5     1     1     1
  1450. actor STEAM 0 STEAMFRAMES
  1451.   state steamcode
  1452. enda
  1453.  
  1454. actor CEILINGSTEAM 0 STEAMFRAMES
  1455.   state steamcode
  1456. enda
  1457.  
  1458. actor WATERBUBBLEMAKER 0 0 randomangle
  1459.   ifpdistl 3084
  1460.     ifrnd 24
  1461.       spawn WATERBUBBLE
  1462. enda
  1463.  
  1464. action BUBBLE
  1465. action CRACKEDBUBBLE  1
  1466. move BUBMOVE       -10 -36
  1467. move BUBMOVEFAST     -10 -52
  1468.  
  1469. actor WATERBUBBLE 0 BUBBLE BUBMOVE getv geth randomangle
  1470.  
  1471.   ifaction CRACKEDBUBBLE
  1472.   {
  1473.     ifinwater
  1474.       ifrnd 192
  1475.         killit
  1476.     ifactioncount 7
  1477.       killit
  1478.   }
  1479.   else
  1480.   {
  1481.     ifcount 4
  1482.     {
  1483.       ifrnd 192
  1484.         move BUBMOVE getv geth randomangle
  1485.       else
  1486.         move BUBMOVEFAST getv geth randomangle
  1487.       resetcount
  1488.  
  1489.       ifrnd 84
  1490.         sizeat 8 10
  1491.       else
  1492.         ifrnd 84
  1493.           sizeat 10 8
  1494.       else
  1495.         sizeat 9 9
  1496.     }
  1497.  
  1498.     ifonwater
  1499.     {
  1500.       iffloordistl 8
  1501.         action CRACKEDBUBBLE
  1502.     }
  1503.     else
  1504.       ifactioncount 40
  1505.         action CRACKEDBUBBLE
  1506.   }
  1507. enda
  1508.  
  1509.  
  1510. move SMOKEVEL 8 -16
  1511. move ENGINE_SMOKE 64 -64
  1512. move SMOKESHOOTOUT -192
  1513. action SMOKEFRAMES 0 4 1 1 10
  1514. actor SMALLSMOKE 0 SMOKEFRAMES
  1515.   ifmove 0
  1516.   {
  1517.     ifspawnedby RECON
  1518.       move SMOKESHOOTOUT geth
  1519.     else
  1520.       ifspawnedby SECTOREFFECTOR
  1521.         move ENGINE_SMOKE geth getv
  1522.     else
  1523.       move SMOKEVEL geth getv faceplayer
  1524.     ifspawnedby RPG
  1525.       cstat 2
  1526.   }
  1527.   ifpdistl 1596
  1528.     ifspawnedby RPG
  1529.       killit
  1530.   ifactioncount 4
  1531.     killit
  1532. enda
  1533.  
  1534. action BARREL_DENTING  2 2 1 1 6
  1535. action BARREL_DENTED   1
  1536. action BARREL_DENTED2  2
  1537.  
  1538. move SPAWNED_BLOOD
  1539.  
  1540. actor NUKEBARRELDENTED WEAK
  1541.   cactor NUKEBARREL
  1542.   action BARREL_DENTED
  1543. enda
  1544.  
  1545. actor NUKEBARRELLEAKED WEAK
  1546.   cactor NUKEBARREL
  1547.   action BARREL_DENTED2
  1548. enda
  1549.  
  1550. state random_ooz
  1551.   ifrnd 128
  1552.     spawn OOZ2
  1553.   else
  1554.     spawn OOZ
  1555. ends
  1556.  
  1557. actor NUKEBARREL MEDIUMSTRENGTH
  1558.   ifsquished
  1559.   {
  1560.     debris SCRAP1 32
  1561.     spawn BLOODPOOL
  1562.     state random_ooz
  1563.     killit
  1564.   }
  1565.   fall
  1566.   ifaction BARREL_DENTING
  1567.   {
  1568.     ifactioncount 2
  1569.     {
  1570.       debris SCRAP1 10
  1571.       ifrnd 2 spawn BLOODPOOL
  1572.       killit
  1573.     }
  1574.   }
  1575.   else
  1576.     ifhitweapon
  1577.   {
  1578.     ifdead
  1579.     {
  1580.       sound VENT_BUST
  1581.  
  1582.       ifrnd 128
  1583.         spawn BLOODPOOL
  1584.       action BARREL_DENTING
  1585.     }
  1586.     else
  1587.     {
  1588.       ifaction 0
  1589.         action BARREL_DENTED
  1590.       else
  1591.         ifaction BARREL_DENTED
  1592.       {
  1593.         action BARREL_DENTED2
  1594.         spawn BLOODPOOL
  1595.       }
  1596.       else
  1597.         ifaction BARREL_DENTED2
  1598.           action BARREL_DENTING
  1599.     }
  1600.   }
  1601. enda
  1602.  
  1603. state burningbarrelcode
  1604.   fall
  1605.   ifcount 32
  1606.   {
  1607.     resetcount
  1608.     ifp palive
  1609.       ifpdistl 1480
  1610.         ifp phigher
  1611.     {
  1612.       addphealth -1
  1613.       palfrom 16 16
  1614.       ifrnd 96
  1615.         sound DUKE_LONGTERM_PAIN
  1616.     }
  1617.   }
  1618.   ifhitweapon
  1619.   {
  1620.     sound VENT_BUST
  1621.     debris SCRAP1 10
  1622.     ifrnd 128
  1623.       spawn BURNING
  1624.     else
  1625.       spawn BURNING2
  1626.     killit
  1627.   }
  1628. ends
  1629.  
  1630. actor FIREBARREL
  1631.   state burningbarrelcode
  1632. enda
  1633. actor FIREVASE
  1634.   state burningbarrelcode
  1635. enda
  1636.  
  1637. action SHRINKERFRAMES 0 4 1 1 10
  1638. actor SHRINKEREXPLOSION 0 SHRINKERFRAMES
  1639.   ifactioncount 4
  1640.     killit
  1641. enda
  1642.  
  1643. action EXPLOSION_FRAMES 0 20 1 1  4
  1644. actor EXPLOSION2 1 EXPLOSION_FRAMES
  1645.   ifactioncount 20
  1646.     killit
  1647. enda
  1648.  
  1649. actor EXPLOSION2BOT 1 EXPLOSION_FRAMES
  1650.   ifactioncount 20
  1651.     killit
  1652. enda
  1653.  
  1654. action FFLAME_FR 0 16 1 1 1
  1655. action FFLAME 0 1 1 1 1
  1656.  
  1657. actor FLOORFLAME 0 FFLAME_FR
  1658.   ifaction FFLAME_FR
  1659.   {
  1660.     ifpdistl 1024
  1661.       hitradius 1024 WEAKEST WEAKEST WEAKEST WEAKEST
  1662.     ifactioncount 16
  1663.       action FFLAME
  1664.   }
  1665.   ifaction FFLAME
  1666.     ifrnd 4
  1667.   {
  1668.     action FFLAME_FR
  1669.     sound CAT_FIRE
  1670.     resetactioncount
  1671.   }
  1672. enda
  1673.  
  1674.  
  1675.  
  1676. action ASATNSPIN     0 5 1 1 4
  1677. action ASATSHOOTING   -10 3 5 1 40
  1678. action ASATWAIT      0 1 5 1 1
  1679. move TURRVEL
  1680.  
  1681. actor ROTATEGUN ROTTURRETSTRENGTH
  1682. // ASATSHOOTING TURRVEL faceplayer
  1683.  
  1684.   ifaction 0
  1685.   {
  1686.     action ASATSHOOTING
  1687.     move TURRVEL faceplayer
  1688.   }
  1689.   else
  1690.     ifaction ASATNSPIN
  1691.   {
  1692.     ifactioncount 32
  1693.     {
  1694.       action ASATWAIT
  1695.       move TURRVEL faceplayer
  1696.     }
  1697.   }
  1698.   else
  1699.     ifaction ASATSHOOTING
  1700.   {
  1701.     ifactioncount 12
  1702.       ifrnd 32
  1703.     {
  1704.       action ASATWAIT
  1705.       move 0
  1706.     }
  1707.     ifcount 32
  1708.       resetcount
  1709.     else
  1710.       ifcount 16
  1711.     {
  1712.       ifcount 17 nullop
  1713.       else
  1714.       {
  1715.         sound PRED_ATTACK
  1716.         shoot FIRELASER
  1717.       }
  1718.     }
  1719.     else
  1720.       ifcount 4
  1721.     {
  1722.       ifcount 5 nullop
  1723.       else
  1724.       {
  1725.         ifcansee
  1726.           ifcanshoottarget
  1727.         {
  1728.           sound PRED_ATTACK
  1729.           shoot FIRELASER
  1730.         }
  1731.       }
  1732.     }
  1733.   }
  1734.   else
  1735.     ifaction ASATWAIT
  1736.   {
  1737.     ifactioncount 64
  1738.       ifrnd 32
  1739.         ifp palive
  1740.           ifcansee
  1741.     {
  1742.       action ASATSHOOTING
  1743.       move TURRVEL faceplayer
  1744.     }
  1745.   }
  1746.   ifhitweapon
  1747.   {
  1748.     ifdead
  1749.     {
  1750.       addkills 1
  1751.       sound LASERTRIP_EXPLODE
  1752.       debris SCRAP1 15
  1753.       spawn EXPLOSION2
  1754.       killit
  1755.     }
  1756.     else
  1757.     {
  1758.       action ASATNSPIN
  1759.       debris SCRAP1 4
  1760.     }
  1761.     move 0
  1762.   }
  1763. enda
  1764.  
  1765. action RIP_F 0 8 1 1 1
  1766. actor FORCERIPPLE 0 RIP_F
  1767.   ifactioncount 8
  1768.     killit
  1769. enda
  1770.  
  1771. action TRANSFOWARD 0  6  1  1  2
  1772. action TRANSBACK   5  6  1 -1  2
  1773. actor TRANSPORTERSTAR 0 TRANSFOWARD
  1774.   ifaction TRANSFOWARD
  1775.   {
  1776.     ifactioncount 6
  1777.       action TRANSBACK
  1778.   }
  1779.   else
  1780.     ifactioncount 6
  1781.       killit
  1782. enda
  1783.  
  1784. action BEAMFOWARD  0  4  1  1  9
  1785. actor TRANSPORTERBEAM 0 BEAMFOWARD
  1786.   sizeto 32 64
  1787.   sizeto 32 64
  1788.   sizeto 32 64
  1789.   ifactioncount 4
  1790.     killit
  1791. enda
  1792.  
  1793. state getcode
  1794.   ifactor ATOMICHEALTH
  1795.     globalsound GETATOMICHEALTH
  1796.   else
  1797.     globalsound DUKE_GET
  1798.   palfrom 16 0 32
  1799.   ifrespawn
  1800.   {
  1801.     move RESPAWN_ACTOR_FLAG
  1802.     spawn RESPAWNMARKERRED
  1803.     cstat 32768
  1804.   }
  1805.   else
  1806.     killit
  1807. ends
  1808.  
  1809. state randgetweapsnds
  1810.   ifrnd 64
  1811.     globalsound DUKE_GETWEAPON1
  1812.   else
  1813.     ifrnd 96
  1814.       globalsound DUKE_GETWEAPON2
  1815.   else
  1816.     ifrnd 128
  1817.       globalsound DUKE_GETWEAPON3
  1818.   else
  1819.     ifrnd 140
  1820.       globalsound DUKE_GETWEAPON4
  1821.   else
  1822.     globalsound DUKE_GETWEAPON6
  1823. ends
  1824.  
  1825. state getweaponcode
  1826.  
  1827.   ifactor SHRINKERSPRITE { sound GETMAGIC }
  1828.   else { state randgetweapsnds }
  1829.  
  1830.   ifactor SHRINKERSPRITE
  1831.   {
  1832.   palfrom 48 0 48
  1833.   }
  1834.   else
  1835.   {
  1836.   palfrom 32 0 32
  1837.   }
  1838.   ifgotweaponce 1
  1839.     break
  1840.   ifrespawn
  1841.   {
  1842.     move RESPAWN_ACTOR_FLAG
  1843.     spawn RESPAWNMARKERRED
  1844.     cstat 32768
  1845.   }
  1846.   else
  1847.     killit
  1848. ends
  1849.  
  1850.  
  1851. state respawnit
  1852.   ifcount RESPAWNITEMTIME
  1853.   {
  1854.     spawn TRANSPORTERSTAR
  1855.     move 0
  1856.     cstat 0
  1857.     sound TELEPORTER
  1858.   }
  1859. ends
  1860.  
  1861. state quikget
  1862.   ifactor ATOMICHEALTH
  1863.     globalsound GETATOMICHEALTH
  1864.   else
  1865.     globalsound DUKE_GET
  1866.   palfrom 16 0 32
  1867.   killit
  1868. ends
  1869.  
  1870. state quikweaponget
  1871.   state randgetweapsnds
  1872.   ifactor SHRINKERSPRITE
  1873.   {
  1874.   palfrom 48 0 48
  1875.   }
  1876.   else
  1877.   {
  1878.   palfrom 32 0 32
  1879.   }
  1880.   ifgotweaponce 1
  1881.     break
  1882.   killit
  1883. ends
  1884.  
  1885. actor STEROIDS
  1886.   fall
  1887.   ifmove RESPAWN_ACTOR_FLAG
  1888.     state respawnit
  1889.   else
  1890.     ifp pshrunk
  1891.       nullop
  1892.     else
  1893.       ifp palive
  1894.         ifcount 6
  1895.           ifpdistl RETRIEVEDISTANCE
  1896.             ifpinventory GET_STEROIDS STEROID_AMOUNT
  1897.               ifcanseetarget
  1898.       {
  1899.         addinventory GET_STEROIDS STEROID_AMOUNT
  1900.         quote 37
  1901.         ifspawnedby STEROIDS
  1902.           state getcode
  1903.         else
  1904.           state quikget
  1905.       }
  1906. enda
  1907.  
  1908. actor BOOTS
  1909.   fall
  1910.   ifmove RESPAWN_ACTOR_FLAG
  1911.     state respawnit
  1912.   else
  1913.     ifp pshrunk
  1914.       nullop
  1915.     else
  1916.       ifp palive
  1917.         ifcount 6
  1918.           ifpdistl RETRIEVEDISTANCE
  1919.             ifpinventory GET_BOOTS BOOT_AMOUNT
  1920.               ifcanseetarget
  1921.       {
  1922.         addinventory GET_BOOTS BOOT_AMOUNT
  1923.         quote 6
  1924.         ifspawnedby BOOTS
  1925.           state getcode
  1926.         else
  1927.           state quikget
  1928.       }
  1929. enda
  1930.  
  1931. actor HEATSENSOR
  1932.   fall
  1933.   ifmove RESPAWN_ACTOR_FLAG
  1934.     state respawnit
  1935.   else
  1936.     ifp pshrunk
  1937.       nullop
  1938.   else
  1939.     ifp palive
  1940.       ifcount 6
  1941.         ifpdistl RETRIEVEDISTANCE
  1942.           ifpinventory GET_HEATS HEAT_AMOUNT
  1943.             ifcanseetarget
  1944.       {
  1945.         addinventory GET_HEATS HEAT_AMOUNT
  1946.         quote 101
  1947.         ifspawnedby HEATSENSOR
  1948.           state getcode
  1949.         else
  1950.           state quikget
  1951.       }
  1952. enda
  1953.  
  1954. actor SHIELD
  1955.   fall
  1956.   ifmove RESPAWN_ACTOR_FLAG
  1957.     state respawnit
  1958.   else
  1959.     ifp pshrunk nullop
  1960.     else
  1961.       ifp palive
  1962.         ifcount 6
  1963.           ifpdistl RETRIEVEDISTANCE
  1964.             ifpinventory GET_SHIELD SHIELD_AMOUNT
  1965.               ifcanseetarget
  1966.       {
  1967.         ifspawnedby PIGCOP
  1968.         {
  1969.           ifrnd 128
  1970.             addinventory GET_SHIELD PIG_SHIELD_AMOUNT1
  1971.           else
  1972.             addinventory GET_SHIELD PIG_SHIELD_AMOUNT2
  1973.           quote 104
  1974.           sound KICK_HIT
  1975.           palfrom 24 0 32
  1976.           killit
  1977.         }
  1978.         else
  1979.           addinventory GET_SHIELD SHIELD_AMOUNT
  1980.         quote 38
  1981.         ifspawnedby SHIELD
  1982.           state getcode
  1983.         else
  1984.           state quikget
  1985.       }
  1986. enda
  1987.  
  1988.  
  1989. actor AIRTANK
  1990.   fall
  1991.   ifmove RESPAWN_ACTOR_FLAG
  1992.     state respawnit
  1993.   else
  1994.     ifp pshrunk nullop
  1995.     else
  1996.       ifp palive
  1997.         ifcount 6
  1998.           ifpdistl RETRIEVEDISTANCE
  1999.             ifpinventory GET_SCUBA SCUBA_AMOUNT
  2000.               ifcanseetarget
  2001.       {
  2002.         addinventory GET_SCUBA SCUBA_AMOUNT
  2003.         quote 39
  2004.         ifspawnedby AIRTANK
  2005.           state getcode
  2006.         else
  2007.           state quikget
  2008.       }
  2009. enda
  2010.  
  2011. action HOLODUKE_FRAMES 0 4 1 1 8
  2012. actor HOLODUKE 0 HOLODUKE_FRAMES
  2013.   fall
  2014.   ifmove RESPAWN_ACTOR_FLAG
  2015.     state respawnit
  2016.   else
  2017.     ifp pshrunk nullop
  2018.     else
  2019.       ifp palive
  2020.         ifcount 6
  2021.           ifpdistl RETRIEVEDISTANCE
  2022.             ifpinventory GET_HOLODUKE HOLODUKE_AMOUNT
  2023.               ifcanseetarget
  2024.       {
  2025.         addinventory GET_HOLODUKE HOLODUKE_AMOUNT
  2026.         quote 51
  2027.         ifspawnedby HOLODUKE
  2028.           state getcode
  2029.         else
  2030.           state quikget
  2031.       }
  2032. enda
  2033.  
  2034. actor JETPACK
  2035.   fall
  2036.   ifmove RESPAWN_ACTOR_FLAG
  2037.     state respawnit
  2038.   else
  2039.     ifp pshrunk nullop
  2040.     else
  2041.       ifp palive
  2042.         ifpdistl RETRIEVEDISTANCE
  2043.           ifcount 6
  2044.             ifpinventory GET_JETPACK JETPACK_AMOUNT
  2045.               ifcanseetarget
  2046.       {
  2047.         addinventory GET_JETPACK JETPACK_AMOUNT
  2048.         quote 41
  2049.         ifspawnedby JETPACK
  2050.           state getcode
  2051.         else
  2052.           state quikget
  2053.       }
  2054. enda
  2055.  
  2056. actor ACCESSCARD
  2057.   fall
  2058.   ifmove RESPAWN_ACTOR_FLAG
  2059.     state respawnit
  2060.   else
  2061.     ifp pshrunk nullop
  2062.     else
  2063.       ifp palive
  2064.         ifpdistl RETRIEVEDISTANCE
  2065.           ifcount 6
  2066.             ifcanseetarget
  2067.       {
  2068.         ifpinventory GET_ACCESS 0
  2069.           break
  2070.         addinventory GET_ACCESS 1
  2071.         quote 43
  2072.         state getcode
  2073.       }
  2074. enda
  2075.  
  2076. actor AMMO
  2077.   fall
  2078.   ifmove RESPAWN_ACTOR_FLAG
  2079.     state respawnit
  2080.   else
  2081.     ifp pshrunk nullop
  2082.     else
  2083.       ifp palive
  2084.         ifcount 6
  2085.           ifpdistl RETRIEVEDISTANCE
  2086.             ifcanseetarget
  2087.       {
  2088.         addammo PISTOL_WEAPON PISTOLAMMOAMOUNT
  2089.         quote 65
  2090.         ifspawnedby AMMO
  2091.           state getcode
  2092.         else
  2093.           state quikget
  2094.       }
  2095. enda
  2096.  
  2097. actor FREEZEAMMO
  2098.   fall
  2099.   ifmove RESPAWN_ACTOR_FLAG
  2100.     state respawnit
  2101.   else
  2102.     ifp pshrunk nullop
  2103.     else
  2104.       ifp palive
  2105.         ifcount 6
  2106.           ifpdistl RETRIEVEDISTANCE
  2107.             ifcanseetarget
  2108.       {
  2109.         addammo FREEZE_WEAPON FREEZEAMMOAMOUNT
  2110.         quote 66
  2111.         ifspawnedby FREEZEAMMO
  2112.           state getcode
  2113.         else
  2114.           state quikget
  2115.       }
  2116. enda
  2117.  
  2118. actor SHOTGUNAMMO
  2119.   fall
  2120.   ifmove RESPAWN_ACTOR_FLAG
  2121.     state respawnit
  2122.   else
  2123.     ifp pshrunk nullop
  2124.     else
  2125.       ifp palive
  2126.         ifcount 6
  2127.           ifpdistl RETRIEVEDISTANCE
  2128.             ifcanseetarget
  2129.       {
  2130.         addammo SHOTGUN_WEAPON SHOTGUNAMMOAMOUNT
  2131.         quote 69
  2132.         ifspawnedby SHOTGUNAMMO
  2133.           state getcode
  2134.         else
  2135.           state quikget
  2136.       }
  2137. enda
  2138.  
  2139. actor AMMOLOTS
  2140.   fall
  2141.   ifmove RESPAWN_ACTOR_FLAG
  2142.     state respawnit
  2143.   else
  2144.     ifp pshrunk nullop
  2145.     else
  2146.       ifp palive
  2147.         ifcount 6
  2148.           ifpdistl RETRIEVEDISTANCE
  2149.             ifcanseetarget
  2150.       {
  2151.         addammo PISTOL_WEAPON 48
  2152.         quote 65
  2153.         ifspawnedby AMMOLOTS
  2154.           state getcode
  2155.         else
  2156.           state quikget
  2157.       }
  2158. enda
  2159.  
  2160. actor CRYSTALAMMO
  2161.   fall
  2162.   ifmove RESPAWN_ACTOR_FLAG
  2163.     state respawnit
  2164.   else
  2165.     ifp pshrunk nullop
  2166.     else
  2167.       ifp palive
  2168.         ifpdistl RETRIEVEDISTANCE
  2169.           ifcount 6
  2170.             ifcanseetarget
  2171.       {
  2172.         addammo SHRINKER_WEAPON CRYSTALAMMOAMOUNT
  2173.         quote 78
  2174.         ifspawnedby CRYSTALAMMO
  2175.           state getcode
  2176.         else
  2177.           state quikget
  2178.       }
  2179. enda
  2180.  
  2181. actor GROWAMMO
  2182.   fall
  2183.   ifmove RESPAWN_ACTOR_FLAG
  2184.     state respawnit
  2185.   else
  2186.     ifp pshrunk nullop
  2187.     else
  2188.       ifp palive
  2189.         ifpdistl RETRIEVEDISTANCE
  2190.           ifcount 6
  2191.             ifcanseetarget
  2192.       {
  2193.         addammo GROW_WEAPON GROWCRYSTALAMMOAMOUNT
  2194.         quote 123
  2195.         ifspawnedby GROWAMMO
  2196.           state getcode
  2197.         else
  2198.           state quikget
  2199.       }
  2200. enda
  2201.  
  2202. actor BATTERYAMMO
  2203.   fall
  2204.   ifmove RESPAWN_ACTOR_FLAG
  2205.     state respawnit
  2206.   else
  2207.     ifp pshrunk nullop
  2208.     else
  2209.       ifp palive
  2210.         ifpdistl RETRIEVEDISTANCE
  2211.           ifcount 6
  2212.             ifcanseetarget
  2213.       {
  2214.         addammo CHAINGUN_WEAPON CHAINGUNAMMOAMOUNT
  2215.           quote 63
  2216.         ifspawnedby BATTERYAMMO
  2217.           state getcode
  2218.         else
  2219.           state quikget
  2220.       }
  2221. enda
  2222.  
  2223. actor DEVISTATORAMMO
  2224.   fall
  2225.   ifmove RESPAWN_ACTOR_FLAG
  2226.     state respawnit
  2227.   else
  2228.     ifp pshrunk nullop
  2229.     else
  2230.       ifp palive
  2231.         ifpdistl RETRIEVEDISTANCE
  2232.           ifcount 6
  2233.             ifcanseetarget
  2234.       {
  2235.         addammo DEVISTATOR_WEAPON DEVISTATORAMMOAMOUNT
  2236.         quote 14
  2237.         ifspawnedby DEVISTATORAMMO
  2238.           state getcode
  2239.         else
  2240.           state quikget
  2241.       }
  2242. enda
  2243.  
  2244. actor RPGAMMO
  2245.   fall
  2246.   ifmove RESPAWN_ACTOR_FLAG
  2247.     state respawnit
  2248.   else
  2249.     ifp pshrunk nullop
  2250.     else ifp palive
  2251.       ifpdistl RETRIEVEDISTANCE
  2252.         ifcount 6
  2253.           ifcanseetarget
  2254.       {
  2255.         addammo RPG_WEAPON RPGAMMOBOX
  2256.         quote 64
  2257.         ifspawnedby RPGAMMO
  2258.           state getcode
  2259.         else
  2260.           state quikget
  2261.       }
  2262. enda
  2263.  
  2264. actor HBOMBAMMO
  2265.   fall
  2266.   ifmove RESPAWN_ACTOR_FLAG state respawnit
  2267.   else
  2268.     ifp pshrunk nullop
  2269.     else
  2270.       ifp palive
  2271.         ifpdistl RETRIEVEDISTANCE
  2272.           ifcount 6
  2273.             ifcanseetarget
  2274.       {
  2275.         ifgotweaponce 0
  2276.           break
  2277.  
  2278.         addweapon HANDBOMB_WEAPON HANDBOMBBOX
  2279.         quote 55
  2280. //        addammo HANDBOMB_WEAPON HANDBOMBBOX
  2281.  
  2282.         ifspawnedby HBOMBAMMO
  2283.           state getweaponcode
  2284.         else
  2285.           state quikweaponget
  2286.       }
  2287. enda
  2288.  
  2289. actor RPGSPRITE
  2290.   fall
  2291.   ifmove RESPAWN_ACTOR_FLAG
  2292.     state respawnit
  2293.   else
  2294.     ifp pshrunk nullop
  2295.     else
  2296.       ifp palive
  2297.         ifpdistl RETRIEVEDISTANCE
  2298.           ifcount 6
  2299.             ifcanseetarget
  2300.       {
  2301.         ifgotweaponce 0
  2302.           break
  2303.  
  2304.         addweapon RPG_WEAPON RPGAMMOBOX
  2305.         quote 56
  2306.         ifspawnedby RPGSPRITE
  2307.           state getweaponcode
  2308.         else
  2309.           state quikweaponget
  2310.       }
  2311. enda
  2312.  
  2313. actor SHOTGUNSPRITE
  2314.   fall
  2315.   ifmove RESPAWN_ACTOR_FLAG
  2316.     state respawnit
  2317.   else
  2318.     ifp pshrunk nullop
  2319.     else
  2320.       ifp palive
  2321.         ifpdistl RETRIEVEDISTANCE
  2322.           ifcount 6
  2323.             ifcanseetarget
  2324.       {
  2325.         ifspawnedby PIGCOP
  2326.         {
  2327.           addweapon SHOTGUN_WEAPON 0
  2328.           ifrnd 64
  2329.             addammo SHOTGUN_WEAPON 4
  2330.           else ifrnd 64
  2331.             addammo SHOTGUN_WEAPON 3
  2332.           else ifrnd 64
  2333.             addammo SHOTGUN_WEAPON 2
  2334.           else
  2335.             addammo SHOTGUN_WEAPON 1
  2336.         }
  2337.         else
  2338.         {
  2339.           ifgotweaponce 0
  2340.             break
  2341.           addweapon SHOTGUN_WEAPON SHOTGUNAMMOAMOUNT
  2342.           quote 57
  2343.         }
  2344.  
  2345.         ifspawnedby SHOTGUNSPRITE
  2346.           state getweaponcode
  2347.         else
  2348.           state quikweaponget
  2349.       }
  2350. enda
  2351.  
  2352.  
  2353.  
  2354. actor SIXPAK
  2355.   fall
  2356.   ifmove RESPAWN_ACTOR_FLAG
  2357.     state respawnit
  2358.   else
  2359.     ifp pshrunk nullop
  2360.     else
  2361.       ifp palive
  2362.         ifpdistl RETRIEVEDISTANCE
  2363.           ifcount 6
  2364.             ifphealthl MAXPLAYERHEALTH
  2365.               ifcanseetarget
  2366.       {
  2367.         addphealth 30
  2368.         quote 62
  2369.         ifspawnedby SIXPAK
  2370.           state getcode
  2371.         else
  2372.           state quikget
  2373.       }
  2374. enda
  2375.  
  2376. actor COLA
  2377.   fall
  2378.   ifmove RESPAWN_ACTOR_FLAG
  2379.     state respawnit
  2380.   else
  2381.     ifp pshrunk nullop
  2382.     else
  2383.       ifp palive
  2384.         ifpdistl RETRIEVEDISTANCE
  2385.           ifcount 6
  2386.             ifphealthl MAXPLAYERHEALTH
  2387.               ifcanseetarget
  2388.       {
  2389.         addphealth 10
  2390.         quote 61
  2391.         ifspawnedby COLA
  2392.           state getcode
  2393.         else
  2394.           state quikget
  2395.       }
  2396. enda
  2397.  
  2398. actor ATOMICHEALTH
  2399.   fall
  2400.   ifmove RESPAWN_ACTOR_FLAG
  2401.     state respawnit
  2402.   else
  2403.     ifp pshrunk nullop
  2404.     else
  2405.       ifp palive
  2406.         ifpdistl RETRIEVEDISTANCE
  2407.           ifcount 6
  2408.             ifphealthl MAXPLAYERATOMICHEALTH
  2409.               ifcanseetarget
  2410.       {
  2411.         addphealth 50
  2412.         quote 19
  2413.         ifspawnedby ATOMICHEALTH
  2414.           state getcode
  2415.         else
  2416.           state quikget
  2417.       }
  2418. enda
  2419.  
  2420.  
  2421.  
  2422.  
  2423. actor FIRSTAID
  2424.   fall
  2425.   ifmove RESPAWN_ACTOR_FLAG state respawnit
  2426.   else
  2427.     ifp pshrunk nullop
  2428.     else
  2429.       ifp palive
  2430.         ifpdistl RETRIEVEDISTANCE
  2431.           ifcount 6
  2432.             ifpinventory GET_FIRSTAID FIRSTAID_AMOUNT
  2433.               ifcanseetarget
  2434.       {
  2435.         addinventory GET_FIRSTAID FIRSTAID_AMOUNT
  2436.         quote 3
  2437.  
  2438.         ifspawnedby FIRSTAID
  2439.           state getcode
  2440.         else
  2441.           state quikget
  2442.       }
  2443. enda
  2444.  
  2445.  
  2446. actor FIRSTGUNSPRITE
  2447.   fall
  2448.   ifmove RESPAWN_ACTOR_FLAG
  2449.     state respawnit
  2450.   else
  2451.     ifp pshrunk nullop
  2452.     else
  2453.       ifp palive
  2454.         ifpdistl RETRIEVEDISTANCE
  2455.           ifcount 6
  2456.             ifcanseetarget
  2457.       {
  2458.         ifgotweaponce 0
  2459.           break
  2460.         addweapon PISTOL_WEAPON 48
  2461.         ifspawnedby FIRSTGUNSPRITE
  2462.           state getweaponcode
  2463.         else
  2464.           state quikweaponget
  2465.       }
  2466. enda
  2467.  
  2468.  
  2469. actor TRIPBOMBSPRITE
  2470.   fall
  2471.   ifmove RESPAWN_ACTOR_FLAG
  2472.     state respawnit
  2473.   else
  2474.     ifp pshrunk nullop
  2475.     else
  2476.       ifp palive
  2477.         ifpdistl RETRIEVEDISTANCE
  2478.           ifcount 6
  2479.             ifcanseetarget
  2480.       {
  2481.         ifgotweaponce 0
  2482.           break
  2483.  
  2484.         addweapon TRIPBOMB_WEAPON 1
  2485.         quote 58
  2486.         ifspawnedby TRIPBOMBSPRITE
  2487.           state getweaponcode
  2488.         else
  2489.           state quikweaponget
  2490.       }
  2491. enda
  2492.  
  2493. actor CHAINGUNSPRITE
  2494.   fall
  2495.   ifmove RESPAWN_ACTOR_FLAG
  2496.     state respawnit
  2497.   else
  2498.     ifp pshrunk nullop
  2499.     else
  2500.       ifp palive
  2501.         ifpdistl RETRIEVEDISTANCE
  2502.           ifcount 6
  2503.             ifcanseetarget
  2504.       {
  2505.         ifgotweaponce 0
  2506.           break
  2507.  
  2508.         addweapon CHAINGUN_WEAPON 50
  2509.         quote 54
  2510.         ifspawnedby CHAINGUNSPRITE
  2511.           state getweaponcode
  2512.         else
  2513.           state quikweaponget
  2514.       }
  2515. enda
  2516.  
  2517.  
  2518.  
  2519. actor SHRINKERSPRITE
  2520.   fall
  2521.   ifmove RESPAWN_ACTOR_FLAG
  2522.     state respawnit
  2523.   else
  2524.     ifp pshrunk nullop
  2525.     else
  2526.       ifp palive
  2527.         ifpdistl RETRIEVEDISTANCE
  2528.           ifcount 6
  2529.             ifcanseetarget
  2530.       {
  2531.         ifgotweaponce 0
  2532.           break
  2533.         addweapon SHRINKER_WEAPON 10
  2534.         quote 60
  2535.         ifspawnedby SHRINKERSPRITE
  2536.           state getweaponcode
  2537.         else
  2538.           state quikweaponget
  2539.       }
  2540. enda
  2541.  
  2542. actor FREEZESPRITE
  2543.   fall
  2544.   ifmove RESPAWN_ACTOR_FLAG
  2545.     state respawnit
  2546.   else
  2547.     ifp pshrunk nullop
  2548.     else
  2549.       ifp palive
  2550.         ifpdistl RETRIEVEDISTANCE
  2551.           ifcount 6
  2552.             ifcanseetarget
  2553.       {
  2554.         ifgotweaponce 0
  2555.           break
  2556.  
  2557.         addweapon FREEZE_WEAPON FREEZEAMMOAMOUNT
  2558.         quote 59
  2559.         ifspawnedby FREEZESPRITE
  2560.           state getweaponcode
  2561.         else
  2562.           state quikweaponget
  2563.       }
  2564. enda
  2565.  
  2566. actor DEVISTATORSPRITE
  2567.   fall
  2568.   ifmove RESPAWN_ACTOR_FLAG state respawnit
  2569.   else
  2570.     ifp pshrunk nullop
  2571.     else
  2572.       ifp palive
  2573.         ifpdistl RETRIEVEDISTANCE
  2574.           ifcount 6
  2575.             ifcanseetarget
  2576.       {
  2577.         ifgotweaponce 0
  2578.           break
  2579.         addweapon DEVISTATOR_WEAPON DEVISTATORAMMOAMOUNT
  2580.         quote 87
  2581.         ifspawnedby DEVISTATORSPRITE
  2582.           state getweaponcode
  2583.         else
  2584.           state quikweaponget
  2585.       }
  2586. enda
  2587.  
  2588. action FIRE_FRAMES   -1 14 1 1 1
  2589. move FIREVELS
  2590.  
  2591. state firestate
  2592.  
  2593.   ifaction 0
  2594.     ifrnd 16
  2595.     {
  2596.       action FIRE_FRAMES
  2597.       cstator 128
  2598.     }
  2599.  
  2600.   sleeptime 300         // Never let it fall to sleep
  2601.  
  2602.   ifspawnedby FIRE
  2603.   {
  2604.     ifgapzl 16
  2605.       break
  2606.   }
  2607.   else
  2608.     ifspawnedby FIRE2
  2609.   {
  2610.     ifgapzl 16
  2611.       break
  2612.   }
  2613.  
  2614.   ifinwater
  2615.     killit
  2616.  
  2617.   ifp palive
  2618.     ifpdistl 844
  2619.       ifrnd 32
  2620.         ifcansee
  2621.   {
  2622.     soundonce DUKE_LONGTERM_PAIN
  2623.     addphealth -1
  2624.     palfrom 32 32
  2625.   }
  2626.  
  2627.   ifactor FIRE
  2628.   {
  2629.     ifspawnedby FIRE
  2630.       break
  2631.   }
  2632.   else
  2633.     ifactor FIRE2
  2634.       ifspawnedby FIRE2
  2635.         break
  2636.  
  2637.   iffloordistl 128
  2638.   {
  2639.     ifrnd 128
  2640.     {
  2641.       ifcount 84
  2642.         killit
  2643.                 // This line(and the else below)
  2644.                 // is not necessary, since actors
  2645.                 // with zero x-size are automatically
  2646.                 // deleted anyway!
  2647.       else
  2648.         ifcount 42
  2649.           sizeto 0 0
  2650.       else
  2651.         sizeto 32 32
  2652.     }
  2653.   }
  2654.   else
  2655.     killit
  2656.  
  2657. ends
  2658.  
  2659. useractor notenemy FIRE WEAK 0 FIREVELS state firestate enda
  2660. useractor notenemy FIRE2 WEAK 0 FIREVELS state firestate enda
  2661.  
  2662. actor FECES
  2663.   ifcount 24
  2664.   {
  2665.     ifpdistl RETRIEVEDISTANCE
  2666.     {
  2667.       ifrnd SWEARFREQUENCY
  2668.         soundonce DUKE_STEPONFECES
  2669.  
  2670.       sound STEPNIT
  2671.  
  2672.       spawn BLOODPOOL   // Will be brown
  2673.       killit
  2674.     }
  2675.   }
  2676.   else
  2677.     sizeto 32 32
  2678. enda
  2679.  
  2680. state drop_ammo
  2681.   ifrnd SPAWNAMMOODDS
  2682.     spawn AMMO
  2683. ends
  2684.  
  2685. state drop_battery
  2686.   ifrnd SPAWNAMMOODDS
  2687.     spawn BATTERYAMMO
  2688. ends
  2689. state drop_sgshells
  2690.   ifrnd SPAWNAMMOODDS
  2691.     spawn SHOTGUNAMMO
  2692. ends
  2693. state drop_shotgun
  2694.   ifrnd SPAWNAMMOODDS
  2695.     spawn SHOTGUNSPRITE
  2696. ends
  2697. state drop_chaingun
  2698.   ifrnd SPAWNAMMOODDS
  2699.   {
  2700.     ifrnd 32
  2701.       spawn CHAINGUNSPRITE
  2702.     else
  2703.       spawn BATTERYAMMO
  2704.   }
  2705. ends
  2706.  
  2707.  
  2708. state random_wall_jibs
  2709.   ifrnd 96
  2710.     shoot BLOODSPLAT1
  2711.   ifrnd 96
  2712.     shoot BLOODSPLAT2
  2713.   ifrnd 96
  2714.     shoot BLOODSPLAT3
  2715.   ifrnd 96
  2716.     shoot BLOODSPLAT4
  2717.   ifrnd 96
  2718.     shoot BLOODSPLAT1
  2719. ends
  2720.  
  2721.  
  2722.  
  2723.  
  2724. action FEMSHRUNK
  2725. action FEMFROZEN1 1
  2726. action FEMGROW
  2727. action FEMFROZEN2
  2728. action FEMDANCE1 19 1 1 1 16
  2729. action FEMDANCE3 19 1 1 1 26
  2730. action FEMDANCE2 20 2 1 1 10
  2731.  
  2732. action FEMANIMATESLOW 0 2 1 1 100
  2733. action TOUGHGALANIM   0 5 1 1 25
  2734. action FEMANIMATE
  2735.  
  2736. state femcode
  2737.  
  2738.   ifactor NAKED1 nullop
  2739.   else
  2740.     ifactor FEM6 nullop
  2741.     else
  2742.     {
  2743.       fall
  2744.       ifactor BLOODYPOLE
  2745.         ifhitweapon
  2746.           ifdead
  2747.       {
  2748.         state standard_jibs
  2749.         killit
  2750.       }
  2751.     }
  2752.  
  2753.   ifaction FEMSHRUNK
  2754.   {
  2755.     ifcount SHRUNKDONECOUNT
  2756.     {
  2757.       action FEMANIMATE
  2758.       cstat 257
  2759.     }
  2760.     else
  2761.       ifcount SHRUNKCOUNT
  2762.         sizeto 40 40
  2763.     else
  2764.       state genericshrunkcode
  2765.   }
  2766.   else ifaction FEMGROW
  2767.   {
  2768.       soundonce LADY_SCREAM
  2769.       state genericgrowcode
  2770.       respawnhitag
  2771.   }
  2772.  
  2773.   else
  2774.     ifaction FEMDANCE1
  2775.   {
  2776.     ifactioncount 2
  2777.       action FEMDANCE2
  2778.   }
  2779.   else
  2780.     ifaction FEMDANCE2
  2781.   {
  2782.     ifactioncount 8
  2783.       action FEMDANCE3
  2784.   }
  2785.   else
  2786.     ifaction FEMDANCE3
  2787.   {
  2788.     ifactioncount 2
  2789.     action FEMANIMATE
  2790.   }
  2791.   else
  2792.     ifaction FEMFROZEN1
  2793.   {
  2794.     ifcount THAWTIME
  2795.     {
  2796.       action FEMANIMATE
  2797.       getlastpal
  2798.     }
  2799.     else
  2800.       ifcount FROZENDRIPTIME
  2801.     {
  2802.       ifactioncount 26
  2803.       {
  2804.         spawn WATERDRIP
  2805.         resetactioncount
  2806.       }
  2807.     }
  2808.  
  2809.     ifhitweapon
  2810.     {
  2811.       ifwasweapon FREEZEBLAST
  2812.       {
  2813.         strength 0
  2814.         break
  2815.       }
  2816.       lotsofglass 30
  2817.       sound GLASS_BREAKING
  2818.       respawnhitag
  2819.       ifrnd 84
  2820.         spawn BLOODPOOL
  2821.       killit
  2822.     }
  2823.     else
  2824.       ifp pfacing
  2825.         ifpdistl FROZENQUICKKICKDIST
  2826.           pkick
  2827.     break
  2828.   }
  2829.   else ifaction FEMFROZEN2
  2830.   {
  2831.     ifcount THAWTIME
  2832.     {
  2833.       ifactor TOUGHGAL
  2834.         action TOUGHGALANIM
  2835.       else
  2836.         ifactor FEM10
  2837.           action FEMANIMATESLOW
  2838.       else
  2839.         action FEMANIMATE
  2840.  
  2841.       getlastpal
  2842.     }
  2843.     else
  2844.       ifcount FROZENDRIPTIME
  2845.     {
  2846.       ifactioncount 26
  2847.       {
  2848.         spawn WATERDRIP
  2849.         resetactioncount
  2850.       }
  2851.     }
  2852.  
  2853.     ifhitweapon
  2854.     {
  2855.       ifwasweapon FREEZEBLAST
  2856.       {
  2857.         strength 0
  2858.           break
  2859.       }
  2860.  
  2861.       lotsofglass 30
  2862.  
  2863.       sound GLASS_BREAKING
  2864.       ifrnd 84
  2865.         spawn BLOODPOOL
  2866.       respawnhitag
  2867.  
  2868.       ifrnd 128
  2869.         sound DUKE_HIT_STRIPPER1
  2870.       else
  2871.         sound DUKE_HIT_STRIPPER2
  2872.  
  2873.       killit
  2874.     }
  2875.     else
  2876.       ifp pfacing
  2877.         ifpdistl FROZENQUICKKICKDIST
  2878.           pkick
  2879.     break
  2880.   }
  2881.  
  2882.   ifhitweapon
  2883.   {
  2884.     ifdead
  2885.     {
  2886.       ifwasweapon GROWSPARK
  2887.       {
  2888.         cstat 0
  2889.         move 0
  2890.         sound ACTOR_GROWING
  2891.         action FEMGROW
  2892.         break
  2893.       }
  2894.       else ifwasweapon FREEZEBLAST
  2895.       {
  2896.         ifaction FEMSHRUNK
  2897.           break
  2898.  
  2899.         ifactor NAKED1
  2900.           action FEMFROZEN2
  2901.         else
  2902.           ifactor FEM5
  2903.             action FEMFROZEN2
  2904.         else
  2905.           ifactor FEM6
  2906.             action FEMFROZEN2
  2907.         else
  2908.           ifactor FEM8
  2909.             action FEMFROZEN2
  2910.         else
  2911.           ifactor FEM9
  2912.             action FEMFROZEN2
  2913.         else
  2914.           ifactor FEM10
  2915.             action FEMFROZEN2
  2916.         else
  2917.           ifactor TOUGHGAL
  2918.             action FEMFROZEN2
  2919.         else
  2920.           ifactor PODFEM1
  2921.             action FEMFROZEN2
  2922.         else
  2923.           action FEMFROZEN1
  2924.  
  2925.         move 0
  2926.         spritepal 1
  2927.         strength 0
  2928.  
  2929.         sound SOMETHINGFROZE
  2930.  
  2931.         break
  2932.       }
  2933.  
  2934.       ifrnd 128
  2935.         sound DUKE_HIT_STRIPPER1
  2936.       else
  2937.         sound DUKE_HIT_STRIPPER2
  2938.  
  2939.       respawnhitag
  2940.       state standard_jibs
  2941.       state random_wall_jibs
  2942.       spawn BLOODPOOL
  2943.  
  2944.       ifactor FEM1
  2945.         money 5
  2946.       else
  2947.         ifactor FEM2
  2948.       {
  2949.         money 7
  2950.         cactor BARBROKE
  2951.         cstat 0
  2952.       }
  2953.       else
  2954.         ifactor FEM3
  2955.           money 4
  2956.       else
  2957.         ifactor FEM7
  2958.           money 8
  2959.  
  2960.       ifactor FEM5
  2961.       {
  2962.         strength TOUGH
  2963.         cactor BLOODYPOLE
  2964.       }
  2965.       else ifactor FEM6
  2966.       {
  2967.         cstat 0
  2968.         cactor FEM6PAD
  2969.       }
  2970.       else
  2971.         ifactor FEM8
  2972.       {
  2973.         strength TOUGH
  2974.         cactor BLOODYPOLE
  2975.       }
  2976.       else
  2977.       {
  2978.         spritepal 6
  2979.         soundonce LADY_SCREAM
  2980.         ifactor NAKED1
  2981.           debris SCRAP3 18
  2982.         else
  2983.           ifactor PODFEM1
  2984.             debris SCRAP3 18
  2985.         killit
  2986.       }
  2987.     }
  2988.     else
  2989.     {
  2990.       ifwasweapon SHRINKSPARK
  2991.       {
  2992.         sound ACTOR_SHRINKING
  2993.         move 0
  2994.         action FEMSHRUNK
  2995.         cstat 0
  2996.         break
  2997.       }
  2998.       else
  2999.         ifwasweapon GROWSPARK
  3000.           sound EXPANDERHIT
  3001.       ifactor FEM8
  3002.         break
  3003.  
  3004.       ifactor TOUGHGAL
  3005.           state toughgalspeech
  3006.       else sound SQUISHED
  3007.  
  3008.       guts JIBS6 1
  3009.     }
  3010.   }
  3011. ends
  3012.  
  3013. state killme
  3014.   ifinwater nullop
  3015.   else
  3016.     ifp pfacing
  3017.       ifpdistl 1280
  3018.         ifhitspace
  3019.           soundonce KILLME
  3020. ends
  3021.  
  3022. state tipme
  3023.   ifp pfacing
  3024.     ifpdistl 1280
  3025.       ifhitspace
  3026.   {
  3027.     tip
  3028.     ifrnd 128
  3029.       soundonce DUKE_TIP1
  3030.     else
  3031.       soundonce DUKE_TIP2
  3032.     ifactor FEM1
  3033.       action FEMDANCE1
  3034.   }
  3035. ends
  3036.  
  3037. state toughgaltalk
  3038.   ifp pfacing
  3039.     ifpdistl 1280
  3040.       ifhitspace
  3041.         state toughgalspeech
  3042. ends
  3043.  
  3044. actor FEM1 TOUGH FEMANIMATE
  3045.   state tipme
  3046.   state femcode
  3047. enda
  3048. actor FEM2 TOUGH FEMANIMATE
  3049.   state tipme
  3050.   state femcode
  3051. enda
  3052. actor FEM3 TOUGH FEMANIMATE
  3053.   state tipme
  3054.   state femcode
  3055. enda
  3056. actor FEM4 TOUGH FEMANIMATE
  3057.   state femcode
  3058. enda
  3059. actor FEM5 TOUGH FEMANIMATE
  3060.   state killme
  3061.   state femcode
  3062. enda
  3063. actor FEM6 TOUGH FEMANIMATE
  3064.   state killme
  3065.   state femcode
  3066. enda
  3067. actor FEM7 TOUGH FEMANIMATE
  3068.   state tipme
  3069.   state femcode
  3070. enda
  3071. actor FEM8 TOUGH FEMANIMATE
  3072.   state femcode
  3073. enda
  3074. actor FEM9 TOUGH FEMANIMATE
  3075.   state femcode
  3076. enda
  3077. actor FEM10 TOUGH FEMANIMATESLOW
  3078.   state tipme
  3079.   state femcode
  3080. enda
  3081.  
  3082. actor TOUGHGAL MANWOMANSTRENGTH TOUGHGALANIM
  3083.   state toughgaltalk
  3084.   state femcode
  3085. enda
  3086.  
  3087. actor NAKED1 TOUGH FEMANIMATE
  3088.   state killme
  3089.   state femcode
  3090. enda
  3091. actor PODFEM1 TOUGH FEMANIMATE
  3092.   state killme
  3093.   state femcode
  3094. enda
  3095. actor BLOODYPOLE TOUGH
  3096.   state femcode
  3097. enda
  3098. actor STATUEFLASH
  3099.   fall
  3100.   ifcount 32
  3101.     cactor STATUE
  3102. enda
  3103. actor STATUE
  3104.   fall
  3105.   ifp pfacing
  3106.     ifpdistl 1280
  3107.       ifhitspace
  3108.   {
  3109.     cactor STATUEFLASH
  3110.     move 0
  3111.   }
  3112. enda
  3113.  
  3114. actor MIKE
  3115.   ifp pfacing
  3116.     ifpdistl 1280
  3117.       ifhitspace
  3118.         mikesnd
  3119. enda
  3120.  
  3121.  
  3122.  
  3123. state troop_body_jibs
  3124.   ifrnd 64
  3125.     guts HEADJIB1 1
  3126.   ifrnd 64
  3127.     guts LEGJIB1 2
  3128.   ifrnd 64
  3129.     guts ARMJIB1 1
  3130.   ifrnd 48
  3131.     spawn BLOODPOOL
  3132. ends
  3133.  
  3134. state liz_body_jibs
  3135.   ifrnd 64
  3136.     guts LIZMANHEAD1 1
  3137.   ifrnd 64
  3138.     guts LIZMANLEG1 2
  3139.   ifrnd 64
  3140.     guts LIZMANARM1 1
  3141.   ifrnd 48
  3142.     spawn BLOODPOOL
  3143. ends
  3144.  
  3145. action BLOODFRAMES 0 4 1 1 15
  3146. actor BLOOD 0 BLOODFRAMES
  3147.   sizeto 72 72 sizeto 72 72 sizeto 72 72
  3148.   ifpdistg 3144 killit
  3149.   ifactioncount 4 killit
  3150. enda
  3151.  
  3152. action EGGOPEN1 1 1 1 1 4
  3153. action EGGOPEN2 2 1 1 1 4
  3154. action EGGOPEN3 2 1 1 1 4
  3155. action EGGWAIT  0
  3156. action EGGFROZEN 1
  3157. action EGGGROW 1
  3158. action EGGSHRUNK 1
  3159.  
  3160. actor EGG TOUGH
  3161.   fall
  3162.   ifaction 0
  3163.   {
  3164.     ifcount 64
  3165.     {
  3166.       ifrnd 128
  3167.       {
  3168.         action EGGWAIT
  3169.         move 0
  3170.       }
  3171.       else
  3172.       {
  3173.         sound SLIM_HATCH
  3174.         action EGGOPEN1
  3175.       }
  3176.     }
  3177.   }
  3178.   else
  3179.     ifaction EGGOPEN1
  3180.       ifactioncount 4
  3181.         action EGGOPEN2
  3182.   else
  3183.     ifaction EGGOPEN2
  3184.       ifactioncount 4
  3185.     {
  3186.       spawn GREENSLIME
  3187.       action EGGOPEN3
  3188.     }
  3189.   else
  3190.     ifaction EGGGROW
  3191.       state genericgrowcode
  3192.   else
  3193.     ifaction EGGSHRUNK
  3194.       state genericshrunkcode
  3195.   else
  3196.     ifaction EGGFROZEN
  3197.   {
  3198.     ifcount THAWTIME
  3199.     {
  3200.       action 0
  3201.       getlastpal
  3202.     }
  3203.     else
  3204.       ifcount FROZENDRIPTIME
  3205.     {
  3206.       ifactioncount 26
  3207.       {
  3208.         spawn WATERDRIP
  3209.         resetactioncount
  3210.       }
  3211.     }
  3212.  
  3213.     ifhitweapon
  3214.     {
  3215.       ifwasweapon FREEZEBLAST
  3216.       {
  3217.         strength 0
  3218.         break
  3219.       }
  3220.       lotsofglass 30
  3221.  
  3222.       sound GLASS_BREAKING
  3223.       ifrnd 84
  3224.         spawn BLOODPOOL
  3225.  
  3226.       addkills 1
  3227.       killit
  3228.     }
  3229.  
  3230.     // ifp pducking
  3231.     ifp pfacing
  3232.       ifpdistl FROZENQUICKKICKDIST
  3233.         pkick
  3234.  
  3235.     break
  3236.   }
  3237.  
  3238.   ifhitweapon
  3239.   {
  3240.     ifdead
  3241.     {
  3242.       ifwasweapon FREEZEBLAST
  3243.       {
  3244.         sound SOMETHINGFROZE
  3245.         spritepal 1
  3246.         move 0
  3247.         action EGGFROZEN
  3248.         strength 0
  3249.         break
  3250.       }
  3251.       else
  3252.         ifwasweapon GROWSPARK
  3253.       {
  3254.         cstat 0
  3255.         move 0
  3256.         sound ACTOR_GROWING
  3257.         action EGGGROW
  3258.         break
  3259.       }
  3260.  
  3261.       addkills 1
  3262.  
  3263.       sound SQUISHED
  3264.  
  3265.       state standard_jibs
  3266.       killit
  3267.     }
  3268.     else
  3269.       ifwasweapon SHRINKSPARK
  3270.       {
  3271.         move 0
  3272.         sound ACTOR_SHRINKING
  3273.         action EGGSHRUNK
  3274.         break
  3275.       }
  3276.  
  3277.       ifwasweapon GROWSPARK
  3278.         sound EXPANDERHIT
  3279.   }
  3280.   else
  3281.     ifaction EGGWAIT
  3282.   {
  3283.     ifcount 512
  3284.       ifrnd 2
  3285.     {
  3286.       ifaction EGGSHRUNK
  3287.         break
  3288.       sound SLIM_HATCH
  3289.       action EGGOPEN1
  3290.     }
  3291.   }
  3292.  
  3293. enda
  3294.  
  3295. actor KNEE KNEE_WEAPON_STRENGTH enda
  3296. actor SPIT SPIT_WEAPON_STRENGTH enda
  3297. actor CHAINGUN CHAINGUN_WEAPON_STRENGTH enda
  3298. actor SHOTGUN SHOTGUN_WEAPON_STRENGTH enda
  3299. actor FIRELASER FIRELASER_WEAPON_STRENGTH enda
  3300. actor HEAVYHBOMB HANDBOMB_WEAPON_STRENGTH enda
  3301. actor BOUNCEMINE BOUNCEMINE_WEAPON_STRENGTH enda
  3302. actor MORTER MORTER_WEAPON_STRENGTH enda
  3303. actor SHRINKSPARK SHRINKER_WEAPON_STRENGTH enda
  3304.  
  3305. actor GROWSPARK GROWSPARK_WEAPON_STRENGTH
  3306.   ifcount 18
  3307.     killit
  3308.   else
  3309.     ifcount 9
  3310.   {
  3311.     sizeto 0 0
  3312.     sizeto 0 0
  3313.     sizeto 0 0
  3314.     sizeto 0 0
  3315.   }
  3316.   else
  3317.   {
  3318.     sizeto 28 28
  3319.     sizeto 28 28
  3320.     sizeto 28 28
  3321.     sizeto 28 28
  3322.   }
  3323. enda
  3324.  
  3325. actor RPG RPG_WEAPON_STRENGTH enda
  3326. actor FREEZEBLAST FREEZETHROWER_WEAPON_STRENGTH enda
  3327. actor DEVISTATORBLAST FREEZETHROWER_WEAPON_STRENGTH enda
  3328. actor COOLEXPLOSION1 COOL_EXPLOSION_STRENGTH enda
  3329. actor TRIPBOMB TRIPBOMB_STRENGTH enda
  3330.  
  3331. action WEAP2FRAMES 0  4  1  1  6
  3332. actor SHOTSPARK1 PISTOL_WEAPON_STRENGTH WEAP2FRAMES
  3333.   ifdead
  3334.     killit
  3335.   ifactioncount 4
  3336.     killit
  3337.   else
  3338.   {
  3339.     ifactioncount 3
  3340.     {
  3341.       ifinwater
  3342.       spawn WATERBUBBLE
  3343.     }
  3344.     else
  3345.       ifcount 2 nullop
  3346.       else
  3347.         ifonwater
  3348.           spawn WATERSPLASH2
  3349.   }
  3350. enda
  3351.  
  3352. state standard_pjibs
  3353.   guts JIBS1 1
  3354.   guts JIBS3 2
  3355.   guts JIBS4 1
  3356.   guts JIBS5 1
  3357.   guts JIBS6 2
  3358.   guts DUKETORSO 1
  3359.   guts DUKELEG 2
  3360.   guts DUKEGUN 1
  3361.   ifrnd 16 money 1
  3362. ends
  3363.  
  3364. move DUKENOTMOVING
  3365. state handle_dead_dukes
  3366.   fall
  3367.   ifmove 0   // 1st time initializiation...
  3368.   {
  3369.     ifrnd 128
  3370.       cstat 4
  3371.     else
  3372.       cstat 0
  3373.     move DUKENOTMOVING
  3374.   }
  3375.  
  3376.   ifsquished
  3377.   {
  3378.     sound SQUISHED
  3379.     state random_ooz
  3380.     killit
  3381.   }
  3382.   else
  3383.     ifcount 1024
  3384.       ifpdistg 4096
  3385.         killit
  3386.   else
  3387.   {
  3388.     strength 0
  3389.     ifhitweapon
  3390.       ifwasweapon RADIUSEXPLOSION
  3391.     {
  3392.       state standard_jibs
  3393.       killit
  3394.     }
  3395.   }
  3396. ends
  3397.  
  3398. action PLYINGFRAMES 0 1 0 1 1
  3399. actor DUKELYINGDEAD 0 PLYINGFRAMES
  3400.   state handle_dead_dukes
  3401. enda
  3402.  
  3403. action PGROWING   0
  3404. action PSTAND     0   1   5   1  1
  3405. action PEXPLODE   106   5   1   1   10
  3406. action PEXPLODEAD   113   1   1
  3407. action PJPHOUVER  15   1   5   1
  3408. action PWALK    20   4   5   1   16
  3409. action PRUN     20   4   5   1   10
  3410. action PWALKBACK  45   4   5  -1   16
  3411. action PRUNBACK   45   4   5  -1   10
  3412. action PJUMPING   50   4   5   1   30
  3413. action PFALLING   65   1   5
  3414. action PDUCKING   86   1   5
  3415. action PCRAWLING  86   3   5   1   20
  3416. action PAKICKING  40   2   5   1   25
  3417. action PFLINTCHING  106  1   1   1   10
  3418. action PTHROWNBACK  106  5   1   1   18
  3419. action PFROZEN     20  1   5
  3420. action PLYINGDEAD   113  1   1
  3421.  
  3422. action PSWIMMINGGO   375   1   5   1   10
  3423. action PSWIMMING   375   4   5   1   13
  3424. action PSWIMMINGWAIT 395   1   5   1   13
  3425. action PTREDWATER  395   2   5   1   17
  3426.  
  3427. move PSTOPED
  3428. move PSHRINKING // used as a var only
  3429.  
  3430. state check_pstandard
  3431.   ifp pwalking
  3432.     action PWALK
  3433.   else
  3434.     ifp pkicking
  3435.       action PAKICKING
  3436.   else
  3437.     ifp pwalkingback
  3438.       action PWALKBACK
  3439.   else
  3440.     ifp prunning
  3441.       action PRUN
  3442.   else
  3443.     ifp prunningback
  3444.       action PRUNBACK
  3445.   else
  3446.     ifp pjumping
  3447.       action PJUMPING
  3448.   else
  3449.     ifp pducking
  3450.       action PDUCKING
  3451. ends
  3452.  
  3453.  
  3454.  
  3455. move PGROWINGPOP        // Used only as a variable
  3456.  
  3457. actor APLAYER MAXPLAYERHEALTH PSTAND 0 0
  3458.  
  3459.   ifaction 0
  3460.     action PSTAND
  3461.  
  3462.   ifaction PFROZEN
  3463.   {
  3464.     cstat 257
  3465.  
  3466.     fall
  3467.  
  3468.     palfrom 16 0 0 24
  3469.  
  3470.     ifmove 0
  3471.     {
  3472.       ifhitweapon
  3473.       {
  3474.         ifwasweapon FREEZEBLAST
  3475.           break
  3476.         lotsofglass 60
  3477.         ifrnd 84
  3478.           spawn BLOODPOOL
  3479.  
  3480.         sound GLASS_BREAKING
  3481.         spawn ATOMICHEALTH
  3482.  
  3483.         getlastpal
  3484.  
  3485.         move 1
  3486.         break
  3487.       }
  3488.     }
  3489.     else
  3490.     {
  3491.       cstat 32768
  3492.       quote 13
  3493.       ifhitspace
  3494.       {
  3495.         action PSTAND
  3496.         resetplayer
  3497.       }
  3498.       break
  3499.     }
  3500.  
  3501.     ifactioncount THAWTIME
  3502.     {
  3503.       getlastpal
  3504.       strength 1
  3505.       move 0
  3506.       action PSTAND
  3507.     }
  3508.     else
  3509.       ifactioncount FROZENDRIPTIME
  3510.     {
  3511.       ifrnd 32
  3512.       spawn WATERDRIP
  3513.     }
  3514.  
  3515.     ifp pfacing   // assumes another other player  (multiplayer)
  3516.       ifpdistl FROZENQUICKKICKDIST
  3517.         pkick
  3518.  
  3519.     break
  3520.   }
  3521.  
  3522.   ifdead
  3523.   {
  3524.     ifaction PGROWING
  3525.     {
  3526.       ifmove PGROWINGPOP
  3527.       {
  3528.         quote 13
  3529.         ifhitspace
  3530.         {
  3531.           action 0
  3532.           resetplayer
  3533.         }
  3534.         break
  3535.       }
  3536.       else
  3537.       {
  3538.         ifcount 32
  3539.         {
  3540.           sound SQUISHED
  3541.           palfrom 48 64
  3542.  
  3543.           state standard_pjibs
  3544.  
  3545.           guts JIBS4 20
  3546.           guts JIBS6 20
  3547.           move PGROWINGPOP
  3548.           cstat 32768
  3549.           tossweapon
  3550.  
  3551.           hitradius 2048 60 70 80 90
  3552.  
  3553.         }
  3554.         else
  3555.           sizeto MAXXSTRETCH MAXYSTRETCH
  3556.       }
  3557.       break
  3558.     }
  3559.  
  3560.     ifsquished
  3561.       palfrom 32 63 63 63
  3562.     else
  3563.       fall
  3564.  
  3565.     ifactioncount 7
  3566.       move 0
  3567.     else
  3568.       ifactioncount 6
  3569.     {
  3570.       ifmultiplayer nullop
  3571.       else
  3572.       {
  3573.         ifrnd 32
  3574.           sound DUKE_KILLED5
  3575.         else
  3576.           ifrnd 32
  3577.             sound DUKE_KILLED3
  3578.         else
  3579.           ifrnd 32
  3580.             sound DUKE_KILLED1
  3581.         else
  3582.           ifrnd 32
  3583.             sound DUKE_KILLED2
  3584.       }
  3585.     }
  3586.  
  3587.     ifaction PLYINGDEAD
  3588.     {
  3589.       ifactioncount 3
  3590.         move PSTOPED
  3591.       quote 13
  3592.       ifhitspace
  3593.       {
  3594.         action PSTAND
  3595.         spawn DUKELYINGDEAD
  3596.         resetplayer
  3597.       }
  3598.       break
  3599.     }
  3600.  
  3601.     ifaction PTHROWNBACK
  3602.     {
  3603.       ifactioncount 5
  3604.       {
  3605.         spawn BLOODPOOL
  3606.         action PLYINGDEAD
  3607.       }
  3608.       else
  3609.         ifactioncount 1
  3610.           move 0
  3611.       break
  3612.     }
  3613.  
  3614.     ifaction PEXPLODEAD
  3615.     {
  3616.       quote 13
  3617.       ifhitspace
  3618.       {
  3619.         resetplayer
  3620.         action PSTAND
  3621.       }
  3622.       break
  3623.     }
  3624.     ifaction PEXPLODE
  3625.     {
  3626.       ifactioncount 5
  3627.       {
  3628.         action PEXPLODEAD
  3629.         spawn BLOODPOOL
  3630.       }
  3631.       break
  3632.     }
  3633.  
  3634.     ifp pshrunk
  3635.     {
  3636.       state standard_pjibs
  3637.       spawn BLOODPOOL
  3638.  
  3639.       sound SQUISHED
  3640.       sound DUKE_DEAD
  3641.  
  3642.       cstat 32768         // Hide the sprite
  3643.  
  3644.       action PLYINGDEAD
  3645.     }
  3646.     else
  3647.     {
  3648.       ifinwater
  3649.       {
  3650.         action PLYINGDEAD
  3651.         spawn WATERBUBBLE
  3652.         spawn WATERBUBBLE
  3653.       }
  3654.       else
  3655.       {
  3656.         action PEXPLODE
  3657.         state standard_pjibs
  3658.         cstat 32768
  3659.         sound SQUISHED
  3660.         sound DUKE_DEAD
  3661.       }
  3662.     }
  3663.  
  3664.     tossweapon
  3665.  
  3666.     break
  3667.   }
  3668.  
  3669.   ifsquished
  3670.   {
  3671.     strength -1
  3672.     sound SQUISHED
  3673.     state random_ooz
  3674.     break
  3675.   }
  3676.  
  3677.   ifp ponsteroids
  3678.   {
  3679.     ifp pstanding nullop
  3680.     else
  3681.       spawn FRAMEEFFECT1
  3682.   }
  3683.  
  3684.   ifmove PSHRINKING
  3685.   {
  3686.     ifcount 32
  3687.     {
  3688.       ifcount SHRUNKDONECOUNT
  3689.       {
  3690.         move 0
  3691.         cstat 257
  3692.       }
  3693.       else
  3694.         ifcount SHRUNKCOUNT
  3695.       {
  3696.         sizeto 42 36
  3697.         ifgapzl 24
  3698.         {
  3699.           strength 0
  3700.           sound SQUISHED
  3701.           palfrom 48 64
  3702.           break
  3703.         }
  3704.       }
  3705.       else
  3706.         ifp ponsteroids
  3707.           count SHRUNKCOUNT
  3708.     }
  3709.     else
  3710.     {
  3711.       ifp ponsteroids
  3712.         count SHRUNKCOUNT
  3713.       else
  3714.       {
  3715.         sizeto 8 9
  3716.         spawn FRAMEEFFECT1
  3717.       }
  3718.     }
  3719.   }
  3720.   else ifhitweapon
  3721.   {
  3722.     ifdead
  3723.     {
  3724.       ifmultiplayer
  3725.         sound DUKE_KILLED4
  3726.  
  3727.       ifwasweapon GROWSPARK
  3728.       {
  3729.         palfrom 48 48
  3730.         action PGROWING
  3731.         count 0
  3732.         move 0
  3733.         sound ACTOR_GROWING
  3734.         cstat 0
  3735.         break
  3736.       }
  3737.     }
  3738.     else
  3739.     {
  3740.       ifmultiplayer
  3741.       {
  3742.         ifphealthl YELLHURTSOUNDSTRENGTHMP
  3743.         {
  3744.           ifrnd 64
  3745.             sound DUKE_LONGTERM_PAIN2
  3746.           else
  3747.             ifrnd 64
  3748.               sound DUKE_LONGTERM_PAIN3
  3749.           else
  3750.             ifrnd 64
  3751.               sound DUKE_LONGTERM_PAIN4
  3752.           else
  3753.             sound DUKE_DEAD
  3754.         }
  3755.         else
  3756.         {
  3757.           ifrnd 64
  3758.             sound DUKE_LONGTERM_PAIN5
  3759.           else ifrnd 64
  3760.             sound DUKE_LONGTERM_PAIN6
  3761.           else ifrnd 64
  3762.             sound DUKE_LONGTERM_PAIN7
  3763.           else
  3764.             sound DUKE_LONGTERM_PAIN8
  3765.         }
  3766.       }
  3767.       else
  3768.       {
  3769.         ifphealthl YELLHURTSOUNDSTRENGTH
  3770.         {
  3771.           ifrnd 74
  3772.             sound DUKE_LONGTERM_PAIN2
  3773.           else
  3774.             ifrnd 8
  3775.               sound DUKE_LONGTERM_PAIN3
  3776.           else
  3777.             sound DUKE_LONGTERM_PAIN4
  3778.         }
  3779.         ifrnd 128
  3780.           sound DUKE_LONGTERM_PAIN
  3781.       }
  3782.     }
  3783.     ifstrength TOUGH
  3784.     {
  3785.       state headhitstate
  3786.       sound DUKE_GRUNT
  3787.       ifp pstanding
  3788.         action PFLINTCHING
  3789.     }
  3790.  
  3791.     ifwasweapon RPG
  3792.     {
  3793.       ifrnd 32
  3794.         spawn BLOOD
  3795.       ifdead
  3796.         state standard_pjibs
  3797.       palfrom 48 52
  3798.       break
  3799.     }
  3800.     ifwasweapon RADIUSEXPLOSION
  3801.     {
  3802.       ifrnd 32
  3803.         spawn BLOOD
  3804.       ifdead
  3805.         state standard_pjibs
  3806.       palfrom 48 52
  3807.       break
  3808.     }
  3809.     ifwasweapon FIREEXT
  3810.     {
  3811.       ifrnd 32
  3812.         spawn BLOOD
  3813.       ifdead
  3814.         state standard_pjibs
  3815.       palfrom 48 52
  3816.       break
  3817.     }
  3818.     ifwasweapon GROWSPARK
  3819.     {
  3820.       palfrom 48 52
  3821.       sound EXPANDERHIT
  3822.       break
  3823.     }
  3824.     ifwasweapon SHRINKSPARK
  3825.     {
  3826.       palfrom 48 0 48
  3827.       move PSHRINKING // used as a var only.
  3828.       sound ACTOR_SHRINKING
  3829.       cstat 0
  3830.       break
  3831.     }
  3832.     ifwasweapon SHOTSPARK1
  3833.       palfrom 24 48
  3834.     ifwasweapon FREEZEBLAST
  3835.     {
  3836.       palfrom 48 0 0 48
  3837.       ifdead
  3838.       {
  3839.         sound SOMETHINGFROZE
  3840.         spritepal 1
  3841.         move 0
  3842.         action PFROZEN
  3843.         break
  3844.       }
  3845.     }
  3846.     ifwasweapon COOLEXPLOSION1
  3847.       palfrom 48 48 0 48
  3848.     ifwasweapon KNEE
  3849.       palfrom 16 32
  3850.     ifwasweapon FIRELASER
  3851.       palfrom 32 32
  3852.  
  3853.     ifdead
  3854.     {
  3855.       action PTHROWNBACK
  3856.       tossweapon
  3857.     }
  3858.  
  3859.     state random_wall_jibs
  3860.  
  3861.     break
  3862.   }
  3863.  
  3864.   ifaction PFLINTCHING
  3865.   {
  3866.     ifactioncount 2
  3867.       action PSTAND
  3868.     break
  3869.   }
  3870.  
  3871.   ifinwater
  3872.   {
  3873.     ifaction PTREDWATER
  3874.     {
  3875.       ifp pwalking prunning
  3876.         action PSWIMMINGGO
  3877.     }
  3878.     else
  3879.       ifp pstanding pwalkingback prunningback
  3880.         action PTREDWATER
  3881.     else
  3882.     {
  3883.       ifaction PSWIMMING
  3884.       {
  3885.         ifrnd 4
  3886.           spawn WATERBUBBLE
  3887.         ifactioncount 4
  3888.           action PSWIMMINGWAIT
  3889.       }
  3890.       else
  3891.         ifaction PSWIMMINGWAIT
  3892.       {
  3893.         ifactioncount 2
  3894.           action PSWIMMINGGO
  3895.       }
  3896.       else
  3897.         ifaction PSWIMMINGGO
  3898.       {
  3899.         ifactioncount 2
  3900.           action PSWIMMING
  3901.       }
  3902.       else
  3903.         action PTREDWATER
  3904.     }
  3905.  
  3906.     ifrnd 4
  3907.       spawn WATERBUBBLE // For effect
  3908.  
  3909.     break
  3910.   }
  3911.   else ifp pjetpack
  3912.   {
  3913.     ifaction PJPHOUVER
  3914.     {
  3915.       ifactioncount 4
  3916.         resetactioncount
  3917.     }
  3918.     else
  3919.       action PJPHOUVER
  3920.     break
  3921.   }
  3922.   else
  3923.   {
  3924.     ifaction PTREDWATER
  3925.       action PSTAND
  3926.     ifaction PSWIMMING
  3927.       action PSTAND
  3928.     ifaction PSWIMMINGWAIT
  3929.       action PSTAND
  3930.     ifaction PSWIMMINGGO
  3931.       action PSTAND
  3932.     ifaction PJPHOUVER
  3933.       action PFALLING
  3934.   }
  3935.  
  3936.   ifaction PFALLING
  3937.   {
  3938.     ifp ponground
  3939.       action PSTAND
  3940.     else
  3941.     {
  3942.       ifp pfalling
  3943.         break
  3944.       else
  3945.         state check_pstandard
  3946.     }
  3947.   }
  3948.  
  3949.   ifaction PDUCKING
  3950.   {
  3951.     ifgapzl 48
  3952.     {
  3953.       ifp pwalking pwalkingback prunning prunningback
  3954.         action PCRAWLING
  3955.     }
  3956.     else ifp pducking
  3957.     {
  3958.       ifp pwalking pwalkingback prunning prunningback
  3959.         action PCRAWLING
  3960.     }
  3961.     else
  3962.     {
  3963.       ifp pstanding
  3964.         action PSTAND
  3965.       else
  3966.         state check_pstandard
  3967.     }
  3968.   }
  3969.  
  3970.   else ifaction PCRAWLING
  3971.   {
  3972.     ifgapzl 48
  3973.     {
  3974.       ifp pstanding
  3975.         action PCRAWLING
  3976.     }
  3977.     else
  3978.       ifp pducking
  3979.     {
  3980.       ifp pstanding
  3981.         action PDUCKING
  3982.     }
  3983.     else
  3984.     {
  3985.       ifp pstanding
  3986.         action PSTAND
  3987.       else
  3988.         state check_pstandard
  3989.     }
  3990.   }
  3991.   else
  3992.     ifgapzl 48
  3993.       action PDUCKING
  3994.  
  3995.   else
  3996.     ifaction PJUMPING
  3997.   {
  3998.     ifp ponground
  3999.       action PSTAND
  4000.     else
  4001.       ifactioncount 4
  4002.         ifp pfalling
  4003.           action PFALLING
  4004.   }
  4005.  
  4006.   ifp pfalling
  4007.     action PFALLING
  4008.   else
  4009.     ifaction PSTAND
  4010.       state check_pstandard
  4011.   else
  4012.     ifaction PAKICKING
  4013.   {
  4014.     ifactioncount 2
  4015.       action PSTAND
  4016.     break
  4017.   }
  4018.   else
  4019.     ifaction PWALK
  4020.   {
  4021.     ifp pfalling
  4022.       action PFALLING
  4023.     else
  4024.       ifp pstanding
  4025.         action PSTAND
  4026.     else
  4027.       ifp prunning
  4028.         action PRUN
  4029.     else
  4030.       ifp pwalkingback
  4031.         action PWALKBACK
  4032.     else
  4033.       ifp prunningback
  4034.         action PRUNBACK
  4035.     else
  4036.       ifp pjumping
  4037.         action PJUMPING
  4038.     else
  4039.       ifp pducking
  4040.         action PDUCKING
  4041.   }
  4042.  
  4043.   else
  4044.     ifaction PRUN
  4045.   {
  4046.     ifp pstanding
  4047.       action PSTAND
  4048.     else
  4049.       ifp pwalking
  4050.         action PWALK
  4051.     else
  4052.       ifp pwalkingback
  4053.         action PWALKBACK
  4054.     else
  4055.       ifp prunningback
  4056.         action PRUNBACK
  4057.     else
  4058.       ifp pjumping
  4059.         action PJUMPING
  4060.     else
  4061.       ifp pducking
  4062.         action PDUCKING
  4063.   }
  4064.  
  4065.   else
  4066.     ifaction PWALKBACK
  4067.   {
  4068.     ifp pstanding
  4069.       action PSTAND
  4070.     else
  4071.       ifp pwalking
  4072.         action PWALK
  4073.     else
  4074.       ifp prunning
  4075.         action PRUN
  4076.     else
  4077.       ifp prunningback
  4078.         action PRUNBACK
  4079.     else
  4080.       ifp pjumping
  4081.         action PJUMPING
  4082.     else
  4083.       ifp pducking
  4084.         action PDUCKING
  4085.   }
  4086.  
  4087.   else
  4088.     ifaction PRUNBACK
  4089.   {
  4090.     ifp pstanding
  4091.       action PSTAND
  4092.     else
  4093.       ifp pwalking
  4094.         action PWALK
  4095.     else
  4096.       ifp prunning
  4097.         action PRUN
  4098.     else
  4099.       ifp pwalkingback
  4100.         action PWALKBACK
  4101.     else
  4102.       ifp pjumping
  4103.         action PJUMPING
  4104.     else
  4105.       ifp pducking
  4106.         action PDUCKING
  4107.   }
  4108. enda
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114. actor ORGANTIC TURRETSTRENGTH
  4115.   ifcount 48
  4116.     resetcount
  4117.   else
  4118.   {
  4119.     ifcount 32
  4120.     sizeto 32 32
  4121.   }
  4122.   else
  4123.     ifcount 16
  4124.     {
  4125.       sizeto 48 18
  4126.       ifpdistl 2048
  4127.       {
  4128.         sound TURR_ATTACK
  4129.         addphealth -2
  4130.         palfrom 32 16
  4131.       }
  4132.     }
  4133.   ifhitweapon
  4134.   {
  4135.     ifdead
  4136.     {
  4137.       addkills 1
  4138.       sound TURR_DYING
  4139.       guts JIBS5 10
  4140.       killit
  4141.     }
  4142.     sound TURR_PAIN
  4143.     break
  4144.   }
  4145.   ifrnd 1
  4146.     soundonce TURR_ROAM
  4147. enda
  4148.  
  4149. state rf
  4150.   ifrnd 128
  4151.     cstat 4
  4152.   else
  4153.     cstat 0
  4154. ends
  4155.  
  4156.  
  4157. //
  4158. //
  4159. //    TROOP/LIZTROOP CODE
  4160. //
  4161. //
  4162.  
  4163. action ATROOPSTAND     0  1  5  1  1
  4164. action ATROOPGROW    0  1  5  1  1
  4165. action ATROOPSTAYSTAND  -2  1  5  1  1
  4166. action ATROOPWALKING   0  4  5  1   12
  4167. action ATROOPWALKINGBACK 15   4  5   -1   12
  4168. action ATROOPRUNNING   0  4  5  1  8
  4169. action ATROOPSHOOT    35  1  5  1   30
  4170. action ATROOPJETPACK  40  1  5  1  1
  4171. action ATROOPJETPACKILL 40  2  5  1   50
  4172. action ATROOPFLINTCH  50  1  1  1  6
  4173. action ATROOPDYING    50  5  1  1   16
  4174. action ATROOPDEAD     54
  4175. action ATROOPPLAYDEAD   54
  4176. action ATROOPSUFFERDEAD 58  2  1   -4   24
  4177. action ATROOPSUFFERING  59  2  1  1   21
  4178. action ATROOPDUCK     64  1  5  1  3
  4179. action ATROOPDUCKSHOOT  64  2  5  1   25
  4180. action ATROOPABOUTHIDE  74  1  1  1   25
  4181. action ATROOPHIDE     79  1  1  1   25
  4182. action ATROOPREAPPEAR   74  1  1  1   25
  4183. action ATROOPFROZEN    0  1  5
  4184.  
  4185. move TROOPWALKVELS 72
  4186. move TROOPWALKVELSBACK -72
  4187. move TROOPJETPACKVELS 64 -84
  4188. move TROOPJETPACKILLVELS 192 -38
  4189. move TROOPRUNVELS 108
  4190. move TROOPSTOPPED
  4191. move DONTGETUP
  4192. move SHRUNKVELS 32
  4193.  
  4194. ai AITROOPSEEKENEMY  ATROOPWALKING   TROOPWALKVELS seekplayer
  4195. ai AITROOPSEEKPLAYER ATROOPWALKING   TROOPWALKVELS seekplayer
  4196. ai AITROOPFLEEING  ATROOPWALKING   TROOPWALKVELS fleeenemy
  4197. ai AITROOPFLEEINGBACK ATROOPWALKINGBACK   TROOPWALKVELSBACK faceplayer
  4198. ai AITROOPDODGE    ATROOPWALKING   TROOPRUNVELS  dodgebullet
  4199. ai AITROOPSHOOTING   ATROOPSHOOT   TROOPSTOPPED  faceplayer
  4200. ai AITROOPDUCKING  ATROOPDUCK    TROOPSTOPPED  faceplayer
  4201. ai AITROOPJETPACK  ATROOPJETPACK   TROOPJETPACKVELS seekplayer
  4202. ai AITROOPSHRUNK   ATROOPWALKING   SHRUNKVELS fleeenemy
  4203. ai AITROOPHIDE     ATROOPABOUTHIDE TROOPSTOPPED faceplayer
  4204. ai AITROOPGROW     ATROOPGROW    DONTGETUP looking
  4205.  
  4206. state troophidestate
  4207.   ifaction ATROOPREAPPEAR
  4208.   {
  4209.     ifactioncount 2
  4210.     {
  4211.       sound TELEPORTER
  4212.       ai AITROOPSHOOTING
  4213.       cstat 257
  4214.     }
  4215.     else
  4216.     {
  4217.       sizeto 41 40
  4218.       sizeto 41 40
  4219.       sizeto 41 40
  4220.       sizeto 41 40
  4221.       spawn FRAMEEFFECT1
  4222.     }
  4223.   }
  4224.   else
  4225.     ifaction ATROOPWALKING
  4226.   {
  4227.     ifpdistl 2448
  4228.       ifpdistg 1024
  4229.     {
  4230.       ifceilingdistl 48
  4231.         break
  4232.       ifp pfacing
  4233.         break
  4234.  
  4235.       ifgapzl 64 nullop
  4236.       else
  4237.         ifawayfromwall
  4238.       {
  4239.         spawn TRANSPORTERSTAR
  4240.         action ATROOPREAPPEAR
  4241.         move 0
  4242.         break
  4243.       }
  4244.     }
  4245.   }
  4246.   else
  4247.     ifaction ATROOPHIDE
  4248.   {
  4249.     ifactioncount 2
  4250.     {
  4251.       spawn TRANSPORTERSTAR
  4252.       sound TELEPORTER
  4253.       action ATROOPWALKING
  4254.       move TROOPWALKVELS faceplayer
  4255.       cstat 32768
  4256.     }
  4257.     else
  4258.     {
  4259.       sizeto 4 40
  4260.       sizeto 4 40
  4261.       sizeto 4 40
  4262.       sizeto 4 40
  4263.       spawn FRAMEEFFECT1
  4264.     }
  4265.   }
  4266.   else
  4267.     ifaction ATROOPABOUTHIDE
  4268.       ifactioncount 2
  4269.     {
  4270.       action ATROOPHIDE
  4271.       cstat 0
  4272.     }
  4273. ends
  4274.  
  4275.  
  4276. state troopgunnashoot
  4277.   ifp palive
  4278.   {
  4279.     ifpdistl 1024
  4280.       ai AITROOPSHOOTING
  4281.     else
  4282.       ifactornotstayput
  4283.     {
  4284.       ifactioncount 12
  4285.         ifrnd 16
  4286.           ifcanshoottarget
  4287.       {
  4288.         ifspritepal 21
  4289.           ifrnd 4
  4290.             ifpdistg 4096
  4291.               ai AITROOPHIDE
  4292.         else
  4293.         {
  4294.           ifpdistl 1100
  4295.             ai AITROOPFLEEING
  4296.           else
  4297.           {
  4298.             ifpdistl 4096
  4299.               ifcansee
  4300.                 ifcanshoottarget
  4301.                   ai AITROOPSHOOTING
  4302.             else
  4303.             {
  4304.               move TROOPRUNVELS seekplayer
  4305.               action ATROOPRUNNING
  4306.             }
  4307.           }
  4308.         }
  4309.       }
  4310.     }
  4311.     else
  4312.       ifcount 26
  4313.         ifrnd 32
  4314.           ai AITROOPSHOOTING
  4315.   }
  4316. ends
  4317.  
  4318. state troopseekstate
  4319.   state troopgunnashoot
  4320.   ifinwater
  4321.   {
  4322.     ai AITROOPJETPACK
  4323.     break
  4324.   }
  4325.   ifcansee
  4326.   {
  4327.     ifmove TROOPRUNVELS
  4328.       ifpdistl 1596
  4329.         ai AITROOPDUCKING
  4330.     ifp phigher
  4331.     {
  4332.       ifceilingdistl 128 nullop
  4333.       else
  4334.         ifactornotstayput
  4335.           ai AITROOPJETPACK
  4336.       break
  4337.     }
  4338.     else
  4339.       ifrnd 2
  4340.     {
  4341.       ifspritepal 21
  4342.         ifpdistg 1596
  4343.       {
  4344.         ai AITROOPHIDE
  4345.         break
  4346.       }
  4347.       ifbulletnear
  4348.       {
  4349.         ifrnd 128
  4350.           ai AITROOPDODGE
  4351.         else
  4352.           ai AITROOPDUCKING
  4353.         break
  4354.       }
  4355.     }
  4356.   }
  4357.   ifnotmoving
  4358.   {
  4359.     ifrnd 32
  4360.       operate
  4361.     else
  4362.       ifcount 32
  4363.         ifp palive
  4364.           ifcansee
  4365.             ifcanshoottarget
  4366.               ai AITROOPSHOOTING
  4367.   }
  4368.   ifrnd 1
  4369.   {
  4370.     ifrnd 128
  4371.       soundonce PRED_ROAM
  4372.     else
  4373.       soundonce PRED_ROAM2
  4374.   }
  4375. ends
  4376.  
  4377. state troopduckstate
  4378.   ifaction ATROOPDUCK
  4379.   {
  4380.     ifactioncount 8
  4381.     {
  4382.       ifp palive
  4383.       {
  4384.         ifrnd 128
  4385.           action ATROOPDUCKSHOOT
  4386.       }
  4387.       else
  4388.         ifmove DONTGETUP
  4389.           break
  4390.         else
  4391.           ai AITROOPSEEKPLAYER
  4392.     }
  4393.   }
  4394.   else
  4395.     ifaction ATROOPDUCKSHOOT
  4396.   {
  4397.     ifcount 64
  4398.     {
  4399.       ifmove DONTGETUP
  4400.         resetcount
  4401.       else
  4402.       {
  4403.         ifpdistl 1100
  4404.           ai AITROOPFLEEING
  4405.         else
  4406.           ai AITROOPSEEKPLAYER
  4407.       }
  4408.     }
  4409.     else
  4410.       ifactioncount 2
  4411.       {
  4412.         ifcanshoottarget
  4413.         {
  4414.           sound PRED_ATTACK
  4415.           resetactioncount
  4416.           shoot FIRELASER
  4417.         }
  4418.         else ai AITROOPSEEKPLAYER
  4419.       }
  4420.   }
  4421. ends
  4422.  
  4423. state troopshootstate
  4424.   ifactioncount 2
  4425.   {
  4426.     ifcanshoottarget
  4427.     {
  4428.       shoot FIRELASER
  4429.       sound PRED_ATTACK
  4430.       resetactioncount
  4431.       ifrnd 128
  4432.         ai AITROOPSEEKPLAYER
  4433.       ifcount 24
  4434.       {
  4435.         ifrnd 96
  4436.           ifpdistg 2048
  4437.             ai AITROOPSEEKPLAYER
  4438.           else
  4439.           {
  4440.             ifpdistg 1596
  4441.               ai AITROOPFLEEING
  4442.             else
  4443.               ai AITROOPFLEEINGBACK
  4444.           }
  4445.       }
  4446.     }
  4447.     else
  4448.       ai AITROOPSEEKPLAYER
  4449.   }
  4450. ends
  4451.  
  4452. state troopfleestate
  4453.   ifactioncount 7
  4454.   {
  4455.     ifpdistg 3084
  4456.     {
  4457.       ai AITROOPSEEKPLAYER
  4458.       break
  4459.     }
  4460.     else
  4461.       ifrnd 32
  4462.         ifp palive
  4463.           ifcansee
  4464.             ifcanshoottarget
  4465.       {
  4466.         ifrnd 128
  4467.           ai AITROOPDUCKING
  4468.         else
  4469.           ai AITROOPSHOOTING
  4470.           break
  4471.       }
  4472.   }
  4473.   ifnotmoving
  4474.   {
  4475.     ifrnd 32
  4476.       operate
  4477.     else
  4478.       ifcount 32
  4479.         ifp palive
  4480.           ifcansee
  4481.             ifcanshoottarget
  4482.       {
  4483.         ifrnd 128
  4484.           ai AITROOPSHOOTING
  4485.         else
  4486.           ai AITROOPDUCKING
  4487.       }
  4488.   }
  4489. ends
  4490.  
  4491. state troopdying
  4492.   iffloordistl 32
  4493.   {
  4494.     ifactioncount 5
  4495.     {
  4496.       cstat 0
  4497.       iffloordistl 8
  4498.       sound THUD
  4499.       ifrnd 64
  4500.         spawn BLOODPOOL
  4501.       state rf
  4502.       strength 0
  4503.       move TROOPSTOPPED
  4504.       action ATROOPDEAD
  4505.     }
  4506.     break
  4507.   }
  4508.   else
  4509.   {
  4510.     state rf
  4511.     move 0
  4512.     action ATROOPDYING
  4513.   }
  4514. ends
  4515.  
  4516. state checktroophit
  4517.   ifaction ATROOPSUFFERING
  4518.   {
  4519.     stopsound LIZARD_BEG
  4520.     sound PRED_DYING
  4521.     cstat 0
  4522.     strength 0
  4523.     action ATROOPSUFFERDEAD
  4524.     break
  4525.   }
  4526.   ifdead
  4527.   {
  4528.     ifwasweapon FREEZEBLAST
  4529.     {
  4530.       sound SOMETHINGFROZE
  4531.       spritepal 1
  4532.       move 0
  4533.       action ATROOPFROZEN
  4534.       strength 0
  4535.       break
  4536.     }
  4537.  
  4538.     state drop_ammo
  4539.     state random_wall_jibs
  4540.  
  4541.     ifwasweapon GROWSPARK
  4542.     {
  4543.       cstat 0
  4544.       move 0
  4545.       sound ACTOR_GROWING
  4546.       ai AITROOPGROW
  4547.       break
  4548.     }
  4549.  
  4550.     addkills 1
  4551.  
  4552.     ifwasweapon RPG
  4553.     {
  4554.       sound SQUISHED
  4555.       state troop_body_jibs
  4556.       state standard_jibs
  4557.       killit
  4558.     }
  4559.     else
  4560.       ifwasweapon RADIUSEXPLOSION
  4561.     {
  4562.       sound SQUISHED
  4563.       state troop_body_jibs
  4564.       state standard_jibs
  4565.       killit
  4566.     }
  4567.     else
  4568.     {
  4569.       sound PRED_DYING
  4570.       ifrnd 32
  4571.         iffloordistl 32
  4572.       {
  4573.         sound LIZARD_BEG
  4574.         spawn BLOODPOOL
  4575.         strength 0
  4576.         move 0
  4577.         action ATROOPSUFFERING
  4578.         break
  4579.       }
  4580.       action ATROOPDYING
  4581.       break
  4582.     }
  4583.   }
  4584.   else
  4585.   {
  4586.     state random_wall_jibs
  4587.     sound PRED_PAIN
  4588.  
  4589.     ifwasweapon SHRINKSPARK
  4590.     {
  4591.       sound ACTOR_SHRINKING
  4592.       ai AITROOPSHRUNK
  4593.     }
  4594.     else
  4595.       ifwasweapon GROWSPARK
  4596.         sound EXPANDERHIT
  4597.     else
  4598.       iffloordistl 32
  4599.         ifrnd 96
  4600.           action ATROOPFLINTCH
  4601.   }
  4602. ends
  4603.  
  4604. state troopjetpackstate
  4605.   ifaction ATROOPJETPACKILL
  4606.   {
  4607.     ifcansee
  4608.       ifactioncount 2
  4609.     {
  4610.       resetactioncount
  4611.       sound PRED_ATTACK
  4612.       shoot FIRELASER
  4613.     }
  4614.  
  4615.     ifp phigher
  4616.       ai AITROOPJETPACK
  4617.     else
  4618.       ifinwater
  4619.         ai AITROOPJETPACK
  4620.     else
  4621.       ifcount 26
  4622.         iffloordistl 32
  4623.           ai AITROOPSEEKPLAYER
  4624.   }
  4625.   else
  4626.     ifcount 48
  4627.       ifcansee
  4628.   {
  4629.     action ATROOPJETPACKILL
  4630.     move TROOPJETPACKILLVELS
  4631.     seekplayer
  4632.   }
  4633. ends
  4634.  
  4635. state checksquished
  4636.   ifsquished
  4637.   {
  4638.     addkills 1
  4639.     sound SQUISHED
  4640.     state standard_jibs
  4641.     state random_ooz
  4642.     killit
  4643.   }
  4644. ends
  4645.  
  4646. state troopsufferingstate
  4647.   ifactioncount 2
  4648.   {
  4649.     ifrnd 16
  4650.       spawn WATERDRIP
  4651.     ifactioncount 14
  4652.     {
  4653.       stopsound LIZARD_BEG
  4654.       cstat 0
  4655.       strength 0
  4656.       action ATROOPSUFFERDEAD
  4657.       break
  4658.     }
  4659.   }
  4660. ends
  4661.  
  4662. state troopshrunkstate
  4663.   ifcount SHRUNKDONECOUNT
  4664.     ai AITROOPSEEKENEMY
  4665.   else
  4666.     ifcount SHRUNKCOUNT
  4667.       sizeto 48 40
  4668.   else
  4669.     state genericshrunkcode
  4670. ends
  4671.  
  4672.  
  4673. state troopcode fall
  4674.   ifinwater
  4675.     ifrnd 1
  4676.       spawn WATERBUBBLE
  4677.   ifaction ATROOPSTAND
  4678.   {
  4679.     ifrnd 192
  4680.       ai AITROOPSHOOTING
  4681.     else
  4682.       ai AITROOPSEEKPLAYER
  4683.   }
  4684.   else
  4685.     ifaction ATROOPFROZEN
  4686.   {
  4687.     ifcount THAWTIME
  4688.     {
  4689.       ai AITROOPSEEKENEMY
  4690.       getlastpal
  4691.     }
  4692.     else
  4693.       ifcount FROZENDRIPTIME
  4694.     {
  4695.       ifactioncount 26
  4696.       {
  4697.         spawn WATERDRIP
  4698.         resetactioncount
  4699.       }
  4700.     }
  4701.     ifhitweapon
  4702.     {
  4703.       ifwasweapon FREEZEBLAST
  4704.       {
  4705.         strength 0
  4706.         break
  4707.       }
  4708.       addkills 1
  4709.  
  4710.       ifrnd 84
  4711.         spawn BLOODPOOL
  4712.       lotsofglass 30
  4713.       sound GLASS_BREAKING
  4714.       killit
  4715.     }
  4716.     ifp pfacing
  4717.       ifpdistl FROZENQUICKKICKDIST
  4718.         pkick
  4719.     break
  4720.   }
  4721.   else ifaction ATROOPPLAYDEAD
  4722.   {
  4723.     ifhitweapon
  4724.     {
  4725.       ifwasweapon RADIUSEXPLOSION
  4726.       {
  4727.         sound SQUISHED
  4728.         state troop_body_jibs
  4729.         state standard_jibs
  4730.         killit
  4731.       }
  4732.       break
  4733.     }
  4734.     else
  4735.       state checksquished
  4736.  
  4737.     ifcount PLAYDEADTIME
  4738.     {
  4739.       addkills -1
  4740.       soundonce PRED_ROAM
  4741.       cstat 257
  4742.       strength 1
  4743.       ai AITROOPSHOOTING
  4744.     }
  4745.     else
  4746.       ifp pfacing
  4747.         resetcount
  4748.  
  4749.     break
  4750.   }
  4751.   else
  4752.     ifaction ATROOPDEAD
  4753.   {
  4754.     strength 0
  4755.     ifrespawn
  4756.       ifcount RESPAWNACTORTIME
  4757.     {
  4758.       spawn TRANSPORTERSTAR
  4759.       cstat 257
  4760.       strength TROOPSTRENGTH
  4761.       ai AITROOPSEEKENEMY
  4762.     }
  4763.     ifhitweapon
  4764.     {
  4765.       ifwasweapon RADIUSEXPLOSION
  4766.       {
  4767.         sound SQUISHED
  4768.         state troop_body_jibs
  4769.         state standard_jibs
  4770.         killit
  4771.       }
  4772.       break
  4773.     }
  4774.     else
  4775.       state checksquished
  4776.     break
  4777.   }
  4778.   else
  4779.     ifaction ATROOPSUFFERDEAD
  4780.   {
  4781.     ifactioncount 2
  4782.     {
  4783.       ifrnd 64
  4784.       {
  4785.         resetcount
  4786.         action ATROOPPLAYDEAD
  4787.       }
  4788.       else
  4789.       {
  4790.         soundonce PRED_DYING
  4791.         action ATROOPDEAD
  4792.       }
  4793.     }
  4794.   }
  4795.   else
  4796.     ifaction ATROOPDYING
  4797.   {
  4798.     state troopdying
  4799.     break
  4800.   }
  4801.   else
  4802.     ifaction ATROOPSUFFERING
  4803.   {
  4804.     state troopsufferingstate
  4805.     ifhitweapon
  4806.       state checktroophit
  4807.     break
  4808.   }
  4809.   else
  4810.     ifaction ATROOPFLINTCH
  4811.   {
  4812.     ifactioncount 4
  4813.       ai AITROOPSEEKENEMY
  4814.   }
  4815.   else
  4816.   {
  4817.     ifai AITROOPSEEKPLAYER
  4818.       state troopseekstate
  4819.     else
  4820.       ifai AITROOPJETPACK
  4821.     {
  4822.       state troopjetpackstate
  4823.       ifinwater nullop
  4824.       else
  4825.         soundonce DUKE_JETPACK_IDLE
  4826.     }
  4827.     else
  4828.       ifai AITROOPSEEKENEMY
  4829.         state troopseekstate
  4830.     else
  4831.       ifai AITROOPSHOOTING
  4832.         state troopshootstate
  4833.     else
  4834.       ifai AITROOPFLEEING
  4835.         state troopfleestate
  4836.     else
  4837.       ifai AITROOPFLEEINGBACK
  4838.         state troopfleestate
  4839.     else
  4840.       ifai AITROOPDODGE
  4841.         state troopseekstate
  4842.     else
  4843.       ifai AITROOPDUCKING
  4844.         state troopduckstate
  4845.     else
  4846.       ifai AITROOPSHRUNK
  4847.         state troopshrunkstate
  4848.     else
  4849.       ifai AITROOPGROW
  4850.         state genericgrowcode
  4851.     else
  4852.       ifai AITROOPHIDE
  4853.     {
  4854.       state troophidestate
  4855.       break
  4856.     }
  4857.   }
  4858.  
  4859.   ifhitweapon
  4860.     state checktroophit
  4861.   else
  4862.     state checksquished
  4863. ends
  4864.  
  4865. state checktrooppalette
  4866.   ifai 0
  4867.   {
  4868.     ifspritepal 0
  4869.         nullop
  4870.     else
  4871.         ifspritepal 21
  4872.           addstrength TROOPSTRENGTH // Double the hitpoint vals
  4873.   }
  4874. ends
  4875.  
  4876.  
  4877. actor LIZTROOPJETPACK TROOPSTRENGTH
  4878.   state checktrooppalette
  4879.   ai AITROOPJETPACK
  4880.   cactor LIZTROOP
  4881. enda
  4882.  
  4883. actor LIZTROOPDUCKING TROOPSTRENGTH
  4884.   state checktrooppalette
  4885.   ai AITROOPDUCKING
  4886.   cactor LIZTROOP
  4887.   ifgapzl 48
  4888.     move DONTGETUP
  4889. enda
  4890.  
  4891. actor LIZTROOPSHOOT TROOPSTRENGTH ATROOPSTAND
  4892.   state checktrooppalette
  4893.   ai AITROOPSHOOTING
  4894.   cactor LIZTROOP
  4895. enda
  4896. actor LIZTROOPSTAYPUT TROOPSTRENGTH ATROOPSTAYSTAND
  4897.   state checktrooppalette
  4898.   ai AITROOPSEEKPLAYER
  4899.   cactor LIZTROOP
  4900. enda
  4901. actor LIZTROOPRUNNING TROOPSTRENGTH ATROOPSTAND
  4902.   state checktrooppalette
  4903.   ai AITROOPSEEKPLAYER
  4904.   cactor LIZTROOP
  4905. enda
  4906. actor LIZTROOPONTOILET TROOPSTRENGTH
  4907.   ifcount 24
  4908.   {
  4909.     sound FLUSH_TOILET
  4910.     operate
  4911.     ai AITROOPSEEKPLAYER
  4912.     cactor LIZTROOP
  4913.   }
  4914.   else
  4915.     ifcount 2
  4916.       nullop
  4917.   else
  4918.     state checktrooppalette
  4919. enda
  4920.  
  4921. actor LIZTROOPJUSTSIT TROOPSTRENGTH
  4922.   ifcount 30
  4923.   {
  4924.     operate
  4925.     ai AITROOPSEEKPLAYER
  4926.     cactor LIZTROOP
  4927.   }
  4928.   else
  4929.     ifcount 2
  4930.       nullop
  4931.   else
  4932.     state checktrooppalette
  4933. enda
  4934.  
  4935.  
  4936. actor LIZTROOP TROOPSTRENGTH ATROOPSTAND
  4937.   state checktrooppalette
  4938.   state troopcode
  4939. enda
  4940.  
  4941. action ALIZSTAND     0
  4942. action ALIZWALKING     0   4  5  1  15
  4943. action ALIZRUNNING     0   4  5  1  11
  4944. action ALIZTHINK     20  2  5  1  40
  4945. action ALIZSCREAM    30  1  5  1  2
  4946. action ALIZJUMP      45  3  5  1  20
  4947. action ALIZFALL      55  1  5
  4948. action ALIZSHOOTING    70  2  5  1  7
  4949. action ALIZDYING     60  6  1  1  15
  4950. action ALIZLYINGDEAD   65  1
  4951. action ALIZFROZEN     0  1  5
  4952.  
  4953. move LIZWALKVEL 72
  4954. move LIZRUNVEL 192
  4955. move LIZJUMPVEL 184
  4956. move LIZSTOP
  4957.  
  4958. ai AILIZGETENEMY ALIZWALKING LIZWALKVEL seekplayer
  4959. ai AILIZDODGE ALIZRUNNING LIZRUNVEL dodgebullet
  4960. ai AILIZCHARGEENEMY ALIZRUNNING LIZRUNVEL seekplayer
  4961. ai AILIZFLEENEMY ALIZWALKING LIZWALKVEL fleeenemy
  4962. ai AILIZSHOOTENEMY ALIZSHOOTING LIZSTOP faceplayer
  4963. ai AILIZJUMPENEMY ALIZJUMP LIZJUMPVEL jumptoplayer
  4964. ai AILIZTHINK ALIZTHINK LIZSTOP faceplayerslow
  4965. ai AILIZSHRUNK ALIZWALKING SHRUNKVELS fleeenemy
  4966. ai AILIZGROW ALIZSTAND  LIZSTOP looking
  4967. ai AILIZSPIT ALIZSCREAM LIZSTOP faceplayerslow
  4968. ai AILIZDYING ALIZDYING LIZSTOP faceplayer
  4969.  
  4970. state lizseekstate
  4971.  
  4972.   ifactornotstayput
  4973.   {
  4974.     ifcansee
  4975.       ifp palive
  4976.         ifpdistl 2048
  4977.           ifcount 16
  4978.             ifcanshoottarget
  4979.     {
  4980.       ai AILIZSHOOTENEMY
  4981.       break
  4982.     }
  4983.     ifai AILIZCHARGEENEMY
  4984.     {
  4985.       ifcount 72
  4986.         ifcanshoottarget
  4987.       {
  4988.         ai AILIZSHOOTENEMY
  4989.         break
  4990.       }
  4991.       ifp phigher
  4992.         ifpdistg 2048
  4993.           ifrnd 6
  4994.       {
  4995.         ai AILIZJUMPENEMY
  4996.         break
  4997.       }
  4998.     }
  4999.     else
  5000.       ifpdistg 4096
  5001.     {
  5002.       ifrnd 92
  5003.       {
  5004.         ifcount 48
  5005.           ifcanshoottarget
  5006.             ai AILIZSHOOTENEMY
  5007.       }
  5008.       else
  5009.         ifcount 24
  5010.       {
  5011.         ai AILIZCHARGEENEMY
  5012.         break
  5013.       }
  5014.     }
  5015.  
  5016.     iffloordistl 16
  5017.     {
  5018.       ifcount 48
  5019.         ifnotmoving
  5020.           ifcansee
  5021.       {
  5022.         ai AILIZJUMPENEMY
  5023.         break
  5024.       }
  5025.     }
  5026.     else
  5027.     {
  5028.       ifpdistg 1280
  5029.         ai AILIZJUMPENEMY
  5030.       break
  5031.     }
  5032.  
  5033.     ifrnd 4
  5034.       ifnotmoving
  5035.         operate
  5036.     else
  5037.       ifrnd 1
  5038.         ifbulletnear
  5039.     {
  5040.       ifgapzl 128
  5041.         ai AILIZDODGE
  5042.       else
  5043.         ifactornotstayput
  5044.       {
  5045.         ifrnd 32
  5046.           ai AILIZJUMPENEMY
  5047.         else
  5048.           ai AILIZDODGE
  5049.       }
  5050.     }
  5051.   }
  5052.   else
  5053.   {
  5054.     ifactioncount 16
  5055.     {
  5056.       ifp palive
  5057.         ifrnd 32
  5058.           ifcansee
  5059.             ifcanshoottarget
  5060.               ai AILIZSHOOTENEMY
  5061.     }
  5062.     ifcount 16
  5063.       ifrnd 32
  5064.         move LIZWALKVEL randomangle geth
  5065.   }
  5066.  
  5067. ends
  5068.  
  5069. state lizshrunkstate
  5070.   ifcount SHRUNKDONECOUNT
  5071.     ai AILIZGETENEMY
  5072.   else
  5073.     ifcount SHRUNKCOUNT
  5074.       sizeto 48 40
  5075.   else
  5076.     state genericshrunkcode
  5077. ends
  5078.  
  5079. state lizfleestate
  5080.   ifcount 16
  5081.   {
  5082.     ifrnd 48
  5083.       ifp palive
  5084.         ifcansee
  5085.           ai AILIZSPIT
  5086.   }
  5087.   else
  5088.   {
  5089.     iffloordistl 16 nullop
  5090.     else
  5091.       ai AILIZGETENEMY
  5092.     break
  5093.   }
  5094. ends
  5095.  
  5096. state lizthinkstate
  5097.   ifrnd 8
  5098.     soundonce CAPT_ROAM
  5099.   ifactioncount 3
  5100.   {
  5101.     ifrnd 32
  5102.       ifp palive
  5103.         ifcansee
  5104.           ai AILIZSPIT
  5105.         else
  5106.           ifrnd 96
  5107.             ai AILIZGETENEMY
  5108.   }
  5109.   else
  5110.     ifactioncount 2
  5111.       ifrnd 1
  5112.         spawn FECES
  5113.   ifrnd 1
  5114.     ifbulletnear
  5115.   {
  5116.     ifgapzl 96
  5117.       ai AILIZDODGE
  5118.     else
  5119.     {
  5120.       ifrnd 128
  5121.         ai AILIZJUMPENEMY
  5122.       else
  5123.         ai AILIZDODGE
  5124.     }
  5125.   }
  5126. ends
  5127.  
  5128. state lizshootstate
  5129.   ifcount 20
  5130.     ifrnd 8
  5131.   {
  5132.     ifcansee
  5133.       ifpdistl 2048
  5134.     {
  5135.       ifrnd 128
  5136.         ai AILIZFLEENEMY
  5137.       break
  5138.     }
  5139.     ifrnd 80
  5140.       ai AILIZTHINK
  5141.     else
  5142.       ai AILIZGETENEMY
  5143.   }
  5144.   ifactioncount 2
  5145.   {
  5146.     ifcansee
  5147.     {
  5148.       ifcanshoottarget
  5149.       {
  5150.         sound CAPT_ATTACK
  5151.         shoot SHOTSPARK1
  5152.         resetactioncount
  5153.       }
  5154.       else
  5155.         ai AILIZTHINK
  5156.     }
  5157.     else
  5158.       ai AILIZGETENEMY
  5159.   }
  5160. ends
  5161.  
  5162. state checklizhit
  5163.   spawn BLOOD
  5164.   ifai AILIZSHRUNK
  5165.   {
  5166.     addkills 1
  5167.     sound SQUISHED
  5168.     state standard_jibs
  5169.     killit
  5170.   }
  5171.   ifdead
  5172.   {
  5173.     ifwasweapon FREEZEBLAST
  5174.     {
  5175.       sound SOMETHINGFROZE
  5176.       spritepal 1
  5177.       move 0
  5178.       action ALIZFROZEN
  5179.       strength 0
  5180.       break
  5181.     }
  5182.  
  5183.     state drop_chaingun
  5184.  
  5185.     ifwasweapon GROWSPARK
  5186.     {
  5187.       cstat 0
  5188.       move 0
  5189.       sound ACTOR_GROWING
  5190.       ai AILIZGROW
  5191.       break
  5192.     }
  5193.  
  5194.     addkills 1
  5195.  
  5196.     ifwasweapon RPG
  5197.     {
  5198.       sound SQUISHED
  5199.       state liz_body_jibs
  5200.       state standard_jibs
  5201.       killit
  5202.     }
  5203.     else
  5204.       ifwasweapon RADIUSEXPLOSION
  5205.     {
  5206.       sound SQUISHED
  5207.       state liz_body_jibs
  5208.       state standard_jibs
  5209.       killit
  5210.     }
  5211.     else
  5212.     {
  5213.       state rf
  5214.       ai AILIZDYING
  5215.       ifrnd 64
  5216.         spawn BLOODPOOL
  5217.     }
  5218.     sound CAPT_DYING
  5219.   }
  5220.   else
  5221.   {
  5222.     sound CAPT_PAIN
  5223.     ifwasweapon SHRINKSPARK
  5224.     {
  5225.       sound ACTOR_SHRINKING
  5226.       ai AILIZSHRUNK
  5227.       break
  5228.     }
  5229.     ifwasweapon GROWSPARK
  5230.       sound EXPANDERHIT
  5231.  
  5232.     state random_wall_jibs
  5233.     ifp palive
  5234.       ifcansee
  5235.         ifcanshoottarget
  5236.     {
  5237.       ai AILIZSHOOTENEMY
  5238.       break
  5239.     }
  5240.   }
  5241. ends
  5242.  
  5243. state lizjumpstate
  5244.   ifaction ALIZFALL
  5245.   {
  5246.     iffloordistl 16
  5247.       ai AILIZGETENEMY
  5248.   }
  5249.   else
  5250.     ifactioncount 3
  5251.       action ALIZFALL
  5252. ends
  5253.  
  5254. state lizdyingstate
  5255.   ifaction ALIZLYINGDEAD
  5256.   {
  5257.     strength 0
  5258.     ifhitweapon
  5259.       ifwasweapon RADIUSEXPLOSION
  5260.     {
  5261.       sound SQUISHED
  5262.       state standard_jibs
  5263.       killit
  5264.     }
  5265.     ifcount RESPAWNACTORTIME
  5266.       ifrespawn
  5267.     {
  5268.       spawn TRANSPORTERSTAR
  5269.       cstat 257
  5270.       strength LIZSTRENGTH
  5271.       ai AILIZGETENEMY
  5272.     }
  5273.   }
  5274.   else
  5275.     ifai AILIZDYING
  5276.       ifactioncount 6
  5277.   {
  5278.     iffloordistl 8
  5279.       sound THUD
  5280.     move LIZSTOP
  5281.     action ALIZLYINGDEAD
  5282.   }
  5283. ends
  5284.  
  5285. state lizdodgestate
  5286.   ifcount 13
  5287.     ai AILIZGETENEMY
  5288. ends
  5289.  
  5290. actor LIZMANSTAYPUT LIZSTRENGTH ai AILIZGETENEMY cactor LIZMAN enda
  5291. actor LIZMANSPITTING LIZSTRENGTH ai AILIZSPIT cactor LIZMAN enda
  5292. actor LIZMANJUMP LIZSTRENGTH ai AILIZJUMPENEMY cactor LIZMAN enda
  5293.  
  5294. state lizcode
  5295.   state checksquished
  5296.   ifai 0
  5297.     ai AILIZGETENEMY
  5298.   else
  5299.     ifaction ALIZLYINGDEAD
  5300.   {
  5301.     fall
  5302.     state lizdyingstate
  5303.     break
  5304.   }
  5305.   else
  5306.     ifaction ALIZFROZEN
  5307.   {
  5308.     ifcount THAWTIME
  5309.     {
  5310.       ai AILIZGETENEMY
  5311.       getlastpal
  5312.     }
  5313.     else
  5314.       ifcount FROZENDRIPTIME
  5315.     {
  5316.       ifactioncount 26
  5317.       {
  5318.         spawn WATERDRIP
  5319.         resetactioncount
  5320.       }
  5321.     }
  5322.  
  5323.     ifhitweapon
  5324.     {
  5325.       ifwasweapon FREEZEBLAST
  5326.       {
  5327.         strength 0
  5328.         break
  5329.       }
  5330.       addkills 1
  5331.  
  5332.       ifrnd 84
  5333.         spawn BLOODPOOL
  5334.       lotsofglass 30
  5335.       sound GLASS_BREAKING
  5336.       killit
  5337.     }
  5338.     ifp pfacing
  5339.       ifpdistl FROZENQUICKKICKDIST
  5340.         pkick
  5341.     break
  5342.   }
  5343.   else
  5344.     ifai AILIZJUMPENEMY
  5345.       state lizjumpstate
  5346.   else
  5347.   {
  5348.     fall
  5349.     ifai AILIZGETENEMY
  5350.       state lizseekstate
  5351.     else
  5352.       ifai AILIZCHARGEENEMY
  5353.         state lizseekstate
  5354.     else
  5355.       ifai AILIZDODGE
  5356.         state lizdodgestate
  5357.     else
  5358.       ifai AILIZSHOOTENEMY
  5359.         state lizshootstate
  5360.     else
  5361.       ifai AILIZFLEENEMY
  5362.         state lizfleestate
  5363.     else
  5364.       ifai AILIZTHINK
  5365.         state lizthinkstate
  5366.     else
  5367.       ifai AILIZSHRUNK
  5368.         state lizshrunkstate
  5369.     else
  5370.       ifai AILIZGROW
  5371.         state genericgrowcode
  5372.     else
  5373.       ifai AILIZDYING
  5374.         state lizdyingstate
  5375.     else
  5376.       ifai AILIZSPIT
  5377.     {
  5378.       ifcount 26
  5379.         ai AILIZGETENEMY
  5380.       else
  5381.         ifcount 18
  5382.           ifrnd 96
  5383.       {
  5384.         shoot SPIT
  5385.         sound LIZARD_SPIT
  5386.       }
  5387.     }
  5388.   }
  5389.  
  5390.   ifai AILIZSHRUNK
  5391.     break
  5392.   ifhitweapon
  5393.     state checklizhit
  5394. ends
  5395.  
  5396. actor LIZMAN LIZSTRENGTH
  5397.   fall
  5398.   state lizcode
  5399. enda
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406. action DRONEFRAMES   0   1   7   1   1
  5407. action DRONESCREAM   0   1   7   1   1
  5408. move DRONERUNVELS 128 64
  5409. move DRONERUNUPVELS 128 -64
  5410. move DRONEBULLVELS 252 -64
  5411. move DRONEBACKWARDS -64 -64
  5412. move DRONERISE 32 -32
  5413. move DRONESTOPPED -16
  5414.  
  5415. ai AIDRONEGETE DRONESCREAM DRONERUNVELS faceplayerslow getv
  5416. ai AIDRONEWAIT DRONEFRAMES DRONESTOPPED faceplayerslow
  5417. ai AIDRONEGETUP DRONESCREAM DRONERUNUPVELS faceplayer getv
  5418. ai AIDRONEPULLBACK DRONEFRAMES DRONEBACKWARDS faceplayerslow
  5419. ai AIDRONEHIT DRONESCREAM DRONEBACKWARDS faceplayer
  5420. ai AIDRONESHRUNK DRONEFRAMES SHRUNKVELS fleeenemy
  5421. ai AIDRONEDODGE DRONEFRAMES DRONEBULLVELS dodgebullet geth
  5422. ai AIDRONEDODGEUP DRONEFRAMES DRONERISE getv geth
  5423.  
  5424. state dronedead
  5425.   addkills 1
  5426.   debris SCRAP1 8
  5427.   debris SCRAP2 4
  5428.   debris SCRAP3 7
  5429.   spawn EXPLOSION2
  5430.   sound RPG_EXPLODE
  5431.   hitradius 2048 15 20 25 30
  5432.   killit
  5433. ends
  5434.  
  5435. state checkdronehitstate
  5436.  
  5437.   ifdead state dronedead
  5438.   else ifsquished state dronedead
  5439.   else
  5440.   {
  5441.     sound DRON_PAIN
  5442.     ifbulletnear
  5443.     {
  5444.       ifceilingdistl 64
  5445.         ifrnd 48
  5446.           ai AIDRONEDODGE
  5447.       ai AIDRONEDODGEUP
  5448.     }
  5449.     else
  5450.       ai AIDRONEGETE
  5451.   }
  5452. ends
  5453.  
  5454. state droneshrunkstate
  5455.   ifcount 24
  5456.     killit
  5457.   else
  5458.     sizeto 1 1
  5459. ends
  5460.  
  5461. state checkdronenearplayer
  5462.  
  5463.   ifp palive
  5464.     ifpdistl 1596
  5465.   {
  5466.     ifcount 8
  5467.     {
  5468.       addkills 1
  5469.       sound DRON_ATTACK2
  5470.       debris SCRAP1 8
  5471.       debris SCRAP2 4
  5472.       debris SCRAP3 7
  5473.       spawn EXPLOSION2
  5474.       sound RPG_EXPLODE
  5475.       hitradius 2048 15 20 25 30
  5476.       killit
  5477.     }
  5478.     else
  5479.       ifcount 3 nullop
  5480.       else
  5481.         sound LASERTRIP_ARMING
  5482.   }
  5483.  
  5484. ends
  5485.  
  5486. state dronegetstate
  5487.   ifrnd 192
  5488.   {
  5489.     ifcansee
  5490.     {
  5491.       ifbulletnear
  5492.       {
  5493.         ai AIDRONEDODGE
  5494.         break
  5495.       }
  5496.       ifmove DRONEBULLVELS
  5497.       {
  5498.         ifcount 64
  5499.           ai AIDRONEPULLBACK
  5500.         else
  5501.           ifnotmoving
  5502.             ifcount 16
  5503.               ai AIDRONEPULLBACK
  5504.       }
  5505.       else
  5506.         ifcount 32
  5507.       {
  5508.         ifp phigher
  5509.           move DRONEBULLVELS geth getv
  5510.         else
  5511.           move DRONEBULLVELS geth
  5512.       }
  5513.     }
  5514.     else
  5515.       ifrnd 1
  5516.         operate
  5517.   }
  5518. ends
  5519.  
  5520. state dronedodgestate
  5521.   ifai AIDRONEDODGEUP
  5522.   {
  5523.      ifcount 8
  5524.        ai AIDRONEGETE
  5525.      else
  5526.        ifnotmoving
  5527.          ai AIDRONEGETE
  5528.   }
  5529.   else
  5530.   {
  5531.     ifcount 8
  5532.       ai AIDRONEGETE
  5533.     else
  5534.       ifnotmoving
  5535.         ai AIDRONEGETE
  5536.   }
  5537. ends
  5538.  
  5539. actor DRONE DRONESTRENGTH
  5540.   state checkdronenearplayer
  5541.  
  5542.   ifrnd 2
  5543.     fall
  5544.   else
  5545.     soundonce DRON_JETSND
  5546.  
  5547.   ifaction 0
  5548.     ai AIDRONEGETE
  5549.  
  5550.   else
  5551.     ifai AIDRONEWAIT
  5552.   {
  5553.     ifactioncount 4
  5554.       ifrnd 16
  5555.         ifcansee
  5556.     {
  5557.       sound DRON_ATTACK1
  5558.       ifp phigher
  5559.         ai AIDRONEGETUP
  5560.       else ai AIDRONEGETE
  5561.     }
  5562.   }
  5563.   else
  5564.     ifai AIDRONEGETE
  5565.       state dronegetstate
  5566.   else
  5567.     ifai AIDRONEGETUP
  5568.       state dronegetstate
  5569.   else
  5570.     ifai AIDRONEPULLBACK
  5571.   {
  5572.     ifcount 32
  5573.     ai AIDRONEWAIT
  5574.   }
  5575.   else
  5576.     ifai AIDRONEHIT
  5577.   {
  5578.     ifcount 8
  5579.       ai AIDRONEWAIT
  5580.   }
  5581.   else
  5582.     ifai AIDRONESHRUNK
  5583.       state droneshrunkstate
  5584.   else
  5585.     ifai AIDRONEDODGE
  5586.       state dronedodgestate
  5587.   else
  5588.     ifai AIDRONEDODGEUP
  5589.       state dronedodgestate
  5590.  
  5591.   ifhitweapon
  5592.     state checkdronehitstate
  5593.  
  5594.   ifrnd 1
  5595.     soundonce DRON_ROAM
  5596.  
  5597. enda
  5598.  
  5599.  
  5600.  
  5601. action AOCTAWALK    0   3   5   1   15
  5602. action AOCTASTAND     0   1   5   1   15
  5603. action AOCTASCRATCH   0   4   5   1   15
  5604. action AOCTAHIT    30   1   1   1   10
  5605. action AOCTASHOOT    20   1   5   1   10
  5606. action AOCTADYING    30   8   1   1   17
  5607. action AOCTADEAD     38   1   1   1  1
  5608. action AOCTAFROZEN    0   1   5
  5609.  
  5610. move OCTAWALKVELS 96 -30
  5611. move OCTAUPVELS 96 -70
  5612. move OCTASTOPPED 0 -30
  5613. move OCTAINWATER 96 24
  5614.  
  5615. ai AIOCTAGETENEMY AOCTAWALK OCTAWALKVELS seekplayer
  5616. ai AIOCTASHOOTENEMY AOCTASHOOT OCTASTOPPED faceplayer
  5617. ai AIOCTASCRATCHENEMY AOCTASCRATCH OCTASTOPPED faceplayerslow
  5618. ai AIOCTAHIT AOCTAHIT OCTASTOPPED faceplayer
  5619. ai AIOCTASHRUNK AOCTAWALK SHRUNKVELS faceplayer
  5620. ai AIOCTAGROW AOCTASTAND OCTASTOPPED looking
  5621. ai AIOCTADYING AOCTADYING OCTASTOPPED faceplayer
  5622.  
  5623. state octagetenemystate
  5624.  
  5625.   ifcansee
  5626.   {
  5627.     ifactioncount 32
  5628.     {
  5629.       ifrnd 48
  5630.         ifcanshoottarget
  5631.       {
  5632.         sound OCTA_ATTACK1
  5633.         ai AIOCTASHOOTENEMY
  5634.         break
  5635.       }
  5636.     }
  5637.     else
  5638.       ifpdistl 1280
  5639.         ai AIOCTASCRATCHENEMY
  5640.   }
  5641.  
  5642. ends
  5643.  
  5644. state octascratchenemystate
  5645.   ifpdistg 1280
  5646.     ai AIOCTAGETENEMY
  5647.   else
  5648.     ifcount 32
  5649.   {
  5650.     resetcount
  5651.     sound OCTA_ATTACK2
  5652.     palfrom 8 32
  5653.     addphealth OCTASCRATCHINGPLAYER
  5654.   }
  5655. ends
  5656.  
  5657. state octashootenemystate
  5658.   ifcount 25
  5659.   {
  5660.     ifcount 27
  5661.       ai AIOCTAGETENEMY
  5662.   }
  5663.   else
  5664.     ifcount 24
  5665.       shoot COOLEXPLOSION1
  5666.   else
  5667.     ifactioncount 6
  5668.       resetactioncount
  5669. ends
  5670.  
  5671. state checkoctahitstate
  5672.   ifwasweapon SHRINKSPARK
  5673.   {
  5674.     sound ACTOR_SHRINKING
  5675.     ai AIOCTASHRUNK
  5676.   }
  5677.   else
  5678.   {
  5679.     ifdead
  5680.     {
  5681.       ifwasweapon FREEZEBLAST
  5682.       {
  5683.         sound SOMETHINGFROZE
  5684.         spritepal 1
  5685.         move 0
  5686.         action AOCTAFROZEN
  5687.         strength 0
  5688.         break
  5689.       }
  5690.  
  5691.       addkills 1
  5692.       ifwasweapon RPG
  5693.       {
  5694.         sound SQUISHED
  5695.         state standard_jibs
  5696.         killit
  5697.       }
  5698.       else
  5699.         ifwasweapon RADIUSEXPLOSION
  5700.       {
  5701.         sound SQUISHED
  5702.         state standard_jibs
  5703.         killit
  5704.       }
  5705.       else
  5706.         ifwasweapon GROWSPARK
  5707.       {
  5708.         cstat 0
  5709.         move 0
  5710.         sound ACTOR_GROWING
  5711.         ai AIOCTAGROW
  5712.         break
  5713.       }
  5714.       else
  5715.       {
  5716.         state rf
  5717.         ai AIOCTADYING
  5718.       }
  5719.       sound OCTA_DYING
  5720.     }
  5721.     else
  5722.     {
  5723.       ifwasweapon RPG
  5724.       {
  5725.         sound OCTA_DYING
  5726.         addkills 1
  5727.         state standard_jibs
  5728.         killit
  5729.       }
  5730.       else
  5731.         ifwasweapon GROWSPARK
  5732.           sound EXPANDERHIT
  5733.  
  5734.       sound OCTA_PAIN
  5735.       spawn BLOOD
  5736.       ifrnd 64
  5737.         ai AIOCTAHIT
  5738.     }
  5739.   }
  5740.   state random_wall_jibs
  5741. ends
  5742.  
  5743. state octashrunkstate
  5744.   ifcount SHRUNKDONECOUNT
  5745.     ai AILIZGETENEMY
  5746.   else
  5747.     ifcount SHRUNKCOUNT
  5748.       sizeto 40 40
  5749.   else
  5750.     state genericshrunkcode
  5751. ends
  5752.  
  5753.  
  5754. state octadyingstate
  5755.   ifactioncount 8
  5756.   {
  5757.     ifrnd 64
  5758.       spawn BLOODPOOL
  5759.     move OCTASTOPPED
  5760.     action AOCTADEAD
  5761.     break
  5762.   }
  5763.   else
  5764.     ifactioncount 5 nullop
  5765.   else
  5766.     ifactioncount 4
  5767.       iffloordistl 8
  5768.         sound THUD
  5769. ends
  5770.  
  5771. actor OCTABRAINSTAYPUT OCTASTRENGTH
  5772.   ai AIOCTAGETENEMY
  5773.   cactor OCTABRAIN
  5774. enda
  5775.  
  5776. actor OCTABRAIN OCTASTRENGTH
  5777.   fall
  5778.   state checksquished
  5779.   ifai 0
  5780.     ai AIOCTAGETENEMY
  5781.   else
  5782.     ifaction AOCTADEAD
  5783.   {
  5784.     strength 0
  5785.     ifcount RESPAWNACTORTIME
  5786.       ifrespawn
  5787.     {
  5788.       addkills -1
  5789.       spawn TRANSPORTERSTAR
  5790.       cstat 257
  5791.       strength OCTASTRENGTH
  5792.       ai AIOCTAGETENEMY
  5793.     }
  5794.     ifhitweapon
  5795.       ifwasweapon RADIUSEXPLOSION
  5796.     {
  5797.       state standard_jibs
  5798.       killit
  5799.     }
  5800.     break
  5801.   }
  5802.   else ifaction AOCTAFROZEN
  5803.   {
  5804.     ifcount THAWTIME
  5805.     {
  5806.       ai AIOCTAGETENEMY
  5807.       getlastpal
  5808.     }
  5809.     else
  5810.       ifcount FROZENDRIPTIME
  5811.       {
  5812.         ifactioncount 26
  5813.         {
  5814.           spawn WATERDRIP
  5815.           resetactioncount
  5816.         }
  5817.       }
  5818.  
  5819.     ifhitweapon
  5820.     {
  5821.       addkills 1
  5822.       ifwasweapon FREEZEBLAST
  5823.       {
  5824.         strength 0
  5825.         break
  5826.       }
  5827.  
  5828.       lotsofglass 30
  5829.       ifrnd 84
  5830.         spawn BLOODPOOL
  5831.       sound GLASS_BREAKING
  5832.       killit
  5833.     }
  5834.     ifp pfacing
  5835.       ifpdistl FROZENQUICKKICKDIST
  5836.         pkick
  5837.     break
  5838.   }
  5839.   else
  5840.   {
  5841.     ifrnd 1
  5842.       soundonce OCTA_ROAM
  5843.  
  5844.     ifai AIOCTAGETENEMY
  5845.       state octagetenemystate
  5846.     else
  5847.       ifai AIOCTAHIT
  5848.       {
  5849.         ifcount 8
  5850.           ai AIOCTASHOOTENEMY
  5851.       }
  5852.     else
  5853.       ifai AIOCTADYING
  5854.       {
  5855.         state octadyingstate
  5856.         break
  5857.       }
  5858.     else
  5859.       ifai AIOCTASCRATCHENEMY
  5860.         state octascratchenemystate
  5861.     else
  5862.       ifai AIOCTASHOOTENEMY
  5863.         state octashootenemystate
  5864.     else
  5865.       ifai AIOCTASHRUNK
  5866.       {
  5867.         state octashrunkstate
  5868.         break
  5869.       }
  5870.     else
  5871.       ifai AIOCTAGROW
  5872.         state genericgrowcode
  5873.  
  5874.     ifmove OCTAUPVELS nullop
  5875.     else
  5876.       ifp phigher
  5877.         move OCTAUPVELS seekplayer
  5878.     else
  5879.       ifmove OCTAINWATER nullop
  5880.       else
  5881.         ifinwater
  5882.           move OCTAINWATER seekplayer
  5883.  
  5884.     ifhitweapon
  5885.       state checkoctahitstate
  5886.   }
  5887. enda
  5888.  
  5889. action APIGWALK     0  4 5 1 20
  5890. action APIGRUN      0  4 5 1 11
  5891. action APIGSHOOT    30 2 5 1 58
  5892. action APIGCOCK     25 1 5 1 16
  5893. action APIGSTAND    30 1 5 1 1
  5894. action APIGDIVE     40 2 5 1 40
  5895. action APIGDIVESHOOT  45 2 5 1 58
  5896. action APIGDYING    55 5 1 1 15
  5897. action APIGHIT      55 1 1 1 10
  5898. action APIGDEAD     60 1 1 1 1
  5899. action APIGFROZEN    0 1 5
  5900. action APIGGROW      0
  5901.  
  5902.  
  5903. move PIGWALKVELS 72
  5904. move PIGRUNVELS 108
  5905. move PIGSTOPPED
  5906.  
  5907. ai AIPIGSEEKENEMY APIGWALK PIGWALKVELS seekplayer
  5908. ai AIPIGSHOOTENEMY APIGSHOOT PIGSTOPPED faceplayer
  5909. ai AIPIGFLEEENEMY APIGWALK PIGWALKVELS fleeenemy
  5910. ai AIPIGSHOOT APIGSHOOT PIGSTOPPED faceplayer
  5911. ai AIPIGDODGE APIGRUN PIGRUNVELS dodgebullet
  5912. ai AIPIGCHARGE APIGRUN PIGRUNVELS seekplayer
  5913. ai AIPIGDIVING APIGDIVE PIGSTOPPED faceplayer
  5914. ai AIPIGDYING APIGDYING PIGSTOPPED faceplayer
  5915. ai AIPIGSHRINK APIGWALK SHRUNKVELS fleeenemy
  5916. ai AIPIGGROW APIGGROW PIGSTOPPED looking
  5917. ai AIPIGHIT APIGHIT PIGSTOPPED faceplayer
  5918.  
  5919. state pigseekenemystate
  5920.  
  5921.   ifai AIPIGCHARGE
  5922.   {
  5923.     ifcansee
  5924.       ifpdistl 3084
  5925.     {
  5926.       ifnotmoving
  5927.         ai AIPIGSEEKENEMY
  5928.       else
  5929.         ai AIPIGDIVING
  5930.     }
  5931.     break
  5932.   }
  5933.   else iffloordistl 32
  5934.   {
  5935.     ifpdistg 4096
  5936.     {
  5937.       ifactornotstayput
  5938.       ai AIPIGCHARGE
  5939.     }
  5940.     ifrnd 8
  5941.     {
  5942.       ifbulletnear
  5943.         ai AIPIGDODGE
  5944.     }
  5945.   }
  5946.  
  5947.   ifrnd 128
  5948.     ifcansee
  5949.   {
  5950.     ifai AIPIGDODGE
  5951.     {
  5952.       ifcount 32
  5953.         ai AIPIGCHARGE
  5954.           break
  5955.     }
  5956.     iffloordistl 32
  5957.     {
  5958.       ifpdistl 1024
  5959.         ifp palive
  5960.           ifcanshoottarget
  5961.       {
  5962.         ai AIPIGSHOOTENEMY
  5963.         break
  5964.       }
  5965.       ifcount 48
  5966.       {
  5967.         ifrnd 8
  5968.           ifp palive
  5969.             ifcanshoottarget
  5970.         {
  5971.           ifrnd 192
  5972.             ai AIPIGSHOOTENEMY
  5973.           else
  5974.             ai AIPIGDIVING
  5975.           break
  5976.         }
  5977.       }
  5978.     }
  5979.   }
  5980. ends
  5981.  
  5982.  
  5983. state pigshootenemystate
  5984. //  ifcansee
  5985.   {
  5986.     ifcount 12 nullop
  5987.     else
  5988.       ifcount 11
  5989.     {
  5990.       ifcanshoottarget
  5991.       {
  5992.         sound PIG_ATTACK
  5993.         shoot SHOTGUN
  5994.         shoot SHOTGUN
  5995.         shoot SHOTGUN
  5996.         shoot SHOTGUN
  5997.         shoot SHOTGUN
  5998.       }
  5999.       else
  6000.         ai AIPIGSEEKENEMY
  6001.     }
  6002.     ifcount 25 nullop
  6003.     else
  6004.       ifcount 24
  6005.       {
  6006.         action APIGCOCK
  6007.         sound SHOTGUN_COCK
  6008.       }
  6009.     ifcount 48 nullop
  6010.     else
  6011.       ifcount 47
  6012.     {
  6013.       ifcanshoottarget
  6014.       {
  6015.         sound PIG_ATTACK
  6016.         shoot SHOTGUN
  6017.         shoot SHOTGUN
  6018.         shoot SHOTGUN
  6019.         shoot SHOTGUN
  6020.         shoot SHOTGUN
  6021.       }
  6022.       else
  6023.         ai AIPIGSEEKENEMY
  6024.     }
  6025.     ifcount 60 nullop
  6026.     else
  6027.       ifcount 59
  6028.       {
  6029.         action APIGCOCK
  6030.         sound SHOTGUN_COCK
  6031.       }
  6032.     ifcount 72
  6033.     {
  6034.       ifrnd 64
  6035.         resetcount
  6036.       else
  6037.       {
  6038.         ifpdistl 768
  6039.           ai AIPIGFLEEENEMY
  6040.         else
  6041.           ai AIPIGSEEKENEMY
  6042.       }
  6043.     }
  6044.     ifaction APIGCOCK
  6045.       ifactioncount 2
  6046.         action APIGSHOOT
  6047.   }
  6048.   else
  6049.     ai AIPIGSEEKENEMY
  6050. ends
  6051.  
  6052. state pigfleeenemystate
  6053.   ifactioncount 8
  6054.     ai AIPIGSEEKENEMY
  6055.   else
  6056.     ifnotmoving
  6057.       ai AIPIGSEEKENEMY
  6058. ends
  6059.  
  6060. state pigdivestate
  6061.   ifaction APIGDIVESHOOT
  6062.   {
  6063.     ifcansee
  6064.     {
  6065.       ifcount 12 nullop
  6066.       else
  6067.         ifcount 11
  6068.       {
  6069.         ifcanshoottarget
  6070.         {
  6071.           sound PIG_ATTACK
  6072.           shoot SHOTGUN
  6073.           shoot SHOTGUN
  6074.           shoot SHOTGUN
  6075.           shoot SHOTGUN
  6076.         }
  6077.         else
  6078.           ai AIPIGSEEKENEMY
  6079.       }
  6080.       ifcount 25 nullop
  6081.       else
  6082.         ifcount 24
  6083.           sound SHOTGUN_COCK
  6084.       ifcount 48 nullop
  6085.       else
  6086.         ifcount 47
  6087.       {
  6088.         ifcanshoottarget
  6089.         {
  6090.           sound PIG_ATTACK
  6091.           shoot SHOTGUN
  6092.           shoot SHOTGUN
  6093.           shoot SHOTGUN
  6094.           shoot SHOTGUN
  6095.         }
  6096.         else
  6097.           ai AIPIGSEEKENEMY
  6098.       }
  6099.       ifcount 60 nullop
  6100.       else
  6101.         ifcount 59
  6102.       {
  6103.         sound SHOTGUN_COCK
  6104.         ifgapzl 32
  6105.           ai AIPIGDIVING
  6106.         else
  6107.         {
  6108.           ifpdistl 4096
  6109.             ai AIPIGFLEEENEMY
  6110.           else
  6111.             ai AIPIGSEEKENEMY
  6112.         }
  6113.       }
  6114.     }
  6115.     else
  6116.       ifgapzl 32
  6117.         ai AIPIGDIVING
  6118.       else
  6119.         ai AIPIGSEEKENEMY
  6120.   }
  6121.   else
  6122.     ifactioncount 2
  6123.     ifp palive
  6124.     {
  6125.       resetcount
  6126.       action APIGDIVESHOOT
  6127.     }
  6128. ends
  6129.  
  6130. state checkpighitstate
  6131.   spawn BLOOD
  6132.   ifdead
  6133.   {
  6134.     state random_wall_jibs
  6135.     ifrnd 16
  6136.       spawn SHIELD
  6137.     else
  6138.       state drop_shotgun
  6139.  
  6140.     ifwasweapon GROWSPARK
  6141.     {
  6142.       move 0
  6143.       sound ACTOR_GROWING
  6144.       ai AIPIGGROW
  6145.       break
  6146.     }
  6147.  
  6148.     addkills 1
  6149.  
  6150.     ifwasweapon FREEZEBLAST
  6151.     {
  6152.       sound SOMETHINGFROZE
  6153.       spritepal 1
  6154.       move 0
  6155.       action APIGFROZEN
  6156.       strength 0
  6157.       break
  6158.     }
  6159.     ifwasweapon RADIUSEXPLOSION
  6160.     {
  6161.       sound SQUISHED
  6162.       state standard_jibs
  6163.       killit
  6164.     }
  6165.     else
  6166.       ifwasweapon RPG
  6167.     {
  6168.       sound SQUISHED
  6169.       state standard_jibs
  6170.       killit
  6171.     }
  6172.     else
  6173.       ai AIPIGDYING
  6174.         sound PIG_DYING
  6175.   }
  6176.   else
  6177.   {
  6178.     sound PIG_PAIN
  6179.     state random_wall_jibs
  6180.  
  6181.     ifwasweapon SHRINKSPARK
  6182.     {
  6183.       sound ACTOR_SHRINKING
  6184.       ai AIPIGSHRINK
  6185.     }
  6186.     else
  6187.       ifwasweapon GROWSPARK
  6188.         sound EXPANDERHIT
  6189.     else
  6190.       ifrnd 32
  6191.         ai AIPIGHIT
  6192.     else
  6193.       ifrnd 64
  6194.         ai AIPIGSHOOTENEMY
  6195.     else
  6196.       ifrnd 64
  6197.       {
  6198.         ai AIPIGDIVING
  6199.         action APIGDIVESHOOT
  6200.       }
  6201.   }
  6202. ends
  6203.  
  6204. state pigshrinkstate
  6205.   ifcount SHRUNKDONECOUNT
  6206.     ai AIPIGSEEKENEMY
  6207.   else
  6208.     ifcount SHRUNKCOUNT
  6209.       sizeto 48 40
  6210.   else
  6211.     state genericshrunkcode
  6212. ends
  6213.  
  6214. state pigdyingstate
  6215.   ifactioncount 5
  6216.   {
  6217.     ifrnd 64
  6218.       spawn BLOODPOOL
  6219.     state rf
  6220.     iffloordistl 8
  6221.       sound THUD
  6222.     action APIGDEAD
  6223.     move PIGSTOPPED
  6224.     break
  6225.   }
  6226. ends
  6227.  
  6228.  
  6229. actor PIGCOPDIVE PIGCOPSTRENGTH
  6230.   ai AIPIGDIVING
  6231.   action APIGDIVESHOOT
  6232.   cactor PIGCOP
  6233. enda
  6234. actor PIGCOPSTAYPUT PIGCOPSTRENGTH
  6235.   ai AIPIGSEEKENEMY
  6236.   cactor PIGCOP
  6237. enda
  6238. actor PIGCOP PIGCOPSTRENGTH APIGSTAND
  6239.   fall
  6240.   state checksquished
  6241.   ifaction APIGSTAND
  6242.     ai AIPIGSEEKENEMY
  6243.   else
  6244.     ifaction APIGDEAD
  6245.   {
  6246.     ifrespawn
  6247.       ifcount RESPAWNACTORTIME
  6248.     {
  6249.       spawn TRANSPORTERSTAR
  6250.       cstat 257
  6251.       strength PIGCOPSTRENGTH
  6252.       ai AIPIGSEEKENEMY
  6253.     }
  6254.     else
  6255.     {
  6256.       strength 0
  6257.       ifhitweapon
  6258.         ifwasweapon RADIUSEXPLOSION
  6259.       {
  6260.         sound SQUISHED
  6261.         state standard_jibs
  6262.         killit
  6263.       }
  6264.       break
  6265.     }
  6266.   }
  6267.   else
  6268.     ifaction APIGFROZEN
  6269.   {
  6270.     ifcount THAWTIME
  6271.     {
  6272.       ai AIPIGSEEKENEMY
  6273.       getlastpal
  6274.     }
  6275.     else
  6276.       ifcount FROZENDRIPTIME
  6277.         ifrnd 8
  6278.           spawn WATERDRIP
  6279.  
  6280.     ifhitweapon
  6281.     {
  6282.       ifwasweapon FREEZEBLAST
  6283.       {
  6284.         strength 0
  6285.         break
  6286.       }
  6287.       addkills 1
  6288.  
  6289.       lotsofglass 30
  6290.       ifrnd 84 spawn BLOODPOOL
  6291.       sound GLASS_BREAKING
  6292.       killit
  6293.     }
  6294.     ifp pfacing
  6295.       ifpdistl FROZENQUICKKICKDIST
  6296.         pkick
  6297.     break
  6298.   }
  6299.   else
  6300.     ifai AIPIGDYING
  6301.       state pigdyingstate
  6302.   else
  6303.     ifai AIPIGHIT
  6304.     {
  6305.       ifactioncount 3
  6306.       ai AIPIGSEEKENEMY
  6307.     }
  6308.   else
  6309.     ifai AIPIGSHRINK
  6310.       state pigshrinkstate
  6311.   else
  6312.   {
  6313.     ifai AIPIGSEEKENEMY
  6314.       state pigseekenemystate
  6315.     else
  6316.       ifai AIPIGDODGE
  6317.         state pigseekenemystate
  6318.     else
  6319.       ifai AIPIGSHOOTENEMY
  6320.         state pigshootenemystate
  6321.     else
  6322.       ifai AIPIGGROW
  6323.         state genericgrowcode
  6324.     else
  6325.       ifai AIPIGFLEEENEMY
  6326.         state pigfleeenemystate
  6327.     else
  6328.       ifai AIPIGDIVING
  6329.         state pigdivestate
  6330.     else
  6331.       ifai AIPIGCHARGE
  6332.         state pigseekenemystate
  6333.     ifhitweapon
  6334.       state checkpighitstate
  6335.     ifrnd 1
  6336.     {
  6337.       ifrnd 32
  6338.         soundonce PIG_ROAM
  6339.       else
  6340.         ifrnd 64
  6341.           soundonce PIG_ROAM2
  6342.       else
  6343.         soundonce PIG_ROAM3
  6344.     }
  6345.   }
  6346. enda
  6347.  
  6348.  
  6349.  
  6350. action ABOSS1WALK        0  4  5  1  12
  6351. action ABOSS1FROZEN        30 1  5
  6352. action ABOSS1RUN         0  6  5  1  5
  6353. action ABOSS1SHOOT         30 2  5  1  4
  6354. action ABOSS1LOB         40 2  5  1  35
  6355. action ABOSS1DYING        50 5  1  1  35
  6356. action BOSS1FLINTCH       50 1  1  1  1
  6357. action ABOSS1DEAD         55
  6358.  
  6359. move PALBOSS1SHRUNKRUNVELS 32
  6360. move PALBOSS1RUNVELS 128
  6361. move BOSS1WALKVELS 208
  6362. move BOSS1RUNVELS 296
  6363. move BOSS1STOPPED
  6364.  
  6365. ai AIBOSS1SEEKENEMY ABOSS1WALK BOSS1WALKVELS seekplayer
  6366. ai AIBOSS1RUNENEMY ABOSS1RUN BOSS1RUNVELS faceplayer
  6367. ai AIBOSS1SHOOTENEMY ABOSS1SHOOT BOSS1STOPPED faceplayer
  6368. ai AIBOSS1LOBBED ABOSS1LOB BOSS1STOPPED faceplayer // faceplayersmart
  6369. ai AIBOSS1DYING ABOSS1DYING BOSS1STOPPED faceplayer
  6370. ai AIBOSS1PALSHRINK ABOSS1WALK PALBOSS1SHRUNKRUNVELS furthestdir
  6371.  
  6372. state boss1palshrunkstate
  6373.   ifcount SHRUNKDONECOUNT
  6374.     ai AITROOPSEEKENEMY
  6375.   else
  6376.     ifcount SHRUNKCOUNT
  6377.       sizeto 40 40
  6378.   else
  6379.     state genericshrunkcode
  6380. ends
  6381.  
  6382. state checkboss1seekstate
  6383.   ai AIBOSS1SEEKENEMY
  6384.   ifspritepal 0 nullop
  6385.     else   // a fake way of doing a ifspritepal NOT.
  6386.       move PALBOSS1RUNVELS seekplayer
  6387. ends
  6388.  
  6389. state boss1runenemystate
  6390.   ifpdistl 2048
  6391.   {
  6392.     ifp palive
  6393.       ai AIBOSS1SHOOTENEMY
  6394.     break
  6395.   }
  6396.   else
  6397.     ifcansee
  6398.   {
  6399.     ifactioncount 6
  6400.     {
  6401.       ifcanshoottarget
  6402.       {
  6403.         resetactioncount
  6404.         sound BOS1_WALK
  6405.       }
  6406.       else
  6407.         ai AIBOSS1SEEKENEMY
  6408.     }
  6409.   }
  6410.   else
  6411.     ai AIBOSS1SEEKENEMY
  6412. ends
  6413.  
  6414. state boss1seekenemystate
  6415.   ifrnd 2
  6416.     soundonce BOS1_ROAM
  6417.   else
  6418.     ifactioncount 6
  6419.   {
  6420.     resetactioncount
  6421.     sound BOS1_WALK
  6422.   }
  6423.  
  6424.   ifpdistl 2548
  6425.     ifp palive
  6426.   {
  6427.     ai AIBOSS1SHOOTENEMY
  6428.     break
  6429.   }
  6430.  
  6431.   ifcansee
  6432.     ifcount 32
  6433.   {
  6434.     ifrnd 32
  6435.     {
  6436.       ifp palive
  6437.         ifcanshoottarget
  6438.           ai AIBOSS1SHOOTENEMY
  6439.     }
  6440.     else
  6441.       ifpdistg 2548
  6442.         ifrnd 192
  6443.           ifcanshoottarget
  6444.     {
  6445.       ifrnd 64
  6446.       {
  6447.         ai AIBOSS1RUNENEMY
  6448.         ifspritepal 0 nullop
  6449.         else
  6450.           move PALBOSS1RUNVELS seekplayer
  6451.       }
  6452.       else
  6453.         ai AIBOSS1LOBBED
  6454.     }
  6455.   }
  6456.  
  6457. ends
  6458.  
  6459. state boss1dyingstate
  6460.   ifaction ABOSS1DEAD
  6461.   {
  6462.     ifspritepal 0
  6463.       break
  6464.     ifrespawn
  6465.       ifcount RESPAWNACTORTIME
  6466.     {
  6467.       spawn TRANSPORTERSTAR
  6468.       cstat 257
  6469.       strength PIGCOPSTRENGTH
  6470.       state checkboss1seekstate
  6471.     }
  6472.     else
  6473.     {
  6474.       strength 0
  6475.       ifhitweapon
  6476.         ifwasweapon RADIUSEXPLOSION
  6477.       {
  6478.         sound SQUISHED
  6479.         state standard_jibs
  6480.         killit
  6481.       }
  6482.       break
  6483.     }
  6484.   }
  6485.   ifactioncount 5
  6486.   {
  6487.     iffloordistl 8
  6488.       sound THUD
  6489.     action ABOSS1DEAD
  6490.     cstat 0
  6491.     ifspritepal 0
  6492.     endofgame 52
  6493.   }
  6494. ends
  6495.  
  6496. state boss1lobbedstate
  6497.   ifcansee
  6498.   {
  6499.     ifactioncount 2
  6500.     {
  6501.       resetactioncount
  6502.       sound BOS1_ATTACK2
  6503.       shoot MORTER
  6504.     }
  6505.     else
  6506.       ifcount 64
  6507.         ifrnd 16
  6508.           state checkboss1seekstate
  6509.   }
  6510.   else
  6511.     state checkboss1seekstate
  6512. ends
  6513.  
  6514. state boss1shootenemy
  6515.   ifcount 72
  6516.     state checkboss1seekstate
  6517.   else
  6518.     ifaction ABOSS1SHOOT
  6519.       ifactioncount 2
  6520.   {
  6521.     sound BOS1_ATTACK1
  6522.     shoot SHOTSPARK1
  6523.     shoot SHOTSPARK1
  6524.     shoot SHOTSPARK1
  6525.     shoot SHOTSPARK1
  6526.     shoot SHOTSPARK1
  6527.     shoot SHOTSPARK1
  6528.     resetactioncount
  6529.   }
  6530. ends
  6531.  
  6532. state checkboss1hitstate
  6533.   ifrnd 2
  6534.     spawn BLOODPOOL
  6535.   ifdead
  6536.   {
  6537.     ifspritepal 0
  6538.       globalsound DUKE_TALKTOBOSSFALL
  6539.     else
  6540.     {
  6541.       ifrnd 64
  6542.         globalsound DUKE_TALKTOBOSSFALL
  6543.       ifwasweapon FREEZEBLAST
  6544.       {
  6545.         sound SOMETHINGFROZE
  6546.         spritepal 1
  6547.         move 0
  6548.         action ABOSS1FROZEN
  6549.         strength 0
  6550.         break
  6551.       }
  6552.     }
  6553.  
  6554.     sound BOS1_DYING
  6555.  
  6556.     addkills 1
  6557.     ai AIBOSS1DYING
  6558.   }
  6559.   else
  6560.   {
  6561.     ifrnd 32
  6562.     {
  6563.       action BOSS1FLINTCH
  6564.       move 0
  6565.     }
  6566.  
  6567.     ifspritepal 0 nullop
  6568.     else
  6569.       ifwasweapon SHRINKSPARK
  6570.     {
  6571.       sound ACTOR_SHRINKING
  6572.       ai AIBOSS1PALSHRINK
  6573.       cstat 0
  6574.       break
  6575.     }
  6576.  
  6577.     soundonce BOS1_PAIN
  6578.  
  6579.     debris SCRAP1 1
  6580.     guts JIBS6 1
  6581.   }
  6582. ends
  6583.  
  6584. state boss1code
  6585.  
  6586.   ifaction ABOSS1FROZEN
  6587.   {
  6588.     ifcount THAWTIME
  6589.     {
  6590.       ai AIBOSS1SEEKENEMY
  6591.       spritepal 21
  6592.     }
  6593.     else
  6594.       ifcount FROZENDRIPTIME
  6595.     {
  6596.       ifactioncount 26
  6597.       {
  6598.         spawn WATERDRIP
  6599.         resetactioncount
  6600.       }
  6601.     }
  6602.  
  6603.     ifhitweapon
  6604.     {
  6605.       ifwasweapon FREEZEBLAST
  6606.       {
  6607.         strength 0
  6608.         break
  6609.       }
  6610.       addkills 1
  6611.       lotsofglass 30
  6612.  
  6613.       ifrnd 84
  6614.         spawn BLOODPOOL
  6615.       sound GLASS_BREAKING
  6616.       killit
  6617.     }
  6618.     ifp pfacing
  6619.       ifpdistl FROZENQUICKKICKDIST
  6620.         pkick
  6621.     break
  6622.   }
  6623.   ifai 0
  6624.   {
  6625.     ifspritepal 0
  6626.       ai AIBOSS1RUNENEMY
  6627.     else
  6628.     {
  6629.       strength BOSS1PALSTRENGTH
  6630.       ai AIBOSS1SHOOTENEMY
  6631.     }
  6632.   }
  6633.   else
  6634.     ifaction BOSS1FLINTCH
  6635.   {
  6636.     ifactioncount 3
  6637.     ai AIBOSS1SHOOTENEMY
  6638.   }
  6639.   else
  6640.     ifai AIBOSS1SEEKENEMY
  6641.       state boss1seekenemystate
  6642.   else
  6643.     ifai AIBOSS1RUNENEMY
  6644.       state boss1runenemystate
  6645.   else
  6646.     ifai AIBOSS1SHOOTENEMY
  6647.       state boss1shootenemy
  6648.   else
  6649.     ifai AIBOSS1LOBBED
  6650.       state boss1lobbedstate
  6651.   else
  6652.     ifai AIBOSS1PALSHRINK
  6653.       state boss1palshrunkstate
  6654.  
  6655.   ifai AIBOSS1DYING
  6656.     state boss1dyingstate
  6657.   else
  6658.   {
  6659.     ifhitweapon
  6660.       state checkboss1hitstate
  6661.     else
  6662.       ifp palive
  6663.         ifspritepal 0
  6664.           ifpdistl 1280
  6665.     {
  6666.       addphealth -1000
  6667.       palfrom 63 63
  6668.     }
  6669.   }
  6670. ends
  6671.  
  6672. actor BOSS1STAYPUT BOSS1STRENGTH cactor BOSS1 enda
  6673. actor BOSS1 BOSS1STRENGTH fall state boss1code enda
  6674.  
  6675.  
  6676. action ABOSS2WALK        0  4  5  1  30
  6677. action ABOSS2FROZEN        0  1  5
  6678. action ABOSS2RUN         0  4  5  1  15
  6679. action ABOSS2SHOOT         20 2  5  1  15
  6680. action ABOSS2LOB         30 2  5  1  105
  6681. action ABOSS2DYING        40 8  1  1  35
  6682. action BOSS2FLINTCH       40 1  1  1  1
  6683. action ABOSS2DEAD         48
  6684.  
  6685. move PALBOSS2SHRUNKRUNVELS 32
  6686. move PALBOSS2RUNVELS 84
  6687. move BOSS2WALKVELS 192
  6688. move BOSS2RUNVELS 256
  6689. move BOSS2STOPPED
  6690.  
  6691. ai AIBOSS2SEEKENEMY ABOSS2WALK BOSS2WALKVELS seekplayer
  6692. ai AIBOSS2RUNENEMY ABOSS2RUN BOSS2RUNVELS faceplayer
  6693. ai AIBOSS2SHOOTENEMY ABOSS2SHOOT BOSS2STOPPED faceplayer
  6694. ai AIBOSS2LOBBED ABOSS2LOB BOSS2STOPPED faceplayer
  6695. ai AIBOSS2DYING ABOSS2DYING BOSS2STOPPED faceplayer
  6696. ai AIBOSS2PALSHRINK ABOSS2WALK PALBOSS2SHRUNKRUNVELS furthestdir
  6697.  
  6698. state boss2palshrunkstate
  6699.   ifcount SHRUNKDONECOUNT
  6700.   {
  6701.     cstat 257
  6702.     ai AITROOPSEEKENEMY
  6703.   }
  6704.   else
  6705.     ifcount SHRUNKCOUNT
  6706.       sizeto 40 40
  6707.   else
  6708.     state genericshrunkcode
  6709. ends
  6710.  
  6711. state checkboss2seekstate
  6712.   ai AIBOSS2SEEKENEMY
  6713.   ifspritepal 0 nullop
  6714.   else   // a fake way of doing a ifspritepal NOT.
  6715.     move PALBOSS2RUNVELS seekplayer
  6716. ends
  6717.  
  6718. state boss2runenemystate
  6719.   ifcansee
  6720.   {
  6721.     ifactioncount 3
  6722.     {
  6723.       ifcanshoottarget
  6724.       {
  6725.         resetactioncount
  6726.         sound BOS1_WALK
  6727.       }
  6728.       else
  6729.         ai AIBOSS2SEEKENEMY
  6730.     }
  6731.     ifcount 48
  6732.       ifrnd 2
  6733.     {
  6734.       ifp palive
  6735.       {
  6736.         sound BOS2_ATTACK
  6737.         ai AIBOSS2SHOOTENEMY
  6738.       }
  6739.       break
  6740.     }
  6741.   }
  6742.   else
  6743.     ai AIBOSS2SEEKENEMY
  6744. ends
  6745.  
  6746. state boss2seekenemystate
  6747.   ifrnd 2
  6748.     soundonce BOS2_ROAM
  6749.   else
  6750.     ifactioncount 3
  6751.   {
  6752.     resetactioncount
  6753.     sound BOS1_WALK
  6754.   }
  6755.  
  6756.   ifcansee
  6757.     ifcount 32
  6758.       ifp palive
  6759.         ifrnd 48
  6760.           ifcanshoottarget
  6761.   {
  6762.     ifrnd 64
  6763.       ifpdistg 4096
  6764.     {
  6765.       ai AIBOSS2RUNENEMY
  6766.       ifspritepal 0 nullop
  6767.       else
  6768.         move PALBOSS2RUNVELS seekplayer
  6769.       break
  6770.     }
  6771.  
  6772.     ifpdistl 10240
  6773.     {
  6774.       ifrnd 128
  6775.       {
  6776.         sound BOS2_ATTACK
  6777.         ai AIBOSS2LOBBED
  6778.       }
  6779.     }
  6780.     else
  6781.     {
  6782.       sound BOS2_ATTACK
  6783.       ai AIBOSS2SHOOTENEMY
  6784.     }
  6785.   }
  6786. ends
  6787.  
  6788. state boss2dyingstate
  6789.   ifaction ABOSS2DEAD
  6790.   {
  6791.     ifspritepal 0
  6792.       break
  6793.     ifrespawn
  6794.       ifcount RESPAWNACTORTIME
  6795.     {
  6796.       spawn TRANSPORTERSTAR
  6797.       cstat 257
  6798.       strength PIGCOPSTRENGTH
  6799.       state checkboss2seekstate
  6800.     }
  6801.     else
  6802.     {
  6803.       strength 0
  6804.       ifhitweapon
  6805.         ifwasweapon RADIUSEXPLOSION
  6806.       {
  6807.         sound SQUISHED
  6808.         state standard_jibs
  6809.         killit
  6810.       }
  6811.       break
  6812.     }
  6813.   }
  6814.   ifactioncount 8
  6815.   {
  6816.     iffloordistl 8
  6817.       sound THUD
  6818.     action ABOSS2DEAD
  6819.     cstat 0
  6820.     ifspritepal 0
  6821.       endofgame 52
  6822.   }
  6823. ends
  6824.  
  6825. state boss2lobbedstate
  6826.   ifcansee
  6827.   {
  6828.     ifactioncount 2
  6829.       resetactioncount
  6830.     else
  6831.       ifactioncount 1
  6832.     {
  6833.       ifrnd 128
  6834.         shoot COOLEXPLOSION1
  6835.     }
  6836.     else
  6837.       ifcount 64
  6838.         ifrnd 16
  6839.           state checkboss2seekstate
  6840.   }
  6841.   else
  6842.     state checkboss2seekstate
  6843. ends
  6844.  
  6845. state boss2shootenemy
  6846.   ifcount 72
  6847.     state checkboss2seekstate
  6848.   else
  6849.     ifaction ABOSS2SHOOT
  6850.       ifactioncount 2
  6851.   {
  6852.     shoot RPG
  6853.     resetactioncount
  6854.   }
  6855. ends
  6856.  
  6857. state checkboss2hitstate
  6858.   ifrnd 2
  6859.     spawn BLOODPOOL
  6860.   ifdead
  6861.   {
  6862.     ifspritepal 0
  6863.       globalsound DUKE_TALKTOBOSSFALL
  6864.     else
  6865.     {
  6866.       ifrnd 64
  6867.         globalsound DUKE_TALKTOBOSSFALL
  6868.       ifwasweapon FREEZEBLAST
  6869.       {
  6870.         sound SOMETHINGFROZE
  6871.         spritepal 1
  6872.         move 0
  6873.         action ABOSS2FROZEN
  6874.         strength 0
  6875.         break
  6876.       }
  6877.     }
  6878.  
  6879.     sound BOS2_DYING
  6880.  
  6881.     addkills 1
  6882.  
  6883.     ai AIBOSS2DYING
  6884.   }
  6885.   else
  6886.   {
  6887.     ifrnd 144
  6888.     {
  6889.       ifrnd 32
  6890.       {
  6891.         action BOSS2FLINTCH
  6892.         move 0
  6893.       }
  6894.       else
  6895.       {
  6896.         sound BOS2_ATTACK
  6897.         ai AIBOSS2SHOOTENEMY
  6898.       }
  6899.     }
  6900.  
  6901.     ifspritepal 0 nullop
  6902.     else
  6903.       ifwasweapon SHRINKSPARK
  6904.     {
  6905.       sound ACTOR_SHRINKING
  6906.       ai AIBOSS2PALSHRINK
  6907.       break
  6908.     }
  6909.  
  6910.     soundonce BOS2_PAIN
  6911.  
  6912.     debris SCRAP1 1
  6913.     guts JIBS6 1
  6914.   }
  6915. ends
  6916.  
  6917. state boss2code
  6918.  
  6919.   ifaction ABOSS2FROZEN
  6920.   {
  6921.     ifcount THAWTIME
  6922.     {
  6923.       ai AIBOSS2SEEKENEMY
  6924.         spritepal 21
  6925.     }
  6926.     else
  6927.       ifcount FROZENDRIPTIME
  6928.     {
  6929.       ifactioncount 26
  6930.       {
  6931.         spawn WATERDRIP
  6932.         resetactioncount
  6933.       }
  6934.     }
  6935.  
  6936.     ifhitweapon
  6937.     {
  6938.       ifwasweapon FREEZEBLAST
  6939.       {
  6940.         strength 0
  6941.         break
  6942.       }
  6943.       addkills 1
  6944.  
  6945.       lotsofglass 30
  6946.       sound GLASS_BREAKING
  6947.       ifrnd 84 spawn BLOODPOOL
  6948.       killit
  6949.     }
  6950.     ifp pfacing
  6951.       ifpdistl FROZENQUICKKICKDIST
  6952.         pkick
  6953.     break
  6954.   }
  6955.   ifai 0
  6956.   {
  6957.     ifspritepal 0
  6958.       ai AIBOSS2RUNENEMY
  6959.     else
  6960.     {
  6961.       strength 1
  6962.       sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
  6963.     }
  6964.   }
  6965.   else
  6966.     ifaction BOSS2FLINTCH
  6967.   {
  6968.     ifactioncount 3
  6969.       ai AIBOSS2SEEKENEMY
  6970.   }
  6971.   else
  6972.     ifai AIBOSS2SEEKENEMY
  6973.       state boss2seekenemystate
  6974.   else
  6975.     ifai AIBOSS2RUNENEMY
  6976.       state boss2runenemystate
  6977.   else
  6978.     ifai AIBOSS2SHOOTENEMY
  6979.       state boss2shootenemy
  6980.   else
  6981.     ifai AIBOSS2LOBBED
  6982.       state boss2lobbedstate
  6983.   else
  6984.     ifai AIBOSS2PALSHRINK
  6985.       state boss2palshrunkstate
  6986.  
  6987.   ifai AIBOSS2DYING
  6988.     state boss2dyingstate
  6989.   else
  6990.   {
  6991.     ifhitweapon state checkboss2hitstate
  6992.     else
  6993.       ifp palive
  6994.         ifspritepal 0 ifpdistl
  6995.           1280
  6996.     {
  6997.       addphealth -1000
  6998.       palfrom 63 63
  6999.     }
  7000.   }
  7001.  
  7002.  
  7003. ends
  7004.  
  7005. actor BOSS2 BOSS2STRENGTH fall state boss2code enda
  7006.  
  7007. action ABOSS3WALK        0  4  5  1  30
  7008. action ABOSS3FROZEN        0  1  5
  7009. action ABOSS3RUN         0  4  5  1  15
  7010. action ABOSS3LOB        20 4  5  1  50
  7011. action ABOSS3LOBBING      30 2  5  1  15
  7012. action ABOSS3DYING        40 8  1  1  20
  7013. action BOSS3FLINTCH       40 1  1  1  1
  7014. action ABOSS3DEAD         48
  7015.  
  7016. move PALBOSS3SHRUNKRUNVELS 32
  7017. move PALBOSS3RUNVELS 84
  7018. move BOSS3WALKVELS 208
  7019. move BOSS3RUNVELS 270
  7020. move BOSS3STOPPED
  7021.  
  7022. ai AIBOSS3SEEKENEMY ABOSS3WALK BOSS3WALKVELS seekplayer
  7023. ai AIBOSS3RUNENEMY ABOSS3RUN BOSS3RUNVELS faceplayerslow
  7024. ai AIBOSS3LOBENEMY ABOSS3LOB BOSS3STOPPED faceplayer
  7025. ai AIBOSS3DYING ABOSS3DYING BOSS3STOPPED faceplayer
  7026. ai AIBOSS3PALSHRINK ABOSS3WALK PALBOSS3SHRUNKRUNVELS faceplayer
  7027.  
  7028. state boss3palshrunkstate
  7029.   ifcount SHRUNKDONECOUNT
  7030.     ai AITROOPSEEKENEMY
  7031.   else
  7032.     ifcount SHRUNKCOUNT
  7033.       sizeto 40 40
  7034.   else
  7035.     state genericshrunkcode
  7036. ends
  7037.  
  7038. state checkboss3seekstate
  7039.   ai AIBOSS3SEEKENEMY
  7040.   ifspritepal 0 nullop
  7041.   else   // a fake way of doing a ifspritepal NOT.
  7042.     move PALBOSS3RUNVELS seekplayer
  7043. ends
  7044.  
  7045. state boss3runenemystate
  7046.   ifcansee
  7047.   {
  7048.     ifactioncount 3
  7049.     {
  7050.       ifcanshoottarget
  7051.       {
  7052.         resetactioncount
  7053.         sound BOS1_WALK
  7054.       }
  7055.       else
  7056.         ai AIBOSS3SEEKENEMY
  7057.     }
  7058.   }
  7059.   else
  7060.     ai AIBOSS3SEEKENEMY
  7061. ends
  7062.  
  7063. state boss3seekenemystate
  7064.   ifrnd 2
  7065.     soundonce BOS3_ROAM
  7066.   else
  7067.     ifactioncount 3
  7068.     {
  7069.       resetactioncount
  7070.       sound BOS1_WALK
  7071.     }
  7072.  
  7073.   ifcansee
  7074.     ifcount 32
  7075.       ifrnd 48
  7076.         ifcanshoottarget
  7077.   {
  7078.     ifrnd 64
  7079.       ifpdistg 4096
  7080.       {
  7081.         ai AIBOSS3RUNENEMY
  7082.         ifspritepal 0
  7083.           break
  7084.         move PALBOSS3RUNVELS seekplayer
  7085.         break
  7086.       }
  7087.  
  7088.     ifp palive
  7089.       ai AIBOSS3LOBENEMY
  7090.   }
  7091. ends
  7092.  
  7093. state boss3dyingstate
  7094.   ifaction ABOSS3DEAD
  7095.   {
  7096.     ifspritepal 0
  7097.       break
  7098.     ifrespawn
  7099.       ifcount RESPAWNACTORTIME
  7100.     {
  7101.       spawn TRANSPORTERSTAR
  7102.       cstat 257
  7103.       strength PIGCOPSTRENGTH
  7104.       state checkboss3seekstate
  7105.     }
  7106.     else
  7107.     {
  7108.       strength 0
  7109.       ifhitweapon
  7110.         ifwasweapon RADIUSEXPLOSION
  7111.       {
  7112.         sound SQUISHED
  7113.         state standard_jibs
  7114.         killit
  7115.       }
  7116.       break
  7117.     }
  7118.   }
  7119.   ifactioncount 8
  7120.   {
  7121.     iffloordistl 8
  7122.       sound THUD
  7123.     action ABOSS3DEAD
  7124.     cstat 0
  7125.     ifspritepal 0
  7126.     endofgame 52
  7127.   }
  7128. ends
  7129.  
  7130. state boss3lobbedstate
  7131.   ifcansee
  7132.   {
  7133.     ifaction ABOSS3LOBBING
  7134.       ifactioncount 2
  7135.     {
  7136.       shoot RPG
  7137.       resetactioncount
  7138.       ifrnd 8
  7139.         ai AIBOSS3SEEKENEMY
  7140.     }
  7141.  
  7142.     ifactioncount 3
  7143.     {
  7144.       action ABOSS3LOBBING
  7145.       resetcount
  7146.     }
  7147.   }
  7148.   else
  7149.     state checkboss3seekstate
  7150. ends
  7151.  
  7152. state checkboss3hitstate
  7153.   ifrnd 2
  7154.     spawn BLOODPOOL
  7155.   ifdead
  7156.   {
  7157.     ifspritepal 0
  7158.       globalsound DUKE_TALKTOBOSSFALL
  7159.     else
  7160.     {
  7161.       ifrnd 64
  7162.         globalsound DUKE_TALKTOBOSSFALL
  7163.       ifwasweapon FREEZEBLAST
  7164.       {
  7165.         sound SOMETHINGFROZE
  7166.         spritepal 1
  7167.         move 0
  7168.         action ABOSS3FROZEN
  7169.         strength 0
  7170.         break
  7171.       }
  7172.     }
  7173.  
  7174.     addkills 1
  7175.     ai AIBOSS3DYING
  7176.  
  7177.     sound BOS3_DYING
  7178.     sound JIBBED_ACTOR9
  7179.  
  7180.   }
  7181.   else
  7182.   {
  7183.     ifrnd 32
  7184.     {
  7185.       action BOSS3FLINTCH
  7186.       move 0
  7187.     }
  7188.  
  7189.     ifspritepal 0 nullop
  7190.     else
  7191.       ifwasweapon SHRINKSPARK
  7192.     {
  7193.       sound ACTOR_SHRINKING
  7194.       ai AIBOSS3PALSHRINK
  7195.       break
  7196.     }
  7197.  
  7198.     soundonce BOS3_PAIN
  7199.  
  7200.     debris SCRAP1 1
  7201.     guts JIBS6 1
  7202.   }
  7203. ends
  7204.  
  7205. state boss3code
  7206.  
  7207.   ifaction ABOSS3FROZEN
  7208.   {
  7209.     ifhitweapon
  7210.     {
  7211.       ifwasweapon FREEZEBLAST
  7212.       {
  7213.         strength 0
  7214.         break
  7215.       }
  7216.  
  7217.       addkills 1
  7218.       lotsofglass 30
  7219.  
  7220.       ifrnd 84
  7221.         spawn BLOODPOOL
  7222.       sound GLASS_BREAKING
  7223.       killit
  7224.     }
  7225.     ifp pfacing
  7226.       ifpdistl FROZENQUICKKICKDIST
  7227.         pkick
  7228.     break
  7229.   }
  7230.   ifai 0
  7231.   {
  7232.     ifspritepal 0
  7233.       ai AIBOSS3RUNENEMY
  7234.     else
  7235.     {
  7236.       strength 1
  7237.       ai AIBOSS3LOBENEMY
  7238.     }
  7239.   }
  7240.   else
  7241.     ifaction BOSS3FLINTCH
  7242.     {
  7243.       ifactioncount 3
  7244.       ai AIBOSS3SEEKENEMY
  7245.     }
  7246.   else
  7247.     ifai AIBOSS3SEEKENEMY
  7248.       state boss3seekenemystate
  7249.   else
  7250.     ifai AIBOSS3RUNENEMY
  7251.       state boss3runenemystate
  7252.   else
  7253.     ifai AIBOSS3LOBENEMY
  7254.       state boss3lobbedstate
  7255.   else
  7256.     ifai AIBOSS3PALSHRINK
  7257.       state boss3palshrunkstate
  7258.  
  7259.   ifai AIBOSS3DYING
  7260.     state boss3dyingstate
  7261.   else
  7262.   {
  7263.     ifhitweapon
  7264.       state checkboss3hitstate
  7265.     else
  7266.       ifp palive
  7267.         ifspritepal 0
  7268.           ifpdistl 1280
  7269.       {
  7270.         addphealth -1000
  7271.         palfrom 63 63
  7272.       }
  7273.   }
  7274. ends
  7275.  
  7276. actor BOSS3 BOSS3STRENGTH fall state boss3code enda
  7277.  
  7278.  
  7279. action ACOMMBREETH  0  3  5  1  40
  7280. action ACOMMFROZEN  0  1  5
  7281. action ACOMMSPIN   -5  1  5  1  12
  7282. action ACOMMGET   0  3  5  1  30
  7283. action ACOMMSHOOT  20  1  5   1 35
  7284. action ACOMMABOUTTOSHOOT 20 1 5 1 30
  7285. action ACOMMDYING  30  8  1  1  12
  7286. action ACOMMDEAD   38  1  1  1  1
  7287.  
  7288.  
  7289. move COMMGETUPVELS 128 -64
  7290. move COMMGETVELS 128 64
  7291. move COMMSLOW 64 24
  7292. move COMMSTOPPED
  7293.  
  7294. ai AICOMMWAIT ACOMMBREETH COMMSTOPPED faceplayerslow
  7295. ai AICOMMGET ACOMMGET COMMGETVELS seekplayer
  7296. ai AICOMMSHOOT ACOMMSHOOT COMMSTOPPED faceplayerslow
  7297. ai AICOMMABOUTTOSHOOT ACOMMABOUTTOSHOOT COMMSTOPPED faceplayerslow
  7298. ai AICOMMSPIN ACOMMSPIN COMMGETVELS spin
  7299. ai AICOMMDYING ACOMMDYING COMMSTOPPED faceplayer
  7300. ai AICOMMSHRUNK ACOMMGET COMMSLOW furthestdir
  7301. ai AICOMMGROW ACOMMGET COMMSTOPPED looking         // furthestdir
  7302.  
  7303. state checkcommhitstate
  7304.  
  7305.   ifhitweapon
  7306.   {
  7307.     guts JIBS6 2
  7308.  
  7309.     ifdead
  7310.     {
  7311.       ifwasweapon FREEZEBLAST
  7312.       {
  7313.         sound SOMETHINGFROZE
  7314.         spritepal 1
  7315.         move 0
  7316.         action ACOMMFROZEN
  7317.         strength 0
  7318.         break
  7319.       }
  7320.       else
  7321.         ifwasweapon GROWSPARK
  7322.       {
  7323.         move 0
  7324.         sound ACTOR_GROWING
  7325.         ai AICOMMGROW
  7326.         break
  7327.       }
  7328.  
  7329.       addkills 1
  7330.  
  7331.       ifwasweapon RADIUSEXPLOSION
  7332.       {
  7333.         spawn BLOODPOOL
  7334.         sound SQUISHED
  7335.         state standard_jibs
  7336.         killit
  7337.       }
  7338.       else
  7339.         ifwasweapon RPG
  7340.       {
  7341.         sound SQUISHED
  7342.         spawn BLOODPOOL
  7343.         state standard_jibs
  7344.         killit
  7345.       }
  7346.  
  7347.       sound COMM_DYING
  7348.       ai AICOMMDYING
  7349.     }
  7350.     else
  7351.     {
  7352.       soundonce COMM_PAIN
  7353.       ifwasweapon SHRINKSPARK
  7354.       {
  7355.         sound ACTOR_SHRINKING
  7356.         ai AICOMMSHRUNK
  7357.       }
  7358.       else
  7359.         ifwasweapon GROWSPARK
  7360.           sound EXPANDERHIT
  7361.       else
  7362.         ifrnd 24
  7363.           ai AICOMMABOUTTOSHOOT
  7364.     }
  7365.   }
  7366. ends
  7367.  
  7368. actor COMMANDERSTAYPUT COMMANDERSTRENGTH
  7369.   cactor COMMANDER
  7370.   ai AICOMMABOUTTOSHOOT
  7371. enda
  7372.  
  7373. actor COMMANDER COMMANDERSTRENGTH
  7374.  
  7375.   state checksquished
  7376.  
  7377.   ifaction ACOMMFROZEN
  7378.   {
  7379.     fall
  7380.  
  7381.     ifcount THAWTIME
  7382.     {
  7383.       getlastpal
  7384.       ai AICOMMWAIT
  7385.     }
  7386.     else
  7387.       ifcount FROZENDRIPTIME
  7388.     {
  7389.       ifactioncount 26
  7390.       {
  7391.         spawn WATERDRIP
  7392.         resetactioncount
  7393.       }
  7394.     }
  7395.  
  7396.     ifhitweapon
  7397.     {
  7398.       ifwasweapon FREEZEBLAST
  7399.       {
  7400.         strength 0
  7401.         break
  7402.       }
  7403.       addkills 1
  7404.  
  7405.       ifrnd 84
  7406.         spawn BLOODPOOL
  7407.       lotsofglass 30
  7408.       sound GLASS_BREAKING
  7409.       killit
  7410.     }
  7411.     ifp pfacing
  7412.       ifpdistl FROZENQUICKKICKDIST
  7413.         pkick
  7414.     break
  7415.   }
  7416.   ifai 0
  7417.     ai AICOMMSHOOT
  7418.   else
  7419.     ifai AICOMMWAIT
  7420.   {
  7421.     ifcount 20
  7422.     {
  7423.       ifcansee
  7424.       {
  7425.         ifcanshoottarget
  7426.         {
  7427.           ifrnd 96
  7428.             ai AICOMMGET
  7429.           else
  7430.             ai AICOMMABOUTTOSHOOT
  7431.         }
  7432.       }
  7433.       else
  7434.         ai AICOMMGET
  7435.     }
  7436.   }
  7437.   else
  7438.     ifai AICOMMABOUTTOSHOOT
  7439.   {
  7440.     ifactioncount 2
  7441.     {
  7442.       ifcansee
  7443.         ai AICOMMSHOOT
  7444.       else
  7445.       {
  7446.         ai AICOMMGET
  7447.         break
  7448.       }
  7449.     }
  7450.     ifrnd 32 soundonce COMM_ATTACK
  7451.   }
  7452.   else
  7453.     ifai AICOMMSHOOT
  7454.   {
  7455.     ifcanshoottarget
  7456.     {
  7457.       ifcount 24
  7458.         ifrnd 16
  7459.           ai AICOMMWAIT
  7460.       ifactioncount 2
  7461.       {
  7462.         shoot RPG
  7463.         resetactioncount
  7464.       }
  7465.     }
  7466.     else
  7467.       ai AICOMMGET
  7468.   }
  7469.   else
  7470.     ifai AICOMMSHRUNK
  7471.   {
  7472.     ifcount SHRUNKDONECOUNT
  7473.       ai AICOMMGET
  7474.     else
  7475.       ifcount SHRUNKCOUNT
  7476.         sizeto 48 40
  7477.     else
  7478.       state genericshrunkcode
  7479.   }
  7480.   else
  7481.     ifai AICOMMGROW
  7482.       state genericgrowcode
  7483.   else
  7484.     ifai AICOMMGET
  7485.   {
  7486.     ifnotmoving
  7487.       ifrnd 4
  7488.         operate
  7489.     ifpdistl 1024
  7490.       ifp palive
  7491.     {
  7492.       sound COMM_SPIN
  7493.       ai AICOMMSPIN
  7494.       break
  7495.     }
  7496.  
  7497.     ifcansee
  7498.     {
  7499.       ifp phigher
  7500.         move COMMGETUPVELS getv geth faceplayer
  7501.       else
  7502.         move COMMGETVELS getv geth faceplayer
  7503.     }
  7504.     ifactioncount 8
  7505.       ifrnd 2
  7506.         ai AICOMMABOUTTOSHOOT
  7507.   }
  7508.   else
  7509.     ifai AICOMMSPIN
  7510.   {
  7511.     soundonce COMM_SPIN
  7512.     ifcount 16
  7513.     {
  7514.       ifpdistl 1280
  7515.       {
  7516.         addphealth CAPTSPINNINGPLAYER
  7517.         sound DUKE_GRUNT
  7518.         palfrom 32
  7519.         16 resetcount
  7520.       }
  7521.       else
  7522.         ifpdistg 2300
  7523.           ai AICOMMWAIT
  7524.     }
  7525.     ifactioncount 52
  7526.       ai AICOMMWAIT
  7527.     ifnotmoving
  7528.       ifrnd 32
  7529.         operate
  7530.   }
  7531.  
  7532.   ifai AICOMMDYING
  7533.   {
  7534.     fall
  7535.     strength 0
  7536.  
  7537.     ifhitweapon
  7538.       ifwasweapon RADIUSEXPLOSION
  7539.     {
  7540.       sound SQUISHED
  7541.       spawn BLOODPOOL
  7542.       state standard_jibs
  7543.       killit
  7544.     }
  7545.  
  7546.     ifaction ACOMMDYING
  7547.       ifactioncount 8
  7548.     {
  7549.       iffloordistl 8
  7550.         sound THUD
  7551.       cstat 0
  7552.       action ACOMMDEAD
  7553.     }
  7554.   }
  7555.   else
  7556.   {
  7557.     ifrnd 2
  7558.       soundonce COMM_ROAM
  7559.     state checkcommhitstate
  7560.   }
  7561. enda
  7562.  
  7563.  
  7564. // CANNONBALL for Pirates of the Carribean
  7565. define CANNONBALLSTRENGTH 400
  7566. move CANNONBALL1 512 0
  7567. move CANNONBALL2 512 10
  7568. move CANNONBALL3 512 20
  7569. move CANNONBALL4 512 40
  7570. move CANNONBALL5 512 80
  7571.  
  7572. useractor notenemy CANNONBALL CANNONBALLSTRENGTH
  7573.  
  7574.   ifaction 0
  7575.   {
  7576.     sizeat 32 32
  7577.     cstat 257         // Force actor to block
  7578.     action ANULLACTION
  7579.   }
  7580.  
  7581.     ifactioncount 46
  7582.     {
  7583.       ifactioncount 47 nullop
  7584.       else
  7585.         move CANNONBALL5 geth getv
  7586.     }
  7587.     else
  7588.       ifactioncount 44
  7589.     {
  7590.       ifactioncount 45 nullop
  7591.       else
  7592.         move CANNONBALL4 geth getv
  7593.     }
  7594.     else
  7595.       ifactioncount 40
  7596.     {
  7597.       ifactioncount 41 nullop
  7598.       else
  7599.         move CANNONBALL3 geth getv
  7600.     }
  7601.     else
  7602.       ifactioncount 32
  7603.     {
  7604.       ifactioncount 33 nullop
  7605.       else
  7606.         move CANNONBALL2 geth getv
  7607.     }
  7608.     else
  7609.       ifactioncount 16
  7610.     {
  7611.       ifactioncount 17 nullop
  7612.       else move CANNONBALL1 geth getv
  7613.     }
  7614.  
  7615.   ifnotmoving
  7616.   {
  7617.     spawn EXPLOSION2
  7618.     sound PIPEBOMB_EXPLODE
  7619.     hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7620.     killit
  7621.   }
  7622.  
  7623.   ifhitweapon
  7624.   {
  7625.     ifdead
  7626.     {
  7627.       spawn EXPLOSION2
  7628.       hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7629.       killit
  7630.     }
  7631.     else
  7632.       debris SCRAP1 3
  7633.   }
  7634.  
  7635. enda
  7636.  
  7637.  
  7638. define CANNONBALLS 1818
  7639. define CANNONBALLSSTRENGTH 10
  7640. move CANNONBALLSVEL
  7641.  
  7642. useractor notenemy CANNONBALLS CANNONBALLSSTRENGTH
  7643.   ifaction 0
  7644.   {
  7645.     cstator 257
  7646.     action ANULLACTION
  7647.   }
  7648.   ifhitweapon
  7649.   {
  7650.     ifdead
  7651.     {
  7652.       spawn EXPLOSION2
  7653.       hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7654.       killit
  7655.     }
  7656.     else
  7657.       debris SCRAP1 3
  7658.   }
  7659. enda
  7660.  
  7661.  
  7662. define CANNON 1810
  7663. define CANNONSTRENGTH 400
  7664. action ACANNONWAIT 0 1 7 1 1
  7665. action ACANNONSHOOTING 0 1 7 1 1
  7666. move CANNONSTOP
  7667.  
  7668. useractor enemy CANNON CANNONSTRENGTH // fall
  7669.  
  7670.   ifaction 0
  7671.   {
  7672. //    sizeat 64 64
  7673.     action ACANNONWAIT
  7674.   }
  7675.   else
  7676.     ifaction ACANNONSHOOTING
  7677.   {
  7678.     spawn CANNONBALL
  7679.     action ACANNONWAIT
  7680.   }
  7681.   else
  7682.     ifaction ACANNONWAIT
  7683.   {
  7684.     ifactioncount 64
  7685.     {
  7686.       ifrnd 128
  7687.         action ACANNONSHOOTING
  7688.       else
  7689.         resetactioncount
  7690.     }
  7691.   }
  7692.  
  7693.   ifhitweapon
  7694.   {
  7695.     ifdead
  7696.     {
  7697.       addkills 1
  7698.       hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7699.       spawn EXPLOSION2
  7700.       killit
  7701.     }
  7702.     else debris SCRAP1 3
  7703.   }
  7704.  
  7705.   ifpdistl 1024
  7706.     ifhitspace
  7707.   {
  7708.     ifp pfacing
  7709.       ifcanshoottarget
  7710.         spawn CANNONBALL
  7711.       else break
  7712.   }
  7713. enda
  7714.  
  7715. useractor notenemy HOTMEAT TOUGH
  7716.   ifaction 0
  7717.   {
  7718.     action ANULLACTION
  7719.     cstat 257
  7720.   }
  7721.   ifhitweapon
  7722.   {
  7723.     ifdead
  7724.     {
  7725.       sound SQUISHED
  7726.       guts JIBS5 8
  7727.       guts JIBS6 9
  7728.       killit
  7729.     }
  7730.     else
  7731.       guts JIBS6 1
  7732.   }
  7733.   ifrnd 1
  7734.     spawn WATERDRIP
  7735.  
  7736. enda
  7737.  
  7738. action ASPEAKERBROKE 1
  7739. useractor notenemy SPEAKER
  7740.   ifaction 0
  7741.   {
  7742.     ifhitweapon
  7743.     {
  7744.       stopsound STORE_MUSIC
  7745.       soundonce STORE_MUSIC_BROKE
  7746.       action ASPEAKERBROKE
  7747.     }
  7748.     else
  7749.     {
  7750.       ifpdistl 10240
  7751.           soundonce STORE_MUSIC
  7752.       cstat 289
  7753.     }
  7754.   }
  7755. enda
  7756.  
  7757. action ALAVABUBBLE
  7758. action ALAVABUBBLEANIM 0 5 1 1 16
  7759.  
  7760. useractor notenemy LAVABUBBLE
  7761.   ifaction 0
  7762.   {
  7763.     cstat 32768
  7764.     action ALAVABUBBLE
  7765.   }
  7766.   else
  7767.     ifaction ALAVABUBBLE
  7768.   {
  7769.     ifcount 72
  7770.       ifrnd 2
  7771.     {
  7772.       cstat 0
  7773.       action ALAVABUBBLEANIM
  7774.     }
  7775.   }
  7776.   else
  7777.   {
  7778.     ifactioncount 5
  7779.     {
  7780.       cstat 32768
  7781.       action ALAVABUBBLE
  7782.     }
  7783.   }
  7784. enda
  7785.  
  7786. // RIOT TANK with Pigcop inside
  7787.  
  7788. define TANKSTRENGTH       500      // 2 3 4 5 7 8
  7789. //           off-set, numofframes, numofrot, skipframes, delay
  7790. action ATANKSPIN   0 1 7 1 4
  7791. action ATANKSHOOTING 7 2 7 1 10
  7792. action ATANKWAIT 0 1 7 1 1
  7793. action ATANKDESTRUCT 0 1 7 1 1
  7794. action ATANKDEAD 0 1 7 1 1
  7795. // move TANKVEL horiz vert
  7796. move TANKFORWARD 100
  7797. move TANKSTOP
  7798.  
  7799. useractor enemy TANK TANKSTRENGTH fall
  7800.  
  7801.   ifaction 0
  7802.   {
  7803.     sizeat 60 60
  7804.     action ATANKWAIT
  7805.     cstat 257
  7806.     clipdist 100
  7807.   }
  7808.   else
  7809.     ifaction ATANKSPIN
  7810.   {
  7811.     soundonce TANK_ROAM
  7812.  
  7813.     ifactioncount 20
  7814.     {
  7815.       ifrnd 16
  7816.         ifcansee
  7817.           ifcanshoottarget
  7818.       {
  7819.         move TANKSTOP geth
  7820.         action ATANKSHOOTING
  7821.         stopsound TANK_ROAM
  7822.       }
  7823.     }
  7824.  
  7825.     ifrnd 16
  7826.       move TANKFORWARD seekplayer
  7827.   }
  7828.   else
  7829.     ifaction ATANKSHOOTING
  7830.   {
  7831.     ifactioncount 22
  7832.     {
  7833.       ifpdistg 8192
  7834.       {
  7835.         sound BOS1_ATTACK2
  7836.         shoot MORTER
  7837.       }
  7838.       resetcount
  7839.       move 0 action ATANKWAIT
  7840.     }
  7841.     else
  7842.       ifactioncount 2
  7843.     {
  7844.       ifcansee
  7845.       {
  7846.         ifpdistl 16384
  7847.         {
  7848.           ifrnd 128
  7849.           {
  7850.             sound PISTOL_FIRE
  7851.             shoot SHOTSPARK1
  7852.           }
  7853.         }
  7854.         else
  7855.           ifrnd 128
  7856.         {
  7857.           sound PRED_ATTACK
  7858.           shoot FIRELASER
  7859.         }
  7860.       }
  7861.       else
  7862.       {
  7863.         move TANKFORWARD seekplayer
  7864.         action ATANKSPIN
  7865.       }
  7866.     }
  7867.  
  7868.     ifrnd 16
  7869.     {
  7870.       stopsound TANK_ROAM
  7871.       move TANKSTOP faceplayerslow
  7872.     }
  7873.   }
  7874.   else
  7875.     ifaction ATANKWAIT
  7876.   {
  7877.     ifactioncount 32
  7878.     {
  7879.       move TANKFORWARD seekplayer
  7880.       action ATANKSPIN
  7881.     }
  7882.   }
  7883.   else
  7884.     ifaction ATANKDESTRUCT
  7885.   {
  7886.     ifactioncount 64
  7887.       action ATANKDEAD
  7888.     else
  7889.       ifactioncount 56
  7890.        sound LASERTRIP_ARMING
  7891.      else
  7892.        ifactioncount 48
  7893.          sound LASERTRIP_ARMING
  7894.      else
  7895.        ifactioncount 32
  7896.          sound LASERTRIP_ARMING
  7897.      else
  7898.        ifactioncount 16
  7899.          sound LASERTRIP_ARMING
  7900.      break
  7901.   }
  7902.   else
  7903.     ifaction ATANKDEAD
  7904.   {
  7905.     addkills 1
  7906.     hitradius 6144 TOUGH TOUGH TOUGH TOUGH
  7907.     sound LASERTRIP_EXPLODE
  7908.     debris SCRAP1 15
  7909.     spawn EXPLOSION2
  7910.     ifrnd 128 spawn PIGCOP
  7911.     killit
  7912.   }
  7913.  
  7914.   ifhitweapon
  7915.   {
  7916.     ifdead
  7917.       action ATANKDEAD
  7918.     else
  7919.     {
  7920.       debris SCRAP1 1
  7921.       ifaction ATANKSHOOTING break
  7922.  
  7923.       ifrnd 192
  7924.       {
  7925.         move TANKSTOP geth
  7926.         action ATANKSHOOTING
  7927.         stopsound TANK_ROAM
  7928.       }
  7929.     }
  7930.   }
  7931.  
  7932.   ifpdistl 1280
  7933.     ifhitspace
  7934.       ifp pfacing
  7935.         ifangdiffl 512
  7936.           action ATANKDESTRUCT
  7937. enda
  7938.  
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.  
  7945. action ABOSS4WALK          0 4  5  1  30
  7946. action ABOSS4DYING        40 9  1  1  20
  7947. action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
  7948. action ABOSS4SHOOT        25 2  5  1  10
  7949. action ABOSS4LAYIT        50 3  5  1  120
  7950. action BOSS4FLINTCH       40 1  1  1  1
  7951. action ABOSS4DEAD         49
  7952.  
  7953. move BOSS4WALKVELS 128
  7954. move BOSS4STOPPED
  7955.  
  7956. ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
  7957. ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
  7958. ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer
  7959.  
  7960. state boss4shootstate
  7961.   ifaction ABOSS4ABOUTTOSHOOT
  7962.     ifactioncount 3
  7963.       action ABOSS4SHOOT
  7964.  
  7965.   ifaction ABOSS4SHOOT
  7966.   {
  7967.     ifcount 48
  7968.     {
  7969.       ifrnd 4
  7970.         ai AIBOSS4LAYEGGS
  7971.     }
  7972.     ifcount 26
  7973.       ifrnd 32
  7974.     {
  7975.       ifrnd 128
  7976.       {
  7977.         sound SHORT_CIRCUIT
  7978.         addphealth -2
  7979.       }
  7980.       else
  7981.       {
  7982.         sound DUKE_GRUNT
  7983.         addphealth -1
  7984.       }
  7985.       palfrom 32 32 0 0
  7986.     }
  7987.   }
  7988.  
  7989. ends
  7990.  
  7991. state boss4layeggs
  7992.   ifrnd 2
  7993.     sound BOS4_ROAM
  7994.  
  7995.   ifaction ABOSS4LAYIT
  7996.   {
  7997.     ifactioncount 3
  7998.       ifcount 32
  7999.     {
  8000.       ai AIBOSS4LAYEGGS
  8001.       ifrnd 32
  8002.         move BOSS4WALKVELS furthestdir geth
  8003.       spawn NEWBEASTHANG
  8004.     }
  8005.   }
  8006.   else
  8007.     ifcount 64
  8008.       ifrnd 4
  8009.   {
  8010.     move 0
  8011.  
  8012.     ifrnd 88
  8013.     {
  8014.       action ABOSS4LAYIT
  8015.       sound BOS4_LAY
  8016.     }
  8017.     else
  8018.       ifp palive
  8019.         ifcansee
  8020.     {
  8021.       ai AIBOSS4SHOOT
  8022.       sound BOS4_ATTACK
  8023.     }
  8024.   }
  8025.  
  8026. ends
  8027.  
  8028. state boss4dyingstate
  8029.   ifaction ABOSS4DEAD
  8030.     break
  8031.   else
  8032.     ifactioncount 9
  8033.   {
  8034.     iffloordistl 8
  8035.       sound THUD
  8036.  
  8037.     endofgame 52
  8038.     action ABOSS4DEAD
  8039.     cstat 0
  8040.   }
  8041. ends
  8042.  
  8043. state checkboss4hitstate
  8044.   ifrnd 2
  8045.     spawn BLOODPOOL
  8046.  
  8047.   ifdead
  8048.   {
  8049.     globalsound DUKE_TALKTOBOSSFALL
  8050.  
  8051.     addkills 1
  8052.     ai AIBOSS4DYING
  8053.  
  8054.     sound BOS4_DYING
  8055.     sound BOSS4_DEADSPEECH
  8056.   }
  8057.   else
  8058.   {
  8059.     soundonce BOS4_PAIN
  8060.     debris SCRAP1 1
  8061.     guts JIBS6 1
  8062.  
  8063.     ifaction ABOSS4LAYIT
  8064.       break
  8065.  
  8066.     ifrnd 16
  8067.     {
  8068.       action BOSS4FLINTCH
  8069.       move 0
  8070.     }
  8071.   }
  8072. ends
  8073.  
  8074. state boss4code
  8075.  
  8076.   ifai 0
  8077.     ai AIBOSS4LAYEGGS
  8078.   else
  8079.     ifaction BOSS4FLINTCH
  8080.     {
  8081.       ifactioncount 3
  8082.         ai AIBOSS4LAYEGGS
  8083.     }
  8084.   else
  8085.     ifai AIBOSS4LAYEGGS
  8086.       state boss4layeggs
  8087.   else
  8088.     ifai AIBOSS4SHOOT
  8089.       state boss4shootstate
  8090.  
  8091.   ifai AIBOSS4DYING
  8092.     state boss4dyingstate
  8093.   else
  8094.   {
  8095.     ifhitweapon
  8096.       state checkboss4hitstate
  8097.     else
  8098.       ifp palive
  8099.         ifpdistl 1280
  8100.       {
  8101.         addphealth -1000
  8102.         palfrom 63 63
  8103.       }
  8104.   }
  8105. ends
  8106.  
  8107. actor BOSS4STAYPUT BOSS4STRENGTH
  8108.  
  8109.   fall
  8110.   cactor BOSS4
  8111.   spritepal 6
  8112.   state boss4code
  8113.   getlastpal
  8114.  
  8115. enda
  8116.  
  8117. actor BOSS4 BOSS4STRENGTH
  8118.  
  8119.   fall
  8120.   cactor BOSS4
  8121.   spritepal 6
  8122.   state boss4code
  8123.   getlastpal
  8124.  
  8125. enda
  8126.  
  8127. action ANEWBEASTSTAND     0
  8128. action ANEWBEASTWALKING   10  4  5  1  12
  8129. action ANEWBEASTRUNNING   10  4  5  1  8
  8130. action ANEWBEASTTHINK     0   2  5  1  40
  8131. action ANEWBEASTSCRATCHING  30  3  5  1  20
  8132. action ANEWBEASTDYING     72  8  1  1  15
  8133. action ANEWBEASTFLINTCH   71  1  1  1  1
  8134. action ANEWBEASTLYINGDEAD 79  1  1
  8135. action ANEWBEASTSCREAM    50  2  5  1  40
  8136. action ANEWBEASTJUMP      80  2  5  1  50
  8137. action ANEWBEASTFALL      90  1  5
  8138. action ANEWBEASTFROZEN    10  1  5
  8139.  
  8140. action ANEWBEASTHANG      0  1  5
  8141. useractor enemy NEWBEASTHANG NEWBEASTSTRENGTH
  8142.   ifaction 0
  8143.   {
  8144.     action ANEWBEASTHANG
  8145.     cstator 257
  8146.  
  8147.     sizeat 40 40
  8148.   }
  8149.   else
  8150.     ifhitweapon
  8151.   {
  8152.     cactor NEWBEAST
  8153.     action ANEWBEASTSTAND
  8154.     sound NEWBEAST_PAIN
  8155.   }
  8156.   else
  8157.     ifspawnedby BOSS4
  8158.       ifcount 200
  8159.         ifrnd 1
  8160.   {
  8161.     cactor NEWBEAST
  8162.     action ANEWBEASTSTAND
  8163.     sound NEWBEAST_PAIN
  8164.   }
  8165. enda
  8166.  
  8167. action ANEWBEASTHANGDEAD      -1  1  5
  8168. useractor enemy NEWBEASTHANGDEAD TOUGH
  8169.  
  8170.   ifaction 0
  8171.   {
  8172.     action ANEWBEASTHANGDEAD
  8173.     sizeat 40 40
  8174.     cstator 257
  8175.   }
  8176.   else
  8177.     ifhitweapon
  8178.   {
  8179.     ifdead
  8180.     {
  8181.       state standard_jibs
  8182.       spawn BLOODPOOL
  8183.       sound SQUISHED
  8184.       killit
  8185.     }
  8186.     else
  8187.     {
  8188.       guts JIBS6 1
  8189.       sound SQUISHED
  8190.     }
  8191.   }
  8192. enda
  8193.  
  8194. move NEWBEASTWALKVEL 182
  8195. move NEWBEASTRUNVEL 256
  8196. move NEWBEASTJUMPVEL 264
  8197. move NEWBEASTSTOP
  8198.  
  8199. ai AINEWBEASTGETENEMY ANEWBEASTWALKING NEWBEASTWALKVEL seekplayer
  8200. ai AINEWBEASTDODGE ANEWBEASTRUNNING NEWBEASTRUNVEL dodgebullet
  8201. ai AINEWBEASTCHARGEENEMY ANEWBEASTRUNNING NEWBEASTRUNVEL seekplayer
  8202. ai AINEWBEASTFLEENEMY ANEWBEASTWALKING NEWBEASTWALKVEL fleeenemy
  8203. ai AINEWBEASTSCRATCHENEMY ANEWBEASTSCRATCHING NEWBEASTSTOP faceplayerslow
  8204. ai AINEWBEASTJUMPENEMY ANEWBEASTJUMP NEWBEASTJUMPVEL jumptoplayer
  8205. ai AINEWBEASTTHINK ANEWBEASTTHINK NEWBEASTSTOP
  8206. // ai AINEWBEASTSHRUNK ANEWBEASTWALKING SHRUNKVELS fleeenemy
  8207. ai AINEWBEASTGROW ANEWBEASTSTAND  NEWBEASTSTOP looking
  8208. ai AINEWBEASTDYING ANEWBEASTDYING NEWBEASTSTOP faceplayer
  8209. ai AINEWBEASTSHOOT ANEWBEASTSCREAM NEWBEASTSTOP faceplayerslow
  8210. ai AINEWBEASTFLINTCH ANEWBEASTFLINTCH NEWBEASTSTOP faceplayerslow
  8211.  
  8212.  
  8213. state newbeastseekstate
  8214.  
  8215.   ifactornotstayput
  8216.   {
  8217.     ifp palive
  8218.       ifcansee
  8219.         ifpdistl 1596
  8220.     {
  8221.       ai AINEWBEASTSCRATCHENEMY
  8222.       break
  8223.     }
  8224.  
  8225.     ifai AINEWBEASTCHARGEENEMY
  8226.     {
  8227.       ifp palive
  8228.         ifpdistl 1596
  8229.           ifcansee
  8230.       {
  8231.         ai AINEWBEASTSCRATCHENEMY
  8232.         break
  8233.       }
  8234.  
  8235.       ifrnd 1
  8236.         ifpdistg 4096
  8237.           ifp palive
  8238.             ifcansee
  8239.       {
  8240.         ai AINEWBEASTSHOOT
  8241.         break
  8242.       }
  8243.     }
  8244.     else
  8245.       ifpdistg 4096
  8246.     {
  8247.       ai AINEWBEASTCHARGEENEMY
  8248.       break
  8249.     }
  8250.  
  8251.     iffloordistl 16
  8252.     {
  8253.       ifcount 32
  8254.         ifrnd 16
  8255.       {
  8256.         ifceilingdistl 96 break
  8257.         ai AINEWBEASTJUMPENEMY
  8258.       }
  8259.       break
  8260.     }
  8261.  
  8262.     ifrnd 4
  8263.     {
  8264.       ifnotmoving
  8265.         operate
  8266.     }
  8267.     else
  8268.       ifrnd 16
  8269.         ifbulletnear
  8270.     {
  8271.       ifgapzl 128
  8272.         ai AINEWBEASTDODGE
  8273.       else
  8274.         ifactornotstayput
  8275.       {
  8276.         ifrnd 128
  8277.         {
  8278.           ifceilingdistl 96 break
  8279.           ai AINEWBEASTJUMPENEMY
  8280.         }
  8281.         else
  8282.           ai AINEWBEASTDODGE
  8283.       }
  8284.     }
  8285.   }
  8286.   else
  8287.   {
  8288.     ifactioncount 16
  8289.     {
  8290.       ifp palive
  8291.         ifpdistl 1596
  8292.           ifcansee
  8293.       {
  8294.         ai AINEWBEASTSCRATCHENEMY
  8295.         break
  8296.       }
  8297.     }
  8298.     ifcount 16
  8299.       ifrnd 32
  8300.         move NEWBEASTWALKVEL randomangle geth
  8301.   }
  8302.  
  8303. ends
  8304.  
  8305. /*
  8306. state newbeastshrunkstate
  8307.   ifcount SHRUNKDONECOUNT
  8308.     ai AINEWBEASTGETENEMY
  8309.   else
  8310.     ifcount SHRUNKCOUNT
  8311.       sizeto 48 40
  8312.   else
  8313.     state genericshrunkcode
  8314. ends
  8315. */
  8316.  
  8317. state newbeastfleestate
  8318.   ifcount 8
  8319.   {
  8320.     ifrnd 64
  8321.       ifpdistg 3500
  8322.         ifp palive
  8323.           ifcansee
  8324.             ai AINEWBEASTSHOOT
  8325.   }
  8326.   else
  8327.   {
  8328.     iffloordistl 16
  8329.     {
  8330.       ifnotmoving
  8331.         ai AINEWBEASTGETENEMY
  8332.     }
  8333.     else
  8334.       ai AINEWBEASTGETENEMY
  8335.     break
  8336.   }
  8337. ends
  8338.  
  8339. state newbeastthinkstate
  8340.  
  8341.   ifrnd 8
  8342.     soundonce NEWBEAST_ROAM
  8343.  
  8344.   ifactioncount 3
  8345.   {
  8346.     ifrnd 128
  8347.     {
  8348.       ifpdistg 3500
  8349.         ifp palive
  8350.           ifcansee
  8351.             ai AINEWBEASTSHOOT
  8352.     }
  8353.     else
  8354.       ai AINEWBEASTGETENEMY
  8355.   }
  8356.  
  8357.   ifrnd 16
  8358.     ifbulletnear
  8359.   {
  8360.     ifgapzl 96
  8361.       ai AINEWBEASTDODGE
  8362.     else
  8363.     {
  8364.       ifrnd 128
  8365.       {
  8366.         ifceilingdistl 144 break
  8367.         ai AINEWBEASTJUMPENEMY
  8368.       }
  8369.       else
  8370.         ai AINEWBEASTDODGE
  8371.     }
  8372.   }
  8373. ends
  8374.  
  8375. state newbeastscratchstate
  8376.   ifcount 20
  8377.     ifrnd 8
  8378.   {
  8379.     ifcansee
  8380.       ifpdistl 2048
  8381.     {
  8382.       ifrnd 128
  8383.         ai AINEWBEASTFLEENEMY
  8384.       break
  8385.     }
  8386.     ifrnd 80
  8387.       ai AINEWBEASTTHINK
  8388.     else
  8389.       ai AINEWBEASTGETENEMY
  8390.   }
  8391.  
  8392.   ifactioncount 3
  8393.   {
  8394.     ifpdistg 1596
  8395.       ai AINEWBEASTTHINK
  8396.     else ifp palive ifcansee
  8397.     {
  8398.       palfrom 16 16
  8399.       addphealth NEWBEASTSCRATCHAMOUNT
  8400.       sound DUKE_GRUNT
  8401.       resetactioncount
  8402.       resetcount
  8403.     }
  8404.   }
  8405.   else
  8406.     ifcount 15
  8407.       nullop
  8408.   else
  8409.     ifcount 14
  8410.   {
  8411.     ifpdistl 1596
  8412.       soundonce NEWBEAST_ATTACK
  8413.     else
  8414.       soundonce NEWBEAST_ATTACKMISS
  8415.   }
  8416. ends
  8417.  
  8418. state checknewbeasthit
  8419.   spawn BLOOD
  8420. /*
  8421.   ifai AINEWBEASTSHRUNK
  8422.   {
  8423.     addkills 1
  8424.     sound SQUISHED
  8425.     state standard_jibs
  8426.     killit
  8427.   }
  8428. */
  8429.   ifdead
  8430.   {
  8431.     ifwasweapon FREEZEBLAST
  8432.     {
  8433.       sound SOMETHINGFROZE
  8434.       spritepal 1
  8435.       move 0
  8436.       action ANEWBEASTFROZEN
  8437.       strength 0
  8438.       break
  8439.     }
  8440.  
  8441.     ifwasweapon GROWSPARK
  8442.     {
  8443.       cstat 0
  8444.       move 0
  8445.       sound ACTOR_GROWING
  8446.       ai AINEWBEASTGROW
  8447.       break
  8448.     }
  8449.  
  8450.     addkills 1
  8451.  
  8452.     ifwasweapon RPG
  8453.     {
  8454.       sound SQUISHED
  8455.       state liz_body_jibs
  8456.       state standard_jibs
  8457.       killit
  8458.     }
  8459.     else
  8460.       ifwasweapon RADIUSEXPLOSION
  8461.     {
  8462.       sound SQUISHED
  8463.       state liz_body_jibs
  8464.       state standard_jibs
  8465.       killit
  8466.     }
  8467.     else
  8468.     {
  8469.       state rf
  8470.       ai AINEWBEASTDYING
  8471.       ifrnd 64
  8472.         spawn BLOODPOOL
  8473.     }
  8474.     sound NEWBEAST_DYING
  8475.   }
  8476.   else
  8477.   {
  8478.     sound NEWBEAST_PAIN
  8479.     ifwasweapon GROWSPARK
  8480.       sound EXPANDERHIT
  8481. /*
  8482. //  The alien is immune to the shrinker
  8483.     ifwasweapon SHRINKSPARK
  8484.     {
  8485.       sound ACTOR_SHRINKING
  8486.       ai AINEWBEASTSHRUNK
  8487.       break
  8488.     }
  8489. */
  8490.     state random_wall_jibs
  8491.     ifrnd 32
  8492.       ai AINEWBEASTFLINTCH
  8493.     else
  8494.       ifrnd 32
  8495.         ifpdistg 3500
  8496.           ifp palive
  8497.             ifcansee
  8498.               ai AINEWBEASTSHOOT
  8499.   }
  8500. ends
  8501.  
  8502. state newbeastjumpstate
  8503.   ifaction ANEWBEASTFALL
  8504.   {
  8505.     iffloordistl 16
  8506.       ai AINEWBEASTGETENEMY
  8507.   }
  8508.   else
  8509.     ifcount 32
  8510.       action ANEWBEASTFALL
  8511. ends
  8512.  
  8513. state newbeastdyingstate
  8514.   ifaction ANEWBEASTLYINGDEAD
  8515.   {
  8516.     strength 0
  8517.     ifhitweapon
  8518.       ifwasweapon RADIUSEXPLOSION
  8519.     {
  8520.       sound SQUISHED
  8521.       state standard_jibs
  8522.       killit
  8523.     }
  8524.     ifcount RESPAWNACTORTIME
  8525.       ifrespawn
  8526.     {
  8527.       spawn TRANSPORTERSTAR
  8528.       cstat 257
  8529.       strength NEWBEASTSTRENGTH
  8530.       ai AINEWBEASTGETENEMY
  8531.     }
  8532.   }
  8533.   else
  8534.     ifai AINEWBEASTDYING
  8535.       ifactioncount 7
  8536.   {
  8537.     iffloordistl 8
  8538.       sound THUD
  8539.     move NEWBEASTSTOP
  8540.     action ANEWBEASTLYINGDEAD
  8541.   }
  8542. ends
  8543.  
  8544. state newbeastdodgestate
  8545.   ifcount 13
  8546.     ai AINEWBEASTGETENEMY
  8547. ends
  8548.  
  8549. useractor enemystayput NEWBEASTSTAYPUT NEWBEASTSTRENGTH ai AINEWBEASTGETENEMY cstator 257 cactor NEWBEAST enda
  8550. useractor enemy NEWBEASTJUMP NEWBEASTSTRENGTH ai AINEWBEASTJUMPENEMY cstator 257 cactor NEWBEAST enda
  8551.  
  8552. state newbeastcode
  8553.   state checksquished
  8554.   ifai 0
  8555.   {
  8556.     cstator 257
  8557.     ai AINEWBEASTGETENEMY
  8558.   }
  8559.   else
  8560.     ifaction ANEWBEASTLYINGDEAD
  8561.   {
  8562.     fall
  8563.     state newbeastdyingstate
  8564.     break
  8565.   }
  8566.   else
  8567.     ifaction ANEWBEASTFROZEN
  8568.   {
  8569.     ifcount THAWTIME
  8570.     {
  8571.       ai AINEWBEASTGETENEMY
  8572.       spritepal 0
  8573.     }
  8574.     else
  8575.       ifcount FROZENDRIPTIME
  8576.     {
  8577.       ifactioncount 26
  8578.       {
  8579.         spawn WATERDRIP
  8580.         resetactioncount
  8581.       }
  8582.     }
  8583.  
  8584.     ifhitweapon
  8585.     {
  8586.       ifwasweapon FREEZEBLAST
  8587.       {
  8588.         strength 0
  8589.         break
  8590.       }
  8591.       addkills 1
  8592.  
  8593.       ifrnd 84
  8594.         spawn BLOODPOOL
  8595.       lotsofglass 30
  8596.       sound GLASS_BREAKING
  8597.       killit
  8598.     }
  8599.     ifp pfacing
  8600.       ifpdistl FROZENQUICKKICKDIST
  8601.         pkick
  8602.     break
  8603.   }
  8604.   else
  8605.     ifai AINEWBEASTJUMPENEMY
  8606.       state newbeastjumpstate
  8607.   else
  8608.   {
  8609.     fall
  8610.     ifai AINEWBEASTGETENEMY
  8611.       state newbeastseekstate
  8612.     else
  8613.       ifai AINEWBEASTCHARGEENEMY
  8614.         state newbeastseekstate
  8615.     else
  8616.       ifai AINEWBEASTFLINTCH
  8617.     {
  8618.       ifcount 8
  8619.         ai AINEWBEASTGETENEMY
  8620.     }
  8621.  
  8622.     else
  8623.       ifai AINEWBEASTDODGE
  8624.         state newbeastdodgestate
  8625.     else
  8626.       ifai AINEWBEASTSCRATCHENEMY
  8627.         state newbeastscratchstate
  8628.     else
  8629.       ifai AINEWBEASTFLEENEMY
  8630.         state newbeastfleestate
  8631.     else
  8632.       ifai AINEWBEASTTHINK
  8633.         state newbeastthinkstate
  8634. /*
  8635.     else
  8636.       ifai AINEWBEASTSHRUNK
  8637.         state newbeastshrunkstate
  8638. */
  8639.     else
  8640.       ifai AINEWBEASTGROW
  8641.         state genericgrowcode
  8642.     else
  8643.       ifai AINEWBEASTDYING
  8644.         state newbeastdyingstate
  8645.     else
  8646.       ifai AINEWBEASTSHOOT
  8647.     {
  8648.       ifp pshrunk
  8649.         ai AINEWBEASTGETENEMY
  8650.       else
  8651.         ifcount 26
  8652.           ai AINEWBEASTGETENEMY
  8653.       else
  8654.         ifcount 25
  8655.           shoot SHRINKER
  8656.       else
  8657.       {
  8658.         ifcount 5
  8659.           nullop
  8660.         else
  8661.           ifcount 4
  8662.             sound NEWBEAST_SPIT
  8663.       }
  8664.     }
  8665.   }
  8666.  
  8667.   ifhitweapon
  8668.     state checknewbeasthit
  8669. ends
  8670.  
  8671.  
  8672. useractor enemy NEWBEAST NEWBEASTSTRENGTH
  8673.   fall
  8674.   ifaction 0
  8675.   {
  8676.     cstator 257
  8677.     sizeat 40 40
  8678.     ai AINEWBEASTDODGE
  8679.   }
  8680.   ifaction ANEWBEASTFROZEN
  8681.     state newbeastcode
  8682.   else
  8683.   {
  8684.     spritepal 6
  8685.     state newbeastcode
  8686.     ifaction ANEWBEASTFROZEN
  8687.       break
  8688.     getlastpal
  8689.   }
  8690. enda
  8691.  
  8692.