/*
*****************************************************************************
Armageddon - Gang Wars Demo
What follows is a bunch of new sprites that I've decided to add to AGW, in
order to bring more interaction with the scenaries.
In this demo, the interaction with the scenaries is not fully enhanced
compared with what we've been planing for the full version.

If you want to use some of this code for your own TC, you're allowed(except
for *),since you ask for our permission via e-mail,and include a few lines
we'll give you to insert in your file.

Our mail:
bullgames@portugalmail.pt

This code (c) BullGames 2002 / 2003
[www.bullgames.totalconversions.com]
*Except for the Ladder Effector from Borg Nukem TC (c) by CoolSoftware 2002
[www.borgn.totalconversions.com]

mIg
****************************************************************************
*/

define GARBAGE1 1940
define GARBAGE2 1941
define GARBAGE3 1942
define GARBAGE4 1943

actor GARBAGE1 
        ifhitweapon
        { ifstrength 0 debris SCRAP4 10
        spawn RAT
        spawn RAT
        debris SCRAP4 17
        killit }
enda

actor GARBAGE2 
        ifhitweapon
        { ifstrength 0 debris SCRAP4 15
        spawn RAT
        spawn RAT
        debris SCRAP4 17
        killit }
enda

actor GARBAGE3 
        ifhitweapon
        { ifstrength 0 debris SCRAP4 10
        spawn RAT
        spawn RAT
        debris SCRAP4 17
        killit }
enda

actor GARBAGE4
        ifhitweapon
        { ifstrength 0 debris SCRAP4 10
        spawn RAT
        spawn RAT
        debris SCRAP4 17
        killit }
enda

define WOODBOX1 1825
define WOODBOX2 1826
define WOODBSTRENGTH 30
actor WOODBOX1 WOODBSTRENGTH
ifhitweapon { sound GENERIC_AMBIENCE19 debris SCRAP4 2 }
ifdead
{ soundonce GENERIC_AMBIENCE20 debris SCRAP4 3 killit }
enda

actor WOODBOX2 WOODBSTRENGTH
ifhitweapon { sound GENERIC_AMBIENCE19 debris SCRAP4 2 }
ifdead
{ soundonce GENERIC_AMBIENCE20 debris SCRAP4 3 killit }
enda

define WOODBOX3 1822
define WOODBOX4 1823
define WOODB3STRENGTH 70
actor WOODBOX3 WOODB3STRENGTH
ifhitweapon { sound GENERIC_AMBIENCE19 debris SCRAP4 2 }
ifdead
{ soundonce GENERIC_AMBIENCE20 debris SCRAP4 5 killit }
enda

actor WOODBOX4 WOODB3STRENGTH
ifhitweapon { sound GENERIC_AMBIENCE19 debris SCRAP4 2 }
ifdead
{ soundonce GENERIC_AMBIENCE20 debris SCRAP4 5 killit }
enda

definequote 140 THIS IS WOOD,YOU CAN BREAK IT
define BRKWOOD1 287
define WOODSTRENGTH 69
actor BRKWOOD1 WOODSTRENGTH
ifspritepal 9 { ifpdistl 1500 quote 140 sound GENERIC_AMBIENCE1 }
ifhitweapon { soundonce GENERIC_AMBIENCE19 debris SCRAP4 2 }
ifdead
{ soundonce GENERIC_AMBIENCE20 debris SCRAP4 20 killit }
enda

define WINDOW1 3944
define WINDOW2 3945
define WINDOW3 3946
define WINDOW4 3947
define WINDOW5 3948
define WINDOW6 3949

actor WINDOW1 
ifhitweapon { sound GLASS_BREAKING lotsofglass 9 killit }
enda

actor WINDOW2 
ifhitweapon { sound GLASS_BREAKING lotsofglass 9 killit }
enda

actor WINDOW3
ifhitweapon { sound GLASS_BREAKING lotsofglass 9 killit }
enda

actor WINDOW4 
ifhitweapon { sound GLASS_BREAKING lotsofglass 9 killit }
enda

actor WINDOW5 
ifhitweapon { sound GLASS_BREAKING lotsofglass 9 killit }
enda

actor WINDOW6
ifhitweapon { sound GLASS_BREAKING lotsofglass 9 killit }
enda                                           

