//---------------------------------------------------------------------------
// Script file for the level 3 of the Chinatown (subway train)
// Geoffroy Audy, September 11 1996
//---------------------------------------------------------------------------

define  STC1       0
define  STC2       1
define  STC3       2
define  STC4       3
define  STC5       4
define  STC6       5
define  STC7       6
define  STC8       7
define  STC9       8
define  NINJA1     9
define  NINJA2     10
define  NINJA3     11
define  NINJA4     12
define  NINJA5     13
define  NINJA6     14
define  NINJA7     15
define  NINJA8     16
define  NINJA9     17
define  NINJA10    18
define  NINJA11    19
define  NINJA12    20
define  NINJA13    21
define  NINJA14    22
define  NINJA15    23
define  NINJA16    24
define  NINJA17    25
define  NINJA18    26
define  TRAIN1     27
define  TRAIN2     28
define  TRAIN3     29
define  TRAIN4     30
define  TRAIN5     31
define  TRAIN6     32
define  POLICE     33
define  NAO1       34
define  NAO2       35
define  BIGNINJA1  36
define  BIGNINJA2  37
define  BIGNINJA3  38
define  BIGNINJA4  39
define  BIGNINJA5  40
define  BIGNINJA6  41
define  BIGNINJA7  42
define  BIGNINJA8  43
define  STEVE1     44
define  STEVE2     45
define  STEVE3     46
define  STEVE4     47
define  STEVE5     48
define  STEVE6     49
define  BACKWALL1  50
define  BACKWALL2  51
define  BACKWALL3  52
define  BACKWALL4  53
define  BACKWALL5  54
define  BACKWALL6  55
define  BLUEGIRL   56
define  JERRY1     57
define  JERRY2     58
define  JERRY3     59
define  JERRY4     60
define  JERRY5     61
define  JERRY6     62
define  JERRY7     63
define  JERRY8     64
define  JACK1      65
define  JACK2      66
define  JACK3      67
define  JACK4      68
define  JACK5      69
define  JACK6      70
define  JACK7      71
define  JACK8      72
define  BUM        73
define  TOURIST    74
define  WHITEGUY   75
define  WINDOW1    76
define  WINDOW2    77
define  WINDOW3    78
define  WINDOW4    79
define  DOOR1      80
define  DOOR2      81
define  DOOR3      82
define  WINDOW5    83
define  WINDOW6    84
define  INS_TRAIN1 85
define  INS_TRAIN2 86
define  INS_TRAIN3 87
define  INS_TRAIN4 88
define  GUN        89
define  BOARD1     90
define  BOARD2     91
define  GARBAGE    92
define  KNIFE1     93
define  KNIFE2     94
define  KNIFE3     95
define  KNIFE4     96
define  KNIFE5     97
define  KNIFE6     98
define  KNIFE7     99
define  KNIFE8     100
define  CONDUCTOR  101
define  CHRISTIE   102
define  TINA       103
define  WOMANPURSE 104

define  L1         0            // Difficulty levels
define  L2         1
define  L3         2
define  L4         3
define  L5         4
define  L6         5
define  L7         6
define  L8         7

//-------------------------------------
// Start initialization
//-------------------------------------
loadBKD \BACKGRND\CHINATWN\CHINA3.BKD                   // BKD 0
setBKDLoc 0 0 0 0                                       //
loadVAB \SOUNDFX\CHINA.VAB                              // Sound fx

loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_2\STC.KRT       // Char 0
CloneCharacter STC1                                     // Char 1
CloneCharacter STC1                                     // Char 2
CloneCharacter STC1                                     // Char 3
CloneCharacter STC1                                     // Char 4
CloneCharacter STC1                                     // Char 5
CloneCharacter STC1                                     // Char 6
CloneCharacter STC1                                     // Char 7
CloneCharacter STC1                                     // Char 8
SetScale STC1 3700
SetScale STC2 3900
SetScale STC4 3700
SetScale STC5 3500
SetScale STC7 3500
SetScale STC8 3900
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_2\NINJA.KRT     // Char 9
CloneCharacter NINJA1                                   // Char 10
CloneCharacter NINJA1                                   // Char 11
CloneCharacter NINJA1                                   // Char 12
CloneCharacter NINJA1                                   // Char 13
CloneCharacter NINJA1                                   // Char 14
CloneCharacter NINJA1                                   // Char 15
CloneCharacter NINJA1                                   // Char 16
CloneCharacter NINJA1                                   // Char 17
CloneCharacter NINJA1                                   // Char 18
CloneCharacter NINJA1                                   // Char 19
CloneCharacter NINJA1                                   // Char 20
CloneCharacter NINJA1                                   // Char 21
CloneCharacter NINJA1                                   // Char 22
CloneCharacter NINJA1                                   // Char 23
CloneCharacter NINJA1                                   // Char 24
CloneCharacter NINJA1                                   // Char 25
CloneCharacter NINJA1                                   // Char 26
SetScale NINJA4 3700
SetScale NINJA5 3700
SetScale NINJA7 3700
SetScale NINJA11 3700
loadKRT \SPRITES\CHINATWN\LEVEL3\TRAIN.KRT              // Char 27
ObjectCharacteristics TRAIN1 17536                      //
CloneCharacter TRAIN1                                   // Char 28
CloneCharacter TRAIN1                                   // Char 29
CloneCharacter TRAIN1                                   // Char 30
CloneCharacter TRAIN1                                   // Char 31
CloneCharacter TRAIN1                                   // Char 32
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\POLICE.KRT    // Char 33
ObjectCharacteristics POLICE 1030                       // Char 33 is a victim
SetScale POLICE 4900
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_2\NAO.KRT       // Char 34
CloneCharacter NAO1                                     // Char 35
SetScale NAO1 3500
SetScale NAO2 3500
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_2\BNNJ.KRT      // Char 36
CloneCharacter BIGNINJA1                                // Char 37
CloneCharacter BIGNINJA1                                // Char 38
CloneCharacter BIGNINJA1                                // Char 39
CloneCharacter BIGNINJA1                                // Char 40
CloneCharacter BIGNINJA1                                // Char 41
CloneCharacter BIGNINJA1                                // Char 42
CloneCharacter BIGNINJA1                                // Char 43
loadKRT \SPRITES\CHINATWN\LEVEL2\STA.KRT                // Char 44
CloneCharacter STEVE1                                   // Char 45
CloneCharacter STEVE1                                   // Char 46
CloneCharacter STEVE1                                   // Char 47
CloneCharacter STEVE1                                   // Char 48
CloneCharacter STEVE1                                   // Char 49
SetScale STEVE1 4500
SetScale STEVE4 4500
SetScale STEVE5 3700
SetScale STEVE6 4500
loadKRT \SPRITES\CHINATWN\LEVEL3\BKWALL.KRT             // Char 50
ObjectCharacteristics BACKWALL1 1152                    //
CloneCharacter BACKWALL1                                // Char 51
CloneCharacter BACKWALL1                                // Char 52
CloneCharacter BACKWALL1                                // Char 53
CloneCharacter BACKWALL1                                // Char 54
CloneCharacter BACKWALL1                                // Char 55
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\SCARED.KRT    // Char 56
ObjectCharacteristics BLUEGIRL 1030                     // Char 56 is a victim
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_2\JERRY.KRT     // Char 57
CloneCharacter JERRY1                                   // Char 58
CloneCharacter JERRY1                                   // Char 59
CloneCharacter JERRY1                                   // Char 60
CloneCharacter JERRY1                                   // Char 61
CloneCharacter JERRY1                                   // Char 62
CloneCharacter JERRY1                                   // Char 63
CloneCharacter JERRY1                                   // Char 64
SetScale JERRY3 3700
SetScale JERRY6 3700
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_2\JACK.KRT      // Char 65
CloneCharacter JACK1                                    // Char 66
CloneCharacter JACK1                                    // Char 67
CloneCharacter JACK1                                    // Char 68
CloneCharacter JACK1                                    // Char 69
CloneCharacter JACK1                                    // Char 70
CloneCharacter JACK1                                    // Char 71
CloneCharacter JACK1                                    // Char 72
SetScale JACK2 3700
SetScale JACK4 3700
SetScale JACK6 3700
loadKRT \SPRITES\CHINATWN\LEVEL3\HOBO.KRT               // Char 73
ObjectCharacteristics BUM 1026                          // Char 73 is a victim
SetScale BUM 4500
loadKRT \SPRITES\CHINATWN\LEVEL2\TOURIST.KRT            // Char 74
ObjectCharacteristics TOURIST 1030                      // Char 74 is a victim
SetScale TOURIST 3800
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\MNC.KRT       // Char 75
ObjectCharacteristics WHITEGUY 1030                     // Char 75 is a victim
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\BIGWIN.KRT    // CHAR 76
ObjectCharacteristics WINDOW1 1060                      // This is a window
CloneCharacter WINDOW1                                  // Char 77
CloneCharacter WINDOW1                                  // Char 78
CloneCharacter WINDOW1                                  // Char 79
SetScale WINDOW3 4900
SetScale WINDOW4 4900
loadKRT \SPRITES\CHINATWN\LEVEL3\DOORS.KRT              // CHAR 80
ObjectCharacteristics DOOR1 1024                        //
CloneCharacter DOOR1                                    // Char 81
ObjectCharacteristics DOOR2 1024                        //
CloneCharacter DOOR1                                    // Char 82
ObjectCharacteristics DOOR3 1024                        //
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\LONGWIN.KRT   // Char 83
ObjectCharacteristics WINDOW5 1060                      // This is a window
CloneCharacter WINDOW5                                  // Char 84
loadKRT \SPRITES\CHINATWN\LEVEL3\INSSWAY.KRT            // CHAR 85
ObjectCharacteristics INS_TRAIN1 1024                   //
CloneCharacter INS_TRAIN1                               // Char 86
CloneCharacter INS_TRAIN1                               // Char 87
CloneCharacter INS_TRAIN1                               // Char 88
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\WEAPON1.KRT   // Char 89
ObjectCharacteristics GUN 1032                          // This is a gun
loadKRT \SPRITES\CHINATWN\LEVEL3\BOARD.KRT              // Char 90
ObjectCharacteristics BOARD1 1168                       // This is an object
CloneCharacter BOARD1                                   // Char 91
loadKRT \SPRITES\CHINATWN\LEVEL3\GARBAGE.KRT            // Char 92
ObjectCharacteristics GARBAGE 1024                      // This is an object
SetTotalHitPoints GARBAGE 3                             //
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\KNIFE.KRT     // Char 93
ObjectCharacteristics KNIFE1 1092                       // Throwed object
CloneCharacter KNIFE1                                   // Char 94
CloneCharacter KNIFE1                                   // Char 95
CloneCharacter KNIFE1                                   // Char 96
CloneCharacter KNIFE1                                   // Char 97
CloneCharacter KNIFE1                                   // Char 98
CloneCharacter KNIFE1                                   // Char 99
CloneCharacter KNIFE1                                   // Char 100
//loadKRT \SPRITES\CHINATWN\LEVEL3\CONDUCTO.KRT           // Char 101
//ObjectCharacteristics CONDUCTOR 1030                    // This is a victim
//loadKRT \SPRITES\CHINATWN\LEVEL3\CHRISTIE.KRT           // Char 102
//ObjectCharacteristics CHRISTIE 1030                     // This is a victim
//loadKRT \SPRITES\CHINATWN\LEVEL3\TINA.KRT               // Char 103
//ObjectCharacteristics TINA 1030                         // This is a victim
//loadKRT \SPRITES\CHINATWN\LEVEL3\WOMANPUR.KRT           // Char 104
//ObjectCharacteristics WOMANPURSE 1030                   // This is a victim

