
/*
--------------------------------------------------------------------------------
Redneck Rampage GAME.CON file.
--------------------------------------------------------------------------------

IMPORTANT NOTICE IF YOU USE MODIFIED .CON FILES

If you are playing a MULTIPLAY game and you are using 
*modified* .CON files then each multiplayer must be 
using the EXACT SAME .CON files, or the game will
get out of sync and/or develop interesting problems.

Xatrix encourages you to experiment freely with the parameters
contained in this file, and to share your discoveries with the rest
of the world.  However, BE ADVISED that Xatrix does NOT offer 
any technical support on how to use this file or other user-modifiable 
features of this game.  Do NOT call Xatrix or Interplay 
for advice or help with this subject.  

You make modifications to this and other files at your own risk. 
It is recommended that you first make a backup copy of this, or
any .CON files before making any changes.
--------------------------------------------------------------------------------
*/

include DEFS.CON
include USER.CON

action ANULLACTION 0

// Play a randomly chosen sound or phrase
state jib_sounds
  ifrnd SWEARFREQUENCY
  {
    ifrnd 128
    {
      ifrnd 128
      {
        ifrnd 128
        {
          ifrnd 128
          {
            ifrnd 128
              globalsound JIBBED_ACTOR12
            else
              globalsound JIBBED_ACTOR1
          }
          else
            globalsound JIBBED_ACTOR9
        }
        else
        {
          ifrnd 128
            globalsound SMACKED
          else
            globalsound JIBBED_ACTOR2
        }
      }
      else
      {
        ifrnd 128
          globalsound MDEVSPEECH
        else
          globalsound JIBBED_ACTOR5
      }
    }
    else
    {
      ifrnd 128
      {
        ifrnd 128
        {
          ifrnd 128
            globalsound JIBBED_ACTOR11
          else
            globalsound JIBBED_ACTOR13
        }
        else
        {
          ifrnd 128
            globalsound JIBBED_ACTOR3
          else
            globalsound JIBBED_ACTOR8
        }
      }
      else
      {
        ifrnd 128
        {
          ifrnd 128
            globalsound JIBBED_ACTOR6
          else
            globalsound JIBBED_ACTOR4
        }
        else
        {
          ifrnd 128
            globalsound JIBBED_ACTOR10
          else
            globalsound JIBBED_ACTOR7
        }
      }
    }
  }
ends

// Display a nice gory selection of
// splashing blood, and body parts
state standard_jibs
  guts JIBS2 1
  guts JIBS3 2
  guts JIBS4 3
  guts JIBS5 2
  guts JIBS6 3
  ifrnd 6
  {
    guts JIBS1 1
    spawn BLOODPOOL
  }         // spine
  state jib_sounds
ends

move RESPAWN_ACTOR_FLAG

state jibfood
  sound SQUISHED
  guts JIBS6 3
  killit
ends

state rf
  ifrnd 128
    cstat 4
  else
    cstat 0
ends

state nf
  cstat 0
ends

state bf
  cstat 0
ends


// this code controls what happens when 
// specified actors are hit by a weapon
state breakobject
  ifaction 0
  {
    action ANULLACTION
    cstator 257
  }

  ifhitweapon
  {
    ifdead
    {
      ifactor FOODOBJECT6
        state jibfood
      else
        ifactor FOODOBJECT11
          state jibfood
      else
        ifactor FOODOBJECT12
          state jibfood
      else
        ifactor FOODOBJECT13
          state jibfood
      else
        ifactor FOODOBJECT14
          state jibfood
      else
        ifactor FOODOBJECT15
          state jibfood
      else
        ifactor FOODOBJECT16
          state jibfood
      else
        ifactor FOODOBJECT17
          state jibfood
      else
      {
        ifrnd 128
          sound GLASS_BREAKING
        else
          sound GLASS_HEAVYBREAK
      }

      else
      {
        lotsofglass 10
        debris SCRAP4 3
      }
      killit
    }
  }
  else
  {
    else
      ifactor FOODOBJECT2
        nullop
    else
      ifactor FOODOBJECT6
        nullop
    else
      fall
  }


ends


// All of these actors can be shot and
//  will do different things based on
//  the code in state breakobject listed above

useractor notenemy MOP WEAK state breakobject enda

useractor notenemy BROOM WEAK state breakobject enda

useractor notenemy WETFLOOR WEAK state breakobject enda

