home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / VDUKE / DOOM2TC.ZIP / DOOM2TC / DOOM2GAM.CON < prev    next >
Text File  |  1998-05-11  |  152KB  |  8,547 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 DOOM2DEF.CON
  29. include DOOM2USR.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 1536 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. // code to add to cola for increment of one
  2208.  
  2209. actor COLA
  2210.   fall
  2211.   ifmove RESPAWN_ACTOR_FLAG
  2212.     state respawnit
  2213.   else
  2214.     ifp pshrunk nullop
  2215.     else
  2216.       ifp palive
  2217.         ifpdistl RETRIEVEDISTANCE
  2218.           ifcount 6
  2219.             ifphealthl MAXPLAYERHEALTH
  2220.               ifcanseetarget
  2221.       {
  2222.         addphealth 10
  2223.         quote 61
  2224.         ifspawnedby COLA
  2225.           state getcode
  2226.         else
  2227.           state quikget
  2228.       }
  2229. enda
  2230.  
  2231. actor ATOMICHEALTH
  2232.   fall
  2233.   ifmove RESPAWN_ACTOR_FLAG
  2234.     state respawnit
  2235.   else
  2236.     ifp pshrunk nullop
  2237.     else
  2238.       ifp palive
  2239.         ifpdistl RETRIEVEDISTANCE
  2240.           ifcount 6
  2241.             ifphealthl MAXPLAYERATOMICHEALTH
  2242.               ifcanseetarget
  2243.       {
  2244.         addphealth 50
  2245.         quote 19
  2246.         ifspawnedby ATOMICHEALTH
  2247.           state getcode
  2248.         else
  2249.           state quikget
  2250.       }
  2251. enda
  2252.  
  2253.  
  2254.  
  2255.  
  2256. actor FIRSTAID
  2257.   fall
  2258.   ifmove RESPAWN_ACTOR_FLAG state respawnit
  2259.   else
  2260.     ifp pshrunk nullop
  2261.     else
  2262.       ifp palive
  2263.         ifpdistl RETRIEVEDISTANCE
  2264.           ifcount 6
  2265.             ifpinventory GET_FIRSTAID FIRSTAID_AMOUNT
  2266.               ifcanseetarget
  2267.       {
  2268.         addinventory GET_FIRSTAID FIRSTAID_AMOUNT
  2269.         quote 3
  2270.  
  2271.         ifspawnedby FIRSTAID
  2272.           state getcode
  2273.         else
  2274.           state quikget
  2275.       }
  2276. enda
  2277.  
  2278.  
  2279. actor FIRSTGUNSPRITE
  2280.   fall
  2281.   ifmove RESPAWN_ACTOR_FLAG
  2282.     state respawnit
  2283.   else
  2284.     ifp pshrunk nullop
  2285.     else
  2286.       ifp palive
  2287.         ifpdistl RETRIEVEDISTANCE
  2288.           ifcount 6
  2289.             ifcanseetarget
  2290.       {
  2291.         ifgotweaponce 0
  2292.           break
  2293.         addweapon PISTOL_WEAPON 48
  2294.         ifspawnedby FIRSTGUNSPRITE
  2295.           state getweaponcode
  2296.         else
  2297.           state quikweaponget
  2298.       }
  2299. enda
  2300.  
  2301.  
  2302. actor TRIPBOMBSPRITE
  2303.   fall
  2304.   ifmove RESPAWN_ACTOR_FLAG
  2305.     state respawnit
  2306.   else
  2307.     ifp pshrunk nullop
  2308.     else
  2309.       ifp palive
  2310.         ifpdistl RETRIEVEDISTANCE
  2311.           ifcount 6
  2312.             ifcanseetarget
  2313.       {
  2314.         ifgotweaponce 0
  2315.           break
  2316.  
  2317.         addweapon TRIPBOMB_WEAPON 1
  2318.         quote 58
  2319.         ifspawnedby TRIPBOMBSPRITE
  2320.           state getweaponcode
  2321.         else
  2322.           state quikweaponget
  2323.       }
  2324. enda
  2325.  
  2326. actor CHAINGUNSPRITE
  2327.   fall
  2328.   ifmove RESPAWN_ACTOR_FLAG
  2329.     state respawnit
  2330.   else
  2331.     ifp pshrunk nullop
  2332.     else
  2333.       ifp palive
  2334.         ifpdistl RETRIEVEDISTANCE
  2335.           ifcount 6
  2336.             ifcanseetarget
  2337.       {
  2338.         ifgotweaponce 0
  2339.           break
  2340.  
  2341.         addweapon CHAINGUN_WEAPON 50
  2342.         quote 54
  2343.         ifspawnedby CHAINGUNSPRITE
  2344.           state getweaponcode
  2345.         else
  2346.           state quikweaponget
  2347.       }
  2348. enda
  2349.  
  2350.  
  2351.  
  2352. actor SHRINKERSPRITE
  2353.   fall
  2354.   ifmove RESPAWN_ACTOR_FLAG
  2355.     state respawnit
  2356.   else
  2357.     ifp pshrunk nullop
  2358.     else
  2359.       ifp palive
  2360.         ifpdistl RETRIEVEDISTANCE
  2361.           ifcount 6
  2362.             ifcanseetarget
  2363.       {
  2364.         ifgotweaponce 0
  2365.           break
  2366.         addweapon SHRINKER_WEAPON 10
  2367.         quote 60
  2368.         ifspawnedby SHRINKERSPRITE
  2369.           state getweaponcode
  2370.         else
  2371.           state quikweaponget
  2372.       }
  2373. enda
  2374.  
  2375. actor FREEZESPRITE
  2376.   fall
  2377.   ifmove RESPAWN_ACTOR_FLAG
  2378.     state respawnit
  2379.   else
  2380.     ifp pshrunk nullop
  2381.     else
  2382.       ifp palive
  2383.         ifpdistl RETRIEVEDISTANCE
  2384.           ifcount 6
  2385.             ifcanseetarget
  2386.       {
  2387.         ifgotweaponce 0
  2388.           break
  2389.  
  2390.         addweapon FREEZE_WEAPON FREEZEAMMOAMOUNT
  2391.         quote 59
  2392.         ifspawnedby FREEZESPRITE
  2393.           state getweaponcode
  2394.         else
  2395.           state quikweaponget
  2396.       }
  2397. enda
  2398.  
  2399. actor DEVISTATORSPRITE
  2400.   fall
  2401.   ifmove RESPAWN_ACTOR_FLAG state respawnit
  2402.   else
  2403.     ifp pshrunk nullop
  2404.     else
  2405.       ifp palive
  2406.         ifpdistl RETRIEVEDISTANCE
  2407.           ifcount 6
  2408.             ifcanseetarget
  2409.       {
  2410.         ifgotweaponce 0
  2411.           break
  2412.         addweapon DEVISTATOR_WEAPON DEVISTATORAMMOAMOUNT
  2413.         quote 87
  2414.         ifspawnedby DEVISTATORSPRITE
  2415.           state getweaponcode
  2416.         else
  2417.           state quikweaponget
  2418.       }
  2419. enda
  2420.  
  2421. action FIRE_FRAMES   -1 14 1 1 1
  2422. move FIREVELS
  2423.  
  2424. state firestate
  2425.  
  2426.   ifaction 0
  2427.     ifrnd 16
  2428.     {
  2429.       action FIRE_FRAMES
  2430.       cstator 128
  2431.     }
  2432.  
  2433.   sleeptime 300         // Never let it fall to sleep
  2434.  
  2435.   ifspawnedby FIRE
  2436.   {
  2437.     ifgapzl 16
  2438.       break
  2439.   }
  2440.   else
  2441.     ifspawnedby FIRE2
  2442.   {
  2443.     ifgapzl 16
  2444.       break
  2445.   }
  2446.  
  2447.   ifinwater
  2448.     killit
  2449.  
  2450.   ifp palive
  2451.     ifpdistl 844
  2452.       ifrnd 32
  2453.         ifcansee
  2454.   {
  2455.     soundonce DUKE_LONGTERM_PAIN
  2456.     addphealth -1
  2457.     palfrom 32 32
  2458.   }
  2459.  
  2460.   ifactor FIRE
  2461.   {
  2462.     ifspawnedby FIRE
  2463.       break
  2464.   }
  2465.   else
  2466.     ifactor FIRE2
  2467.       ifspawnedby FIRE2
  2468.         break
  2469.  
  2470.   iffloordistl 128
  2471.   {
  2472.     ifrnd 128
  2473.     {
  2474.       ifcount 84
  2475.         killit
  2476.                 // This line(and the else below)
  2477.                 // is not necessary, since actors
  2478.                 // with zero x-size are automatically
  2479.                 // deleted anyway!
  2480.       else
  2481.         ifcount 42
  2482.           sizeto 0 0
  2483.       else
  2484.         sizeto 32 32
  2485.     }
  2486.   }
  2487.   else
  2488.     killit
  2489.  
  2490. ends
  2491.  
  2492. useractor notenemy FIRE WEAK 0 FIREVELS state firestate enda
  2493. useractor notenemy FIRE2 WEAK 0 FIREVELS state firestate enda
  2494.  
  2495. actor FECES
  2496.   ifcount 24
  2497.   {
  2498.     ifpdistl RETRIEVEDISTANCE
  2499.     {
  2500.       ifrnd SWEARFREQUENCY
  2501.         soundonce DUKE_STEPONFECES
  2502.  
  2503.       sound STEPNIT
  2504.  
  2505.       spawn BLOODPOOL   // Will be brown
  2506.       killit
  2507.     }
  2508.   }
  2509.   else
  2510.     sizeto 32 32
  2511. enda
  2512.  
  2513. state drop_ammo
  2514.   ifrnd SPAWNAMMOODDS
  2515.     spawn AMMO
  2516. ends
  2517.  
  2518. state drop_battery
  2519.   ifrnd SPAWNAMMOODDS
  2520.     spawn BATTERYAMMO
  2521. ends
  2522. state drop_sgshells
  2523.   ifrnd SPAWNAMMOODDS
  2524.     spawn SHOTGUNAMMO
  2525. ends
  2526. state drop_shotgun
  2527.   ifrnd SPAWNAMMOODDS
  2528.     spawn SHOTGUNSPRITE
  2529. ends
  2530. state drop_chaingun
  2531.   ifrnd SPAWNAMMOODDS
  2532.   {
  2533.     ifrnd 32
  2534.       spawn CHAINGUNSPRITE
  2535.     else
  2536.       spawn BATTERYAMMO
  2537.   }
  2538. ends
  2539.  
  2540.  
  2541. state random_wall_jibs
  2542.   ifrnd 96
  2543.     shoot BLOODSPLAT1
  2544.   ifrnd 96
  2545.     shoot BLOODSPLAT2
  2546.   ifrnd 96
  2547.     shoot BLOODSPLAT3
  2548.   ifrnd 96
  2549.     shoot BLOODSPLAT4
  2550.   ifrnd 96
  2551.     shoot BLOODSPLAT1
  2552. ends
  2553.  
  2554.  
  2555.  
  2556.  
  2557. action FEMSHRUNK
  2558. action FEMFROZEN1 1
  2559. action FEMGROW
  2560. action FEMFROZEN2
  2561. action FEMDANCE1 19 1 1 1 16
  2562. action FEMDANCE3 19 1 1 1 26
  2563. action FEMDANCE2 20 2 1 1 10
  2564.  
  2565. action FEMANIMATESLOW 0 2 1 1 100
  2566. action TOUGHGALANIM   0 5 1 1 25
  2567. action FEMANIMATE
  2568.  
  2569. state femcode
  2570.  
  2571.   ifactor NAKED1 nullop
  2572.   else
  2573.     ifactor FEM6 nullop
  2574.     else
  2575.     {
  2576.       // fall
  2577.       ifactor BLOODYPOLE
  2578.         ifhitweapon
  2579.           ifdead
  2580.       {
  2581.         state standard_jibs
  2582.         killit
  2583.       }
  2584.     }
  2585.  
  2586.   ifaction FEMSHRUNK
  2587.   {
  2588.     ifcount SHRUNKDONECOUNT
  2589.     {
  2590.       action FEMANIMATE
  2591.       cstat 257
  2592.     }
  2593.     else
  2594.       ifcount SHRUNKCOUNT
  2595.         sizeto 40 40
  2596.     else
  2597.       state genericshrunkcode
  2598.   }
  2599.   else ifaction FEMGROW
  2600.   {
  2601.     ifcount 32
  2602.     {
  2603.       respawnhitag
  2604.       guts JIBS4 20
  2605.       guts JIBS6 20
  2606.       spritepal 6
  2607.       soundonce LADY_SCREAM
  2608.       ifactor NAKED1
  2609.         debris SCRAP3 4
  2610.       else
  2611.         ifactor PODFEM1
  2612.           debris SCRAP3 4
  2613.       sound SQUISHED
  2614.       killit
  2615.     }
  2616.     else
  2617.       sizeto MAXXSTRETCH MAXYSTRETCH
  2618.   }
  2619.  
  2620.   else
  2621.     ifaction FEMDANCE1
  2622.   {
  2623.     ifactioncount 2
  2624.       action FEMDANCE2
  2625.   }
  2626.   else
  2627.     ifaction FEMDANCE2
  2628.   {
  2629.     ifactioncount 8
  2630.       action FEMDANCE3
  2631.   }
  2632.   else
  2633.     ifaction FEMDANCE3
  2634.   {
  2635.     ifactioncount 2
  2636.     action FEMANIMATE
  2637.   }
  2638.   else
  2639.     ifaction FEMFROZEN1
  2640.   {
  2641.     ifcount THAWTIME
  2642.     {
  2643.       action FEMANIMATE
  2644.       getlastpal
  2645.     }
  2646.     else
  2647.       ifcount FROZENDRIPTIME
  2648.     {
  2649.       ifactioncount 26
  2650.       {
  2651.         spawn WATERDRIP
  2652.         resetactioncount
  2653.       }
  2654.     }
  2655.  
  2656.     ifhitweapon
  2657.     {
  2658.       ifwasweapon FREEZEBLAST
  2659.       {
  2660.         strength 0
  2661.         break
  2662.       }
  2663.       lotsofglass 30
  2664.       sound GLASS_BREAKING
  2665.       respawnhitag
  2666.       ifrnd 84
  2667.         spawn BLOODPOOL
  2668.       killit
  2669.     }
  2670.     else
  2671.       ifp pfacing
  2672.         ifpdistl FROZENQUICKKICKDIST
  2673.           pkick
  2674.     break
  2675.   }
  2676.   else ifaction FEMFROZEN2
  2677.   {
  2678.     ifcount THAWTIME
  2679.     {
  2680.       ifactor TOUGHGAL
  2681.         action TOUGHGALANIM
  2682.       else
  2683.         ifactor FEM10
  2684.           action FEMANIMATESLOW
  2685.       else
  2686.         action FEMANIMATE
  2687.  
  2688.       getlastpal
  2689.     }
  2690.     else
  2691.       ifcount FROZENDRIPTIME
  2692.     {
  2693.       ifactioncount 26
  2694.       {
  2695.         spawn WATERDRIP
  2696.         resetactioncount
  2697.       }
  2698.     }
  2699.  
  2700.     ifhitweapon
  2701.     {
  2702.       ifwasweapon FREEZEBLAST
  2703.       {
  2704.         strength 0
  2705.           break
  2706.       }
  2707.  
  2708.       lotsofglass 30
  2709.  
  2710.       sound GLASS_BREAKING
  2711.       ifrnd 84
  2712.         spawn BLOODPOOL
  2713.       respawnhitag
  2714.  
  2715.       ifrnd 128
  2716.         sound DUKE_HIT_STRIPPER1
  2717.       else
  2718.         sound DUKE_HIT_STRIPPER2
  2719.  
  2720.       killit
  2721.     }
  2722.     else
  2723.       ifp pfacing
  2724.         ifpdistl FROZENQUICKKICKDIST
  2725.           pkick
  2726.     break
  2727.   }
  2728.  
  2729.   ifhitweapon
  2730.   {
  2731.     ifdead
  2732.     {
  2733.       ifwasweapon GROWSPARK
  2734.       {
  2735.         cstat 0
  2736.         move 0
  2737.         sound ACTOR_GROWING
  2738.         action FEMGROW
  2739.         break
  2740.       }
  2741.       else ifwasweapon FREEZEBLAST
  2742.       {
  2743.         ifaction FEMSHRUNK
  2744.           break
  2745.  
  2746.         ifactor NAKED1
  2747.           action FEMFROZEN2
  2748.         else
  2749.           ifactor FEM5
  2750.             action FEMFROZEN2
  2751.         else
  2752.           ifactor FEM6
  2753.             action FEMFROZEN2
  2754.         else
  2755.           ifactor FEM8
  2756.             action FEMFROZEN2
  2757.         else
  2758.           ifactor FEM9
  2759.             action FEMFROZEN2
  2760.         else
  2761.           ifactor FEM10
  2762.             action FEMFROZEN2
  2763.         else
  2764.           ifactor TOUGHGAL
  2765.             action FEMFROZEN2
  2766.         else
  2767.           ifactor PODFEM1
  2768.             action FEMFROZEN2
  2769.         else
  2770.           action FEMFROZEN1
  2771.  
  2772.         move 0
  2773.         spritepal 1
  2774.         strength 0
  2775.  
  2776.         sound SOMETHINGFROZE
  2777.  
  2778.         break
  2779.       }
  2780.  
  2781.       ifrnd 128
  2782.         sound DUKE_HIT_STRIPPER1
  2783.       else
  2784.         sound DUKE_HIT_STRIPPER2
  2785.  
  2786.       respawnhitag
  2787.       state standard_jibs
  2788.       state random_wall_jibs
  2789.       spawn BLOODPOOL
  2790.  
  2791.       ifactor FEM1
  2792.         money 5
  2793.       else
  2794.         ifactor FEM2
  2795.       {
  2796.         money 7
  2797.         cactor BARBROKE
  2798.         cstat 0
  2799.       }
  2800.       else
  2801.         ifactor FEM3
  2802.           money 4
  2803.       else
  2804.         ifactor FEM7
  2805.           money 8
  2806.  
  2807.       ifactor FEM5
  2808.       {
  2809.         strength TOUGH
  2810.         cactor BLOODYPOLE
  2811.       }
  2812.       else ifactor FEM6
  2813.       {
  2814.         cstat 0
  2815.         cactor FEM6PAD
  2816.       }
  2817.       else
  2818.         ifactor FEM8
  2819.       {
  2820.         strength TOUGH
  2821.         cactor BLOODYPOLE
  2822.       }
  2823.       else
  2824.       {
  2825.         spritepal 6
  2826.         soundonce LADY_SCREAM
  2827.         ifactor NAKED1
  2828.           debris SCRAP3 18
  2829.         else
  2830.           ifactor PODFEM1
  2831.             debris SCRAP3 18
  2832.         killit
  2833.       }
  2834.     }
  2835.     else
  2836.     {
  2837.       ifwasweapon SHRINKSPARK
  2838.       {
  2839.         sound ACTOR_SHRINKING
  2840.         move 0
  2841.         action FEMSHRUNK
  2842.         cstat 0
  2843.         break
  2844.       }
  2845.       else
  2846.         ifwasweapon GROWSPARK
  2847.           sound EXPANDERHIT
  2848.       ifactor FEM8
  2849.         break
  2850.  
  2851.       ifactor TOUGHGAL
  2852.           state toughgalspeech
  2853.       else sound SQUISHED
  2854.  
  2855.       guts JIBS6 1
  2856.     }
  2857.   }
  2858. ends
  2859.  
  2860. state killme
  2861.   ifinwater nullop
  2862.   else
  2863.     ifp pfacing
  2864.       ifpdistl 1280
  2865.         ifhitspace
  2866.           soundonce KILLME
  2867. ends
  2868.  
  2869. state tipme
  2870.   ifp pfacing
  2871.     ifpdistl 1280
  2872.       ifhitspace
  2873.   {
  2874.     tip
  2875.     ifrnd 128
  2876.       soundonce DUKE_TIP1
  2877.     else
  2878.       soundonce DUKE_TIP2
  2879.     ifactor FEM1
  2880.       action FEMDANCE1
  2881.   }
  2882. ends
  2883.  
  2884. state toughgaltalk
  2885.   ifp pfacing
  2886.     ifpdistl 1280
  2887.       ifhitspace
  2888.         state toughgalspeech
  2889. ends
  2890.  
  2891. actor FEM1 TOUGH FEMANIMATE
  2892.   state tipme
  2893.   state femcode
  2894. enda
  2895. actor FEM2 TOUGH FEMANIMATE
  2896.   state tipme
  2897.   state femcode
  2898. enda
  2899. actor FEM3 TOUGH FEMANIMATE
  2900.   state tipme
  2901.   state femcode
  2902. enda
  2903. actor FEM4 TOUGH FEMANIMATE
  2904.   state femcode
  2905. enda
  2906. actor FEM5 TOUGH FEMANIMATE
  2907.   state killme
  2908.   state femcode
  2909. enda
  2910. actor FEM6 TOUGH FEMANIMATE
  2911.   state killme
  2912.   state femcode
  2913. enda
  2914. actor FEM7 TOUGH FEMANIMATE
  2915.   state tipme
  2916.   state femcode
  2917. enda
  2918. actor FEM8 TOUGH FEMANIMATE
  2919.   state femcode
  2920. enda
  2921. actor FEM9 TOUGH FEMANIMATE
  2922.   state femcode
  2923. enda
  2924. actor FEM10 TOUGH FEMANIMATESLOW
  2925.   state tipme
  2926.   state femcode
  2927. enda
  2928.  
  2929. actor TOUGHGAL MANWOMANSTRENGTH TOUGHGALANIM
  2930.   state toughgaltalk
  2931.   state femcode
  2932. enda
  2933.  
  2934. actor NAKED1 TOUGH FEMANIMATE
  2935.   state killme
  2936.   state femcode
  2937. enda
  2938. actor PODFEM1 TOUGH FEMANIMATE
  2939.   state killme
  2940.   state femcode
  2941. enda
  2942. actor BLOODYPOLE TOUGH
  2943.   state femcode
  2944. enda
  2945. actor STATUEFLASH
  2946.   fall
  2947.   ifcount 32
  2948.     cactor STATUE
  2949. enda
  2950. actor STATUE
  2951.   fall
  2952.   ifp pfacing
  2953.     ifpdistl 1280
  2954.       ifhitspace
  2955.   {
  2956.     cactor STATUEFLASH
  2957.     move 0
  2958.   }
  2959. enda
  2960.  
  2961. actor MIKE
  2962.   ifp pfacing
  2963.     ifpdistl 1280
  2964.       ifhitspace
  2965.         mikesnd
  2966. enda
  2967.  
  2968.  
  2969.  
  2970. state troop_body_jibs
  2971.   ifrnd 64
  2972.     guts HEADJIB1 1
  2973.   ifrnd 64
  2974.     guts LEGJIB1 2
  2975.   ifrnd 64
  2976.     guts ARMJIB1 1
  2977.   ifrnd 48
  2978.     spawn BLOODPOOL
  2979. ends
  2980.  
  2981. state liz_body_jibs
  2982.   ifrnd 64
  2983.     guts LIZMANHEAD1 1
  2984.   ifrnd 64
  2985.     guts LIZMANLEG1 2
  2986.   ifrnd 64
  2987.     guts LIZMANARM1 1
  2988.   ifrnd 48
  2989.     spawn BLOODPOOL
  2990. ends
  2991.  
  2992. action BLOODFRAMES 0 4 1 1 15
  2993. actor BLOOD 0 BLOODFRAMES
  2994.   sizeto 72 72 sizeto 72 72 sizeto 72 72
  2995.   ifpdistg 3144 killit
  2996.   ifactioncount 4 killit
  2997. enda
  2998.  
  2999. action EGGOPEN1 1 1 1 1 4
  3000. action EGGOPEN2 2 1 1 1 4
  3001. action EGGOPEN3 2 1 1 1 4
  3002. action EGGWAIT  0
  3003. action EGGFROZEN 1
  3004. action EGGGROW 1
  3005. action EGGSHRUNK 1
  3006.  
  3007. actor EGG TOUGH
  3008.   fall
  3009.   ifaction 0
  3010.   {
  3011.     ifcount 64
  3012.     {
  3013.       ifrnd 128
  3014.       {
  3015.         action EGGWAIT
  3016.         move 0
  3017.       }
  3018.       else
  3019.       {
  3020.         sound SLIM_HATCH
  3021.         action EGGOPEN1
  3022.       }
  3023.     }
  3024.   }
  3025.   else
  3026.     ifaction EGGOPEN1
  3027.       ifactioncount 4
  3028.         action EGGOPEN2
  3029.   else
  3030.     ifaction EGGOPEN2
  3031.       ifactioncount 4
  3032.     {
  3033.       spawn GREENSLIME
  3034.       action EGGOPEN3
  3035.     }
  3036.   else
  3037.     ifaction EGGGROW
  3038.       state genericgrowcode
  3039.   else
  3040.     ifaction EGGSHRUNK
  3041.       state genericshrunkcode
  3042.   else
  3043.     ifaction EGGFROZEN
  3044.   {
  3045.     ifcount THAWTIME
  3046.     {
  3047.       action 0
  3048.       getlastpal
  3049.     }
  3050.     else
  3051.       ifcount FROZENDRIPTIME
  3052.     {
  3053.       ifactioncount 26
  3054.       {
  3055.         spawn WATERDRIP
  3056.         resetactioncount
  3057.       }
  3058.     }
  3059.  
  3060.     ifhitweapon
  3061.     {
  3062.       ifwasweapon FREEZEBLAST
  3063.       {
  3064.         strength 0
  3065.         break
  3066.       }
  3067.       lotsofglass 30
  3068.  
  3069.       sound GLASS_BREAKING
  3070.       ifrnd 84
  3071.         spawn BLOODPOOL
  3072.  
  3073.       addkills 1
  3074.       killit
  3075.     }
  3076.  
  3077.     // ifp pducking
  3078.     ifp pfacing
  3079.       ifpdistl FROZENQUICKKICKDIST
  3080.         pkick
  3081.  
  3082.     break
  3083.   }
  3084.  
  3085.   ifhitweapon
  3086.   {
  3087.     ifdead
  3088.     {
  3089.       ifwasweapon FREEZEBLAST
  3090.       {
  3091.         sound SOMETHINGFROZE
  3092.         spritepal 1
  3093.         move 0
  3094.         action EGGFROZEN
  3095.         strength 0
  3096.         break
  3097.       }
  3098.       else
  3099.         ifwasweapon GROWSPARK
  3100.       {
  3101.         cstat 0
  3102.         move 0
  3103.         sound ACTOR_GROWING
  3104.         action EGGGROW
  3105.         break
  3106.       }
  3107.  
  3108.       addkills 1
  3109.  
  3110.       sound SQUISHED
  3111.  
  3112.       state standard_jibs
  3113.       killit
  3114.     }
  3115.     else
  3116.       ifwasweapon SHRINKSPARK
  3117.       {
  3118.         move 0
  3119.         sound ACTOR_SHRINKING
  3120.         action EGGSHRUNK
  3121.         break
  3122.       }
  3123.  
  3124.       ifwasweapon GROWSPARK
  3125.         sound EXPANDERHIT
  3126.   }
  3127.   else
  3128.     ifaction EGGWAIT
  3129.   {
  3130.     ifcount 512
  3131.       ifrnd 2
  3132.     {
  3133.       ifaction EGGSHRUNK
  3134.         break
  3135.       sound SLIM_HATCH
  3136.       action EGGOPEN1
  3137.     }
  3138.   }
  3139.  
  3140. enda
  3141.  
  3142. actor KNEE KNEE_WEAPON_STRENGTH enda
  3143. actor SPIT SPIT_WEAPON_STRENGTH enda
  3144. actor CHAINGUN CHAINGUN_WEAPON_STRENGTH enda
  3145. actor SHOTGUN SHOTGUN_WEAPON_STRENGTH enda
  3146. actor FIRELASER FIRELASER_WEAPON_STRENGTH enda
  3147. actor HEAVYHBOMB HANDBOMB_WEAPON_STRENGTH enda
  3148. actor BOUNCEMINE BOUNCEMINE_WEAPON_STRENGTH enda
  3149. actor MORTER MORTER_WEAPON_STRENGTH enda
  3150. actor SHRINKSPARK SHRINKER_WEAPON_STRENGTH enda
  3151.  
  3152. actor GROWSPARK GROWSPARK_WEAPON_STRENGTH
  3153.   ifcount 18
  3154.     killit
  3155.   else
  3156.     ifcount 9
  3157.   {
  3158.     sizeto 0 0
  3159.     sizeto 0 0
  3160.     sizeto 0 0
  3161.     sizeto 0 0
  3162.   }
  3163.   else
  3164.   {
  3165.     sizeto 28 28
  3166.     sizeto 28 28
  3167.     sizeto 28 28
  3168.     sizeto 28 28
  3169.   }
  3170. enda
  3171.  
  3172. actor RPG RPG_WEAPON_STRENGTH enda
  3173. actor FREEZEBLAST FREEZETHROWER_WEAPON_STRENGTH enda
  3174. actor DEVISTATORBLAST FREEZETHROWER_WEAPON_STRENGTH enda
  3175. actor COOLEXPLOSION1 COOL_EXPLOSION_STRENGTH enda
  3176. actor TRIPBOMB TRIPBOMB_STRENGTH enda
  3177.  
  3178. action WEAP2FRAMES 0  4  1  1  6
  3179. actor SHOTSPARK1 PISTOL_WEAPON_STRENGTH WEAP2FRAMES
  3180.   ifdead
  3181.     killit
  3182.   ifactioncount 4
  3183.     killit
  3184.   else
  3185.   {
  3186.     ifactioncount 3
  3187.     {
  3188.       ifinwater
  3189.       spawn WATERBUBBLE
  3190.     }
  3191.     else
  3192.       ifcount 2 nullop
  3193.       else
  3194.         ifonwater
  3195.           spawn WATERSPLASH2
  3196.   }
  3197. enda
  3198.  
  3199. state standard_pjibs
  3200.   guts JIBS1 1
  3201.   guts JIBS3 2
  3202.   guts JIBS4 1
  3203.   guts JIBS5 1
  3204.   guts JIBS6 2
  3205.   guts DUKETORSO 1
  3206.   guts DUKELEG 2
  3207.   guts DUKEGUN 1
  3208.   ifrnd 16 money 1
  3209. ends
  3210.  
  3211. move DUKENOTMOVING
  3212. state handle_dead_dukes
  3213.   fall
  3214.   ifmove 0   // 1st time initializiation...
  3215.   {
  3216.     ifrnd 128
  3217.       cstat 4
  3218.     else
  3219.       cstat 0
  3220.     move DUKENOTMOVING
  3221.   }
  3222.  
  3223.   ifsquished
  3224.   {
  3225.     sound SQUISHED
  3226.     state random_ooz
  3227.     killit
  3228.   }
  3229.   else
  3230.     ifcount 1024
  3231.       ifpdistg 4096
  3232.         killit
  3233.   else
  3234.   {
  3235.     strength 0
  3236.     ifhitweapon
  3237.       ifwasweapon RADIUSEXPLOSION
  3238.     {
  3239.       state standard_jibs
  3240.       killit
  3241.     }
  3242.   }
  3243. ends
  3244.  
  3245. action PLYINGFRAMES 0 1 0 1 1
  3246. actor DUKELYINGDEAD 0 PLYINGFRAMES
  3247.   state handle_dead_dukes
  3248. enda
  3249.  
  3250. action PGROWING   0
  3251. action PSTAND     0   1   5   1  1
  3252. action PEXPLODE   106   5   1   1   10
  3253. action PEXPLODEAD   113   1   1
  3254. action PJPHOUVER  15   1   5   1
  3255. action PWALK    20   4   5   1   16
  3256. action PRUN     20   4   5   1   10
  3257. action PWALKBACK  45   4   5  -1   16
  3258. action PRUNBACK   45   4   5  -1   10
  3259. action PJUMPING   50   4   5   1   30
  3260. action PFALLING   65   1   5
  3261. action PDUCKING   86   1   5
  3262. action PCRAWLING  86   3   5   1   20
  3263. action PAKICKING  40   2   5   1   25
  3264. action PFLINTCHING  106  1   1   1   10
  3265. action PTHROWNBACK  106  5   1   1   18
  3266. action PFROZEN     20  1   5
  3267. action PLYINGDEAD   113  1   1
  3268.  
  3269. action PSWIMMINGGO   375   1   5   1   10
  3270. action PSWIMMING   375   4   5   1   13
  3271. action PSWIMMINGWAIT 395   1   5   1   13
  3272. action PTREDWATER  395   2   5   1   17
  3273.  
  3274. move PSTOPED
  3275. move PSHRINKING // used as a var only
  3276.  
  3277. state check_pstandard
  3278.   ifp pwalking
  3279.     action PWALK
  3280.   else
  3281.     ifp pkicking
  3282.       action PAKICKING
  3283.   else
  3284.     ifp pwalkingback
  3285.       action PWALKBACK
  3286.   else
  3287.     ifp prunning
  3288.       action PRUN
  3289.   else
  3290.     ifp prunningback
  3291.       action PRUNBACK
  3292.   else
  3293.     ifp pjumping
  3294.       action PJUMPING
  3295.   else
  3296.     ifp pducking
  3297.       action PDUCKING
  3298. ends
  3299.  
  3300.  
  3301.  
  3302. move PGROWINGPOP        // Used only as a variable
  3303.  
  3304. actor APLAYER MAXPLAYERHEALTH PSTAND 0 0
  3305.  
  3306.   ifaction 0
  3307.     action PSTAND
  3308.  
  3309.   ifaction PFROZEN
  3310.   {
  3311.     cstat 257
  3312.  
  3313.     fall
  3314.  
  3315.     palfrom 16 0 0 24
  3316.  
  3317.     ifmove 0
  3318.     {
  3319.       ifhitweapon
  3320.       {
  3321.         ifwasweapon FREEZEBLAST
  3322.           break
  3323.         lotsofglass 60
  3324.         ifrnd 84
  3325.           spawn BLOODPOOL
  3326.  
  3327.         sound GLASS_BREAKING
  3328.         spawn ATOMICHEALTH
  3329.  
  3330.         getlastpal
  3331.  
  3332.         move 1
  3333.         break
  3334.       }
  3335.     }
  3336.     else
  3337.     {
  3338.       cstat 32768
  3339.       quote 13
  3340.       ifhitspace
  3341.       {
  3342.         action PSTAND
  3343.         resetplayer
  3344.       }
  3345.       break
  3346.     }
  3347.  
  3348.     ifactioncount THAWTIME
  3349.     {
  3350.       getlastpal
  3351.       strength 1
  3352.       move 0
  3353.       action PSTAND
  3354.     }
  3355.     else
  3356.       ifactioncount FROZENDRIPTIME
  3357.     {
  3358.       ifrnd 32
  3359.       spawn WATERDRIP
  3360.     }
  3361.  
  3362.     ifp pfacing   // assumes another other player  (multiplayer)
  3363.       ifpdistl FROZENQUICKKICKDIST
  3364.         pkick
  3365.  
  3366.     break
  3367.   }
  3368.  
  3369.   ifdead
  3370.   {
  3371.     ifaction PGROWING
  3372.     {
  3373.       ifmove PGROWINGPOP
  3374.       {
  3375.         quote 13
  3376.         ifhitspace
  3377.         {
  3378.           action 0
  3379.           resetplayer
  3380.         }
  3381.         break
  3382.       }
  3383.       else
  3384.       {
  3385.         ifcount 32
  3386.         {
  3387.           sound SQUISHED
  3388.           palfrom 48 64
  3389.  
  3390.           state standard_pjibs
  3391.  
  3392.           guts JIBS4 20
  3393.           guts JIBS6 20
  3394.           move PGROWINGPOP
  3395.           cstat 32768
  3396.           tossweapon
  3397.  
  3398.           hitradius 2048 60 70 80 90
  3399.  
  3400.         }
  3401.         else
  3402.           sizeto MAXXSTRETCH MAXYSTRETCH
  3403.       }
  3404.       break
  3405.     }
  3406.  
  3407.     ifsquished
  3408.       palfrom 32 63 63 63
  3409.     else
  3410.       fall
  3411.  
  3412.     ifactioncount 7
  3413.       move 0
  3414.     else
  3415.       ifactioncount 6
  3416.     {
  3417.       ifmultiplayer nullop
  3418.       else
  3419.       {
  3420.         ifrnd 32
  3421.           sound DUKE_KILLED5
  3422.         else
  3423.           ifrnd 32
  3424.             sound DUKE_KILLED3
  3425.         else
  3426.           ifrnd 32
  3427.             sound DUKE_KILLED1
  3428.         else
  3429.           ifrnd 32
  3430.             sound DUKE_KILLED2
  3431.       }
  3432.     }
  3433.  
  3434.     ifaction PLYINGDEAD
  3435.     {
  3436.       ifactioncount 3
  3437.         move PSTOPED
  3438.       quote 13
  3439.       ifhitspace
  3440.       {
  3441.         action PSTAND
  3442.         spawn DUKELYINGDEAD
  3443.         resetplayer
  3444.       }
  3445.       break
  3446.     }
  3447.  
  3448.     ifaction PTHROWNBACK
  3449.     {
  3450.       ifactioncount 5
  3451.       {
  3452.         spawn BLOODPOOL
  3453.         action PLYINGDEAD
  3454.       }
  3455.       else
  3456.         ifactioncount 1
  3457.           move 0
  3458.       break
  3459.     }
  3460.  
  3461.     ifaction PEXPLODEAD
  3462.     {
  3463.       quote 13
  3464.       ifhitspace
  3465.       {
  3466.         resetplayer
  3467.         action PSTAND
  3468.       }
  3469.       break
  3470.     }
  3471.     ifaction PEXPLODE
  3472.     {
  3473.       ifactioncount 5
  3474.       {
  3475.         action PEXPLODEAD
  3476.         spawn BLOODPOOL
  3477.       }
  3478.       break
  3479.     }
  3480.  
  3481.     ifp pshrunk
  3482.     {
  3483.       state standard_pjibs
  3484.       spawn BLOODPOOL
  3485.  
  3486.       sound SQUISHED
  3487.       sound DUKE_DEAD
  3488.  
  3489.       cstat 32768         // Hide the sprite
  3490.  
  3491.       action PLYINGDEAD
  3492.     }
  3493.     else
  3494.     {
  3495.       ifinwater
  3496.       {
  3497.         action PLYINGDEAD
  3498.         spawn WATERBUBBLE
  3499.         spawn WATERBUBBLE
  3500.       }
  3501.       else
  3502.       {
  3503.         action PEXPLODE
  3504.         state standard_pjibs
  3505.         cstat 32768
  3506.         sound SQUISHED
  3507.         sound DUKE_DEAD
  3508.       }
  3509.     }
  3510.  
  3511.     tossweapon
  3512.  
  3513.     break
  3514.   }
  3515.  
  3516.   ifsquished
  3517.   {
  3518.     strength -1
  3519.     sound SQUISHED
  3520.     state random_ooz
  3521.     break
  3522.   }
  3523.  
  3524.   ifp ponsteroids
  3525.   {
  3526.     ifp pstanding nullop
  3527.     else
  3528.       spawn FRAMEEFFECT1
  3529.   }
  3530.  
  3531.   ifmove PSHRINKING
  3532.   {
  3533.     ifcount 32
  3534.     {
  3535.       ifcount SHRUNKDONECOUNT
  3536.       {
  3537.         move 0
  3538.         cstat 257
  3539.       }
  3540.       else
  3541.         ifcount SHRUNKCOUNT
  3542.       {
  3543.         sizeto 42 36
  3544.         ifgapzl 24
  3545.         {
  3546.           strength 0
  3547.           sound SQUISHED
  3548.           palfrom 48 64
  3549.           break
  3550.         }
  3551.       }
  3552.       else
  3553.         ifp ponsteroids
  3554.           count SHRUNKCOUNT
  3555.     }
  3556.     else
  3557.     {
  3558.       ifp ponsteroids
  3559.         count SHRUNKCOUNT
  3560.       else
  3561.       {
  3562.         sizeto 8 9
  3563.         spawn FRAMEEFFECT1
  3564.       }
  3565.     }
  3566.   }
  3567.   else ifhitweapon
  3568.   {
  3569.     ifdead
  3570.     {
  3571.       ifmultiplayer
  3572.         sound DUKE_KILLED4
  3573.  
  3574.       ifwasweapon GROWSPARK
  3575.       {
  3576.         palfrom 48 48
  3577.         action PGROWING
  3578.         count 0
  3579.         move 0
  3580.         sound ACTOR_GROWING
  3581.         cstat 0
  3582.         break
  3583.       }
  3584.     }
  3585.     else
  3586.     {
  3587.       ifmultiplayer
  3588.       {
  3589.         ifphealthl YELLHURTSOUNDSTRENGTHMP
  3590.         {
  3591.           ifrnd 64
  3592.             sound DUKE_LONGTERM_PAIN2
  3593.           else
  3594.             ifrnd 64
  3595.               sound DUKE_LONGTERM_PAIN3
  3596.           else
  3597.             ifrnd 64
  3598.               sound DUKE_LONGTERM_PAIN4
  3599.           else
  3600.             sound DUKE_DEAD
  3601.         }
  3602.         else
  3603.         {
  3604.           ifrnd 64
  3605.             sound DUKE_LONGTERM_PAIN5
  3606.           else ifrnd 64
  3607.             sound DUKE_LONGTERM_PAIN6
  3608.           else ifrnd 64
  3609.             sound DUKE_LONGTERM_PAIN7
  3610.           else
  3611.             sound DUKE_LONGTERM_PAIN8
  3612.         }
  3613.       }
  3614.       else
  3615.       {
  3616.         ifphealthl YELLHURTSOUNDSTRENGTH
  3617.         {
  3618.           ifrnd 74
  3619.             sound DUKE_LONGTERM_PAIN2
  3620.           else
  3621.             ifrnd 8
  3622.               sound DUKE_LONGTERM_PAIN3
  3623.           else
  3624.             sound DUKE_LONGTERM_PAIN4
  3625.         }
  3626.         ifrnd 128
  3627.           sound DUKE_LONGTERM_PAIN
  3628.       }
  3629.     }
  3630.     ifstrength TOUGH
  3631.     {
  3632.       state headhitstate
  3633.       sound DUKE_GRUNT
  3634.       ifp pstanding
  3635.         action PFLINTCHING
  3636.     }
  3637.  
  3638.     ifwasweapon RPG
  3639.     {
  3640.       ifrnd 32
  3641.         spawn BLOOD
  3642.       ifdead
  3643.         state standard_pjibs
  3644.       palfrom 48 52
  3645.       break
  3646.     }
  3647.     ifwasweapon RADIUSEXPLOSION
  3648.     {
  3649.       ifrnd 32
  3650.         spawn BLOOD
  3651.       ifdead
  3652.         state standard_pjibs
  3653.       palfrom 48 52
  3654.       break
  3655.     }
  3656.     ifwasweapon FIREEXT
  3657.     {
  3658.       ifrnd 32
  3659.         spawn BLOOD
  3660.       ifdead
  3661.         state standard_pjibs
  3662.       palfrom 48 52
  3663.       break
  3664.     }
  3665.     ifwasweapon GROWSPARK
  3666.     {
  3667.       palfrom 48 52
  3668.       sound EXPANDERHIT
  3669.       break
  3670.     }
  3671.     ifwasweapon SHRINKSPARK
  3672.     {
  3673.       palfrom 48 0 48
  3674.       move PSHRINKING // used as a var only.
  3675.       sound ACTOR_SHRINKING
  3676.       cstat 0
  3677.       break
  3678.     }
  3679.     ifwasweapon SHOTSPARK1
  3680.       palfrom 24 48
  3681.     ifwasweapon FREEZEBLAST
  3682.     {
  3683.       palfrom 48 0 0 48
  3684.       ifdead
  3685.       {
  3686.         sound SOMETHINGFROZE
  3687.         spritepal 1
  3688.         move 0
  3689.         action PFROZEN
  3690.         break
  3691.       }
  3692.     }
  3693.     ifwasweapon COOLEXPLOSION1
  3694.       palfrom 48 48 0 48
  3695.     ifwasweapon KNEE
  3696.       palfrom 16 32
  3697.     ifwasweapon FIRELASER
  3698.       palfrom 32 32
  3699.  
  3700.     ifdead
  3701.     {
  3702.       action PTHROWNBACK
  3703.       tossweapon
  3704.     }
  3705.  
  3706.     state random_wall_jibs
  3707.  
  3708.     break
  3709.   }
  3710.  
  3711.   ifaction PFLINTCHING
  3712.   {
  3713.     ifactioncount 2
  3714.       action PSTAND
  3715.     break
  3716.   }
  3717.  
  3718.   ifinwater
  3719.   {
  3720.     ifaction PTREDWATER
  3721.     {
  3722.       ifp pwalking prunning
  3723.         action PSWIMMINGGO
  3724.     }
  3725.     else
  3726.       ifp pstanding pwalkingback prunningback
  3727.         action PTREDWATER
  3728.     else
  3729.     {
  3730.       ifaction PSWIMMING
  3731.       {
  3732.         ifrnd 4
  3733.           spawn WATERBUBBLE
  3734.         ifactioncount 4
  3735.           action PSWIMMINGWAIT
  3736.       }
  3737.       else
  3738.         ifaction PSWIMMINGWAIT
  3739.       {
  3740.         ifactioncount 2
  3741.           action PSWIMMINGGO
  3742.       }
  3743.       else
  3744.         ifaction PSWIMMINGGO
  3745.       {
  3746.         ifactioncount 2
  3747.           action PSWIMMING
  3748.       }
  3749.       else
  3750.         action PTREDWATER
  3751.     }
  3752.  
  3753.     ifrnd 4
  3754.       spawn WATERBUBBLE // For effect
  3755.  
  3756.     break
  3757.   }
  3758.   else ifp pjetpack
  3759.   {
  3760.     ifaction PJPHOUVER
  3761.     {
  3762.       ifactioncount 4
  3763.         resetactioncount
  3764.     }
  3765.     else
  3766.       action PJPHOUVER
  3767.     break
  3768.   }
  3769.   else
  3770.   {
  3771.     ifaction PTREDWATER
  3772.       action PSTAND
  3773.     ifaction PSWIMMING
  3774.       action PSTAND
  3775.     ifaction PSWIMMINGWAIT
  3776.       action PSTAND
  3777.     ifaction PSWIMMINGGO
  3778.       action PSTAND
  3779.     ifaction PJPHOUVER
  3780.       action PFALLING
  3781.   }
  3782.  
  3783.   ifaction PFALLING
  3784.   {
  3785.     ifp ponground
  3786.       action PSTAND
  3787.     else
  3788.     {
  3789.       ifp pfalling
  3790.         break
  3791.       else
  3792.         state check_pstandard
  3793.     }
  3794.   }
  3795.  
  3796.   ifaction PDUCKING
  3797.   {
  3798.     ifgapzl 48
  3799.     {
  3800.       ifp pwalking pwalkingback prunning prunningback
  3801.         action PCRAWLING
  3802.     }
  3803.     else ifp pducking
  3804.     {
  3805.       ifp pwalking pwalkingback prunning prunningback
  3806.         action PCRAWLING
  3807.     }
  3808.     else
  3809.     {
  3810.       ifp pstanding
  3811.         action PSTAND
  3812.       else
  3813.         state check_pstandard
  3814.     }
  3815.   }
  3816.  
  3817.   else ifaction PCRAWLING
  3818.   {
  3819.     ifgapzl 48
  3820.     {
  3821.       ifp pstanding
  3822.         action PCRAWLING
  3823.     }
  3824.     else
  3825.       ifp pducking
  3826.     {
  3827.       ifp pstanding
  3828.         action PDUCKING
  3829.     }
  3830.     else
  3831.     {
  3832.       ifp pstanding
  3833.         action PSTAND
  3834.       else
  3835.         state check_pstandard
  3836.     }
  3837.   }
  3838.   else
  3839.     ifgapzl 48
  3840.       action PDUCKING
  3841.  
  3842.   else
  3843.     ifaction PJUMPING
  3844.   {
  3845.     ifp ponground
  3846.       action PSTAND
  3847.     else
  3848.       ifactioncount 4
  3849.         ifp pfalling
  3850.           action PFALLING
  3851.   }
  3852.  
  3853.   ifp pfalling
  3854.     action PFALLING
  3855.   else
  3856.     ifaction PSTAND
  3857.       state check_pstandard
  3858.   else
  3859.     ifaction PAKICKING
  3860.   {
  3861.     ifactioncount 2
  3862.       action PSTAND
  3863.     break
  3864.   }
  3865.   else
  3866.     ifaction PWALK
  3867.   {
  3868.     ifp pfalling
  3869.       action PFALLING
  3870.     else
  3871.       ifp pstanding
  3872.         action PSTAND
  3873.     else
  3874.       ifp prunning
  3875.         action PRUN
  3876.     else
  3877.       ifp pwalkingback
  3878.         action PWALKBACK
  3879.     else
  3880.       ifp prunningback
  3881.         action PRUNBACK
  3882.     else
  3883.       ifp pjumping
  3884.         action PJUMPING
  3885.     else
  3886.       ifp pducking
  3887.         action PDUCKING
  3888.   }
  3889.  
  3890.   else
  3891.     ifaction PRUN
  3892.   {
  3893.     ifp pstanding
  3894.       action PSTAND
  3895.     else
  3896.       ifp pwalking
  3897.         action PWALK
  3898.     else
  3899.       ifp pwalkingback
  3900.         action PWALKBACK
  3901.     else
  3902.       ifp prunningback
  3903.         action PRUNBACK
  3904.     else
  3905.       ifp pjumping
  3906.         action PJUMPING
  3907.     else
  3908.       ifp pducking
  3909.         action PDUCKING
  3910.   }
  3911.  
  3912.   else
  3913.     ifaction PWALKBACK
  3914.   {
  3915.     ifp pstanding
  3916.       action PSTAND
  3917.     else
  3918.       ifp pwalking
  3919.         action PWALK
  3920.     else
  3921.       ifp prunning
  3922.         action PRUN
  3923.     else
  3924.       ifp prunningback
  3925.         action PRUNBACK
  3926.     else
  3927.       ifp pjumping
  3928.         action PJUMPING
  3929.     else
  3930.       ifp pducking
  3931.         action PDUCKING
  3932.   }
  3933.  
  3934.   else
  3935.     ifaction PRUNBACK
  3936.   {
  3937.     ifp pstanding
  3938.       action PSTAND
  3939.     else
  3940.       ifp pwalking
  3941.         action PWALK
  3942.     else
  3943.       ifp prunning
  3944.         action PRUN
  3945.     else
  3946.       ifp pwalkingback
  3947.         action PWALKBACK
  3948.     else
  3949.       ifp pjumping
  3950.         action PJUMPING
  3951.     else
  3952.       ifp pducking
  3953.         action PDUCKING
  3954.   }
  3955. enda
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961. actor ORGANTIC TURRETSTRENGTH
  3962.   ifcount 48
  3963.     resetcount
  3964.   else
  3965.   {
  3966.     ifcount 32
  3967.     sizeto 32 32
  3968.   }
  3969.   else
  3970.     ifcount 16
  3971.     {
  3972.       sizeto 48 18
  3973.       ifpdistl 2048
  3974.       {
  3975.         sound TURR_ATTACK
  3976.         addphealth -2
  3977.         palfrom 32 16
  3978.       }
  3979.     }
  3980.   ifhitweapon
  3981.   {
  3982.     ifdead
  3983.     {
  3984.       addkills 1
  3985.       sound TURR_DYING
  3986.       guts JIBS5 10
  3987.       killit
  3988.     }
  3989.     sound TURR_PAIN
  3990.     break
  3991.   }
  3992.   ifrnd 1
  3993.     soundonce TURR_ROAM
  3994. enda
  3995.  
  3996. state rf
  3997.   ifrnd 128
  3998.     cstat 4
  3999.   else
  4000.     cstat 0
  4001. ends
  4002.  
  4003.  
  4004. //
  4005. //
  4006. //    TROOP/LIZTROOP CODE
  4007. //
  4008. //
  4009.  
  4010. action ATROOPSTAND     0  1  5  1  1
  4011. action ATROOPGROW    0  1  5  1  1
  4012. action ATROOPSTAYSTAND  -2  1  5  1  1
  4013. action ATROOPWALKING   0  4  5  1   12
  4014. action ATROOPWALKINGBACK 15   4  5   -1   12
  4015. action ATROOPRUNNING   0  4  5  1  8
  4016. action ATROOPSHOOT    35  1  5  1   30
  4017. action ATROOPJETPACK  40  1  5  1  1
  4018. action ATROOPJETPACKILL 40  2  5  1   50
  4019. action ATROOPFLINTCH  50  1  1  1  6
  4020. action ATROOPDYING    50  5  1  1   16
  4021. action ATROOPDEAD     54
  4022. action ATROOPPLAYDEAD   54
  4023. action ATROOPSUFFERDEAD 58  2  1   -4   24
  4024. action ATROOPSUFFERING  59  2  1  1   21
  4025. action ATROOPDUCK     64  1  5  1  3
  4026. action ATROOPDUCKSHOOT  64  2  5  1   25
  4027. action ATROOPABOUTHIDE  74  1  1  1   25
  4028. action ATROOPHIDE     79  1  1  1   25
  4029. action ATROOPREAPPEAR   74  1  1  1   25
  4030. action ATROOPFROZEN    0  1  5
  4031.  
  4032. move TROOPWALKVELS 72
  4033. move TROOPWALKVELSBACK -72
  4034. move TROOPJETPACKVELS 64 -84
  4035. move TROOPJETPACKILLVELS 192 -38
  4036. move TROOPRUNVELS 108
  4037. move TROOPSTOPPED
  4038. move DONTGETUP
  4039. move SHRUNKVELS 32
  4040.  
  4041. ai AITROOPSEEKENEMY  ATROOPWALKING   TROOPWALKVELS seekplayer
  4042. ai AITROOPSEEKPLAYER ATROOPWALKING   TROOPWALKVELS seekplayer
  4043. ai AITROOPFLEEING  ATROOPWALKING   TROOPWALKVELS fleeenemy
  4044. ai AITROOPFLEEINGBACK ATROOPWALKINGBACK   TROOPWALKVELSBACK faceplayer
  4045. ai AITROOPDODGE    ATROOPWALKING   TROOPRUNVELS  dodgebullet
  4046. ai AITROOPSHOOTING   ATROOPSHOOT   TROOPSTOPPED  faceplayer
  4047. ai AITROOPDUCKING  ATROOPDUCK    TROOPSTOPPED  faceplayer
  4048. ai AITROOPJETPACK  ATROOPJETPACK   TROOPJETPACKVELS seekplayer
  4049. ai AITROOPSHRUNK   ATROOPWALKING   SHRUNKVELS fleeenemy
  4050. ai AITROOPHIDE     ATROOPABOUTHIDE TROOPSTOPPED faceplayer
  4051. ai AITROOPGROW     ATROOPGROW    DONTGETUP faceplayerslow
  4052.  
  4053. state troophidestate
  4054.   ifaction ATROOPREAPPEAR
  4055.   {
  4056.     ifactioncount 2
  4057.     {
  4058.       sound TELEPORTER
  4059.       ai AITROOPSHOOTING
  4060.       cstat 257
  4061.     }
  4062.     else
  4063.     {
  4064.       sizeto 41 40
  4065.       sizeto 41 40
  4066.       sizeto 41 40
  4067.       sizeto 41 40
  4068.       spawn FRAMEEFFECT1
  4069.     }
  4070.   }
  4071.   else
  4072.     ifaction ATROOPWALKING
  4073.   {
  4074.     ifpdistl 2448
  4075.       ifpdistg 1024
  4076.     {
  4077.       ifceilingdistl 48
  4078.         break
  4079.       ifp pfacing
  4080.         break
  4081.  
  4082.       ifgapzl 64 nullop
  4083.       else
  4084.         ifawayfromwall
  4085.       {
  4086.         spawn TRANSPORTERSTAR
  4087.         action ATROOPREAPPEAR
  4088.         move 0
  4089.         break
  4090.       }
  4091.     }
  4092.   }
  4093.   else
  4094.     ifaction ATROOPHIDE
  4095.   {
  4096.     ifactioncount 2
  4097.     {
  4098.       spawn TRANSPORTERSTAR
  4099.       sound TELEPORTER
  4100.       action ATROOPWALKING
  4101.       move TROOPWALKVELS faceplayer
  4102.       cstat 32768
  4103.     }
  4104.     else
  4105.     {
  4106.       sizeto 4 40
  4107.       sizeto 4 40
  4108.       sizeto 4 40
  4109.       sizeto 4 40
  4110.       spawn FRAMEEFFECT1
  4111.     }
  4112.   }
  4113.   else
  4114.     ifaction ATROOPABOUTHIDE
  4115.       ifactioncount 2
  4116.     {
  4117.       action ATROOPHIDE
  4118.       cstat 0
  4119.     }
  4120. ends
  4121.  
  4122.  
  4123. state troopgunnashoot
  4124.   ifp palive
  4125.   {
  4126.     ifpdistl 1024
  4127.       ai AITROOPSHOOTING
  4128.     else
  4129.       ifactornotstayput
  4130.     {
  4131.       ifactioncount 12
  4132.         ifrnd 16
  4133.           ifcanshoottarget
  4134.       {
  4135.         ifspritepal 21
  4136.           ifrnd 4
  4137.             ifpdistg 4096
  4138.               ai AITROOPHIDE
  4139.         else
  4140.         {
  4141.           ifpdistl 1100
  4142.             ai AITROOPFLEEING
  4143.           else
  4144.           {
  4145.             ifpdistl 4096
  4146.               ifcansee
  4147.                 ifcanshoottarget
  4148.                   ai AITROOPSHOOTING
  4149.             else
  4150.             {
  4151.               move TROOPRUNVELS seekplayer
  4152.               action ATROOPRUNNING
  4153.             }
  4154.           }
  4155.         }
  4156.       }
  4157.     }
  4158.     else
  4159.       ifcount 26
  4160.         ifrnd 32
  4161.           ai AITROOPSHOOTING
  4162.   }
  4163. ends
  4164.  
  4165. state troopseekstate
  4166.   state troopgunnashoot
  4167.   ifinwater
  4168.   {
  4169.     ai AITROOPJETPACK
  4170.     break
  4171.   }
  4172.   ifcansee
  4173.   {
  4174.     ifmove TROOPRUNVELS
  4175.       ifpdistl 1596
  4176.         ai AITROOPDUCKING
  4177.     ifp phigher
  4178.     {
  4179.       ifceilingdistl 128 nullop
  4180.       else
  4181.         ifactornotstayput
  4182.           ai AITROOPJETPACK
  4183.       break
  4184.     }
  4185.     else
  4186.       ifrnd 2
  4187.     {
  4188.       ifspritepal 21
  4189.         ifpdistg 1596
  4190.       {
  4191.         ai AITROOPHIDE
  4192.         break
  4193.       }
  4194.       ifbulletnear
  4195.       {
  4196.         ifrnd 128
  4197.           ai AITROOPDODGE
  4198.         else
  4199.           ai AITROOPDUCKING
  4200.         break
  4201.       }
  4202.     }
  4203.   }
  4204.   ifnotmoving
  4205.   {
  4206.     ifrnd 32
  4207.       operate
  4208.     else
  4209.       ifcount 32
  4210.         ifp palive
  4211.           ifcansee
  4212.             ifcanshoottarget
  4213.               ai AITROOPSHOOTING
  4214.   }
  4215.   ifrnd 1
  4216.   {
  4217.     ifrnd 128
  4218.       soundonce PRED_ROAM
  4219.     else
  4220.       soundonce PRED_ROAM2
  4221.   }
  4222. ends
  4223.  
  4224. state troopduckstate
  4225.   ifaction ATROOPDUCK
  4226.   {
  4227.     ifactioncount 8
  4228.     {
  4229.       ifp palive
  4230.       {
  4231.         ifrnd 128
  4232.           action ATROOPDUCKSHOOT
  4233.       }
  4234.       else
  4235.         ifmove DONTGETUP
  4236.           break
  4237.         else
  4238.           ai AITROOPSEEKPLAYER
  4239.     }
  4240.   }
  4241.   else
  4242.     ifaction ATROOPDUCKSHOOT
  4243.   {
  4244.     ifcount 64
  4245.     {
  4246.       ifmove DONTGETUP
  4247.         resetcount
  4248.       else
  4249.       {
  4250.         ifpdistl 1100
  4251.           ai AITROOPFLEEING
  4252.         else
  4253.           ai AITROOPSEEKPLAYER
  4254.       }
  4255.     }
  4256.     else
  4257.       ifactioncount 2
  4258.       {
  4259.         ifcanshoottarget
  4260.         {
  4261.           sound PRED_ATTACK
  4262.           resetactioncount
  4263.           shoot FIRELASER
  4264.         }
  4265.         else ai AITROOPSEEKPLAYER
  4266.       }
  4267.   }
  4268. ends
  4269.  
  4270. state troopshootstate
  4271.   ifactioncount 2
  4272.   {
  4273.     ifcanshoottarget
  4274.     {
  4275.       shoot FIRELASER
  4276.       sound PRED_ATTACK
  4277.       resetactioncount
  4278.       ifrnd 128
  4279.         ai AITROOPSEEKPLAYER
  4280.       ifcount 24
  4281.       {
  4282.         ifrnd 96
  4283.           ifpdistg 2048
  4284.             ai AITROOPSEEKPLAYER
  4285.           else
  4286.           {
  4287.             ifpdistg 1596
  4288.               ai AITROOPFLEEING
  4289.             else
  4290.               ai AITROOPFLEEINGBACK
  4291.           }
  4292.       }
  4293.     }
  4294.     else
  4295.       ai AITROOPSEEKPLAYER
  4296.   }
  4297. ends
  4298.  
  4299. state troopfleestate
  4300.   ifactioncount 7
  4301.   {
  4302.     ifpdistg 3084
  4303.     {
  4304.       ai AITROOPSEEKPLAYER
  4305.       break
  4306.     }
  4307.     else
  4308.       ifrnd 32
  4309.         ifp palive
  4310.           ifcansee
  4311.             ifcanshoottarget
  4312.       {
  4313.         ifrnd 128
  4314.           ai AITROOPDUCKING
  4315.         else
  4316.           ai AITROOPSHOOTING
  4317.           break
  4318.       }
  4319.   }
  4320.   ifnotmoving
  4321.   {
  4322.     ifrnd 32
  4323.       operate
  4324.     else
  4325.       ifcount 32
  4326.         ifp palive
  4327.           ifcansee
  4328.             ifcanshoottarget
  4329.       {
  4330.         ifrnd 128
  4331.           ai AITROOPSHOOTING
  4332.         else
  4333.           ai AITROOPDUCKING
  4334.       }
  4335.   }
  4336. ends
  4337.  
  4338. state troopdying
  4339.   iffloordistl 32
  4340.   {
  4341.     ifactioncount 5
  4342.     {
  4343.       cstat 0
  4344.       iffloordistl 8
  4345.       sound THUD
  4346.       ifrnd 64
  4347.         spawn BLOODPOOL
  4348.       state rf
  4349.       strength 0
  4350.       move TROOPSTOPPED
  4351.       action ATROOPDEAD
  4352.     }
  4353.     break
  4354.   }
  4355.   else
  4356.   {
  4357.     state rf
  4358.     move 0
  4359.     action ATROOPDYING
  4360.   }
  4361. ends
  4362.  
  4363. state checktroophit
  4364.   ifaction ATROOPSUFFERING
  4365.   {
  4366.     stopsound LIZARD_BEG
  4367.     sound PRED_DYING
  4368.     cstat 0
  4369.     strength 0
  4370.     action ATROOPSUFFERDEAD
  4371.     break
  4372.   }
  4373.   ifdead
  4374.   {
  4375.     ifwasweapon FREEZEBLAST
  4376.     {
  4377.       sound SOMETHINGFROZE
  4378.       spritepal 1
  4379.       move 0
  4380.       action ATROOPFROZEN
  4381.       strength 0
  4382.       break
  4383.     }
  4384.  
  4385.     state drop_ammo
  4386.     state random_wall_jibs
  4387.  
  4388.     ifwasweapon GROWSPARK
  4389.     {
  4390.       cstat 0
  4391.       sound ACTOR_GROWING
  4392.       ai AITROOPGROW
  4393.       break
  4394.     }
  4395.  
  4396.     addkills 1
  4397.  
  4398.     ifwasweapon RPG
  4399.     {
  4400.       sound SQUISHED
  4401.       state troop_body_jibs
  4402.       state standard_jibs
  4403.       killit
  4404.     }
  4405.     else
  4406.       ifwasweapon RADIUSEXPLOSION
  4407.     {
  4408.       sound SQUISHED
  4409.       state troop_body_jibs
  4410.       state standard_jibs
  4411.       killit
  4412.     }
  4413.     else
  4414.     {
  4415.       sound PRED_DYING
  4416.       ifrnd 32
  4417.         iffloordistl 32
  4418.       {
  4419.         sound LIZARD_BEG
  4420.         spawn BLOODPOOL
  4421.         strength 0
  4422.         move 0
  4423.         action ATROOPSUFFERING
  4424.         break
  4425.       }
  4426.       action ATROOPDYING
  4427.       break
  4428.     }
  4429.   }
  4430.   else
  4431.   {
  4432.     state random_wall_jibs
  4433.     sound PRED_PAIN
  4434.  
  4435.     ifwasweapon SHRINKSPARK
  4436.     {
  4437.       sound ACTOR_SHRINKING
  4438.       ai AITROOPSHRUNK
  4439.     }
  4440.     else
  4441.       ifwasweapon GROWSPARK
  4442.         sound EXPANDERHIT
  4443.     else
  4444.       iffloordistl 32
  4445.         ifrnd 96
  4446.           action ATROOPFLINTCH
  4447.   }
  4448. ends
  4449.  
  4450. state troopjetpackstate
  4451.   ifaction ATROOPJETPACKILL
  4452.   {
  4453.     ifcansee
  4454.       ifactioncount 2
  4455.     {
  4456.       resetactioncount
  4457.       sound PRED_ATTACK
  4458.       shoot FIRELASER
  4459.     }
  4460.  
  4461.     ifp phigher
  4462.       ai AITROOPJETPACK
  4463.     else
  4464.       ifinwater
  4465.         ai AITROOPJETPACK
  4466.     else
  4467.       ifcount 26
  4468.         iffloordistl 32
  4469.           ai AITROOPSEEKPLAYER
  4470.   }
  4471.   else
  4472.     ifcount 48
  4473.       ifcansee
  4474.   {
  4475.     action ATROOPJETPACKILL
  4476.     move TROOPJETPACKILLVELS
  4477.     seekplayer
  4478.   }
  4479. ends
  4480.  
  4481. state checksquished
  4482.   ifsquished
  4483.   {
  4484.     addkills 1
  4485.     sound SQUISHED
  4486.     state standard_jibs
  4487.     state random_ooz
  4488.     killit
  4489.   }
  4490. ends
  4491.  
  4492. state troopsufferingstate
  4493.   ifactioncount 2
  4494.   {
  4495.     ifrnd 16
  4496.       spawn WATERDRIP
  4497.     ifactioncount 14
  4498.     {
  4499.       stopsound LIZARD_BEG
  4500.       cstat 0
  4501.       strength 0
  4502.       action ATROOPSUFFERDEAD
  4503.       break
  4504.     }
  4505.   }
  4506. ends
  4507.  
  4508. state troopshrunkstate
  4509.   ifcount SHRUNKDONECOUNT
  4510.     ai AITROOPSEEKENEMY
  4511.   else
  4512.     ifcount SHRUNKCOUNT
  4513.       sizeto 48 40
  4514.   else
  4515.     state genericshrunkcode
  4516. ends
  4517.  
  4518.  
  4519. state troopcode fall
  4520.   ifinwater
  4521.     ifrnd 1
  4522.       spawn WATERBUBBLE
  4523.   ifaction ATROOPSTAND
  4524.   {
  4525.     ifrnd 192
  4526.       ai AITROOPSHOOTING
  4527.     else
  4528.       ai AITROOPSEEKPLAYER
  4529.   }
  4530.   else
  4531.     ifaction ATROOPFROZEN
  4532.   {
  4533.     ifcount THAWTIME
  4534.     {
  4535.       ai AITROOPSEEKENEMY
  4536.       getlastpal
  4537.     }
  4538.     else
  4539.       ifcount FROZENDRIPTIME
  4540.     {
  4541.       ifactioncount 26
  4542.       {
  4543.         spawn WATERDRIP
  4544.         resetactioncount
  4545.       }
  4546.     }
  4547.     ifhitweapon
  4548.     {
  4549.       ifwasweapon FREEZEBLAST
  4550.       {
  4551.         strength 0
  4552.         break
  4553.       }
  4554.       addkills 1
  4555.  
  4556.       ifrnd 84
  4557.         spawn BLOODPOOL
  4558.       lotsofglass 30
  4559.       sound GLASS_BREAKING
  4560.       killit
  4561.     }
  4562.     ifp pfacing
  4563.       ifpdistl FROZENQUICKKICKDIST
  4564.         pkick
  4565.     break
  4566.   }
  4567.   else ifaction ATROOPPLAYDEAD
  4568.   {
  4569.     ifhitweapon
  4570.     {
  4571.       ifwasweapon RADIUSEXPLOSION
  4572.       {
  4573.         sound SQUISHED
  4574.         state troop_body_jibs
  4575.         state standard_jibs
  4576.         killit
  4577.       }
  4578.       break
  4579.     }
  4580.     else
  4581.       state checksquished
  4582.  
  4583.     ifcount PLAYDEADTIME
  4584.     {
  4585.       addkills -1
  4586.       soundonce PRED_ROAM
  4587.       cstat 257
  4588.       strength 1
  4589.       ai AITROOPSHOOTING
  4590.     }
  4591.     else
  4592.       ifp pfacing
  4593.         resetcount
  4594.  
  4595.     break
  4596.   }
  4597.   else
  4598.     ifaction ATROOPDEAD
  4599.   {
  4600.     strength 0
  4601.     ifrespawn
  4602.       ifcount RESPAWNACTORTIME
  4603.     {
  4604.       spawn TRANSPORTERSTAR
  4605.       cstat 257
  4606.       strength TROOPSTRENGTH
  4607.       ai AITROOPSEEKENEMY
  4608.     }
  4609.     ifhitweapon
  4610.     {
  4611.       ifwasweapon RADIUSEXPLOSION
  4612.       {
  4613.         sound SQUISHED
  4614.         state troop_body_jibs
  4615.         state standard_jibs
  4616.         killit
  4617.       }
  4618.       break
  4619.     }
  4620.     else
  4621.       state checksquished
  4622.     break
  4623.   }
  4624.   else
  4625.     ifaction ATROOPSUFFERDEAD
  4626.   {
  4627.     ifactioncount 2
  4628.     {
  4629.       ifrnd 64
  4630.       {
  4631.         resetcount
  4632.         action ATROOPPLAYDEAD
  4633.       }
  4634.       else
  4635.       {
  4636.         soundonce PRED_DYING
  4637.         action ATROOPDEAD
  4638.       }
  4639.     }
  4640.   }
  4641.   else
  4642.     ifaction ATROOPDYING
  4643.   {
  4644.     state troopdying
  4645.     break
  4646.   }
  4647.   else
  4648.     ifaction ATROOPSUFFERING
  4649.   {
  4650.     state troopsufferingstate
  4651.     ifhitweapon
  4652.       state checktroophit
  4653.     break
  4654.   }
  4655.   else
  4656.     ifaction ATROOPFLINTCH
  4657.   {
  4658.     ifactioncount 4
  4659.       ai AITROOPSEEKENEMY
  4660.   }
  4661.   else
  4662.   {
  4663.     ifai AITROOPSEEKPLAYER
  4664.       state troopseekstate
  4665.     else
  4666.       ifai AITROOPJETPACK
  4667.     {
  4668.       state troopjetpackstate
  4669.       ifinwater nullop
  4670.       else
  4671.         soundonce DUKE_JETPACK_IDLE
  4672.     }
  4673.     else
  4674.       ifai AITROOPSEEKENEMY
  4675.         state troopseekstate
  4676.     else
  4677.       ifai AITROOPSHOOTING
  4678.         state troopshootstate
  4679.     else
  4680.       ifai AITROOPFLEEING
  4681.         state troopfleestate
  4682.     else
  4683.       ifai AITROOPFLEEINGBACK
  4684.         state troopfleestate
  4685.     else
  4686.       ifai AITROOPDODGE
  4687.         state troopseekstate
  4688.     else
  4689.       ifai AITROOPDUCKING
  4690.         state troopduckstate
  4691.     else
  4692.       ifai AITROOPSHRUNK
  4693.         state troopshrunkstate
  4694.     else
  4695.       ifai AITROOPGROW
  4696.         state genericgrowcode
  4697.     else
  4698.       ifai AITROOPHIDE
  4699.     {
  4700.       state troophidestate
  4701.       break
  4702.     }
  4703.   }
  4704.  
  4705.   ifhitweapon
  4706.     state checktroophit
  4707.   else
  4708.     state checksquished
  4709. ends
  4710.  
  4711. state checktrooppalette
  4712.   ifai 0
  4713.   {
  4714.     ifspritepal 0
  4715.         nullop
  4716.     else
  4717.         ifspritepal 21
  4718.           addstrength TROOPSTRENGTH // Double the hitpoint vals
  4719.   }
  4720. ends
  4721.  
  4722.  
  4723. actor LIZTROOPJETPACK TROOPSTRENGTH
  4724.   state checktrooppalette
  4725.   ai AITROOPJETPACK
  4726.   cactor LIZTROOP
  4727. enda
  4728.  
  4729. actor LIZTROOPDUCKING TROOPSTRENGTH
  4730.   state checktrooppalette
  4731.   ai AITROOPDUCKING
  4732.   cactor LIZTROOP
  4733.   ifgapzl 48
  4734.     move DONTGETUP
  4735. enda
  4736.  
  4737. actor LIZTROOPSHOOT TROOPSTRENGTH ATROOPSTAND
  4738.   state checktrooppalette
  4739.   ai AITROOPSHOOTING
  4740.   cactor LIZTROOP
  4741. enda
  4742. actor LIZTROOPSTAYPUT TROOPSTRENGTH ATROOPSTAYSTAND
  4743.   state checktrooppalette
  4744.   ai AITROOPSEEKPLAYER
  4745.   cactor LIZTROOP
  4746. enda
  4747. actor LIZTROOPRUNNING TROOPSTRENGTH ATROOPSTAND
  4748.   state checktrooppalette
  4749.   ai AITROOPSEEKPLAYER
  4750.   cactor LIZTROOP
  4751. enda
  4752. actor LIZTROOPONTOILET TROOPSTRENGTH
  4753.   ifcount 24
  4754.   {
  4755.     sound FLUSH_TOILET
  4756.     operate
  4757.     ai AITROOPSEEKPLAYER
  4758.     cactor LIZTROOP
  4759.   }
  4760.   else
  4761.     ifcount 2
  4762.       nullop
  4763.   else
  4764.     state checktrooppalette
  4765. enda
  4766.  
  4767. actor LIZTROOPJUSTSIT TROOPSTRENGTH
  4768.   ifcount 30
  4769.   {
  4770.     operate
  4771.     ai AITROOPSEEKPLAYER
  4772.     cactor LIZTROOP
  4773.   }
  4774.   else
  4775.     ifcount 2
  4776.       nullop
  4777.   else
  4778.     state checktrooppalette
  4779. enda
  4780.  
  4781.  
  4782. actor LIZTROOP TROOPSTRENGTH ATROOPSTAND
  4783.   state checktrooppalette
  4784.   state troopcode
  4785. enda
  4786.  
  4787. action ALIZSTAND     0
  4788. action ALIZWALKING     0   4  5  1  15
  4789. action ALIZRUNNING     0   4  5  1  11
  4790. action ALIZTHINK     20  2  5  1  40
  4791. action ALIZSCREAM    30  1  5  1  2
  4792. action ALIZJUMP      45  3  5  1  20
  4793. action ALIZFALL      55  1  5
  4794. action ALIZSHOOTING    70  2  5  1  7
  4795. action ALIZDYING     60  6  1  1  15
  4796. action ALIZLYINGDEAD   65  1
  4797. action ALIZFROZEN     0  1  5
  4798.  
  4799. move LIZWALKVEL 72
  4800. move LIZRUNVEL 192
  4801. move LIZJUMPVEL 184
  4802. move LIZSTOP
  4803.  
  4804. ai AILIZGETENEMY ALIZWALKING LIZWALKVEL seekplayer
  4805. ai AILIZDODGE ALIZRUNNING LIZRUNVEL dodgebullet
  4806. ai AILIZCHARGEENEMY ALIZRUNNING LIZRUNVEL seekplayer
  4807. ai AILIZFLEENEMY ALIZWALKING LIZWALKVEL fleeenemy
  4808. ai AILIZSHOOTENEMY ALIZSHOOTING LIZSTOP faceplayer
  4809. ai AILIZJUMPENEMY ALIZJUMP LIZJUMPVEL jumptoplayer
  4810. ai AILIZTHINK ALIZTHINK LIZSTOP faceplayerslow
  4811. ai AILIZSHRUNK ALIZWALKING SHRUNKVELS fleeenemy
  4812. ai AILIZGROW ALIZSTAND  LIZSTOP faceplayerslow
  4813. ai AILIZSPIT ALIZSCREAM LIZSTOP faceplayerslow
  4814. ai AILIZDYING ALIZDYING LIZSTOP faceplayer
  4815.  
  4816. state lizseekstate
  4817.  
  4818.   ifactornotstayput
  4819.   {
  4820.     ifcansee
  4821.       ifp palive
  4822.         ifpdistl 2048
  4823.           ifcount 16
  4824.             ifcanshoottarget
  4825.     {
  4826.       ai AILIZSHOOTENEMY
  4827.       break
  4828.     }
  4829.     ifai AILIZCHARGEENEMY
  4830.     {
  4831.       ifcount 72
  4832.         ifcanshoottarget
  4833.       {
  4834.         ai AILIZSHOOTENEMY
  4835.         break
  4836.       }
  4837.       ifp phigher
  4838.         ifpdistg 2048
  4839.           ifrnd 6
  4840.       {
  4841.         ai AILIZJUMPENEMY
  4842.         break
  4843.       }
  4844.     }
  4845.     else
  4846.       ifpdistg 4096
  4847.     {
  4848.       ifrnd 92
  4849.       {
  4850.         ifcount 48
  4851.           ifcanshoottarget
  4852.             ai AILIZSHOOTENEMY
  4853.       }
  4854.       else
  4855.         ifcount 24
  4856.       {
  4857.         ai AILIZCHARGEENEMY
  4858.         break
  4859.       }
  4860.     }
  4861.  
  4862.     iffloordistl 16
  4863.     {
  4864.       ifcount 48
  4865.         ifnotmoving
  4866.           ifcansee
  4867.       {
  4868.         ai AILIZJUMPENEMY
  4869.         break
  4870.       }
  4871.     }
  4872.     else
  4873.     {
  4874.       ifpdistg 1280
  4875.         ai AILIZJUMPENEMY
  4876.       break
  4877.     }
  4878.  
  4879.     ifrnd 4
  4880.       ifnotmoving
  4881.         operate
  4882.     else
  4883.       ifrnd 1
  4884.         ifbulletnear
  4885.     {
  4886.       ifgapzl 128
  4887.         ai AILIZDODGE
  4888.       else
  4889.         ifactornotstayput
  4890.       {
  4891.         ifrnd 32
  4892.           ai AILIZJUMPENEMY
  4893.         else
  4894.           ai AILIZDODGE
  4895.       }
  4896.     }
  4897.   }
  4898.   else
  4899.   {
  4900.     ifactioncount 16
  4901.     {
  4902.       ifp palive
  4903.         ifrnd 32
  4904.           ifcansee
  4905.             ifcanshoottarget
  4906.               ai AILIZSHOOTENEMY
  4907.     }
  4908.     ifcount 16
  4909.       ifrnd 32
  4910.         move LIZWALKVEL randomangle geth
  4911.   }
  4912.  
  4913. ends
  4914.  
  4915. state lizshrunkstate
  4916.   ifcount SHRUNKDONECOUNT
  4917.     ai AILIZGETENEMY
  4918.   else
  4919.     ifcount SHRUNKCOUNT
  4920.       sizeto 48 40
  4921.   else
  4922.     state genericshrunkcode
  4923. ends
  4924.  
  4925. state lizfleestate
  4926.   ifcount 16
  4927.   {
  4928.     ifrnd 48
  4929.       ifp palive
  4930.         ifcansee
  4931.           ai AILIZSPIT
  4932.   }
  4933.   else
  4934.   {
  4935.     iffloordistl 16 nullop
  4936.     else
  4937.       ai AILIZGETENEMY
  4938.     break
  4939.   }
  4940. ends
  4941.  
  4942. state lizthinkstate
  4943.   ifrnd 8
  4944.     soundonce CAPT_ROAM
  4945.   ifactioncount 3
  4946.   {
  4947.     ifrnd 32
  4948.       ifp palive
  4949.         ifcansee
  4950.           ai AILIZSPIT
  4951.         else
  4952.           ifrnd 96
  4953.             ai AILIZGETENEMY
  4954.   }
  4955.   else
  4956.     ifactioncount 2
  4957.       ifrnd 1
  4958.         spawn FECES
  4959.   ifrnd 1
  4960.     ifbulletnear
  4961.   {
  4962.     ifgapzl 96
  4963.       ai AILIZDODGE
  4964.     else
  4965.     {
  4966.       ifrnd 128
  4967.         ai AILIZJUMPENEMY
  4968.       else
  4969.         ai AILIZDODGE
  4970.     }
  4971.   }
  4972. ends
  4973.  
  4974. state lizshootstate
  4975.   ifcount 20
  4976.     ifrnd 8
  4977.   {
  4978.     ifcansee
  4979.       ifpdistl 2048
  4980.     {
  4981.       ifrnd 128
  4982.         ai AILIZFLEENEMY
  4983.       break
  4984.     }
  4985.     ifrnd 80
  4986.       ai AILIZTHINK
  4987.     else
  4988.       ai AILIZGETENEMY
  4989.   }
  4990.   ifactioncount 2
  4991.   {
  4992.     ifcansee
  4993.     {
  4994.       ifcanshoottarget
  4995.       {
  4996.         sound CAPT_ATTACK
  4997.         shoot SHOTSPARK1
  4998.         resetactioncount
  4999.       }
  5000.       else
  5001.         ai AILIZTHINK
  5002.     }
  5003.     else
  5004.       ai AILIZGETENEMY
  5005.   }
  5006. ends
  5007.  
  5008. state checklizhit
  5009.   spawn BLOOD
  5010.   ifai AILIZSHRUNK
  5011.   {
  5012.     addkills 1
  5013.     sound SQUISHED
  5014.     state standard_jibs
  5015.     killit
  5016.   }
  5017.   ifdead
  5018.   {
  5019.     ifwasweapon FREEZEBLAST
  5020.     {
  5021.       sound SOMETHINGFROZE
  5022.       spritepal 1
  5023.       move 0
  5024.       action ALIZFROZEN
  5025.       strength 0
  5026.       break
  5027.     }
  5028.  
  5029.     state drop_chaingun
  5030.  
  5031.     ifwasweapon GROWSPARK
  5032.     {
  5033.       cstat 0
  5034.       sound ACTOR_GROWING
  5035.       ai AILIZGROW
  5036.       break
  5037.     }
  5038.  
  5039.     addkills 1
  5040.  
  5041.     ifwasweapon RPG
  5042.     {
  5043.       sound SQUISHED
  5044.       state liz_body_jibs
  5045.       state standard_jibs
  5046.       killit
  5047.     }
  5048.     else
  5049.       ifwasweapon RADIUSEXPLOSION
  5050.     {
  5051.       sound SQUISHED
  5052.       state liz_body_jibs
  5053.       state standard_jibs
  5054.       killit
  5055.     }
  5056.     else
  5057.     {
  5058.       state rf
  5059.       ai AILIZDYING
  5060.       ifrnd 64
  5061.         spawn BLOODPOOL
  5062.     }
  5063.     sound CAPT_DYING
  5064.   }
  5065.   else
  5066.   {
  5067.     sound CAPT_PAIN
  5068.     ifwasweapon SHRINKSPARK
  5069.     {
  5070.       sound ACTOR_SHRINKING
  5071.       ai AILIZSHRUNK
  5072.       break
  5073.     }
  5074.     ifwasweapon GROWSPARK
  5075.       sound EXPANDERHIT
  5076.  
  5077.     state random_wall_jibs
  5078.     ifp palive
  5079.       ifcansee
  5080.         ifcanshoottarget
  5081.     {
  5082.       ai AILIZSHOOTENEMY
  5083.       break
  5084.     }
  5085.   }
  5086. ends
  5087.  
  5088. state lizjumpstate
  5089.   ifaction ALIZFALL
  5090.   {
  5091.     iffloordistl 16
  5092.       ai AILIZGETENEMY
  5093.   }
  5094.   else
  5095.     ifactioncount 3
  5096.       action ALIZFALL
  5097. ends
  5098.  
  5099. state lizdyingstate
  5100.   ifaction ALIZLYINGDEAD
  5101.   {
  5102.     strength 0
  5103.     ifhitweapon
  5104.       ifwasweapon RADIUSEXPLOSION
  5105.     {
  5106.       sound SQUISHED
  5107.       state standard_jibs
  5108.       killit
  5109.     }
  5110.     ifcount RESPAWNACTORTIME
  5111.       ifrespawn
  5112.     {
  5113.       spawn TRANSPORTERSTAR
  5114.       cstat 257
  5115.       strength LIZSTRENGTH
  5116.       ai AILIZGETENEMY
  5117.     }
  5118.   }
  5119.   else
  5120.     ifai AILIZDYING
  5121.       ifactioncount 6
  5122.   {
  5123.     iffloordistl 8
  5124.       sound THUD
  5125.     move LIZSTOP
  5126.     action ALIZLYINGDEAD
  5127.   }
  5128. ends
  5129.  
  5130. state lizdodgestate
  5131.   ifcount 13
  5132.     ai AILIZGETENEMY
  5133. ends
  5134.  
  5135. actor LIZMANSTAYPUT LIZSTRENGTH ai AILIZGETENEMY cactor LIZMAN enda
  5136. actor LIZMANSPITTING LIZSTRENGTH ai AILIZSPIT cactor LIZMAN enda
  5137. actor LIZMANJUMP LIZSTRENGTH ai AILIZJUMPENEMY cactor LIZMAN enda
  5138.  
  5139. state lizcode
  5140.   state checksquished
  5141.   ifai 0
  5142.     ai AILIZGETENEMY
  5143.   else
  5144.     ifaction ALIZLYINGDEAD
  5145.   {
  5146.     fall
  5147.     state lizdyingstate
  5148.     break
  5149.   }
  5150.   else
  5151.     ifaction ALIZFROZEN
  5152.   {
  5153.     ifcount THAWTIME
  5154.     {
  5155.       ai AILIZGETENEMY
  5156.       getlastpal
  5157.     }
  5158.     else
  5159.       ifcount FROZENDRIPTIME
  5160.     {
  5161.       ifactioncount 26
  5162.       {
  5163.         spawn WATERDRIP
  5164.         resetactioncount
  5165.       }
  5166.     }
  5167.  
  5168.     ifhitweapon
  5169.     {
  5170.       ifwasweapon FREEZEBLAST
  5171.       {
  5172.         strength 0
  5173.         break
  5174.       }
  5175.       addkills 1
  5176.  
  5177.       ifrnd 84
  5178.         spawn BLOODPOOL
  5179.       lotsofglass 30
  5180.       sound GLASS_BREAKING
  5181.       killit
  5182.     }
  5183.     ifp pfacing
  5184.       ifpdistl FROZENQUICKKICKDIST
  5185.         pkick
  5186.     break
  5187.   }
  5188.   else
  5189.     ifai AILIZJUMPENEMY
  5190.       state lizjumpstate
  5191.   else
  5192.   {
  5193.     fall
  5194.     ifai AILIZGETENEMY
  5195.       state lizseekstate
  5196.     else
  5197.       ifai AILIZCHARGEENEMY
  5198.         state lizseekstate
  5199.     else
  5200.       ifai AILIZDODGE
  5201.         state lizdodgestate
  5202.     else
  5203.       ifai AILIZSHOOTENEMY
  5204.         state lizshootstate
  5205.     else
  5206.       ifai AILIZFLEENEMY
  5207.         state lizfleestate
  5208.     else
  5209.       ifai AILIZTHINK
  5210.         state lizthinkstate
  5211.     else
  5212.       ifai AILIZSHRUNK
  5213.         state lizshrunkstate
  5214.     else
  5215.       ifai AILIZGROW
  5216.         state genericgrowcode
  5217.     else
  5218.       ifai AILIZDYING
  5219.         state lizdyingstate
  5220.     else
  5221.       ifai AILIZSPIT
  5222.     {
  5223.       ifcount 26
  5224.         ai AILIZGETENEMY
  5225.       else
  5226.         ifcount 18
  5227.           ifrnd 96
  5228.       {
  5229.         shoot SPIT
  5230.         sound LIZARD_SPIT
  5231.       }
  5232.     }
  5233.   }
  5234.  
  5235.   ifai AILIZSHRUNK
  5236.     break
  5237.   ifhitweapon
  5238.     state checklizhit
  5239. ends
  5240.  
  5241. actor LIZMAN LIZSTRENGTH
  5242.   fall
  5243.   state lizcode
  5244. enda
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251. action DRONEFRAMES   0   1   7   1   1
  5252. action DRONESCREAM   0   1   7   1   1
  5253. move DRONERUNVELS 128 64
  5254. move DRONERUNUPVELS 128 -64
  5255. move DRONEBULLVELS 252 -64
  5256. move DRONEBACKWARDS -64 -64
  5257. move DRONERISE 32 -32
  5258. move DRONESTOPPED -16
  5259.  
  5260. ai AIDRONEGETE DRONESCREAM DRONERUNVELS faceplayerslow getv
  5261. ai AIDRONEWAIT DRONEFRAMES DRONESTOPPED faceplayerslow
  5262. ai AIDRONEGETUP DRONESCREAM DRONERUNUPVELS faceplayer getv
  5263. ai AIDRONEPULLBACK DRONEFRAMES DRONEBACKWARDS faceplayerslow
  5264. ai AIDRONEHIT DRONESCREAM DRONEBACKWARDS faceplayer
  5265. ai AIDRONESHRUNK DRONEFRAMES SHRUNKVELS fleeenemy
  5266. ai AIDRONEDODGE DRONEFRAMES DRONEBULLVELS dodgebullet geth
  5267. ai AIDRONEDODGEUP DRONEFRAMES DRONERISE getv geth
  5268.  
  5269. state dronedead
  5270.   addkills 1
  5271.   debris SCRAP1 8
  5272.   debris SCRAP2 4
  5273.   debris SCRAP3 7
  5274.   spawn EXPLOSION2
  5275.   sound RPG_EXPLODE
  5276.   hitradius 2048 15 20 25 30
  5277.   killit
  5278. ends
  5279.  
  5280. state checkdronehitstate
  5281.  
  5282.   ifdead state dronedead
  5283.   else ifsquished state dronedead
  5284.   else
  5285.   {
  5286.     sound DRON_PAIN
  5287.     ifbulletnear
  5288.     {
  5289.       ifceilingdistl 64
  5290.         ifrnd 48
  5291.           ai AIDRONEDODGE
  5292.       ai AIDRONEDODGEUP
  5293.     }
  5294.     else
  5295.       ai AIDRONEGETE
  5296.   }
  5297. ends
  5298.  
  5299. state droneshrunkstate
  5300.   ifcount 24
  5301.     killit
  5302.   else
  5303.     sizeto 1 1
  5304. ends
  5305.  
  5306. state checkdronenearplayer
  5307.  
  5308.   ifp palive
  5309.     ifpdistl 1596
  5310.   {
  5311.     ifcount 8
  5312.     {
  5313.       addkills 1
  5314.       sound DRON_ATTACK2
  5315.       debris SCRAP1 8
  5316.       debris SCRAP2 4
  5317.       debris SCRAP3 7
  5318.       spawn EXPLOSION2
  5319.       sound RPG_EXPLODE
  5320.       hitradius 2048 15 20 25 30
  5321.       killit
  5322.     }
  5323.     else
  5324.       ifcount 3 nullop
  5325.       else
  5326.         sound LASERTRIP_ARMING
  5327.   }
  5328.  
  5329. ends
  5330.  
  5331. state dronegetstate
  5332.   ifrnd 192
  5333.   {
  5334.     ifcansee
  5335.     {
  5336.       ifbulletnear
  5337.       {
  5338.         ai AIDRONEDODGE
  5339.         break
  5340.       }
  5341.       ifmove DRONEBULLVELS
  5342.       {
  5343.         ifcount 64
  5344.           ai AIDRONEPULLBACK
  5345.         else
  5346.           ifnotmoving
  5347.             ifcount 16
  5348.               ai AIDRONEPULLBACK
  5349.       }
  5350.       else
  5351.         ifcount 32
  5352.       {
  5353.         ifp phigher
  5354.           move DRONEBULLVELS geth getv
  5355.         else
  5356.           move DRONEBULLVELS geth
  5357.       }
  5358.     }
  5359.     else
  5360.       ifrnd 1
  5361.         operate
  5362.   }
  5363. ends
  5364.  
  5365. state dronedodgestate
  5366.   ifai AIDRONEDODGEUP
  5367.   {
  5368.      ifcount 8
  5369.        ai AIDRONEGETE
  5370.      else
  5371.        ifnotmoving
  5372.          ai AIDRONEGETE
  5373.   }
  5374.   else
  5375.   {
  5376.     ifcount 8
  5377.       ai AIDRONEGETE
  5378.     else
  5379.       ifnotmoving
  5380.         ai AIDRONEGETE
  5381.   }
  5382. ends
  5383.  
  5384. actor DRONE DRONESTRENGTH
  5385.   state checkdronenearplayer
  5386.  
  5387.   ifrnd 2
  5388.     fall
  5389.   else
  5390.     soundonce DRON_JETSND
  5391.  
  5392.   ifaction 0
  5393.     ai AIDRONEGETE
  5394.  
  5395.   else
  5396.     ifai AIDRONEWAIT
  5397.   {
  5398.     ifactioncount 4
  5399.       ifrnd 16
  5400.         ifcansee
  5401.     {
  5402.       sound DRON_ATTACK1
  5403.       ifp phigher
  5404.         ai AIDRONEGETUP
  5405.       else ai AIDRONEGETE
  5406.     }
  5407.   }
  5408.   else
  5409.     ifai AIDRONEGETE
  5410.       state dronegetstate
  5411.   else
  5412.     ifai AIDRONEGETUP
  5413.       state dronegetstate
  5414.   else
  5415.     ifai AIDRONEPULLBACK
  5416.   {
  5417.     ifcount 32
  5418.     ai AIDRONEWAIT
  5419.   }
  5420.   else
  5421.     ifai AIDRONEHIT
  5422.   {
  5423.     ifcount 8
  5424.       ai AIDRONEWAIT
  5425.   }
  5426.   else
  5427.     ifai AIDRONESHRUNK
  5428.       state droneshrunkstate
  5429.   else
  5430.     ifai AIDRONEDODGE
  5431.       state dronedodgestate
  5432.   else
  5433.     ifai AIDRONEDODGEUP
  5434.       state dronedodgestate
  5435.  
  5436.   ifhitweapon
  5437.     state checkdronehitstate
  5438.  
  5439.   ifrnd 1
  5440.     soundonce DRON_ROAM
  5441.  
  5442. enda
  5443.  
  5444. // ---------------------------------------------------------
  5445. // octabrain code
  5446. // ---------------------------------------------------------
  5447. action AOCTAWALK    0   3   5   1   15
  5448. action AOCTASTAND     0   1   5   1   15
  5449. action AOCTASCRATCH   0   4   5   1   15
  5450. action AOCTAHIT    30   1   1   1   10
  5451. action AOCTASHOOT    20   1   5   1   10
  5452. action AOCTADYING    30   8   1   1   17
  5453. action AOCTADEAD     38   1   1   1  1
  5454. action AOCTAFROZEN    0   1   5
  5455.  
  5456. move OCTAWALKVELS 96 -30
  5457. move OCTAUPVELS 96 -70
  5458. move OCTASTOPPED 0 -30
  5459. move OCTAINWATER 96 24
  5460.  
  5461. ai AIOCTAGETENEMY AOCTAWALK OCTAWALKVELS seekplayer
  5462. ai AIOCTASHOOTENEMY AOCTASHOOT OCTASTOPPED faceplayer
  5463. ai AIOCTASCRATCHENEMY AOCTASCRATCH OCTASTOPPED faceplayerslow
  5464. ai AIOCTAHIT AOCTAHIT OCTASTOPPED faceplayer
  5465. ai AIOCTASHRUNK AOCTAWALK SHRUNKVELS faceplayer
  5466. ai AIOCTAGROW AOCTASTAND OCTASTOPPED faceplayerslow
  5467. ai AIOCTADYING AOCTADYING OCTASTOPPED faceplayer
  5468.  
  5469. state octagetenemystate
  5470.  
  5471.   ifcansee
  5472.   {
  5473.     ifactioncount 32
  5474.     {
  5475.       ifrnd 48
  5476.         ifcanshoottarget
  5477.       {
  5478.         sound OCTA_ATTACK1
  5479.         ai AIOCTASHOOTENEMY
  5480.         break
  5481.       }
  5482.     }
  5483.     else
  5484.       ifpdistl 1280
  5485.         ai AIOCTASCRATCHENEMY
  5486.   }
  5487.  
  5488. ends
  5489.  
  5490. state octascratchenemystate
  5491.   ifpdistg 1280
  5492.     ai AIOCTAGETENEMY
  5493.   else
  5494.     ifcount 32
  5495.   {
  5496.     resetcount
  5497.     sound OCTA_ATTACK2
  5498.     palfrom 8 32
  5499.     addphealth OCTASCRATCHINGPLAYER
  5500.   }
  5501. ends
  5502.  
  5503. state octashootenemystate
  5504.   ifcount 25
  5505.   {
  5506.     ifcount 27
  5507.       ai AIOCTAGETENEMY
  5508.   }
  5509.   else
  5510.     ifcount 24
  5511.       shoot COOLEXPLOSION1
  5512.   else
  5513.     ifactioncount 6
  5514.       resetactioncount
  5515. ends
  5516.  
  5517. state checkoctahitstate
  5518.   ifwasweapon SHRINKSPARK
  5519.   {
  5520.     sound ACTOR_SHRINKING
  5521.     ai AIOCTASHRUNK
  5522.   }
  5523.   else
  5524.   {
  5525.     ifdead
  5526.     {
  5527.       ifwasweapon FREEZEBLAST
  5528.       {
  5529.         sound SOMETHINGFROZE
  5530.         spritepal 1
  5531.         move 0
  5532.         action AOCTAFROZEN
  5533.         strength 0
  5534.         break
  5535.       }
  5536.  
  5537.       addkills 1
  5538.       ifwasweapon RPG
  5539.       {
  5540.         sound SQUISHED
  5541.         state standard_jibs
  5542.         killit
  5543.       }
  5544.       else
  5545.         ifwasweapon RADIUSEXPLOSION
  5546.       {
  5547.         sound SQUISHED
  5548.         state standard_jibs
  5549.         killit
  5550.       }
  5551.       else
  5552.         ifwasweapon GROWSPARK
  5553.       {
  5554.         cstat 0
  5555.         sound ACTOR_GROWING
  5556.         ai AIOCTAGROW
  5557.         break
  5558.       }
  5559.       else
  5560.       {
  5561.         state rf
  5562.         ai AIOCTADYING
  5563.       }
  5564.       sound OCTA_DYING
  5565.     }
  5566.     else
  5567.     {
  5568.       ifwasweapon RPG
  5569.       {
  5570.         sound OCTA_DYING
  5571.         addkills 1
  5572.         state standard_jibs
  5573.         killit
  5574.       }
  5575.       else
  5576.         ifwasweapon GROWSPARK
  5577.           sound EXPANDERHIT
  5578.  
  5579.       sound OCTA_PAIN
  5580.       spawn BLOOD
  5581.       ifrnd 64
  5582.         ai AIOCTAHIT
  5583.     }
  5584.   }
  5585.   state random_wall_jibs
  5586. ends
  5587.  
  5588. state octashrunkstate
  5589.   ifcount SHRUNKDONECOUNT
  5590.     ai AILIZGETENEMY
  5591.   else
  5592.     ifcount SHRUNKCOUNT
  5593.       sizeto 40 40
  5594.   else
  5595.     state genericshrunkcode
  5596. ends
  5597.  
  5598.  
  5599. state octadyingstate
  5600.   ifactioncount 8
  5601.   {
  5602.     ifrnd 64
  5603.       spawn BLOODPOOL
  5604.     move OCTASTOPPED
  5605.     action AOCTADEAD
  5606.     break
  5607.   }
  5608.   else
  5609.     ifactioncount 5 nullop
  5610.   else
  5611.     ifactioncount 4
  5612.       iffloordistl 8
  5613.         sound THUD
  5614. ends
  5615.  
  5616. actor OCTABRAINSTAYPUT OCTASTRENGTH
  5617.   ai AIOCTAGETENEMY
  5618.   cactor OCTABRAIN
  5619. enda
  5620.  
  5621. actor OCTABRAIN OCTASTRENGTH
  5622.   fall
  5623.   state checksquished
  5624.   ifai 0
  5625.     ai AIOCTAGETENEMY
  5626.   else
  5627.     ifaction AOCTADEAD
  5628.   {
  5629.     strength 0
  5630.     ifcount RESPAWNACTORTIME
  5631.       ifrespawn
  5632.     {
  5633.       addkills -1
  5634.       spawn TRANSPORTERSTAR
  5635.       cstat 257
  5636.       strength OCTASTRENGTH
  5637.       ai AIOCTAGETENEMY
  5638.     }
  5639.     ifhitweapon
  5640.       ifwasweapon RADIUSEXPLOSION
  5641.     {
  5642.       state standard_jibs
  5643.       killit
  5644.     }
  5645.     break
  5646.   }
  5647.   else ifaction AOCTAFROZEN
  5648.   {
  5649.     ifcount THAWTIME
  5650.     {
  5651.       ai AIOCTAGETENEMY
  5652.       getlastpal
  5653.     }
  5654.     else
  5655.       ifcount FROZENDRIPTIME
  5656.       {
  5657.         ifactioncount 26
  5658.         {
  5659.           spawn WATERDRIP
  5660.           resetactioncount
  5661.         }
  5662.       }
  5663.  
  5664.     ifhitweapon
  5665.     {
  5666.       addkills 1
  5667.       ifwasweapon FREEZEBLAST
  5668.       {
  5669.         strength 0
  5670.         break
  5671.       }
  5672.  
  5673.       lotsofglass 30
  5674.       ifrnd 84
  5675.         spawn BLOODPOOL
  5676.       sound GLASS_BREAKING
  5677.       killit
  5678.     }
  5679.     ifp pfacing
  5680.       ifpdistl FROZENQUICKKICKDIST
  5681.         pkick
  5682.     break
  5683.   }
  5684.   else
  5685.   {
  5686.     ifrnd 1
  5687.       soundonce OCTA_ROAM
  5688.  
  5689.     ifai AIOCTAGETENEMY
  5690.       state octagetenemystate
  5691.     else
  5692.       ifai AIOCTAHIT
  5693.       {
  5694.         ifcount 8
  5695.           ai AIOCTASHOOTENEMY
  5696.       }
  5697.     else
  5698.       ifai AIOCTADYING
  5699.       {
  5700.         state octadyingstate
  5701.         break
  5702.       }
  5703.     else
  5704.       ifai AIOCTASCRATCHENEMY
  5705.         state octascratchenemystate
  5706.     else
  5707.       ifai AIOCTASHOOTENEMY
  5708.         state octashootenemystate
  5709.     else
  5710.       ifai AIOCTASHRUNK
  5711.       {
  5712.         state octashrunkstate
  5713.         break
  5714.       }
  5715.     else
  5716.       ifai AIOCTAGROW
  5717.         state genericgrowcode
  5718.  
  5719.     ifmove OCTAUPVELS nullop
  5720.     else
  5721.       ifp phigher
  5722.         move OCTAUPVELS seekplayer
  5723.     else
  5724.       ifmove OCTAINWATER nullop
  5725.       else
  5726.         ifinwater
  5727.           move OCTAINWATER seekplayer
  5728.  
  5729.     ifhitweapon
  5730.       state checkoctahitstate
  5731.   }
  5732. enda
  5733.  
  5734. action APIGWALK     0  4 5 1 20
  5735. action APIGRUN      0  4 5 1 11
  5736. action APIGSHOOT    30 2 5 1 58
  5737. action APIGCOCK     25 1 5 1 16
  5738. action APIGSTAND    30 1 5 1 1
  5739. action APIGDIVE     40 2 5 1 40
  5740. action APIGDIVESHOOT  45 2 5 1 58
  5741. action APIGDYING    55 5 1 1 15
  5742. action APIGHIT      55 1 1 1 10
  5743. action APIGDEAD     60 1 1 1 1
  5744. action APIGFROZEN    0 1 5
  5745. action APIGGROW      0
  5746.  
  5747.  
  5748. move PIGWALKVELS 72
  5749. move PIGRUNVELS 108
  5750. move PIGSTOPPED
  5751.  
  5752. ai AIPIGSEEKENEMY APIGWALK PIGWALKVELS seekplayer
  5753. ai AIPIGSHOOTENEMY APIGSHOOT PIGSTOPPED faceplayer
  5754. ai AIPIGFLEEENEMY APIGWALK PIGWALKVELS fleeenemy
  5755. ai AIPIGSHOOT APIGSHOOT PIGSTOPPED faceplayer
  5756. ai AIPIGDODGE APIGRUN PIGRUNVELS dodgebullet
  5757. ai AIPIGCHARGE APIGRUN PIGRUNVELS seekplayer
  5758. ai AIPIGDIVING APIGDIVE PIGSTOPPED faceplayer
  5759. ai AIPIGDYING APIGDYING PIGSTOPPED faceplayer
  5760. ai AIPIGSHRINK APIGWALK SHRUNKVELS fleeenemy
  5761. ai AIPIGGROW APIGGROW PIGSTOPPED faceplayerslow
  5762. ai AIPIGHIT APIGHIT PIGSTOPPED faceplayer
  5763.  
  5764. state pigseekenemystate
  5765.  
  5766.   ifai AIPIGCHARGE
  5767.   {
  5768.     ifcansee
  5769.       ifpdistl 3084
  5770.     {
  5771.       ifnotmoving
  5772.         ai AIPIGSEEKENEMY
  5773.       else
  5774.         ai AIPIGDIVING
  5775.     }
  5776.     break
  5777.   }
  5778.   else iffloordistl 32
  5779.   {
  5780.     ifpdistg 4096
  5781.     {
  5782.       ifactornotstayput
  5783.       ai AIPIGCHARGE
  5784.     }
  5785.     ifrnd 8
  5786.     {
  5787.       ifbulletnear
  5788.         ai AIPIGDODGE
  5789.     }
  5790.   }
  5791.  
  5792.   ifrnd 128
  5793.     ifcansee
  5794.   {
  5795.     ifai AIPIGDODGE
  5796.     {
  5797.       ifcount 32
  5798.         ai AIPIGCHARGE
  5799.           break
  5800.     }
  5801.     iffloordistl 32
  5802.     {
  5803.       ifpdistl 1024
  5804.         ifp palive
  5805.           ifcanshoottarget
  5806.       {
  5807.         ai AIPIGSHOOTENEMY
  5808.         break
  5809.       }
  5810.       ifcount 48
  5811.       {
  5812.         ifrnd 8
  5813.           ifp palive
  5814.             ifcanshoottarget
  5815.         {
  5816.           ifrnd 192
  5817.             ai AIPIGSHOOTENEMY
  5818.           else
  5819.             ai AIPIGDIVING
  5820.           break
  5821.         }
  5822.       }
  5823.     }
  5824.   }
  5825. ends
  5826.  
  5827.  
  5828. state pigshootenemystate
  5829. //  ifcansee
  5830.   {
  5831.     ifcount 12 nullop
  5832.     else
  5833.       ifcount 11
  5834.     {
  5835.       ifcanshoottarget
  5836.       {
  5837.         sound PIG_ATTACK
  5838.         shoot SHOTGUN
  5839.         shoot SHOTGUN
  5840.         shoot SHOTGUN
  5841.         shoot SHOTGUN
  5842.         shoot SHOTGUN
  5843.       }
  5844.       else
  5845.         ai AIPIGSEEKENEMY
  5846.     }
  5847.     ifcount 25 nullop
  5848.     else
  5849.       ifcount 24
  5850.       {
  5851.         action APIGCOCK
  5852.         sound SHOTGUN_COCK
  5853.       }
  5854.     ifcount 48 nullop
  5855.     else
  5856.       ifcount 47
  5857.     {
  5858.       ifcanshoottarget
  5859.       {
  5860.         sound PIG_ATTACK
  5861.         shoot SHOTGUN
  5862.         shoot SHOTGUN
  5863.         shoot SHOTGUN
  5864.         shoot SHOTGUN
  5865.         shoot SHOTGUN
  5866.       }
  5867.       else
  5868.         ai AIPIGSEEKENEMY
  5869.     }
  5870.     ifcount 60 nullop
  5871.     else
  5872.       ifcount 59
  5873.       {
  5874.         action APIGCOCK
  5875.         sound SHOTGUN_COCK
  5876.       }
  5877.     ifcount 72
  5878.     {
  5879.       ifrnd 64
  5880.         resetcount
  5881.       else
  5882.       {
  5883.         ifpdistl 768
  5884.           ai AIPIGFLEEENEMY
  5885.         else
  5886.           ai AIPIGSEEKENEMY
  5887.       }
  5888.     }
  5889.     ifaction APIGCOCK
  5890.       ifactioncount 2
  5891.         action APIGSHOOT
  5892.   }
  5893.   else
  5894.     ai AIPIGSEEKENEMY
  5895. ends
  5896.  
  5897. state pigfleeenemystate
  5898.   ifactioncount 8
  5899.     ai AIPIGSEEKENEMY
  5900.   else
  5901.     ifnotmoving
  5902.       ai AIPIGSEEKENEMY
  5903. ends
  5904.  
  5905. state pigdivestate
  5906.   ifaction APIGDIVESHOOT
  5907.   {
  5908.     ifcansee
  5909.     {
  5910.       ifcount 12 nullop
  5911.       else
  5912.         ifcount 11
  5913.       {
  5914.         ifcanshoottarget
  5915.         {
  5916.           sound PIG_ATTACK
  5917.           shoot SHOTGUN
  5918.           shoot SHOTGUN
  5919.           shoot SHOTGUN
  5920.           shoot SHOTGUN
  5921.         }
  5922.         else
  5923.           ai AIPIGSEEKENEMY
  5924.       }
  5925.       ifcount 25 nullop
  5926.       else
  5927.         ifcount 24
  5928.           sound SHOTGUN_COCK
  5929.       ifcount 48 nullop
  5930.       else
  5931.         ifcount 47
  5932.       {
  5933.         ifcanshoottarget
  5934.         {
  5935.           sound PIG_ATTACK
  5936.           shoot SHOTGUN
  5937.           shoot SHOTGUN
  5938.           shoot SHOTGUN
  5939.           shoot SHOTGUN
  5940.         }
  5941.         else
  5942.           ai AIPIGSEEKENEMY
  5943.       }
  5944.       ifcount 60 nullop
  5945.       else
  5946.         ifcount 59
  5947.       {
  5948.         sound SHOTGUN_COCK
  5949.         ifgapzl 32
  5950.           ai AIPIGDIVING
  5951.         else
  5952.         {
  5953.           ifpdistl 4096
  5954.             ai AIPIGFLEEENEMY
  5955.           else
  5956.             ai AIPIGSEEKENEMY
  5957.         }
  5958.       }
  5959.     }
  5960.     else
  5961.       ifgapzl 32
  5962.         ai AIPIGDIVING
  5963.       else
  5964.         ai AIPIGSEEKENEMY
  5965.   }
  5966.   else
  5967.     ifactioncount 2
  5968.     ifp palive
  5969.     {
  5970.       resetcount
  5971.       action APIGDIVESHOOT
  5972.     }
  5973. ends
  5974.  
  5975. state checkpighitstate
  5976.   spawn BLOOD
  5977.   ifdead
  5978.   {
  5979.     state random_wall_jibs
  5980.     ifrnd 16
  5981.       spawn SHIELD
  5982.     else
  5983.       state drop_shotgun
  5984.  
  5985.     ifwasweapon GROWSPARK
  5986.     {
  5987.       sound ACTOR_GROWING
  5988.       ai AIPIGGROW
  5989.       break
  5990.     }
  5991.  
  5992.     addkills 1
  5993.  
  5994.     ifwasweapon FREEZEBLAST
  5995.     {
  5996.       sound SOMETHINGFROZE
  5997.       spritepal 1
  5998.       move 0
  5999.       action APIGFROZEN
  6000.       strength 0
  6001.       break
  6002.     }
  6003.     ifwasweapon RADIUSEXPLOSION
  6004.     {
  6005.       sound SQUISHED
  6006.       state standard_jibs
  6007.       killit
  6008.     }
  6009.     else
  6010.       ifwasweapon RPG
  6011.     {
  6012.       sound SQUISHED
  6013.       state standard_jibs
  6014.       killit
  6015.     }
  6016.     else
  6017.       ai AIPIGDYING
  6018.         sound PIG_DYING
  6019.   }
  6020.   else
  6021.   {
  6022.     sound PIG_PAIN
  6023.     state random_wall_jibs
  6024.  
  6025.     ifwasweapon SHRINKSPARK
  6026.     {
  6027.       sound ACTOR_SHRINKING
  6028.       ai AIPIGSHRINK
  6029.     }
  6030.     else
  6031.       ifwasweapon GROWSPARK
  6032.         sound EXPANDERHIT
  6033.     else
  6034.       ifrnd 32
  6035.         ai AIPIGHIT
  6036.     else
  6037.       ifrnd 64
  6038.         ai AIPIGSHOOTENEMY
  6039.     else
  6040.       ifrnd 64
  6041.       {
  6042.         ai AIPIGDIVING
  6043.         action APIGDIVESHOOT
  6044.       }
  6045.   }
  6046. ends
  6047.  
  6048. state pigshrinkstate
  6049.   ifcount SHRUNKDONECOUNT
  6050.     ai AIPIGSEEKENEMY
  6051.   else
  6052.     ifcount SHRUNKCOUNT
  6053.       sizeto 48 40
  6054.   else
  6055.     state genericshrunkcode
  6056. ends
  6057.  
  6058. state pigdyingstate
  6059.   ifactioncount 5
  6060.   {
  6061.     ifrnd 64
  6062.       spawn BLOODPOOL
  6063.     state rf
  6064.     iffloordistl 8
  6065.       sound THUD
  6066.     action APIGDEAD
  6067.     move PIGSTOPPED
  6068.     break
  6069.   }
  6070. ends
  6071.  
  6072.  
  6073. actor PIGCOPDIVE PIGCOPSTRENGTH
  6074.   ai AIPIGDIVING
  6075.   action APIGDIVESHOOT
  6076.   cactor PIGCOP
  6077. enda
  6078. actor PIGCOPSTAYPUT PIGCOPSTRENGTH
  6079.   ai AIPIGSEEKENEMY
  6080.   cactor PIGCOP
  6081. enda
  6082. actor PIGCOP PIGCOPSTRENGTH APIGSTAND
  6083.   fall
  6084.   state checksquished
  6085.   ifaction APIGSTAND
  6086.     ai AIPIGSEEKENEMY
  6087.   else
  6088.     ifaction APIGDEAD
  6089.   {
  6090.     ifrespawn
  6091.       ifcount RESPAWNACTORTIME
  6092.     {
  6093.       spawn TRANSPORTERSTAR
  6094.       cstat 257
  6095.       strength PIGCOPSTRENGTH
  6096.       ai AIPIGSEEKENEMY
  6097.     }
  6098.     else
  6099.     {
  6100.       strength 0
  6101.       ifhitweapon
  6102.         ifwasweapon RADIUSEXPLOSION
  6103.       {
  6104.         sound SQUISHED
  6105.         state standard_jibs
  6106.         killit
  6107.       }
  6108.       break
  6109.     }
  6110.   }
  6111.   else
  6112.     ifaction APIGFROZEN
  6113.   {
  6114.     ifcount THAWTIME
  6115.     {
  6116.       ai AIPIGSEEKENEMY
  6117.       getlastpal
  6118.     }
  6119.     else
  6120.       ifcount FROZENDRIPTIME
  6121.         ifrnd 8
  6122.           spawn WATERDRIP
  6123.  
  6124.     ifhitweapon
  6125.     {
  6126.       ifwasweapon FREEZEBLAST
  6127.       {
  6128.         strength 0
  6129.         break
  6130.       }
  6131.       addkills 1
  6132.  
  6133.       lotsofglass 30
  6134.       ifrnd 84 spawn BLOODPOOL
  6135.       sound GLASS_BREAKING
  6136.       killit
  6137.     }
  6138.     ifp pfacing
  6139.       ifpdistl FROZENQUICKKICKDIST
  6140.         pkick
  6141.     break
  6142.   }
  6143.   else
  6144.     ifai AIPIGDYING
  6145.       state pigdyingstate
  6146.   else
  6147.     ifai AIPIGHIT
  6148.     {
  6149.       ifactioncount 3
  6150.       ai AIPIGSEEKENEMY
  6151.     }
  6152.   else
  6153.     ifai AIPIGSHRINK
  6154.       state pigshrinkstate
  6155.   else
  6156.   {
  6157.     ifai AIPIGSEEKENEMY
  6158.       state pigseekenemystate
  6159.     else
  6160.       ifai AIPIGDODGE
  6161.         state pigseekenemystate
  6162.     else
  6163.       ifai AIPIGSHOOTENEMY
  6164.         state pigshootenemystate
  6165.     else
  6166.       ifai AIPIGGROW
  6167.         state genericgrowcode
  6168.     else
  6169.       ifai AIPIGFLEEENEMY
  6170.         state pigfleeenemystate
  6171.     else
  6172.       ifai AIPIGDIVING
  6173.         state pigdivestate
  6174.     else
  6175.       ifai AIPIGCHARGE
  6176.         state pigseekenemystate
  6177.     ifhitweapon
  6178.       state checkpighitstate
  6179.     ifrnd 1
  6180.     {
  6181.       ifrnd 32
  6182.         soundonce PIG_ROAM
  6183.       else
  6184.         ifrnd 64
  6185.           soundonce PIG_ROAM2
  6186.       else
  6187.         soundonce PIG_ROAM3
  6188.     }
  6189.   }
  6190. enda
  6191.  
  6192.  
  6193.  
  6194. // ---------------------------------------------------------------------------------
  6195. // boss 1 code
  6196. // ---------------------------------------------------------------------------------
  6197. action ABOSS1WALK        0  4  5  1  12
  6198. action ABOSS1FROZEN        30 1  5
  6199. action ABOSS1RUN         0  6  5  1  5
  6200. action ABOSS1SHOOT         30 2  5  1  4
  6201. action ABOSS1LOB         40 2  5  1  35
  6202. action ABOSS1DYING        50 5  1  1  35
  6203. action BOSS1FLINTCH       50 1  1  1  1
  6204. action ABOSS1DEAD         55
  6205.  
  6206. move PALBOSS1SHRUNKRUNVELS 32
  6207. move PALBOSS1RUNVELS 128
  6208. move BOSS1WALKVELS 208
  6209. move BOSS1RUNVELS 296
  6210. move BOSS1STOPPED
  6211.  
  6212. ai AIBOSS1SEEKENEMY ABOSS1WALK BOSS1WALKVELS seekplayer
  6213. ai AIBOSS1RUNENEMY ABOSS1RUN BOSS1RUNVELS faceplayer
  6214. ai AIBOSS1SHOOTENEMY ABOSS1SHOOT BOSS1STOPPED faceplayer
  6215. ai AIBOSS1LOBBED ABOSS1LOB BOSS1STOPPED faceplayer // faceplayersmart
  6216. ai AIBOSS1DYING ABOSS1DYING BOSS1STOPPED faceplayer
  6217. ai AIBOSS1PALSHRINK ABOSS1WALK PALBOSS1SHRUNKRUNVELS furthestdir
  6218.  
  6219. state boss1palshrunkstate
  6220.   ifcount SHRUNKDONECOUNT
  6221.     ai AITROOPSEEKENEMY
  6222.   else
  6223.     ifcount SHRUNKCOUNT
  6224.       sizeto 40 40
  6225.   else
  6226.     state genericshrunkcode
  6227. ends
  6228.  
  6229. state checkboss1seekstate
  6230.   ai AIBOSS1SEEKENEMY
  6231.   ifspritepal 0 nullop
  6232.     else   // a fake way of doing a ifspritepal NOT.
  6233.       move PALBOSS1RUNVELS seekplayer
  6234. ends
  6235.  
  6236. state boss1runenemystate
  6237.   ifpdistl 2048
  6238.   {
  6239.     ifp palive
  6240.       ai AIBOSS1SHOOTENEMY
  6241.     break
  6242.   }
  6243.   else
  6244.     ifcansee
  6245.   {
  6246.     ifactioncount 6
  6247.     {
  6248.       ifcanshoottarget
  6249.       {
  6250.         resetactioncount
  6251.         sound BOS1_WALK
  6252.       }
  6253.       else
  6254.         ai AIBOSS1SEEKENEMY
  6255.     }
  6256.   }
  6257.   else
  6258.     ai AIBOSS1SEEKENEMY
  6259. ends
  6260.  
  6261. state boss1seekenemystate
  6262.   ifrnd 2
  6263.     soundonce BOS1_ROAM
  6264.   else
  6265.     ifactioncount 6
  6266.   {
  6267.     resetactioncount
  6268.     sound BOS1_WALK
  6269.   }
  6270.  
  6271.   ifpdistl 2548
  6272.     ifp palive
  6273.   {
  6274.     ai AIBOSS1SHOOTENEMY
  6275.     break
  6276.   }
  6277.  
  6278.   ifcansee
  6279.     ifcount 32
  6280.   {
  6281.     ifrnd 32
  6282.     {
  6283.       ifp palive
  6284.         ifcanshoottarget
  6285.           ai AIBOSS1SHOOTENEMY
  6286.     }
  6287.     else
  6288.       ifpdistg 2548
  6289.         ifrnd 192
  6290.           ifcanshoottarget
  6291.     {
  6292.       ifrnd 64
  6293.       {
  6294.         ai AIBOSS1RUNENEMY
  6295.         ifspritepal 0 nullop
  6296.         else
  6297.           move PALBOSS1RUNVELS seekplayer
  6298.       }
  6299.       else
  6300.         ai AIBOSS1LOBBED
  6301.     }
  6302.   }
  6303.  
  6304. ends
  6305.  
  6306. state boss1dyingstate
  6307.   ifaction ABOSS1DEAD
  6308.   {
  6309.     ifspritepal 0
  6310.       break
  6311.     ifrespawn
  6312.       ifcount RESPAWNACTORTIME
  6313.     {
  6314.       spawn TRANSPORTERSTAR
  6315.       cstat 257
  6316.       strength PIGCOPSTRENGTH
  6317.       state checkboss1seekstate
  6318.     }
  6319.     else
  6320.     {
  6321.       strength 0
  6322.       ifhitweapon
  6323.         ifwasweapon RADIUSEXPLOSION
  6324.       {
  6325.         sound SQUISHED
  6326.         state standard_jibs
  6327.         killit
  6328.       }
  6329.       break
  6330.     }
  6331.   }
  6332.   ifactioncount 5
  6333.   {
  6334.     iffloordistl 8
  6335.       sound THUD
  6336.     action ABOSS1DEAD
  6337.     cstat 0
  6338.     ifspritepal 0
  6339.     endofgame 52
  6340.   }
  6341. ends
  6342.  
  6343. state boss1lobbedstate
  6344.   ifcansee
  6345.   {
  6346.     ifactioncount 2
  6347.     {
  6348.       resetactioncount
  6349.       sound BOS1_ATTACK2
  6350.       shoot MORTER
  6351.     }
  6352.     else
  6353.       ifcount 64
  6354.         ifrnd 16
  6355.           state checkboss1seekstate
  6356.   }
  6357.   else
  6358.     state checkboss1seekstate
  6359. ends
  6360.  
  6361. state boss1shootenemy
  6362.   ifcount 72
  6363.     state checkboss1seekstate
  6364.   else
  6365.     ifaction ABOSS1SHOOT
  6366.       ifactioncount 2
  6367.   {
  6368.     sound BOS1_ATTACK1
  6369.     shoot SHOTSPARK1
  6370.     shoot SHOTSPARK1
  6371.     shoot SHOTSPARK1
  6372.     shoot SHOTSPARK1
  6373.     shoot SHOTSPARK1
  6374.     shoot SHOTSPARK1
  6375.     resetactioncount
  6376.   }
  6377. ends
  6378.  
  6379. state checkboss1hitstate
  6380.   ifrnd 2
  6381.     spawn BLOODPOOL
  6382.   ifdead
  6383.   {
  6384.     ifspritepal 0
  6385.       globalsound DUKE_TALKTOBOSSFALL
  6386.     else
  6387.     {
  6388.       ifrnd 64
  6389.         globalsound DUKE_TALKTOBOSSFALL
  6390.       ifwasweapon FREEZEBLAST
  6391.       {
  6392.         sound SOMETHINGFROZE
  6393.         spritepal 1
  6394.         move 0
  6395.         action ABOSS1FROZEN
  6396.         strength 0
  6397.         break
  6398.       }
  6399.     }
  6400.  
  6401.     sound BOS1_DYING
  6402.  
  6403.     addkills 1
  6404.     ai AIBOSS1DYING
  6405.   }
  6406.   else
  6407.   {
  6408.     ifrnd 32
  6409.     {
  6410.       action BOSS1FLINTCH
  6411.       move 0
  6412.     }
  6413.  
  6414.     ifspritepal 0 nullop
  6415.     else
  6416.       ifwasweapon SHRINKSPARK
  6417.     {
  6418.       sound ACTOR_SHRINKING
  6419.       ai AIBOSS1PALSHRINK
  6420.       cstat 0
  6421.       break
  6422.     }
  6423.  
  6424.     soundonce BOS1_PAIN
  6425.  
  6426.     debris SCRAP1 1
  6427.     guts JIBS6 1
  6428.   }
  6429. ends
  6430.  
  6431. state boss1code
  6432.  
  6433.   ifaction ABOSS1FROZEN
  6434.   {
  6435.     ifcount THAWTIME
  6436.     {
  6437.       ai AIBOSS1SEEKENEMY
  6438.       spritepal 21
  6439.     }
  6440.     else
  6441.       ifcount FROZENDRIPTIME
  6442.     {
  6443.       ifactioncount 26
  6444.       {
  6445.         spawn WATERDRIP
  6446.         resetactioncount
  6447.       }
  6448.     }
  6449.  
  6450.     ifhitweapon
  6451.     {
  6452.       ifwasweapon FREEZEBLAST
  6453.       {
  6454.         strength 0
  6455.         break
  6456.       }
  6457.       addkills 1
  6458.       lotsofglass 30
  6459.  
  6460.       ifrnd 84
  6461.         spawn BLOODPOOL
  6462.       sound GLASS_BREAKING
  6463.       killit
  6464.     }
  6465.     ifp pfacing
  6466.       ifpdistl FROZENQUICKKICKDIST
  6467.         pkick
  6468.     break
  6469.   }
  6470.   ifai 0
  6471.   {
  6472.     ifspritepal 0
  6473.       ai AIBOSS1RUNENEMY
  6474.     else
  6475.     {
  6476.       strength BOSS1PALSTRENGTH
  6477.       ai AIBOSS1SHOOTENEMY
  6478.     }
  6479.   }
  6480.   else
  6481.     ifaction BOSS1FLINTCH
  6482.   {
  6483.     ifactioncount 3
  6484.     ai AIBOSS1SHOOTENEMY
  6485.   }
  6486.   else
  6487.     ifai AIBOSS1SEEKENEMY
  6488.       state boss1seekenemystate
  6489.   else
  6490.     ifai AIBOSS1RUNENEMY
  6491.       state boss1runenemystate
  6492.   else
  6493.     ifai AIBOSS1SHOOTENEMY
  6494.       state boss1shootenemy
  6495.   else
  6496.     ifai AIBOSS1LOBBED
  6497.       state boss1lobbedstate
  6498.   else
  6499.     ifai AIBOSS1PALSHRINK
  6500.       state boss1palshrunkstate
  6501.  
  6502.   ifai AIBOSS1DYING
  6503.     state boss1dyingstate
  6504.   else
  6505.   {
  6506.     ifhitweapon
  6507.       state checkboss1hitstate
  6508.     else
  6509.       ifp palive
  6510.         ifspritepal 0
  6511.           ifpdistl 1280
  6512.     {
  6513.       addphealth -1000
  6514.       palfrom 63 63
  6515.     }
  6516.   }
  6517. ends
  6518.  
  6519. actor BOSS1STAYPUT BOSS1STRENGTH cactor BOSS1 enda
  6520. actor BOSS1 BOSS1STRENGTH
  6521.    fall
  6522.    state checksquished
  6523.    state boss1code
  6524. enda
  6525.  
  6526. // ----------------------------------------------------------
  6527. // code for boss 2 (episode 3 overlord)
  6528. // ----------------------------------------------------------
  6529. action ABOSS2WALK        0  4  5  1  30
  6530. action ABOSS2FROZEN        0  1  5
  6531. action ABOSS2RUN         0  4  5  1  15
  6532. action ABOSS2SHOOT         20 2  5  1  15
  6533. action ABOSS2LOB         30 2  5  1  105
  6534. action ABOSS2DYING        40 8  1  1  35
  6535. action BOSS2FLINTCH       40 1  1  1  1
  6536. action ABOSS2DEAD         48
  6537.  
  6538. move PALBOSS2SHRUNKRUNVELS 32
  6539. move PALBOSS2RUNVELS 84
  6540. move BOSS2WALKVELS 192
  6541. move BOSS2RUNVELS 256
  6542. move BOSS2STOPPED
  6543.  
  6544. ai AIBOSS2SEEKENEMY ABOSS2WALK BOSS2WALKVELS seekplayer
  6545. ai AIBOSS2RUNENEMY ABOSS2RUN BOSS2RUNVELS faceplayer
  6546. ai AIBOSS2SHOOTENEMY ABOSS2SHOOT BOSS2STOPPED faceplayer
  6547. ai AIBOSS2LOBBED ABOSS2LOB BOSS2STOPPED faceplayer
  6548. ai AIBOSS2DYING ABOSS2DYING BOSS2STOPPED faceplayer
  6549. ai AIBOSS2PALSHRINK ABOSS2WALK PALBOSS2SHRUNKRUNVELS furthestdir
  6550.  
  6551. state boss2palshrunkstate
  6552.   ifcount SHRUNKDONECOUNT
  6553.   {
  6554.     cstat 257
  6555.     ai AITROOPSEEKENEMY
  6556.   }
  6557.   else
  6558.     ifcount SHRUNKCOUNT
  6559.       sizeto 40 40
  6560.   else
  6561.     state genericshrunkcode
  6562. ends
  6563.  
  6564. state checkboss2seekstate
  6565.   ai AIBOSS2SEEKENEMY
  6566.   ifspritepal 0 nullop
  6567.   else   // a fake way of doing a ifspritepal NOT.
  6568.     move PALBOSS2RUNVELS seekplayer
  6569. ends
  6570.  
  6571. state boss2runenemystate
  6572.   ifcansee
  6573.   {
  6574.     ifactioncount 3
  6575.     {
  6576.       ifcanshoottarget
  6577.       {
  6578.         resetactioncount
  6579.         sound BOS1_WALK
  6580.       }
  6581.       else
  6582.         ai AIBOSS2SEEKENEMY
  6583.     }
  6584.     ifcount 48
  6585.       ifrnd 2
  6586.     {
  6587.       ifp palive
  6588.       {
  6589.         sound BOS2_ATTACK
  6590.         ai AIBOSS2SHOOTENEMY
  6591.       }
  6592.       break
  6593.     }
  6594.   }
  6595.   else
  6596.     ai AIBOSS2SEEKENEMY
  6597. ends
  6598.  
  6599. state boss2seekenemystate
  6600.   ifrnd 2
  6601.     soundonce BOS2_ROAM
  6602.   else
  6603.     ifactioncount 3
  6604.   {
  6605.     resetactioncount
  6606.     sound BOS1_WALK
  6607.   }
  6608.  
  6609.   ifcansee
  6610.     ifcount 32
  6611.       ifp palive
  6612.         ifrnd 48
  6613.           ifcanshoottarget
  6614.   {
  6615.     ifrnd 64
  6616.       ifpdistg 4096
  6617.     {
  6618.       ai AIBOSS2RUNENEMY
  6619.       ifspritepal 0 nullop
  6620.       else
  6621.         move PALBOSS2RUNVELS seekplayer
  6622.       break
  6623.     }
  6624.  
  6625.     ifpdistl 10240
  6626.     {
  6627.       ifrnd 128
  6628.       {
  6629.         sound BOS2_ATTACK
  6630.         ai AIBOSS2LOBBED
  6631.       }
  6632.     }
  6633.     else
  6634.     {
  6635.       sound BOS2_ATTACK
  6636.       ai AIBOSS2SHOOTENEMY
  6637.     }
  6638.   }
  6639. ends
  6640.  
  6641. state boss2dyingstate
  6642.   ifaction ABOSS2DEAD
  6643.   {
  6644.     ifspritepal 0
  6645.       break
  6646.     ifrespawn
  6647.       ifcount RESPAWNACTORTIME
  6648.     {
  6649.       spawn TRANSPORTERSTAR
  6650.       cstat 257
  6651.       strength PIGCOPSTRENGTH
  6652.       state checkboss2seekstate
  6653.     }
  6654.     else
  6655.     {
  6656.       strength 0
  6657.       ifhitweapon
  6658.         ifwasweapon RADIUSEXPLOSION
  6659.       {
  6660.         sound SQUISHED
  6661.         state standard_jibs
  6662.         killit
  6663.       }
  6664.       break
  6665.     }
  6666.   }
  6667.   ifactioncount 8
  6668.   {
  6669.     iffloordistl 8
  6670.       sound THUD
  6671.     action ABOSS2DEAD
  6672.     cstat 0
  6673.     ifspritepal 0
  6674.       endofgame 52
  6675.   }
  6676. ends
  6677.  
  6678. state boss2lobbedstate
  6679.   ifcansee
  6680.   {
  6681.     ifactioncount 2
  6682.       resetactioncount
  6683.     else
  6684.       ifactioncount 1
  6685.     {
  6686.       ifrnd 128
  6687.         shoot COOLEXPLOSION1
  6688.     }
  6689.     else
  6690.       ifcount 64
  6691.         ifrnd 16
  6692.           state checkboss2seekstate
  6693.   }
  6694.   else
  6695.     state checkboss2seekstate
  6696. ends
  6697.  
  6698. state boss2shootenemy
  6699.   ifcount 72
  6700.     state checkboss2seekstate
  6701.   else
  6702.     ifaction ABOSS2SHOOT
  6703.       ifactioncount 2
  6704.   {
  6705.     shoot RPG
  6706.     resetactioncount
  6707.   }
  6708. ends
  6709.  
  6710. state checkboss2hitstate
  6711.   ifrnd 2
  6712.     spawn BLOODPOOL
  6713.   ifdead
  6714.   {
  6715.     ifspritepal 0
  6716.       globalsound DUKE_TALKTOBOSSFALL
  6717.     else
  6718.     {
  6719.       ifrnd 64
  6720.         globalsound DUKE_TALKTOBOSSFALL
  6721.       ifwasweapon FREEZEBLAST
  6722.       {
  6723.         sound SOMETHINGFROZE
  6724.         spritepal 1
  6725.         move 0
  6726.         action ABOSS2FROZEN
  6727.         strength 0
  6728.         break
  6729.       }
  6730.     }
  6731.  
  6732.     sound BOS2_DYING
  6733.  
  6734.     addkills 1
  6735.  
  6736.     ai AIBOSS2DYING
  6737.   }
  6738.   else
  6739.   {
  6740.     ifrnd 144
  6741.     {
  6742.       ifrnd 32
  6743.       {
  6744.         action BOSS2FLINTCH
  6745.         move 0
  6746.       }
  6747.       else
  6748.       {
  6749.         sound BOS2_ATTACK
  6750.         ai AIBOSS2SHOOTENEMY
  6751.       }
  6752.     }
  6753.  
  6754.     ifspritepal 0 nullop
  6755.     else
  6756.       ifwasweapon SHRINKSPARK
  6757.     {
  6758.       sound ACTOR_SHRINKING
  6759.       ai AIBOSS2PALSHRINK
  6760.       break
  6761.     }
  6762.  
  6763.     soundonce BOS2_PAIN
  6764.  
  6765.     debris SCRAP1 1
  6766.     guts JIBS6 1
  6767.   }
  6768. ends
  6769.  
  6770. state boss2code
  6771.  
  6772.   ifaction ABOSS2FROZEN
  6773.   {
  6774.     ifcount THAWTIME
  6775.     {
  6776.       ai AIBOSS2SEEKENEMY
  6777.         spritepal 21
  6778.     }
  6779.     else
  6780.       ifcount FROZENDRIPTIME
  6781.     {
  6782.       ifactioncount 26
  6783.       {
  6784.         spawn WATERDRIP
  6785.         resetactioncount
  6786.       }
  6787.     }
  6788.  
  6789.     ifhitweapon
  6790.     {
  6791.       ifwasweapon FREEZEBLAST
  6792.       {
  6793.         strength 0
  6794.         break
  6795.       }
  6796.       addkills 1
  6797.  
  6798.       lotsofglass 30
  6799.       sound GLASS_BREAKING
  6800.       ifrnd 84 spawn BLOODPOOL
  6801.       killit
  6802.     }
  6803.     ifp pfacing
  6804.       ifpdistl FROZENQUICKKICKDIST
  6805.         pkick
  6806.     break
  6807.   }
  6808.   ifai 0
  6809.   {
  6810.     ifspritepal 0
  6811.       ai AIBOSS2RUNENEMY
  6812.     else
  6813.     {
  6814.       strength 1
  6815.       sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
  6816.     }
  6817.   }
  6818.   else
  6819.     ifaction BOSS2FLINTCH
  6820.   {
  6821.     ifactioncount 3
  6822.       ai AIBOSS2SEEKENEMY
  6823.   }
  6824.   else
  6825.     ifai AIBOSS2SEEKENEMY
  6826.       state boss2seekenemystate
  6827.   else
  6828.     ifai AIBOSS2RUNENEMY
  6829.       state boss2runenemystate
  6830.   else
  6831.     ifai AIBOSS2SHOOTENEMY
  6832.       state boss2shootenemy
  6833.   else
  6834.     ifai AIBOSS2LOBBED
  6835.       state boss2lobbedstate
  6836.   else
  6837.     ifai AIBOSS2PALSHRINK
  6838.       state boss2palshrunkstate
  6839.  
  6840.   ifai AIBOSS2DYING
  6841.     state boss2dyingstate
  6842.   else
  6843.   {
  6844.     ifhitweapon state checkboss2hitstate
  6845.     else
  6846.       ifp palive
  6847.         ifspritepal 0 ifpdistl
  6848.           1280
  6849.     {
  6850.       addphealth -1000
  6851.       palfrom 63 63
  6852.     }
  6853.   }
  6854.  
  6855.  
  6856. ends
  6857.  
  6858. actor BOSS2 BOSS2STRENGTH
  6859.   fall
  6860.   state checksquished
  6861.   state boss2code
  6862. enda
  6863.  
  6864. action ABOSS3WALK        0  4  5  1  30
  6865. action ABOSS3FROZEN        0  1  5
  6866. action ABOSS3RUN         0  4  5  1  15
  6867. action ABOSS3LOB        20 4  5  1  50
  6868. action ABOSS3LOBBING      30 2  5  1  15
  6869. action ABOSS3DYING        40 8  1  1  20
  6870. action BOSS3FLINTCH       40 1  1  1  1
  6871. action ABOSS3DEAD         48
  6872.  
  6873. move PALBOSS3SHRUNKRUNVELS 32
  6874. move PALBOSS3RUNVELS 84
  6875. move BOSS3WALKVELS 208
  6876. move BOSS3RUNVELS 270
  6877. move BOSS3STOPPED
  6878.  
  6879. ai AIBOSS3SEEKENEMY ABOSS3WALK BOSS3WALKVELS seekplayer
  6880. ai AIBOSS3RUNENEMY ABOSS3RUN BOSS3RUNVELS faceplayerslow
  6881. ai AIBOSS3LOBENEMY ABOSS3LOB BOSS3STOPPED faceplayer
  6882. ai AIBOSS3DYING ABOSS3DYING BOSS3STOPPED faceplayer
  6883. ai AIBOSS3PALSHRINK ABOSS3WALK PALBOSS3SHRUNKRUNVELS faceplayer
  6884.  
  6885. state boss3palshrunkstate
  6886.   ifcount SHRUNKDONECOUNT
  6887.     ai AITROOPSEEKENEMY
  6888.   else
  6889.     ifcount SHRUNKCOUNT
  6890.       sizeto 40 40
  6891.   else
  6892.     state genericshrunkcode
  6893. ends
  6894.  
  6895. state checkboss3seekstate
  6896.   ai AIBOSS3SEEKENEMY
  6897.   ifspritepal 0 nullop
  6898.   else   // a fake way of doing a ifspritepal NOT.
  6899.     move PALBOSS3RUNVELS seekplayer
  6900. ends
  6901.  
  6902. state boss3runenemystate
  6903.   ifcansee
  6904.   {
  6905.     ifactioncount 3
  6906.     {
  6907.       ifcanshoottarget
  6908.       {
  6909.         resetactioncount
  6910.         sound BOS1_WALK
  6911.       }
  6912.       else
  6913.         ai AIBOSS3SEEKENEMY
  6914.     }
  6915.   }
  6916.   else
  6917.     ai AIBOSS3SEEKENEMY
  6918. ends
  6919.  
  6920. state boss3seekenemystate
  6921.   ifrnd 2
  6922.     soundonce BOS3_ROAM
  6923.   else
  6924.     ifactioncount 3
  6925.     {
  6926.       resetactioncount
  6927.       sound BOS1_WALK
  6928.     }
  6929.  
  6930.   ifcansee
  6931.     ifcount 32
  6932.       ifrnd 48
  6933.         ifcanshoottarget
  6934.   {
  6935.     ifrnd 64
  6936.       ifpdistg 4096
  6937.       {
  6938.         ai AIBOSS3RUNENEMY
  6939.         ifspritepal 0
  6940.           break
  6941.         move PALBOSS3RUNVELS seekplayer
  6942.         break
  6943.       }
  6944.  
  6945.     ifp palive
  6946.       ai AIBOSS3LOBENEMY
  6947.   }
  6948. ends
  6949.  
  6950. state boss3dyingstate
  6951.   ifaction ABOSS3DEAD
  6952.   {
  6953.     ifspritepal 0
  6954.       break
  6955.     ifrespawn
  6956.       ifcount RESPAWNACTORTIME
  6957.     {
  6958.       spawn TRANSPORTERSTAR
  6959.       cstat 257
  6960.       strength PIGCOPSTRENGTH
  6961.       state checkboss3seekstate
  6962.     }
  6963.     else
  6964.     {
  6965.       strength 0
  6966.       ifhitweapon
  6967.         ifwasweapon RADIUSEXPLOSION
  6968.       {
  6969.         sound SQUISHED
  6970.         state standard_jibs
  6971.         killit
  6972.       }
  6973.       break
  6974.     }
  6975.   }
  6976.   ifactioncount 8
  6977.   {
  6978.     iffloordistl 8
  6979.       sound THUD
  6980.     action ABOSS3DEAD
  6981.     cstat 0
  6982.     ifspritepal 0
  6983.     endofgame 52
  6984.   }
  6985. ends
  6986.  
  6987. state boss3lobbedstate
  6988.   ifcansee
  6989.   {
  6990.     ifaction ABOSS3LOBBING
  6991.       ifactioncount 2
  6992.     {
  6993.       shoot RPG
  6994.       resetactioncount
  6995.       ifrnd 8
  6996.         ai AIBOSS3SEEKENEMY
  6997.     }
  6998.  
  6999.     ifactioncount 3
  7000.     {
  7001.       action ABOSS3LOBBING
  7002.       resetcount
  7003.     }
  7004.   }
  7005.   else
  7006.     state checkboss3seekstate
  7007. ends
  7008.  
  7009. state checkboss3hitstate
  7010.   ifrnd 2
  7011.     spawn BLOODPOOL
  7012.   ifdead
  7013.   {
  7014.     ifspritepal 0
  7015.       globalsound DUKE_TALKTOBOSSFALL
  7016.     else
  7017.     {
  7018.       ifrnd 64
  7019.         globalsound DUKE_TALKTOBOSSFALL
  7020.       ifwasweapon FREEZEBLAST
  7021.       {
  7022.         sound SOMETHINGFROZE
  7023.         spritepal 1
  7024.         move 0
  7025.         action ABOSS3FROZEN
  7026.         strength 0
  7027.         break
  7028.       }
  7029.     }
  7030.  
  7031.     addkills 1
  7032.     ai AIBOSS3DYING
  7033.  
  7034.     sound BOS3_DYING
  7035.     sound JIBBED_ACTOR9
  7036.  
  7037.   }
  7038.   else
  7039.   {
  7040.     ifrnd 32
  7041.     {
  7042.       action BOSS3FLINTCH
  7043.       move 0
  7044.     }
  7045.  
  7046.     ifspritepal 0 nullop
  7047.     else
  7048.       ifwasweapon SHRINKSPARK
  7049.     {
  7050.       sound ACTOR_SHRINKING
  7051.       ai AIBOSS3PALSHRINK
  7052.       break
  7053.     }
  7054.  
  7055.     soundonce BOS3_PAIN
  7056.  
  7057.     debris SCRAP1 1
  7058.     guts JIBS6 1
  7059.   }
  7060. ends
  7061.  
  7062. state boss3code
  7063.  
  7064.   ifaction ABOSS3FROZEN
  7065.   {
  7066.     ifhitweapon
  7067.     {
  7068.       ifwasweapon FREEZEBLAST
  7069.       {
  7070.         strength 0
  7071.         break
  7072.       }
  7073.  
  7074.       addkills 1
  7075.       lotsofglass 30
  7076.  
  7077.       ifrnd 84
  7078.         spawn BLOODPOOL
  7079.       sound GLASS_BREAKING
  7080.       killit
  7081.     }
  7082.     ifp pfacing
  7083.       ifpdistl FROZENQUICKKICKDIST
  7084.         pkick
  7085.     break
  7086.   }
  7087.   ifai 0
  7088.   {
  7089.     ifspritepal 0
  7090.       ai AIBOSS3RUNENEMY
  7091.     else
  7092.     {
  7093.       strength 1
  7094.       ai AIBOSS3LOBENEMY
  7095.     }
  7096.   }
  7097.   else
  7098.     ifaction BOSS3FLINTCH
  7099.     {
  7100.       ifactioncount 3
  7101.       ai AIBOSS3SEEKENEMY
  7102.     }
  7103.   else
  7104.     ifai AIBOSS3SEEKENEMY
  7105.       state boss3seekenemystate
  7106.   else
  7107.     ifai AIBOSS3RUNENEMY
  7108.       state boss3runenemystate
  7109.   else
  7110.     ifai AIBOSS3LOBENEMY
  7111.       state boss3lobbedstate
  7112.   else
  7113.     ifai AIBOSS3PALSHRINK
  7114.       state boss3palshrunkstate
  7115.  
  7116.   ifai AIBOSS3DYING
  7117.     state boss3dyingstate
  7118.   else
  7119.   {
  7120.     ifhitweapon
  7121.       state checkboss3hitstate
  7122.     else
  7123.       ifp palive
  7124.         ifspritepal 0
  7125.           ifpdistl 1280
  7126.       {
  7127.         addphealth -1000
  7128.         palfrom 63 63
  7129.       }
  7130.   }
  7131. ends
  7132.  
  7133. actor BOSS3 BOSS3STRENGTH fall state boss3code enda
  7134.  
  7135.  
  7136. action ACOMMBREETH  0  3  5  1  40
  7137. action ACOMMFROZEN  0  1  5
  7138. action ACOMMSPIN   -5  1  5  1  12
  7139. action ACOMMGET   0  3  5  1  30
  7140. action ACOMMSHOOT  20  1  5   1 35
  7141. action ACOMMABOUTTOSHOOT 20 1 5 1 30
  7142. action ACOMMDYING  30  8  1  1  12
  7143. action ACOMMDEAD   38  1  1  1  1
  7144.  
  7145.  
  7146. move COMMGETUPVELS 128 -64
  7147. move COMMGETVELS 128 64
  7148. move COMMSLOW 64 24
  7149. move COMMSTOPPED
  7150.  
  7151. ai AICOMMWAIT ACOMMBREETH COMMSTOPPED faceplayerslow
  7152. ai AICOMMGET ACOMMGET COMMGETVELS seekplayer
  7153. ai AICOMMSHOOT ACOMMSHOOT COMMSTOPPED faceplayerslow
  7154. ai AICOMMABOUTTOSHOOT ACOMMABOUTTOSHOOT COMMSTOPPED faceplayerslow
  7155. ai AICOMMSPIN ACOMMSPIN COMMGETVELS spin
  7156. ai AICOMMDYING ACOMMDYING COMMSTOPPED faceplayer
  7157. ai AICOMMSHRUNK ACOMMGET COMMSLOW furthestdir
  7158. ai AICOMMGROW ACOMMGET COMMSTOPPED furthestdir
  7159.  
  7160. state checkcommhitstate
  7161.  
  7162.   ifhitweapon
  7163.   {
  7164.     guts JIBS6 2
  7165.  
  7166.     ifdead
  7167.     {
  7168.       ifwasweapon FREEZEBLAST
  7169.       {
  7170.         sound SOMETHINGFROZE
  7171.         spritepal 1
  7172.         move 0
  7173.         action ACOMMFROZEN
  7174.         strength 0
  7175.         break
  7176.       }
  7177.       else
  7178.         ifwasweapon GROWSPARK
  7179.       {
  7180.         sound ACTOR_GROWING
  7181.         ai AICOMMGROW
  7182.         break
  7183.       }
  7184.  
  7185.       addkills 1
  7186.  
  7187.       ifwasweapon RADIUSEXPLOSION
  7188.       {
  7189.         spawn BLOODPOOL
  7190.         sound SQUISHED
  7191.         state standard_jibs
  7192.         killit
  7193.       }
  7194.       else
  7195.         ifwasweapon RPG
  7196.       {
  7197.         sound SQUISHED
  7198.         spawn BLOODPOOL
  7199.         state standard_jibs
  7200.         killit
  7201.       }
  7202.  
  7203.       sound COMM_DYING
  7204.       ai AICOMMDYING
  7205.     }
  7206.     else
  7207.     {
  7208.       soundonce COMM_PAIN
  7209.       ifwasweapon SHRINKSPARK
  7210.       {
  7211.         sound ACTOR_SHRINKING
  7212.         ai AICOMMSHRUNK
  7213.       }
  7214.       else
  7215.         ifwasweapon GROWSPARK
  7216.           sound EXPANDERHIT
  7217.       else
  7218.         ifrnd 24
  7219.           ai AICOMMABOUTTOSHOOT
  7220.     }
  7221.   }
  7222. ends
  7223.  
  7224. actor COMMANDERSTAYPUT COMMANDERSTRENGTH
  7225.   cactor COMMANDER
  7226.   ai AICOMMABOUTTOSHOOT
  7227. enda
  7228.  
  7229. actor COMMANDER COMMANDERSTRENGTH
  7230.  
  7231.   state checksquished
  7232.  
  7233.   ifaction ACOMMFROZEN
  7234.   {
  7235.     fall
  7236.  
  7237.     ifcount THAWTIME
  7238.     {
  7239.       getlastpal
  7240.       ai AICOMMWAIT
  7241.     }
  7242.     else
  7243.       ifcount FROZENDRIPTIME
  7244.     {
  7245.       ifactioncount 26
  7246.       {
  7247.         spawn WATERDRIP
  7248.         resetactioncount
  7249.       }
  7250.     }
  7251.  
  7252.     ifhitweapon
  7253.     {
  7254.       ifwasweapon FREEZEBLAST
  7255.       {
  7256.         strength 0
  7257.         break
  7258.       }
  7259.       addkills 1
  7260.  
  7261.       ifrnd 84
  7262.         spawn BLOODPOOL
  7263.       lotsofglass 30
  7264.       sound GLASS_BREAKING
  7265.       killit
  7266.     }
  7267.     ifp pfacing
  7268.       ifpdistl FROZENQUICKKICKDIST
  7269.         pkick
  7270.     break
  7271.   }
  7272.   ifai 0
  7273.     ai AICOMMSHOOT
  7274.   else
  7275.     ifai AICOMMWAIT
  7276.   {
  7277.     ifcount 20
  7278.     {
  7279.       ifcansee
  7280.       {
  7281.         ifcanshoottarget
  7282.         {
  7283.           ifrnd 96
  7284.             ai AICOMMGET
  7285.           else
  7286.             ai AICOMMABOUTTOSHOOT
  7287.         }
  7288.       }
  7289.       else
  7290.         ai AICOMMGET
  7291.     }
  7292.   }
  7293.   else
  7294.     ifai AICOMMABOUTTOSHOOT
  7295.   {
  7296.     ifactioncount 2
  7297.     {
  7298.       ifcansee
  7299.         ai AICOMMSHOOT
  7300.       else
  7301.       {
  7302.         ai AICOMMGET
  7303.         break
  7304.       }
  7305.     }
  7306.     ifrnd 32 soundonce COMM_ATTACK
  7307.   }
  7308.   else
  7309.     ifai AICOMMSHOOT
  7310.   {
  7311.     ifcanshoottarget
  7312.     {
  7313.       ifcount 24
  7314.         ifrnd 16
  7315.           ai AICOMMWAIT
  7316.       ifactioncount 2
  7317.       {
  7318.         shoot RPG
  7319.         resetactioncount
  7320.       }
  7321.     }
  7322.     else
  7323.       ai AICOMMGET
  7324.   }
  7325.   else
  7326.     ifai AICOMMSHRUNK
  7327.   {
  7328.     ifcount SHRUNKDONECOUNT
  7329.       ai AICOMMGET
  7330.     else
  7331.       ifcount SHRUNKCOUNT
  7332.         sizeto 48 40
  7333.     else
  7334.       state genericshrunkcode
  7335.   }
  7336.   else
  7337.     ifai AICOMMGROW
  7338.       state genericgrowcode
  7339.   else
  7340.     ifai AICOMMGET
  7341.   {
  7342.     ifnotmoving
  7343.       ifrnd 4
  7344.         operate
  7345.     ifpdistl 1024
  7346.       ifp palive
  7347.     {
  7348.       sound COMM_SPIN
  7349.       ai AICOMMSPIN
  7350.       break
  7351.     }
  7352.  
  7353.     ifcansee
  7354.     {
  7355.       ifp phigher
  7356.         move COMMGETUPVELS getv geth faceplayer
  7357.       else
  7358.         move COMMGETVELS getv geth faceplayer
  7359.     }
  7360.     ifactioncount 8
  7361.       ifrnd 2
  7362.         ai AICOMMABOUTTOSHOOT
  7363.   }
  7364.   else
  7365.     ifai AICOMMSPIN
  7366.   {
  7367.     soundonce COMM_SPIN
  7368.     ifcount 16
  7369.     {
  7370.       ifpdistl 1280
  7371.       {
  7372.         addphealth CAPTSPINNINGPLAYER
  7373.         sound DUKE_GRUNT
  7374.         palfrom 32
  7375.         16 resetcount
  7376.       }
  7377.       else
  7378.         ifpdistg 2300
  7379.           ai AICOMMWAIT
  7380.     }
  7381.     ifactioncount 52
  7382.       ai AICOMMWAIT
  7383.     ifnotmoving
  7384.       ifrnd 32
  7385.         operate
  7386.   }
  7387.  
  7388.   ifai AICOMMDYING
  7389.   {
  7390.     fall
  7391.     strength 0
  7392.  
  7393.     ifhitweapon
  7394.       ifwasweapon RADIUSEXPLOSION
  7395.     {
  7396.       sound SQUISHED
  7397.       spawn BLOODPOOL
  7398.       state standard_jibs
  7399.       killit
  7400.     }
  7401.  
  7402.     ifaction ACOMMDYING
  7403.       ifactioncount 8
  7404.     {
  7405.       iffloordistl 8
  7406.         sound THUD
  7407.       cstat 0
  7408.       action ACOMMDEAD
  7409.     }
  7410.   }
  7411.   else
  7412.   {
  7413.     ifrnd 2
  7414.       soundonce COMM_ROAM
  7415.     state checkcommhitstate
  7416.   }
  7417. enda
  7418.  
  7419.  
  7420. // CANNONBALL for Pirates of the Carribean
  7421. define CANNONBALLSTRENGTH 400
  7422. move CANNONBALL1 512 0
  7423. move CANNONBALL2 512 10
  7424. move CANNONBALL3 512 20
  7425. move CANNONBALL4 512 40
  7426. move CANNONBALL5 512 80
  7427.  
  7428. useractor notenemy CANNONBALL CANNONBALLSTRENGTH
  7429.  
  7430.   ifaction 0
  7431.   {
  7432.     sizeat 32 32
  7433.     cstat 257         // Force actor to block
  7434.     action ANULLACTION
  7435.   }
  7436.  
  7437.     ifactioncount 46
  7438.     {
  7439.       ifactioncount 47 nullop
  7440.       else
  7441.         move CANNONBALL5 geth getv
  7442.     }
  7443.     else
  7444.       ifactioncount 44
  7445.     {
  7446.       ifactioncount 45 nullop
  7447.       else
  7448.         move CANNONBALL4 geth getv
  7449.     }
  7450.     else
  7451.       ifactioncount 40
  7452.     {
  7453.       ifactioncount 41 nullop
  7454.       else
  7455.         move CANNONBALL3 geth getv
  7456.     }
  7457.     else
  7458.       ifactioncount 32
  7459.     {
  7460.       ifactioncount 33 nullop
  7461.       else
  7462.         move CANNONBALL2 geth getv
  7463.     }
  7464.     else
  7465.       ifactioncount 16
  7466.     {
  7467.       ifactioncount 17 nullop
  7468.       else move CANNONBALL1 geth getv
  7469.     }
  7470.  
  7471.   ifnotmoving
  7472.   {
  7473.     spawn EXPLOSION2
  7474.     sound PIPEBOMB_EXPLODE
  7475.     hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7476.     killit
  7477.   }
  7478.  
  7479.   ifhitweapon
  7480.   {
  7481.     ifdead
  7482.     {
  7483.       spawn EXPLOSION2
  7484.       hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7485.       killit
  7486.     }
  7487.     else
  7488.       debris SCRAP1 3
  7489.   }
  7490.  
  7491. enda
  7492.  
  7493.  
  7494. define CANNONBALLS 1818
  7495. define CANNONBALLSSTRENGTH 10
  7496. move CANNONBALLSVEL
  7497.  
  7498. useractor notenemy CANNONBALLS CANNONBALLSSTRENGTH
  7499.   ifaction 0
  7500.   {
  7501.     cstator 257
  7502.     action ANULLACTION
  7503.   }
  7504.   ifhitweapon
  7505.   {
  7506.     ifdead
  7507.     {
  7508.       spawn EXPLOSION2
  7509.       hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7510.       killit
  7511.     }
  7512.     else
  7513.       debris SCRAP1 3
  7514.   }
  7515. enda
  7516.  
  7517.  
  7518. define CANNON 1810
  7519. define CANNONSTRENGTH 400
  7520. action ACANNONWAIT 0 1 7 1 1
  7521. action ACANNONSHOOTING 0 1 7 1 1
  7522. move CANNONSTOP
  7523.  
  7524. useractor enemy CANNON CANNONSTRENGTH // fall
  7525.  
  7526.   ifaction 0
  7527.   {
  7528. //    sizeat 64 64
  7529.     action ACANNONWAIT
  7530.   }
  7531.   else
  7532.     ifaction ACANNONSHOOTING
  7533.   {
  7534.     spawn CANNONBALL
  7535.     action ACANNONWAIT
  7536.   }
  7537.   else
  7538.     ifaction ACANNONWAIT
  7539.   {
  7540.     ifactioncount 64
  7541.     {
  7542.       ifrnd 128
  7543.         action ACANNONSHOOTING
  7544.       else
  7545.         resetactioncount
  7546.     }
  7547.   }
  7548.  
  7549.   ifhitweapon
  7550.   {
  7551.     ifdead
  7552.     {
  7553.       addkills 1
  7554.       hitradius 4096 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
  7555.       spawn EXPLOSION2
  7556.       killit
  7557.     }
  7558.     else debris SCRAP1 3
  7559.   }
  7560.  
  7561.   ifpdistl 1024
  7562.     ifhitspace
  7563.   {
  7564.     ifp pfacing
  7565.       ifcanshoottarget
  7566.         spawn CANNONBALL
  7567.       else break
  7568.   }
  7569. enda
  7570.  
  7571. useractor notenemy HOTMEAT TOUGH
  7572.   ifaction 0
  7573.   {
  7574.     action ANULLACTION
  7575.     cstat 257
  7576.   }
  7577.   ifhitweapon
  7578.   {
  7579.     ifdead
  7580.     {
  7581.       sound SQUISHED
  7582.       guts JIBS5 8
  7583.       guts JIBS6 9
  7584.       killit
  7585.     }
  7586.     else
  7587.       guts JIBS6 1
  7588.   }
  7589.   ifrnd 1
  7590.     spawn WATERDRIP
  7591.  
  7592. enda
  7593.  
  7594. action ASPEAKERBROKE 1
  7595. useractor notenemy SPEAKER
  7596.   ifaction 0
  7597.   {
  7598.     ifhitweapon
  7599.     {
  7600.       stopsound STORE_MUSIC
  7601.       soundonce STORE_MUSIC_BROKE
  7602.       action ASPEAKERBROKE
  7603.     }
  7604.     else
  7605.     {
  7606.       ifpdistl 10240
  7607.           soundonce STORE_MUSIC
  7608.       cstat 289
  7609.     }
  7610.   }
  7611. enda
  7612.  
  7613. action ALAVABUBBLE
  7614. action ALAVABUBBLEANIM 0 5 1 1 16
  7615.  
  7616. useractor notenemy LAVABUBBLE
  7617.   ifaction 0
  7618.   {
  7619.     cstat 32768
  7620.     action ALAVABUBBLE
  7621.   }
  7622.   else
  7623.     ifaction ALAVABUBBLE
  7624.   {
  7625.     ifcount 72
  7626.       ifrnd 2
  7627.     {
  7628.       cstat 0
  7629.       action ALAVABUBBLEANIM
  7630.     }
  7631.   }
  7632.   else
  7633.   {
  7634.     ifactioncount 5
  7635.     {
  7636.       cstat 32768
  7637.       action ALAVABUBBLE
  7638.     }
  7639.   }
  7640. enda
  7641.  
  7642. // RIOT TANK with Pigcop inside
  7643.  
  7644. define TANKSTRENGTH       500      // 2 3 4 5 7 8
  7645. //           off-set, numofframes, numofrot, skipframes, delay
  7646. action ATANKSPIN   0 1 7 1 4
  7647. action ATANKSHOOTING 7 2 7 1 10
  7648. action ATANKWAIT 0 1 7 1 1
  7649. action ATANKDESTRUCT 0 1 7 1 1
  7650. action ATANKDEAD 0 1 7 1 1
  7651. // move TANKVEL horiz vert
  7652. move TANKFORWARD 100
  7653. move TANKSTOP
  7654.  
  7655. useractor enemy TANK TANKSTRENGTH fall
  7656.  
  7657.   ifaction 0
  7658.   {
  7659.     sizeat 60 60
  7660.     action ATANKWAIT
  7661.     cstat 257
  7662.     clipdist 100
  7663.   }
  7664.   else
  7665.     ifaction ATANKSPIN
  7666.   {
  7667.     soundonce TANK_ROAM
  7668.  
  7669.     ifactioncount 20
  7670.     {
  7671.       ifrnd 16
  7672.         ifcansee
  7673.           ifcanshoottarget
  7674.       {
  7675.         move TANKSTOP geth
  7676.         action ATANKSHOOTING
  7677.         stopsound TANK_ROAM
  7678.       }
  7679.     }
  7680.  
  7681.     ifrnd 16
  7682.       move TANKFORWARD seekplayer
  7683.   }
  7684.   else
  7685.     ifaction ATANKSHOOTING
  7686.   {
  7687.     ifactioncount 22
  7688.     {
  7689.       ifpdistg 8192
  7690.       {
  7691.         sound BOS1_ATTACK2
  7692.         shoot MORTER
  7693.       }
  7694.       resetcount
  7695.       move 0 action ATANKWAIT
  7696.     }
  7697.     else
  7698.       ifactioncount 2
  7699.     {
  7700.       ifcansee
  7701.       {
  7702.         ifpdistl 16384
  7703.         {
  7704.           ifrnd 128
  7705.           {
  7706.             sound PISTOL_FIRE
  7707.             shoot SHOTSPARK1
  7708.           }
  7709.         }
  7710.         else
  7711.           ifrnd 128
  7712.         {
  7713.           sound PRED_ATTACK
  7714.           shoot FIRELASER
  7715.         }
  7716.       }
  7717.       else
  7718.       {
  7719.         move TANKFORWARD seekplayer
  7720.         action ATANKSPIN
  7721.       }
  7722.     }
  7723.  
  7724.     ifrnd 16
  7725.     {
  7726.       stopsound TANK_ROAM
  7727.       move TANKSTOP faceplayerslow
  7728.     }
  7729.   }
  7730.   else
  7731.     ifaction ATANKWAIT
  7732.   {
  7733.     ifactioncount 32
  7734.     {
  7735.       move TANKFORWARD seekplayer
  7736.       action ATANKSPIN
  7737.     }
  7738.   }
  7739.   else
  7740.     ifaction ATANKDESTRUCT
  7741.   {
  7742.     ifactioncount 64
  7743.       action ATANKDEAD
  7744.     else
  7745.       ifactioncount 56
  7746.        sound LASERTRIP_ARMING
  7747.      else
  7748.        ifactioncount 48
  7749.          sound LASERTRIP_ARMING
  7750.      else
  7751.        ifactioncount 32
  7752.          sound LASERTRIP_ARMING
  7753.      else
  7754.        ifactioncount 16
  7755.          sound LASERTRIP_ARMING
  7756.      break
  7757.   }
  7758.   else
  7759.     ifaction ATANKDEAD
  7760.   {
  7761.     addkills 1
  7762.     hitradius 6144 TOUGH TOUGH TOUGH TOUGH
  7763.     sound LASERTRIP_EXPLODE
  7764.     debris SCRAP1 15
  7765.     spawn EXPLOSION2
  7766.     ifrnd 128 spawn PIGCOP
  7767.     killit
  7768.   }
  7769.  
  7770.   ifhitweapon
  7771.   {
  7772.     ifdead
  7773.       action ATANKDEAD
  7774.     else
  7775.     {
  7776.       debris SCRAP1 1
  7777.       ifaction ATANKSHOOTING break
  7778.  
  7779.       ifrnd 192
  7780.       {
  7781.         move TANKSTOP geth
  7782.         action ATANKSHOOTING
  7783.         stopsound TANK_ROAM
  7784.       }
  7785.     }
  7786.   }
  7787.  
  7788.   ifpdistl 1280
  7789.     ifhitspace
  7790.       ifp pfacing
  7791.         ifangdiffl 512
  7792.           action ATANKDESTRUCT
  7793. enda
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801. action ABOSS4WALK          0 4  5  1  30
  7802. action ABOSS4DYING        40 9  1  1  20
  7803. action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
  7804. action ABOSS4SHOOT        25 2  5  1  10
  7805. action ABOSS4LAYIT        50 3  5  1  120
  7806. action BOSS4FLINTCH       40 1  1  1  1
  7807. action ABOSS4DEAD         49
  7808.  
  7809. move BOSS4WALKVELS 128
  7810. move BOSS4STOPPED
  7811.  
  7812. ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
  7813. ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
  7814. ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer
  7815.  
  7816. state boss4shootstate
  7817.   ifaction ABOSS4ABOUTTOSHOOT
  7818.     ifactioncount 3
  7819.       action ABOSS4SHOOT
  7820.  
  7821.   ifaction ABOSS4SHOOT
  7822.   {
  7823.     ifcount 48
  7824.     {
  7825.       ifrnd 4
  7826.         ai AIBOSS4LAYEGGS
  7827.     }
  7828.     ifcount 26
  7829.       ifrnd 32
  7830.     {
  7831.       ifrnd 128
  7832.       {
  7833.         sound SHORT_CIRCUIT
  7834.         addphealth -2
  7835.       }
  7836.       else
  7837.       {
  7838.         sound DUKE_GRUNT
  7839.         addphealth -1
  7840.       }
  7841.       palfrom 32 32 0 0
  7842.     }
  7843.   }
  7844.  
  7845. ends
  7846.  
  7847. state boss4layeggs
  7848.   ifrnd 2
  7849.     sound BOS4_ROAM
  7850.  
  7851.   ifaction ABOSS4LAYIT
  7852.   {
  7853.     ifactioncount 3
  7854.       ifcount 32
  7855.     {
  7856.       ai AIBOSS4LAYEGGS
  7857.       ifrnd 32
  7858.         move BOSS4WALKVELS furthestdir geth
  7859.       spawn NEWBEASTHANG
  7860.     }
  7861.   }
  7862.   else
  7863.     ifcount 64
  7864.       ifrnd 4
  7865.   {
  7866.     move 0
  7867.  
  7868.     ifrnd 88
  7869.     {
  7870.       action ABOSS4LAYIT
  7871.       sound BOS4_LAY
  7872.     }
  7873.     else
  7874.       ifp palive
  7875.         ifcansee
  7876.     {
  7877.       ai AIBOSS4SHOOT
  7878.       sound BOS4_ATTACK
  7879.     }
  7880.   }
  7881.  
  7882. ends
  7883.  
  7884. state boss4dyingstate
  7885.   ifaction ABOSS4DEAD
  7886.     break
  7887.   else
  7888.     ifactioncount 9
  7889.   {
  7890.     iffloordistl 8
  7891.       sound THUD
  7892.  
  7893.     endofgame 52
  7894.     action ABOSS4DEAD
  7895.     cstat 0
  7896.   }
  7897. ends
  7898.  
  7899. state checkboss4hitstate
  7900.   ifrnd 2
  7901.     spawn BLOODPOOL
  7902.  
  7903.   ifdead
  7904.   {
  7905.     globalsound DUKE_TALKTOBOSSFALL
  7906.  
  7907.     addkills 1
  7908.     ai AIBOSS4DYING
  7909.  
  7910.     sound BOS4_DYING
  7911.     sound BOSS4_DEADSPEECH
  7912.   }
  7913.   else
  7914.   {
  7915.     soundonce BOS4_PAIN
  7916.     debris SCRAP1 1
  7917.     guts JIBS6 1
  7918.  
  7919.     ifaction ABOSS4LAYIT
  7920.       break
  7921.  
  7922.     ifrnd 16
  7923.     {
  7924.       action BOSS4FLINTCH
  7925.       move 0
  7926.     }
  7927.   }
  7928. ends
  7929.  
  7930. state boss4code
  7931.  
  7932.   ifai 0
  7933.     ai AIBOSS4LAYEGGS
  7934.   else
  7935.     ifaction BOSS4FLINTCH
  7936.     {
  7937.       ifactioncount 3
  7938.         ai AIBOSS4LAYEGGS
  7939.     }
  7940.   else
  7941.     ifai AIBOSS4LAYEGGS
  7942.       state boss4layeggs
  7943.   else
  7944.     ifai AIBOSS4SHOOT
  7945.       state boss4shootstate
  7946.  
  7947.   ifai AIBOSS4DYING
  7948.     state boss4dyingstate
  7949.   else
  7950.   {
  7951.     ifhitweapon
  7952.       state checkboss4hitstate
  7953.     else
  7954.       ifp palive
  7955.         ifpdistl 1280
  7956.       {
  7957.         addphealth -1000
  7958.         palfrom 63 63
  7959.       }
  7960.   }
  7961. ends
  7962.  
  7963. actor BOSS4STAYPUT BOSS4STRENGTH
  7964.  
  7965.   fall
  7966.   cactor BOSS4
  7967.   spritepal 6
  7968.   state boss4code
  7969.   getlastpal
  7970.  
  7971. enda
  7972.  
  7973. actor BOSS4 BOSS4STRENGTH
  7974.  
  7975.   fall
  7976.   cactor BOSS4
  7977.   spritepal 6
  7978.   state boss4code
  7979.   getlastpal
  7980.  
  7981. enda
  7982.  
  7983. action ANEWBEASTSTAND     0
  7984. action ANEWBEASTWALKING   10  4  5  1  12
  7985. action ANEWBEASTRUNNING   10  4  5  1  8
  7986. action ANEWBEASTTHINK     0   2  5  1  40
  7987. action ANEWBEASTSCRATCHING  30  3  5  1  20
  7988. action ANEWBEASTDYING     72  8  1  1  15
  7989. action ANEWBEASTFLINTCH   71  1  1  1  1
  7990. action ANEWBEASTLYINGDEAD 79  1  1
  7991. action ANEWBEASTSCREAM    50  2  5  1  40
  7992. action ANEWBEASTJUMP      80  2  5  1  50
  7993. action ANEWBEASTFALL      90  1  5
  7994. action ANEWBEASTFROZEN    10  1  5
  7995.  
  7996. action ANEWBEASTHANG      0  1  5
  7997. useractor enemy NEWBEASTHANG NEWBEASTSTRENGTH
  7998.   ifaction 0
  7999.   {
  8000.     action ANEWBEASTHANG
  8001.     cstator 257
  8002.  
  8003.     sizeat 40 40
  8004.   }
  8005.   else
  8006.     ifhitweapon
  8007.   {
  8008.     cactor NEWBEAST
  8009.     action ANEWBEASTSTAND
  8010.     sound NEWBEAST_PAIN
  8011.   }
  8012.   else
  8013.     ifspawnedby BOSS4
  8014.       ifcount 200
  8015.         ifrnd 1
  8016.   {
  8017.     cactor NEWBEAST
  8018.     action ANEWBEASTSTAND
  8019.     sound NEWBEAST_PAIN
  8020.   }
  8021. enda
  8022.  
  8023. action ANEWBEASTHANGDEAD      -1  1  5
  8024. useractor enemy NEWBEASTHANGDEAD TOUGH
  8025.  
  8026.   ifaction 0
  8027.   {
  8028.     action ANEWBEASTHANGDEAD
  8029.     sizeat 40 40
  8030.     cstator 257
  8031.   }
  8032.   else
  8033.     ifhitweapon
  8034.   {
  8035.     ifdead
  8036.     {
  8037.       state standard_jibs
  8038.       spawn BLOODPOOL
  8039.       sound SQUISHED
  8040.       killit
  8041.     }
  8042.     else
  8043.     {
  8044.       guts JIBS6 1
  8045.       sound SQUISHED
  8046.     }
  8047.   }
  8048. enda
  8049.  
  8050. move NEWBEASTWALKVEL 182
  8051. move NEWBEASTRUNVEL 256
  8052. move NEWBEASTJUMPVEL 264
  8053. move NEWBEASTSTOP
  8054.  
  8055. ai AINEWBEASTGETENEMY ANEWBEASTWALKING NEWBEASTWALKVEL seekplayer
  8056. ai AINEWBEASTDODGE ANEWBEASTRUNNING NEWBEASTRUNVEL dodgebullet
  8057. ai AINEWBEASTCHARGEENEMY ANEWBEASTRUNNING NEWBEASTRUNVEL seekplayer
  8058. ai AINEWBEASTFLEENEMY ANEWBEASTWALKING NEWBEASTWALKVEL fleeenemy
  8059. ai AINEWBEASTSCRATCHENEMY ANEWBEASTSCRATCHING NEWBEASTSTOP faceplayerslow
  8060. ai AINEWBEASTJUMPENEMY ANEWBEASTJUMP NEWBEASTJUMPVEL jumptoplayer
  8061. ai AINEWBEASTTHINK ANEWBEASTTHINK NEWBEASTSTOP
  8062. // ai AINEWBEASTSHRUNK ANEWBEASTWALKING SHRUNKVELS fleeenemy
  8063. ai AINEWBEASTGROW ANEWBEASTSTAND  NEWBEASTSTOP faceplayerslow
  8064. ai AINEWBEASTDYING ANEWBEASTDYING NEWBEASTSTOP faceplayer
  8065. ai AINEWBEASTSHOOT ANEWBEASTSCREAM NEWBEASTSTOP faceplayerslow
  8066. ai AINEWBEASTFLINTCH ANEWBEASTFLINTCH NEWBEASTSTOP faceplayerslow
  8067.  
  8068.  
  8069. state newbeastseekstate
  8070.  
  8071.   ifactornotstayput
  8072.   {
  8073.     ifp palive
  8074.       ifcansee
  8075.         ifpdistl 1596
  8076.     {
  8077.       ai AINEWBEASTSCRATCHENEMY
  8078.       break
  8079.     }
  8080.  
  8081.     ifai AINEWBEASTCHARGEENEMY
  8082.     {
  8083.       ifp palive
  8084.         ifpdistl 1596
  8085.           ifcansee
  8086.       {
  8087.         ai AINEWBEASTSCRATCHENEMY
  8088.         break
  8089.       }
  8090.  
  8091.       ifrnd 1
  8092.         ifpdistg 4096
  8093.           ifp palive
  8094.             ifcansee
  8095.       {
  8096.         ai AINEWBEASTSHOOT
  8097.         break
  8098.       }
  8099.     }
  8100.     else
  8101.       ifpdistg 4096
  8102.     {
  8103.       ai AINEWBEASTCHARGEENEMY
  8104.       break
  8105.     }
  8106.  
  8107.     iffloordistl 16
  8108.     {
  8109.       ifcount 32
  8110.         ifrnd 16
  8111.       {
  8112.         ifceilingdistl 96 break
  8113.         ai AINEWBEASTJUMPENEMY
  8114.       }
  8115.       break
  8116.     }
  8117.  
  8118.     ifrnd 4
  8119.     {
  8120.       ifnotmoving
  8121.         operate
  8122.     }
  8123.     else
  8124.       ifrnd 16
  8125.         ifbulletnear
  8126.     {
  8127.       ifgapzl 128
  8128.         ai AINEWBEASTDODGE
  8129.       else
  8130.         ifactornotstayput
  8131.       {
  8132.         ifrnd 128
  8133.         {
  8134.           ifceilingdistl 96 break
  8135.           ai AINEWBEASTJUMPENEMY
  8136.         }
  8137.         else
  8138.           ai AINEWBEASTDODGE
  8139.       }
  8140.     }
  8141.   }
  8142.   else
  8143.   {
  8144.     ifactioncount 16
  8145.     {
  8146.       ifp palive
  8147.         ifpdistl 1596
  8148.           ifcansee
  8149.       {
  8150.         ai AINEWBEASTSCRATCHENEMY
  8151.         break
  8152.       }
  8153.     }
  8154.     ifcount 16
  8155.       ifrnd 32
  8156.         move NEWBEASTWALKVEL randomangle geth
  8157.   }
  8158.  
  8159. ends
  8160.  
  8161. /*
  8162. state newbeastshrunkstate
  8163.   ifcount SHRUNKDONECOUNT
  8164.     ai AINEWBEASTGETENEMY
  8165.   else
  8166.     ifcount SHRUNKCOUNT
  8167.       sizeto 48 40
  8168.   else
  8169.     state genericshrunkcode
  8170. ends
  8171. */
  8172.  
  8173. state newbeastfleestate
  8174.   ifcount 8
  8175.   {
  8176.     ifrnd 64
  8177.       ifpdistg 3500
  8178.         ifp palive
  8179.           ifcansee
  8180.             ai AINEWBEASTSHOOT
  8181.   }
  8182.   else
  8183.   {
  8184.     iffloordistl 16
  8185.     {
  8186.       ifnotmoving
  8187.         ai AINEWBEASTGETENEMY
  8188.     }
  8189.     else
  8190.       ai AINEWBEASTGETENEMY
  8191.     break
  8192.   }
  8193. ends
  8194.  
  8195. state newbeastthinkstate
  8196.  
  8197.   ifrnd 8
  8198.     soundonce NEWBEAST_ROAM
  8199.  
  8200.   ifactioncount 3
  8201.   {
  8202.     ifrnd 128
  8203.     {
  8204.       ifpdistg 3500
  8205.         ifp palive
  8206.           ifcansee
  8207.             ai AINEWBEASTSHOOT
  8208.     }
  8209.     else
  8210.       ai AINEWBEASTGETENEMY
  8211.   }
  8212.  
  8213.   ifrnd 16
  8214.     ifbulletnear
  8215.   {
  8216.     ifgapzl 96
  8217.       ai AINEWBEASTDODGE
  8218.     else
  8219.     {
  8220.       ifrnd 128
  8221.       {
  8222.         ifceilingdistl 144 break
  8223.         ai AINEWBEASTJUMPENEMY
  8224.       }
  8225.       else
  8226.         ai AINEWBEASTDODGE
  8227.     }
  8228.   }
  8229. ends
  8230.  
  8231. state newbeastscratchstate
  8232.   ifcount 20
  8233.     ifrnd 8
  8234.   {
  8235.     ifcansee
  8236.       ifpdistl 2048
  8237.     {
  8238.       ifrnd 128
  8239.         ai AINEWBEASTFLEENEMY
  8240.       break
  8241.     }
  8242.     ifrnd 80
  8243.       ai AINEWBEASTTHINK
  8244.     else
  8245.       ai AINEWBEASTGETENEMY
  8246.   }
  8247.  
  8248.   ifactioncount 3
  8249.   {
  8250.     ifpdistg 1596
  8251.       ai AINEWBEASTTHINK
  8252.     else ifp palive ifcansee
  8253.     {
  8254.       palfrom 16 16
  8255.       addphealth NEWBEASTSCRATCHAMOUNT
  8256.       sound DUKE_GRUNT
  8257.       resetactioncount
  8258.       resetcount
  8259.     }
  8260.   }
  8261.   else
  8262.     ifcount 15
  8263.       nullop
  8264.   else
  8265.     ifcount 14
  8266.   {
  8267.     ifpdistl 1596
  8268.       soundonce NEWBEAST_ATTACK
  8269.     else
  8270.       soundonce NEWBEAST_ATTACKMISS
  8271.   }
  8272. ends
  8273.  
  8274. state checknewbeasthit
  8275.   spawn BLOOD
  8276. /*
  8277.   ifai AINEWBEASTSHRUNK
  8278.   {
  8279.     addkills 1
  8280.     sound SQUISHED
  8281.     state standard_jibs
  8282.     killit
  8283.   }
  8284. */
  8285.   ifdead
  8286.   {
  8287.     ifwasweapon FREEZEBLAST
  8288.     {
  8289.       sound SOMETHINGFROZE
  8290.       spritepal 1
  8291.       move 0
  8292.       action ANEWBEASTFROZEN
  8293.       strength 0
  8294.       break
  8295.     }
  8296.  
  8297.     ifwasweapon GROWSPARK
  8298.     {
  8299.       cstat 0
  8300.       sound ACTOR_GROWING
  8301.       ai AINEWBEASTGROW
  8302.       break
  8303.     }
  8304.  
  8305.     addkills 1
  8306.  
  8307.     ifwasweapon RPG
  8308.     {
  8309.       sound SQUISHED
  8310.       state liz_body_jibs
  8311.       state standard_jibs
  8312.       killit
  8313.     }
  8314.     else
  8315.       ifwasweapon RADIUSEXPLOSION
  8316.     {
  8317.       sound SQUISHED
  8318.       state liz_body_jibs
  8319.       state standard_jibs
  8320.       killit
  8321.     }
  8322.     else
  8323.     {
  8324.       state rf
  8325.       ai AINEWBEASTDYING
  8326.       ifrnd 64
  8327.         spawn BLOODPOOL
  8328.     }
  8329.     sound NEWBEAST_DYING
  8330.   }
  8331.   else
  8332.   {
  8333.     sound NEWBEAST_PAIN
  8334.     ifwasweapon GROWSPARK
  8335.       sound EXPANDERHIT
  8336. /*
  8337. //  The alien is immune to the shrinker
  8338.     ifwasweapon SHRINKSPARK
  8339.     {
  8340.       sound ACTOR_SHRINKING
  8341.       ai AINEWBEASTSHRUNK
  8342.       break
  8343.     }
  8344. */
  8345.     state random_wall_jibs
  8346.     ifrnd 32
  8347.       ai AINEWBEASTFLINTCH
  8348.     else
  8349.       ifrnd 32
  8350.         ifpdistg 3500
  8351.           ifp palive
  8352.             ifcansee
  8353.               ai AINEWBEASTSHOOT
  8354.   }
  8355. ends
  8356.  
  8357. state newbeastjumpstate
  8358.   ifaction ANEWBEASTFALL
  8359.   {
  8360.     iffloordistl 16
  8361.       ai AINEWBEASTGETENEMY
  8362.   }
  8363.   else
  8364.     ifcount 32
  8365.       action ANEWBEASTFALL
  8366. ends
  8367.  
  8368. state newbeastdyingstate
  8369.   ifaction ANEWBEASTLYINGDEAD
  8370.   {
  8371.     strength 0
  8372.     ifhitweapon
  8373.       ifwasweapon RADIUSEXPLOSION
  8374.     {
  8375.       sound SQUISHED
  8376.       state standard_jibs
  8377.       killit
  8378.     }
  8379.     ifcount RESPAWNACTORTIME
  8380.       ifrespawn
  8381.     {
  8382.       spawn TRANSPORTERSTAR
  8383.       cstat 257
  8384.       strength NEWBEASTSTRENGTH
  8385.       ai AINEWBEASTGETENEMY
  8386.     }
  8387.   }
  8388.   else
  8389.     ifai AINEWBEASTDYING
  8390.       ifactioncount 7
  8391.   {
  8392.     iffloordistl 8
  8393.       sound THUD
  8394.     move NEWBEASTSTOP
  8395.     action ANEWBEASTLYINGDEAD
  8396.   }
  8397. ends
  8398.  
  8399. state newbeastdodgestate
  8400.   ifcount 13
  8401.     ai AINEWBEASTGETENEMY
  8402. ends
  8403.  
  8404. useractor enemystayput NEWBEASTSTAYPUT NEWBEASTSTRENGTH ai AINEWBEASTGETENEMY cstator 257 cactor NEWBEAST enda
  8405. useractor enemy NEWBEASTJUMP NEWBEASTSTRENGTH ai AINEWBEASTJUMPENEMY cstator 257 cactor NEWBEAST enda
  8406.  
  8407. state newbeastcode
  8408.   state checksquished
  8409.   ifai 0
  8410.   {
  8411.     cstator 257
  8412.     ai AINEWBEASTGETENEMY
  8413.   }
  8414.   else
  8415.     ifaction ANEWBEASTLYINGDEAD
  8416.   {
  8417.     fall
  8418.     state newbeastdyingstate
  8419.     break
  8420.   }
  8421.   else
  8422.     ifaction ANEWBEASTFROZEN
  8423.   {
  8424.     ifcount THAWTIME
  8425.     {
  8426.       ai AINEWBEASTGETENEMY
  8427.       spritepal 0
  8428.     }
  8429.     else
  8430.       ifcount FROZENDRIPTIME
  8431.     {
  8432.       ifactioncount 26
  8433.       {
  8434.         spawn WATERDRIP
  8435.         resetactioncount
  8436.       }
  8437.     }
  8438.  
  8439.     ifhitweapon
  8440.     {
  8441.       ifwasweapon FREEZEBLAST
  8442.       {
  8443.         strength 0
  8444.         break
  8445.       }
  8446.       addkills 1
  8447.  
  8448.       ifrnd 84
  8449.         spawn BLOODPOOL
  8450.       lotsofglass 30
  8451.       sound GLASS_BREAKING
  8452.       killit
  8453.     }
  8454.     ifp pfacing
  8455.       ifpdistl FROZENQUICKKICKDIST
  8456.         pkick
  8457.     break
  8458.   }
  8459.   else
  8460.     ifai AINEWBEASTJUMPENEMY
  8461.       state newbeastjumpstate
  8462.   else
  8463.   {
  8464.     fall
  8465.     ifai AINEWBEASTGETENEMY
  8466.       state newbeastseekstate
  8467.     else
  8468.       ifai AINEWBEASTCHARGEENEMY
  8469.         state newbeastseekstate
  8470.     else
  8471.       ifai AINEWBEASTFLINTCH
  8472.     {
  8473.       ifcount 8
  8474.         ai AINEWBEASTGETENEMY
  8475.     }
  8476.  
  8477.     else
  8478.       ifai AINEWBEASTDODGE
  8479.         state newbeastdodgestate
  8480.     else
  8481.       ifai AINEWBEASTSCRATCHENEMY
  8482.         state newbeastscratchstate
  8483.     else
  8484.       ifai AINEWBEASTFLEENEMY
  8485.         state newbeastfleestate
  8486.     else
  8487.       ifai AINEWBEASTTHINK
  8488.         state newbeastthinkstate
  8489. /*
  8490.     else
  8491.       ifai AINEWBEASTSHRUNK
  8492.         state newbeastshrunkstate
  8493. */
  8494.     else
  8495.       ifai AINEWBEASTGROW
  8496.         state genericgrowcode
  8497.     else
  8498.       ifai AINEWBEASTDYING
  8499.         state newbeastdyingstate
  8500.     else
  8501.       ifai AINEWBEASTSHOOT
  8502.     {
  8503.       ifp pshrunk
  8504.         ai AINEWBEASTGETENEMY
  8505.       else
  8506.         ifcount 26
  8507.           ai AINEWBEASTGETENEMY
  8508.       else
  8509.         ifcount 25
  8510.           shoot SHRINKER
  8511.       else
  8512.       {
  8513.         ifcount 5
  8514.           nullop
  8515.         else
  8516.           ifcount 4
  8517.             sound NEWBEAST_SPIT
  8518.       }
  8519.     }
  8520.   }
  8521.  
  8522.   ifhitweapon
  8523.     state checknewbeasthit
  8524. ends
  8525.  
  8526.  
  8527. useractor enemy NEWBEAST NEWBEASTSTRENGTH
  8528.   fall
  8529.   ifaction 0
  8530.   {
  8531.     cstator 257
  8532.     sizeat 40 40
  8533.     ai AINEWBEASTDODGE
  8534.   }
  8535.   ifaction ANEWBEASTFROZEN
  8536.     state newbeastcode
  8537.   else
  8538.   {
  8539.     spritepal 6
  8540.     state newbeastcode
  8541.     ifaction ANEWBEASTFROZEN
  8542.       break
  8543.     getlastpal
  8544.   }
  8545. enda
  8546.  
  8547.