AssignProjectile NINJA1  KNIFE1
AssignProjectile NINJA2  KNIFE2
AssignProjectile NINJA3  KNIFE3
AssignProjectile NINJA4  KNIFE4
AssignProjectile NINJA7  KNIFE5
AssignProjectile NINJA8  KNIFE6
AssignProjectile NINJA9  KNIFE7
AssignProjectile NINJA10 KNIFE8

PlayTrack 505 7           // Play STAGE3

//-------------------------------------
// Various objects (boards & windows)
//-------------------------------------
StartActionXY BUM        0 200 154 11    0 0 L1
StartActionXY TRAIN1     0  59  91  4    0 0 L1
StartActionXY GARBAGE    0 100 162 11    0 0 L1
StartActionXY BOARD1     0 276  19  9    0 0 L1
StartActionXY BOARD2     1 497  56  2    0 0 L1
StartActionXY GUN        3 365 155  6    0 0 L1
Attach        TRAIN2     TRAIN1 1 0 0  96   0 4 L1
Attach        TRAIN3     TRAIN1 2 0 0 192   0 4 L1
Attach        TRAIN4     TRAIN1 3 0 0 288   0 4 L1
Attach        TRAIN5     TRAIN1 4 0 0 384   0 4 L1
Attach        TRAIN6     TRAIN1 5 0 0 456   0 4 L1
Attach        INS_TRAIN1 TRAIN1 0 0 0   8 -17 1 L1
Attach        INS_TRAIN2 TRAIN1 1 0 0  88 -17 1 L1
Attach        INS_TRAIN3 TRAIN1 2 0 0 358 -17 1 L1
Attach        INS_TRAIN4 TRAIN1 3 0 0 439 -17 1 L1
Attach        DOOR1      TRAIN1 0 0 0 224  12 1 L1
Attach        WINDOW1    TRAIN1 0 0 0   8 -17 3 L1
Attach        WINDOW2    TRAIN1 0 0 0  85 -17 3 L1
Attach        WINDOW3    TRAIN1 0 0 0 355 -17 3 L1
Attach        WINDOW4    TRAIN1 0 0 0 439 -17 3 L1

//-------------------------------------
// Enemy group #1
//-------------------------------------
StartActionXY JACK1      2 215 150  9   64 0 L1
StartActionXY NINJA1     8  65 125  2   96 0 L1
StartActionXY WHITEGUY   1  25 140  8  192 0 L1
StartActionXY BIGNINJA1  0 225 300 14  208 0 L1
StartActionXY NINJA2     2  25 135  8  240 0 L2
StartActionXY JERRY1     2  68 100  2  336 0 L1
StartActionXY JACK2      1 220 103  2  368 0 L6
StartActionXY STC1       6 175 135  2  384 1 L4
//StartActionXY CONDUCTOR  a  60 120  2  480 0 L1
StartActionXY JACK3      2 175 140  9  528 0 L3
StartActionXY BIGNINJA2  0 120 300 14  624 0 L1
StartActionXY JERRY2     2 140 105  2  688 0 L5
//StartActionXY CHRISTIE   a 225  90  2  720 0 L1
StartActionXY NINJA3     8 160 140  9  816 1 L1
StartActionXY STC2       6 225 155  9  848 0 L2

ScrollBKDTo 0 -120 0 120 944

//-------------------------------------
// Enemy group #2
//-------------------------------------
StartActionXY TOURIST    3 340 106  2 1008 1 L1
StartActionXY NAO1       3 140 130  2 1024 0 L1
StartActionXY STC3       9 210 150  9 1056 0 L6
StartActionXY JERRY3     3 240 110  2 1168 0 L1
StartActionXY JACK4      2 410 120  2 1200 0 L3
StartActionXY STEVE1     4 440 160  7 1296 1 L1
StartActionXY BIGNINJA3  0 375 300 14 1328 0 L5
StartActionXY BLUEGIRL   5 215 108  2 1424 0 L1
StartActionXY NINJA4     8 150 120  2 1456 0 L2
StartActionXY STC4       6 390 135  2 1552 0 L1
StartActionXY NINJA5     4 235 108  2 1616 0 L1
StartActionXY BIGNINJA4  0 210 300 14 1664 0 L4
StartActionXY STEVE2     5 220 153  9 1792 0 L3
StartActionXY NINJA6     6 100  80  9 1888 0 L1