useractor notenemy PLEASEWAIT state breakobject enda

useractor notenemy FOODOBJECT1 WEAK state breakobject enda

useractor notenemy FOODOBJECT2 WEAK state breakobject enda

useractor notenemy FOODOBJECT3 WEAK state breakobject enda

useractor notenemy FOODOBJECT4 WEAK state breakobject enda

useractor notenemy FOODOBJECT5 WEAK state breakobject enda

useractor notenemy FOODOBJECT6 WEAK state breakobject enda

useractor notenemy FOODOBJECT7 WEAK state breakobject enda

useractor notenemy FOODOBJECT8 WEAK state breakobject enda

useractor notenemy FOODOBJECT9 WEAK state breakobject enda

useractor notenemy FOODOBJECT10 WEAK state breakobject enda

useractor notenemy FOODOBJECT11 WEAK state breakobject enda

useractor notenemy FOODOBJECT12 WEAK state breakobject enda

useractor notenemy FOODOBJECT13 WEAK state breakobject enda

useractor notenemy FOODOBJECT14 WEAK state breakobject enda

useractor notenemy FOODOBJECT15 WEAK state breakobject enda

useractor notenemy FOODOBJECT16 WEAK state breakobject enda

useractor notenemy FOODOBJECT17 WEAK state breakobject enda

useractor notenemy FOODOBJECT18 WEAK state breakobject enda

useractor notenemy FOODOBJECT19 WEAK state breakobject enda

useractor notenemy FOODOBJECT20 WEAK state breakobject enda



action BURNING_FLAME  0   12   1   1   2
move BURNING_VELS 

state burningstate

  sleeptime 300


  ifspawnedby BURNING
  {
    ifgapzl 16
      break
  }
  else
    ifspawnedby BURNING2
  {
    ifgapzl 16
      break
  }

  ifpdistg 10240
    break

  ifcount 128
  {
    ifspawnedby TIRE
    {
      ifactioncount 512
        killit
      ifrnd 16
        sizeto 64 48
    }
    else
    {
      sizeto 8 8
      sizeto 8 8
      ifcount 192
        killit
    }
  }
  else
  {
    ifmove 0
      move BURNING_VELS

    sizeto 52 52

    ifp palive
      ifpdistl 844
        ifrnd 32
          ifcansee
    {
      soundonce LNRD_LONGTERM_PAIN
      addphealth -1
      palfrom 24 16
    }
  }

ends

actor BURNING WEAK BURNING_FLAME
  state burningstate
enda

actor BURNING2 WEAK BURNING_FLAME
  state burningstate
enda


state steamcode
  ifpdistl 8192
    soundonce STEAM_HISSING

  ifcount 20
    {
      resetcount
      ifp palive
        ifpdistl 1024
      {
        addphealth -1
        palfrom 16 16
      }
    }
  else
  {
    ifspawnedby STEAM
      break
    else
      ifspawnedby CEILINGSTEAM
        break

    sizeto 24 24
  }
ends

action STEAMFRAMES    0     5     1     1     1
actor STEAM 0 STEAMFRAMES
  state steamcode
enda

actor CEILINGSTEAM 0 STEAMFRAMES
  state steamcode
enda

actor WATERBUBBLEMAKER 0 0 randomangle
  ifpdistl 3084
    ifrnd 24
      spawn WATERBUBBLE
enda

action BUBBLE
action CRACKEDBUBBLE  1
move BUBMOVE       -10 -36
move BUBMOVEFAST     -10 -52

actor WATERBUBBLE 0 BUBBLE BUBMOVE getv geth randomangle

  ifaction CRACKEDBUBBLE
  {
    ifinwater
      ifrnd 192
        killit
    ifactioncount 7
      killit
  }
  else
  {
    ifcount 4
    {
      ifrnd 192
        move BUBMOVE getv geth randomangle
      else
        move BUBMOVEFAST getv geth randomangle
      resetcount
    }

    ifonwater
    {
      iffloordistl 8
        action CRACKEDBUBBLE
    }
    else
      ifactioncount 40
        action CRACKEDBUBBLE
  }
enda


move SMOKEVEL 8 -16
move ENGINE_SMOKE 64 -64
move SMOKESHOOTOUT -192
action SMOKEFRAMES 0 4 1 1 10

