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