ScrollBKDTo 0 -255 0 135 2016

//-------------------------------------
// Enemy group #3
//-------------------------------------
StartActionXY BIGNINJA5  0 360 300 14 2080 0 L1
//StartActionXY STEVE3     a 360  90  2 2144 0 L1
StartActionXY POLICE     1 580 150 13 2272 1 L1
StartActionXY JERRY4     3 540 125  7 2304 1 L1
StartActionXY STC5       6 250 130  2 2320 0 L6
StartActionXY STEVE4    10 535 160  9 2416 1 L4
StartActionXY NINJA7     8 410 120  2 2448 0 L1
StartActionXY NINJA8     2 575 132  8 2464 1 L3
StartActionXY STC6       6 250 156  9 2560 0 L1
StartActionXY STEVE5     5 350 120  2 2592 1 L5
//StartActionXY TINA       a 410  90  2 2688 0 L1
StartActionXY NINJA9     8 425 150  9 2784 0 L1
StartActionXY BIGNINJA6  0 470 300 14 2848 0 L2
StartActionXY STC7       6 240 130  2 2944 0 L1
StartActionXY JERRY5     2 450 149  9 2992 0 L4
StartActionXY JACK5      1 555 125  9 3088 1 L1

ScrollBKDTo 0 -125 0 130 3120

//-------------------------------------
// Enemy group #4
//-------------------------------------
StartActionXY NAO2       3 410 130  2 3184 0 L1
StartActionXY JERRY6     3 240 110  2 3232 0 L1
StartActionXY STEVE6     4 440 160  9 3360 1 L1
StartActionXY BIGNINJA7  0 355 300 14 3392 0 L2
//StartActionXY WOMANPURSE a 350  90  2 3488 1 L1
StartActionXY STC8       6 225 155  9 3552 0 L1
StartActionXY NINJA10    8 425 150  9 3600 0 L4
StartActionXY NINJA11    4 330 105  2 3696 1 L1
StartActionXY BIGNINJA8  0 220 300 14 3728 0 L3
StartActionXY JACK6      1 360 103  2 3824 0 L1
StartActionXY STC9       9 210 140  9 3856 0 L5
StartActionXY NINJA12    6 465  80  8 3952 1 L1
StartActionXY NINJA13    6 105  80  8 4016 0 L3

ScrollBKDTo 0 -125 0 0 4112

Attach        DOOR2      TRAIN1 1 0 4200 167 11 3 L1
Attach        DOOR3      TRAIN1 3 0 4200 278 11 3 L1
Attach        WINDOW5    DOOR2  0 0 4200  -5 -10 3 L1
Attach        WINDOW6    DOOR3  0 0 4200   0 -10 3 L1
StartActionXY BACKWALL1  0 157  90  0 4300 0 L1
StartActionXY BACKWALL2  1 220  90  0 4300 0 L1
StartActionXY BACKWALL3  2 283  90  0 4300 0 L1
StartActionXY BACKWALL4  3 346  90  0 4300 0 L1
StartActionXY BACKWALL5  4 409  90  0 4300 0 L1
StartActionXY BACKWALL6  5 452  90  0 4300 0 L1
StartAction   TRAIN1     6  59  91  4 4300 0 L3

EndRound 4300