actor SMALLSMOKE 0 SMOKEFRAMES
  ifmove 0
  {
    ifspawnedby RECON
      move SMOKESHOOTOUT geth
    else
      ifspawnedby SECTOREFFECTOR
        move ENGINE_SMOKE geth getv
    else
      move SMOKEVEL geth getv faceplayer
    ifspawnedby CROSSBOW
      cstat 2
  }
  ifpdistl 1596
    ifspawnedby CROSSBOW
      killit
  ifactioncount 4
    killit
enda

move SPAWNED_BLOOD

state random_ooz
  ifrnd 128
    spawn OOZ2
  else
    spawn OOZ
ends

action EXPLOSION_FRAMES 0 20 1 1  4
actor EXPLOSION2 1 EXPLOSION_FRAMES
  ifactioncount 20
    killit
enda

actor EXPLOSION2BOT 1 EXPLOSION_FRAMES
  ifactioncount 20
    killit
enda

action FFLAME_FR 0 16 1 1 1
action FFLAME    0  1 1 1 1

actor FLOORFLAME 0 FFLAME_FR
  ifaction FFLAME_FR
  {
    ifpdistl 1024
      hitradius 1024 WEAKEST WEAKEST WEAKEST WEAKEST
    ifactioncount 16
      action FFLAME
  }
  ifaction FFLAME
    ifrnd 4
  {
    action FFLAME_FR
    sound CAT_FIRE
    resetactioncount
  }
enda


action RIP_F 0 8 1 1 1
actor FORCERIPPLE 0 RIP_F
  ifactioncount 8
    killit
enda
// This actors animation is used to
// indicate that something is
// being respawned
action TRANSFOWARD 0  6  1  1  2
action TRANSBACK   5  6  1 -1  2
actor TRANSPORTERSTAR 0 TRANSFOWARD
  ifaction TRANSFOWARD
  {
    ifactioncount 6
      action TRANSBACK
  }
  else
    ifactioncount 6
      killit
enda

action BEAMFOWARD  0  4  1  1  9
actor TRANSPORTERBEAM 0 BEAMFOWARD
  sizeto 32 64
  sizeto 32 64
  sizeto 32 64
  ifactioncount 4
    killit
enda


// This is for Juke Box
action ASPEAKERBROKE 1
useractor notenemy SPEAKER
  ifaction 0
  {
    ifhitweapon
    {
      stopsound BAR_MUSIC
      soundonce STORE_MUSIC_BROKE
      action ASPEAKERBROKE
    }
    else
    {
      soundonce BAR_MUSIC
      cstat 257
    }
  }
enda


// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
state getcode
  ifactor ECLAIRHEALTH
    globalsound GETECLAIRHEALTH
  else
    globalsound LNRD_GET
  palfrom 16 0 32
  ifrespawn
  {
    move RESPAWN_ACTOR_FLAG
    spawn RESPAWNMARKERRED
    cstat 32768
  }
  else
    killit
ends

// Play a random sound when player
// picks up a weapon
state randgetweapsnds
  ifrnd 64
    globalsound LNRD_GETWEAPON1
  else
    ifrnd 96
      globalsound LNRD_GETWEAPON2
  else
    ifrnd 128
      globalsound LNRD_GETWEAPON3
  else
    ifrnd 140
      globalsound LNRD_GETWEAPON4
  else
    globalsound LNRD_GETWEAPON6
ends

// Play a random sound when player
// picks up a weapon
// Then either setup weapon to be respawned
// OR delete sprite from map
state getweaponcode

  state randgetweapsnds

  palfrom 32 0 32
  ifgotweaponce 1
    break
  ifrespawn
  {
    move RESPAWN_ACTOR_FLAG
    spawn RESPAWNMARKERRED
    cstat 32768
  }
  else
    killit
ends

// if count > RESPAWNITEMTIME
// Play the TRANSPORTERSTAR animation with
// the TELEPORTER sound effect
state respawnit
  ifcount RESPAWNITEMTIME
  {
    spawn TRANSPORTERSTAR
    move 0
    cstat 0
    sound TELEPORTER
  }
ends

// Play a sound when player picks up item
// then delete sprite from map
state quikget
  ifactor ECLAIRHEALTH
    globalsound GETECLAIRHEALTH
  else
    globalsound LNRD_GET
  palfrom 16 0 32
  killit
ends

// Play a sound from randgetweapsnds
// then delete sprite from map
state quikweaponget
  state randgetweapsnds
  palfrom 32 0 32
  ifgotweaponce 1
    break
  killit
ends

// Moonshine make the player faster, stronger,
// and less susceptable to damage.
// Studies have proven this to be true
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor MOONSHINE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else ifp palive
    ifcount 6
      ifpdistl RETRIEVEDISTANCE
        ifpinventory GET_MOONSHINE MOONSHINE_AMOUNT
          ifcanseetarget
          {
             addinventory GET_MOONSHINE MOONSHINE_AMOUNT
             quote 37
             ifspawnedby MOONSHINE
                state getcode
             else
                state quikget
          }
enda

// Boots are used to walk through toxic water
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor BOOTS
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifcount 6
        ifpdistl RETRIEVEDISTANCE
          ifpinventory GET_BOOTS BOOT_AMOUNT
            ifcanseetarget
            {
               addinventory GET_BOOTS BOOT_AMOUNT
               quote 6
               ifspawnedby BOOTS
                  state getcode
               else
                  state quikget
            }
enda

actor MOONPIE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifcount 6
        ifpdistl RETRIEVEDISTANCE
          ifpinventory GET_MOONPIE MOONPIE_AMOUNT
            ifcanseetarget
            {
               addinventory GET_MOONPIE MOONPIE_AMOUNT
               quote 88
               ifspawnedby MOONPIE
                  state getcode
               else
                  state quikget
            }
enda

actor BEER
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifcount 6
        ifpdistl RETRIEVEDISTANCE
          ifpinventory GET_BEER BEER_AMOUNT
            ifcanseetarget
            {
               addinventory GET_BEER BEER_AMOUNT
               quote 91
               ifspawnedby BEER
                  state getcode
               else
                  state quikget
            }
enda

// Allows player to breathe under water
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor AIRTANK
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifcount 6
        ifpdistl RETRIEVEDISTANCE
          ifpinventory GET_SCUBA SCUBA_AMOUNT
            ifcanseetarget
            {
              addinventory GET_SCUBA SCUBA_AMOUNT
              quote 39
              ifspawnedby AIRTANK
                state getcode
              else
                state quikget
            }
enda

// Keys are used to open locked doors
// that lead into different levels of the
// map
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor DOORKEY
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            ifpinventory GET_KEYS 0
              break
            addinventory GET_KEYS 1
            quote 43
            state getcode
          }
enda

// Extra ammo for CASUL
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor AMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            addammo CASUL_WEAPON CASULAMMOAMOUNT
            quote 65
            ifspawnedby AMMO
              state getcode
            else
              state quikget
          }
enda

// Extra ammo for shotgun
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor SHOTGUNAMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifcount 6
        ifpdistl RETRIEVEDISTANCE
          ifcanseetarget
          {
            addammo SHOTGUN_WEAPON SHOTGUNAMMOAMOUNT
            quote 69
            ifspawnedby SHOTGUNAMMO
              state getcode
            else
              state quikget
          }
enda

// Extra ammo for CASUL
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor AMMOLOTS
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifcount 6
        ifpdistl RETRIEVEDISTANCE
          ifcanseetarget
          {
            addammo CASUL_WEAPON 48
            quote 65
            ifspawnedby AMMOLOTS
              state getcode
            else
              state quikget
          }
enda

// Extra ammo
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor BATTERYAMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            addammo AK47_WEAPON AK47AMMOAMOUNT
            quote 63
            ifspawnedby BATTERYAMMO
              state getcode
            else
              state quikget
          }
enda

// IF NOT USED LATER, DELETE
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor ALIENBLASTERAMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            addammo ALIENBLASTER_WEAPON ALIENBLASTERAMMOAMOUNT
            quote 14
           ifspawnedby ALIENBLASTERAMMO
             state getcode
           else
             state quikget
          }
enda

// IF NOT USED LATER, DELETE
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor CROSSBOWAMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp pshrunk nullop
    else ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
      {
        addammo CROSSBOW_WEAPON CROSSBOWAMMOBOX
        quote 64
        ifspawnedby CROSSBOWAMMO
          state getcode
        else
          state quikget
      }
enda

// Extra Dynamite ammo
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor HBOMBAMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            ifgotweaponce 0
               break

            addweapon DYNAMITE_WEAPON DYNAMITEBOX
            quote 55

            ifspawnedby HBOMBAMMO
              state getweaponcode
            else
              state quikweaponget
          }
enda

// IF NOT USED LATER, DELETE
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor CROSSBOWSPRITE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            ifgotweaponce 0
              break

            addweapon CROSSBOW_WEAPON CROSSBOWAMMOBOX
            quote 56
            ifspawnedby CROSSBOWSPRITE
              state getweaponcode
            else
              state quikweaponget
          }
enda


// Shotgun for player to pick up
//  either placed on level by designers
//  OR spawned by Billy 
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor SHOTGUNSPRITE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            // randomly set how much
            // ammo shotgun has
            ifspawnedby BILLYRAY
            {
              addweapon SHOTGUN_WEAPON 0
              ifrnd 64
                addammo SHOTGUN_WEAPON 4
              else ifrnd 64
                addammo SHOTGUN_WEAPON 4
              else ifrnd 64
                addammo SHOTGUN_WEAPON 2
              else
                addammo SHOTGUN_WEAPON 2
            }
            else
            {
              ifgotweaponce 0
                break
              addweapon SHOTGUN_WEAPON SHOTGUNAMMOAMOUNT
              quote 57
            }

            ifspawnedby SHOTGUNSPRITE
              state getweaponcode
            else
              state quikweaponget
          }
enda


//  Adds thirty points to players health
//  OR if players health is > 70
//  bumps health to 100
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor PORKBALLS
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifphealthl MAXPLAYERHEALTH
            ifcanseetarget
            {
               iseat 10
               quote 62
               ifspawnedby PORKBALLS
                 state getcode
               else
                 state quikget
            }
enda

// Bumps players health up to MAXPLAYERHEALTH
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor ECLAIRHEALTH
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifphealthl MAXPLAYERECLAIRHEALTH
            ifcanseetarget
            {
              addphealth 50
              quote 19
              ifspawnedby ECLAIRHEALTH
                state getcode
              else
                state quikget
            }
enda


// Portable health.  Holds 100 health points
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor WHISKEY
  fall
  ifmove RESPAWN_ACTOR_FLAG state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifpinventory GET_WHISKEY WHISKEY_AMOUNT
            ifcanseetarget
            {
              addinventory GET_WHISKEY WHISKEY_AMOUNT
              quote 3

              ifspawnedby WHISKEY
                state getcode
              else
                state quikget
            }
enda

// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor FIRSTGUNSPRITE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp palive
      ifpdistl RETRIEVEDISTANCE
        ifcount 6
          ifcanseetarget
          {
            ifgotweaponce 0
              break
            addweapon CASUL_WEAPON 48
            ifspawnedby FIRSTGUNSPRITE
              state getweaponcode
            else
              state quikweaponget
          }
enda

// IF NOT USED LATER, DELETE
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor TRIPBOMBSPRITE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp pshrunk nullop
    else
      ifp palive
        ifpdistl RETRIEVEDISTANCE
          ifcount 6
            ifcanseetarget
      {
        ifgotweaponce 0
          break

        addweapon TRIPBOMB_WEAPON 1
        quote 58
        ifspawnedby TRIPBOMBSPRITE
          state getweaponcode
        else
          state quikweaponget
      }
enda

// IF NOT USED LATER, DELETE
// Play a sound when player picks up item
// then delete sprite from map
// OR setup to be respawned
actor AK47SPRITE
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp pshrunk nullop
    else
      ifp palive
        ifpdistl RETRIEVEDISTANCE
          ifcount 6
            ifcanseetarget
      {
        ifgotweaponce 0
          break

        addweapon AK47_WEAPON 50
        quote 54
        ifspawnedby AK47SPRITE
          state getweaponcode
        else
          state quikweaponget
      }
enda

action FIRE_FRAMES   -1 14 1 1 1
move FIREVELS

state firestate

  ifaction 0
    ifrnd 16
    {
      action FIRE_FRAMES
      cstator 128
    }

  sleeptime 300         // Never let it fall to sleep

  ifspawnedby FIRE
  {
    ifgapzl 16
      break
  }
  else
    ifspawnedby FIRE2
  {
    ifgapzl 16
      break
  }

  ifinwater
    killit

  ifp palive
    ifpdistl 844
      ifrnd 32
        ifcansee
  {
    soundonce LNRD_LONGTERM_PAIN
    addphealth -1
    palfrom 32 32
  }

  ifactor FIRE
  {
    ifspawnedby FIRE
      break
  }
  else
    ifactor FIRE2
      ifspawnedby FIRE2
        break

  iffloordistl 128
  {
    ifrnd 128
    {
      ifcount 84
        killit
                // This line(and the else below)
                // is not necessary, since actors
                // with zero x-size are automatically
                // deleted anyway!
      else
        ifcount 42
          sizeto 0 0
      else
        sizeto 32 32
    }
  }
  else
    killit

