⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 game.con

📁 game duke3d source
💻 CON
📖 第 1 页 / 共 5 页
字号:
// -------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment

This file is part of Duke Nukem 3D version 1.5 - Atomic Edition

Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/
// -------------------------------------------------------------------------

/*
---------------------------------------------------------------------------

IMPORTANT NOTICE IF YOU USE MODIFIED .CON FILES

If you are playing a MULTIPLAY game (Dukematch or Co-op) and you are
using *modified* .CON files (USER.CON, GAME.CON, DEFS.CON), then each
multiplayer must be using the EXACT SAME .CON files, or the game might
get out of sync and/or develop interesting problems.

3D Realms 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 3D Realms does NOT offer 
any technical support on how to use this file or other user-modifiable 
features of this game.  Do NOT call 3D Realms or Apogee Software 
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

// Below is example code that ADDS enemies/items in Duke Nukem 3D.

// "MYENEMY" is simply a three-framed object bouncing around in random angles
// mindlessly shooting the freeze weapon towards at closest player.
/*
define MYENEMY 3590            // A position in .art file
define MYENEMY_NORMAL_STRENGTH   100
define MYENEMY_TOUGHER_STRENGTH  200
define MYENEMY_DAMAGE_TO_PLAYER  -20

definesound MYENEMY_ROAM   my_eroam.voc   0 0 0 0 0
definesound MYENEMY_HURT   my_ehurt.voc   0 0 0 0 0
definesound MYENEMY_DEAD   my_edead.voc   0 0 0 0 0
definesound MYENEMY_SHOOT  my_eshot.voc   0 0 0 0 0

action MYENEMY_ANIMATIONS  0  3  1  1  4
move MYENEMY_SPEEDS 64

ai AIMYENEMY_BOUNCE   MYENEMY_ANIMATIONS MYENEMY_SPEEDS geth randomangle

useractor enemy MYENEMY

  ifai NO           // 'NO' is defined as '0'
  {               // Prepare(Initialize) MyEnemy for battle...

    // Give 'MYENEMY' strength.  If it
    // has a palette lookup other than
    // 0, make it twice as strong!

    ifspritepal 0
      strength MYENEMY_NORMAL_STRENGTH
    else
      strength MYENEMY_TOUGHER_STRENGTH

    sizeat 48 48      // Set the size of your actor

    cstator 257         // Force actor to block

    ai AIMYENEMY_BOUNCE   // Make it go!

  }

  ifrnd 8
  {

    // Used with keyword 'shoot'.
    // BLOODSPLAT1 ,BLOODSPLAT2 ,BLOODSPLAT3 ,BLOODSPLAT4 ,KNEE ,
    // SHOTSPARK1 ,SHOTGUN ,CHAINGUN ,FIRELASER ,SPIT ,COOLEXPLOSION1 ,
    // FREEZEBLAST ,RPG ,HANDHOLDINGLASER ,BOUNCEMINE ,MORTER ,SHRINKER
    // GROWSPARK

    shoot FREEZEBLAST


    // A sound effect to play for the shooting action.

    sound MYENEMY_SHOOT
  }

  ifcount 48   // if after about a second and a half and...
    ifrnd 16   // if a random value between 0-255 is less than 16...
      ai AIMYENEMY_BOUNCE // reset everything, including all counters

  ifpdistl 1024
    ifrnd 16
  {
    sound DUKE_GRUNT
    palfrom 24 24
    addphealth MYENEMY_DAMAGE_TO_PLAYER
  }

  ifhitweapon         // Was it hit by a weapon?
  {
    debris SCRAP1 2       // OUCH!  Make some peices fall off

    ifdead          // Is it dead yet?
    {             // If so, then...
      addkills 1        //   Add 1 kill to player score
      spawn EXPLOSION2      //   Make an explosion
      sound MYENEMY_DEAD    //   The sound of death

                    // Damage anything within a close distance.
      hitradius 2048 WEAKEST WEAK MEDIUMSTRENGTH TOUGH
      killit          //   Delete sprite (CODE ABORTS HERE)
    }

    sound MYENEMY_HURT    // No?, Make a hurt sound instead
  }
enda
*/



define SPACESHUTTLE 487
move SHUTTLEVELS 16
actor SPACESHUTTLE TOUGH
//  ifmove 0          //  Init once
//    move SHUTTLEVELS getv geth
enda