/*
**************************************
The burned engine                
by mIg                           
                                 
Note: bug if spawned by enemies, 
still donno why...               
**************************************
*/

define BURNED 3920
define BURNEDEAD 3940

state burned2
ifpdistl 5000
sound DUKE_BREATHING
 ifcount 85
 { spawn BLOODPOOL  
  guts JIBS6 4
  spawn FIRE
  sound THUD
  cactor BURNEDEAD }
ends

actor BURNED
state burned2
ifpdistl 1000
{ palfrom 48 52
sound DUKE_BREATHING
addphealth -1 }

ifwasweapon RADIUSEXPLOSION
        { guts JIBS3 7
          guts JIBS5 2
          guts JIBS6 9
          sound SQUISHED
          spawn FIRE
          killit }

ifwasweapon KNEE { guts JIBS6 1 }
ifwasweapon SHOTSPARK1 { guts JIBS6 1 }
ifwasweapon SHOTGUN { guts JIBS6 1 }

enda

actor BURNEDEAD
ifpdistl 700
{ palfrom 48 52 addphealth -1
sound DUKE_LONGTERM_PAIN spawn FIRE2 }
ifwasweapon RADIUSEXPLOSION
        { guts JIBS3 7
          guts JIBS5 2
          guts JIBS6 9
          sound SQUISHED
          spawn FIRE
          killit }

enda

define EXPLDOOR 2442
define EDOORSTRENGTH 400
definequote 145 YOU CAN BLOW THIS DOOR.
actor EXPLDOOR

ifpdistl 1000
 { ifhitspace sound GENERIC_AMBIENCE14 }
ifspritepal 9 { ifpdistl 1000 quote 145 }

        ifwasweapon RPG
        { debris SCRAP1 30
        debris SCRAP2 17
        killit }

        ifwasweapon RADIUSEXPLOSION
        { debris SCRAP1 30
        debris SCRAP2 17
        killit }

enda

/*
********************************************
this is just a small intro to the ladders
mIg
********************************************
*/

define LADDER 2421
definequote 143 YOU CAN CLIMB LADDERS.

actor LADDER
ifspritepal 9
{ ifpdistl 1200
  quote 143 }
enda

/*
*************************************************************************
The following is
Borg Nukem (C) Copyright 2002 by CoolSoftware.

Following game-code additions have been programmed:
Ladder Effector

The use of this programing has been authorized by Kevin Cools,from
CoolSoftware. 

Extraction by Hanz

We'd like to thanx Kevin for the authorization of using these lines!
Thanx,dude!
BullGames 2003

*************************************************************************
*/


define LADDERSTEP 5121
define LADDERSTEP2 5122

action NOACTIONLAD 0 1 1 1 1  action NOACTIONLAD2 0 1 1 1 1

useractor notenemy LADDERSTEP 0 NOACTIONLAD

ifpdistl 800  {  ifhitspace { ifrnd 164 { cstat 33 } else { cstat 32 } action NOACTIONLAD }
else ifp pducking { ifactioncount 2 { cstat 32 resetactioncount } else { cstat 33 } ifactioncount 3 { resetactioncount } }
else ifp pfalling { ifactioncount 2 { cstat 32 resetactioncount } else { cstat 33 } ifactioncount 3 { resetactioncount } ifaction NOACTIONLAD ( action NOACTIONLAD2 ) }
else { action NOACTIONLAD }  }  else { cstat 32 action NOACTIONLAD }  ifspritepal 3 { cstator 32768 }
enda    

useractor notenemy LADDERSTEP2 0 NOACTIONLAD

ifpdistl 800  {  ifhitspace { ifrnd 164 { cstat 17 } else { cstat 16 } action NOACTIONLAD }
else ifp pducking { ifactioncount 2 { cstat 16 resetactioncount } else { cstat 17 } ifactioncount 3 { resetactioncount } break }
else ifp pfalling { ifactioncount 2 { cstat 16 resetactioncount } else { cstat 17 } ifactioncount 3 { resetactioncount } ifaction NOACTIONLAD ( action NOACTIONLAD2 ) }
else { action NOACTIONLAD }  }  else { cstat 16 action NOACTIONLAD }  ifspritepal 3 { cstator 32768 }
enda