ends

useractor notenemy FIRE WEAK 0 FIREVELS state firestate enda
useractor notenemy FIRE2 WEAK 0 FIREVELS state firestate enda

actor FECES
  ifcount 24
  {
    ifpdistl RETRIEVEDISTANCE
    {
      ifrnd SWEARFREQUENCY
        soundonce LNRD_STEPONFECES

      sound STEPNIT

      spawn BLOODPOOL   // Will be brown
      killit
    }
  }
  else
    sizeto 32 32
enda

state drop_ammo
  ifrnd SPAWNAMMOODDS
    spawn AMMO
ends

state drop_sgshells
  ifrnd SPAWNAMMOODDS
    spawn SHOTGUNAMMO
ends
state drop_shotgun
  ifrnd SPAWNAMMOODDS
    spawn SHOTGUNSPRITE
ends

state random_wall_jibs
  ifrnd 96
    shoot BLOODSPLAT1
  ifrnd 96
    shoot BLOODSPLAT2
  ifrnd 96
    shoot BLOODSPLAT3
  ifrnd 96
    shoot BLOODSPLAT4
  ifrnd 96
    shoot BLOODSPLAT1
ends

state killme
  ifp pfacing
    ifpdistl 1280
      ifhitspace
        soundonce KILLME
ends

state hulk_body_jibs
  ifrnd 64
    guts HULKHEAD1 1
  ifrnd 64
    guts HULKLEG1 2
  ifrnd 64
    guts HULKARM1 1
  ifrnd 48
    spawn BLOODPOOL
ends


action BLOODFRAMES 0 4 1 1 15
actor BLOOD 0 BLOODFRAMES
  sizeto 72 72 sizeto 72 72 sizeto 72 72
  ifpdistg 3144 killit
  ifactioncount 4 killit
enda

// Weapon actors
actor CROWBAR CROWBAR_WEAPON_STRENGTH enda
actor SPIT SPIT_WEAPON_STRENGTH enda
actor AK47 AK47_WEAPON_STRENGTH enda
actor SHOTGUN SHOTGUN_WEAPON_STRENGTH enda
actor FIRELASER FIRELASER_WEAPON_STRENGTH enda
actor HEAVYHBOMB DYNAMITE_WEAPON_STRENGTH enda
actor BOUNCEMINE BOUNCEMINE_WEAPON_STRENGTH enda
actor MORTER MORTER_WEAPON_STRENGTH enda


actor CROSSBOW CROSSBOW_WEAPON_STRENGTH enda
actor ALIENBLASTERBLAST PLASMATHROWER_WEAPON_STRENGTH enda
actor COOLEXPLOSION1 COOL_EXPLOSION_STRENGTH enda
actor TRIPBOMB TRIPBOMB_STRENGTH enda

action WEAP2FRAMES 0  4  1  1  6
actor SHOTSPARK1 CASUL_WEAPON_STRENGTH WEAP2FRAMES
  ifdead
    killit
  ifactioncount 4
    killit
  else
  {
    ifactioncount 3
    {
      ifinwater
      spawn WATERBUBBLE
    }
    else
      ifcount 2 nullop
      else
        ifonwater
          spawn WATERSPLASH2
  }
enda

include "LEONARD.CON"
include "BILLY.CON"
include "HEN.CON"
include "COOT.CON"
include "MOSQUITO.CON"
// include "COW.CON"
// include "MINION.CON"
// include "HULK.CON"

action ALAVABUBBLE
action ALAVABUBBLEANIM 0 5 1 1 16

useractor notenemy LAVABUBBLE
  ifaction 0
  {
    cstat 32768
    action ALAVABUBBLE
  }
  else
    ifaction ALAVABUBBLE
  {
    ifcount 72
      ifrnd 2
    {
      cstat 0
      action ALAVABUBBLEANIM
    }
  }
  else
  {
    ifactioncount 5
    {
      cstat 32768
      action ALAVABUBBLE
    }
  }
enda