actor SATELLITE TOUGH
  //  ifmove 0 move SHUTTLEVELS getv geth
  //  ifcount 120 move SHUTTLEVELS getv geth randomangle
enda

state jib_sounds
  ifrnd SWEARFREQUENCY
  {
    ifrnd 128
    {
      ifrnd 128
      {
        ifrnd 128
        {
          ifrnd 128
          {
            ifrnd 128
              globalsound JIBBED_ACTOR12
            else
              globalsound JIBBED_ACTOR1
          }
          else
          {
            ifrnd 128
              globalsound JIBBED_ACTOR9
            else
              globalsound JIBBED_ACTOR14
          }
        }
        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
          {
            ifrnd 128
              globalsound JIBBED_ACTOR10
            else
              globalsound JIBBED_ACTOR15

          }
          else
            globalsound JIBBED_ACTOR7
        }
      }
    }
  }
ends


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
  }         // a badly drawn spine

  state jib_sounds
ends

state genericshrunkcode
  ifcount 32
  {
    ifpdistl SQUISHABLEDISTANCE
    pstomp
  }
  else
  {
    sizeto MINXSTRETCH MINYSTRETCH
    spawn FRAMEEFFECT1
  }
ends

state genericgrowcode
  ifcount 32
  {
    guts JIBS4 24
    guts JIBS6 28
    addkills 1
    sound SQUISHED
    sound PIPEBOMB_EXPLODE
    hitradius 2048 60 70 80 90
    spawn BLOODPOOL
    spawn EXPLOSION2
    killit
  }
  else
  {
    ifactor COMMANDER
      sizeto 100 100
    else
      ifactor SHARK
        sizeto 84 84
    else
      sizeto MAXXSTRETCH MAXYSTRETCH
    break
  }
ends




action ASHARKCRUZING 0 8 5 1 24
action ASHARKFLEE  0 8 5 1 10
action ASHARKATACK   0 8 5 1 6
action ASHARKSHRUNK  0 8 5 1 24
action ASHARKGROW  0 8 5 1 24
action ASHARKFROZEN  0 1 5 1 24

move SHARKVELS 24
move SHARKFASTVELS 72
move SHARKFLEEVELS 40

actor SHARK SHARKSTRENGTH ASHARKCRUZING SHARKVELS randomangle geth
  ifaction ASHARKSHRUNK
  {
    ifcount SHRUNKDONECOUNT
      action ASHARKCRUZING
    else ifcount SHRUNKCOUNT
      sizeto 60 60
    else
      state genericshrunkcode
    break
  }
  else
    ifaction ASHARKGROW
  {
    ifcount SHRUNKDONECOUNT
      action ASHARKCRUZING
    else
      ifcount SHRUNKCOUNT
        sizeto 24 24
    else
      state genericgrowcode
  }
  else
    ifaction ASHARKFROZEN
  {
    fall

    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pkick

    ifcount THAWTIME
    {
      action ASHARKFLEE
      getlastpal
      break
    }
    else
      ifcount FROZENDRIPTIME
        ifactioncount 26
          resetactioncount

    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
        break

      lotsofglass 30
      sound GLASS_BREAKING
      addkills 1
      killit
    }
    break
  }
  else
    ifaction ASHARKFLEE
  {
    ifcount 16
      ifrnd 48
    {
      action ASHARKCRUZING
      move SHARKVELS randomangle geth
    }
  }
  else
    ifaction ASHARKCRUZING
  {
    ifcansee
      ifcount 48
        ifrnd 2
          ifcanshoottarget
    {
      action ASHARKATACK
      move SHARKFASTVELS faceplayerslow getv break
    }
    ifcount 32
      ifnotmoving
    {
      ifrnd 128
        move SHARKVELS randomangle geth
      else
        move SHARKFASTVELS randomangle geth
    }
  }
  else
    ifaction ASHARKATACK
  {
    ifcount 4
    {
      ifpdistl 1280
      {
        ifp palive ifcanshoottarget
        {
          sound DUKE_GRUNT
          palfrom 32 32
          addphealth SHARKBITESTRENGTH
        }
        action ASHARKFLEE
        move SHARKFLEEVELS fleeenemy
      }
    }
    else
      ifnotmoving
    {
      ifcount 32
      {
        action ASHARKCRUZING
        move SHARKVELS randomangle geth
      }
    }
    else
      ifcount 48
        ifrnd 2
    {
      action ASHARKCRUZING
      move SHARKFASTVELS randomangle geth
    }
  }

  ifhitweapon
  {
    ifdead
    {
      ifwasweapon GROWSPARK
      {
        move 0
        cstat 0
        action ASHARKGROW
        sound ACTOR_GROWING
        break
      }
      else
        ifwasweapon FREEZEBLAST
      {
        spritepal 1
        strength 0
        action ASHARKFROZEN
        sound SOMETHINGFROZE
      }
      else
      {
        sound SQUISHED
        guts JIBS6 5
        addkills 1
        killit
      }
    }
    else
    {
      ifwasweapon SHRINKSPARK
      {
        action ASHARKSHRUNK
        sound ACTOR_SHRINKING
        move 0
        break
      }
      else
        ifwasweapon GROWSPARK
          sound EXPANDERHIT

      move SHARKVELS randomangle geth
    }
  }
