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