enda


action BLIMPWAITTORESPAWN

state blimphitstate
  cstat 0
  spawn FIRSTGUNSPRITE
  spawn EXPLOSION2

  debris SCRAP1 40      // Weapons and ammo!
  debris SCRAP2 32
  debris SCRAP3 32
  debris SCRAP4 32
  debris SCRAP5 32

  sound PIPEBOMB_EXPLODE
  ifrespawn
  {
    action BLIMPRESPAWNTIME
    move 0
    cstat 32768
  }
  else
    killit
ends

actor BLIMP 1

  ifaction BLIMPWAITTORESPAWN
  {
    ifcount RESPAWNACTORTIME
    {
      action 0
      cstat 0
      move 0
    }
    break
  }

  ifhitweapon
  {
    ifwasweapon RADIUSEXPLOSION
      state blimphitstate
    ifwasweapon RPG
      state blimphitstate
    strength 1
  }
enda



state rats
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
  ifrnd 128
    spawn RAT
ends

move RESPAWN_ACTOR_FLAG
move MOUSEVELS 32

action RUBCANDENT 1 1 1 1 1

actor RUBBERCAN WEAK
  ifaction RUBCANDENT
  {
    ifactioncount 16
    {
      strength 0
      action ANULLACTION
      break
    }
  }
  else
    ifhitweapon
  {
    ifwasweapon RADIUSEXPLOSION
    {
      state rats
      ifrnd 48
        spawn BURNING
      debris SCRAP3 12
      killit
    }
    else
      action RUBCANDENT
  }
enda

state toughgalspeech
  ifrnd 64
  {
    ifnosounds
      soundonce TOUGHGALSND1
  }
  else
    ifrnd 64
  {
    ifnosounds
      soundonce TOUGHGALSND2
  }
  else
    ifrnd 64
  {
    ifnosounds
      soundonce TOUGHGALSND3
  }
  else
    ifnosounds
      soundonce TOUGHGALSND4
ends

state jibfood
  sound SQUISHED
  guts JIBS6 3
  killit
ends

state breakobject
  ifaction 0
  {
    action ANULLACTION
    cstator 257
    ifactor ROBOTMOUSE
      clipdist 64
  }
  else
    ifactor ROBOTMOUSE
  {
      ifdead
      {
        ifcount 32
        {
          globalsound MOUSEANNOY
          killit
        }
        break
      }
      ifcount 64 ifrnd 6
      {
        ifrnd 128
          move MOUSEVELS randomangle geth
        else
        {
          ifrnd 64
            soundonce HAPPYMOUSESND1
          else
            ifrnd 64
              soundonce HAPPYMOUSESND2
          else
            ifrnd 64
              soundonce HAPPYMOUSESND3
          else
            soundonce HAPPYMOUSESND4
        }
        resetcount
      }
  }

  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
        ifactor SKINNEDCHICKEN
          state jibfood
      else
        ifactor SHOPPINGCART
      {
        debris SCRAP1 5
        debris SCRAP2 5
        debris SCRAP3 5
        sound GLASS_HEAVYBREAK
        killit
      }
      else
        ifactor ROBOTDOG2
      {
        soundonce DEAD_DOG
        guts JIBS2 1
        guts JIBS3 2
        guts JIBS6 3
        killit
      }
      else
        ifactor FEATHEREDCHICKEN
          state jibfood
      else
        ifactor DOLPHIN1
      {
        guts JIBS2 1
        guts JIBS3 2

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -