Changed the way Kline works.

Kline previously had a maximum of 500 or 750 health, and uses some
hacks to cause it to flee just as it was destroyed, and to advance
to new stages in the final battle.

I've replaced this with a much larger amount of health, and progression
being based on how much health he has.

Also some other stuff.
This commit is contained in:
onpon4 2015-03-08 20:59:33 -04:00
parent 982d39278c
commit 31a8383f90
13 changed files with 852 additions and 826 deletions

View File

@ -110,647 +110,8 @@ int main(int argc, char **argv)
audio_loadSounds();
initWeapons();
initVars();
// Dual Plasma Fighter.
alien_defs[CD_DUALFIGHTER].classDef = CD_DUALFIGHTER;
alien_defs[CD_DUALFIGHTER].AIType = AI_NORMAL;
alien_defs[CD_DUALFIGHTER].speed = 4;
alien_defs[CD_DUALFIGHTER].maxShield = 5;
alien_defs[CD_DUALFIGHTER].shield = 5;
alien_defs[CD_DUALFIGHTER].imageIndex[0] = 2;
alien_defs[CD_DUALFIGHTER].imageIndex[1] = 3;
alien_defs[CD_DUALFIGHTER].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_DUALFIGHTER].weaponType[1] = W_ROCKETS;
alien_defs[CD_DUALFIGHTER].chance[0] = 100;
alien_defs[CD_DUALFIGHTER].chance[1] = 1;
alien_defs[CD_DUALFIGHTER].collectChance = 50;
alien_defs[CD_DUALFIGHTER].collectType = P_ANYTHING;
alien_defs[CD_DUALFIGHTER].collectValue = 50;
alien_defs[CD_DUALFIGHTER].flags = FL_WEAPCO;
// Missile Boat
alien_defs[CD_MISSILEBOAT].classDef = CD_MISSILEBOAT;
alien_defs[CD_MISSILEBOAT].AIType = AI_DEFENSIVE;
alien_defs[CD_MISSILEBOAT].speed = 2;
alien_defs[CD_MISSILEBOAT].maxShield = 50;
alien_defs[CD_MISSILEBOAT].shield = 50;
alien_defs[CD_MISSILEBOAT].imageIndex[0] = 4;
alien_defs[CD_MISSILEBOAT].imageIndex[1] = 5;
alien_defs[CD_MISSILEBOAT].weaponType[0] = W_ROCKETS;
alien_defs[CD_MISSILEBOAT].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_MISSILEBOAT].chance[0] = 25;
alien_defs[CD_MISSILEBOAT].chance[1] = 4;
alien_defs[CD_MISSILEBOAT].collectChance = 25;
alien_defs[CD_MISSILEBOAT].collectType = P_ANYTHING;
alien_defs[CD_MISSILEBOAT].collectValue = 75;
alien_defs[CD_MISSILEBOAT].flags = FL_WEAPCO;
//Prototype fighter
alien_defs[CD_PROTOFIGHTER].classDef = CD_PROTOFIGHTER;
alien_defs[CD_PROTOFIGHTER].AIType = AI_DEFENSIVE;
alien_defs[CD_PROTOFIGHTER].speed = 5;
alien_defs[CD_PROTOFIGHTER].maxShield = 15;
alien_defs[CD_PROTOFIGHTER].shield = 15;
alien_defs[CD_PROTOFIGHTER].imageIndex[0] = 6;
alien_defs[CD_PROTOFIGHTER].imageIndex[1] = 7;
alien_defs[CD_PROTOFIGHTER].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_PROTOFIGHTER].weaponType[1] = P_ANYTHING;
alien_defs[CD_PROTOFIGHTER].chance[0] = 100;
alien_defs[CD_PROTOFIGHTER].chance[1] = 1;
alien_defs[CD_PROTOFIGHTER].collectChance = 50;
alien_defs[CD_PROTOFIGHTER].collectType = P_ANYTHING;
alien_defs[CD_PROTOFIGHTER].collectValue = 50;
alien_defs[CD_PROTOFIGHTER].flags = FL_WEAPCO;
// Phoebe and Ursula
alien_defs[CD_FRIEND].classDef = CD_FRIEND;
alien_defs[CD_FRIEND].AIType = AI_OFFENSIVE;
alien_defs[CD_FRIEND].speed = 3;
alien_defs[CD_FRIEND].maxShield = 50;
alien_defs[CD_FRIEND].shield = 50;
alien_defs[CD_FRIEND].imageIndex[0] = 20;
alien_defs[CD_FRIEND].imageIndex[1] = 21;
alien_defs[CD_FRIEND].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_FRIEND].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_FRIEND].chance[0] = 100;
alien_defs[CD_FRIEND].chance[1] = 5;
alien_defs[CD_FRIEND].collectChance = 0;
alien_defs[CD_FRIEND].collectType = P_CASH;
alien_defs[CD_FRIEND].collectValue = 0;
alien_defs[CD_FRIEND].flags = FL_FRIEND;
// Boss 1
alien_defs[CD_FRIGATE].classDef = CD_BOSS;
alien_defs[CD_FRIGATE].AIType = AI_NORMAL;
alien_defs[CD_FRIGATE].speed = 2;
alien_defs[CD_FRIGATE].maxShield = 550;
alien_defs[CD_FRIGATE].shield = 550;
alien_defs[CD_FRIGATE].imageIndex[0] = 8;
alien_defs[CD_FRIGATE].imageIndex[1] = 9;
alien_defs[CD_FRIGATE].weaponType[0] = W_MICRO_ROCKETS;
alien_defs[CD_FRIGATE].weaponType[1] = W_ENERGYRAY;
alien_defs[CD_FRIGATE].chance[0] = 100;
alien_defs[CD_FRIGATE].chance[1] = 85;
alien_defs[CD_FRIGATE].collectChance = 100;
alien_defs[CD_FRIGATE].collectType = P_CASH;
alien_defs[CD_FRIGATE].collectValue = 500;
alien_defs[CD_FRIGATE].flags = FL_WEAPCO;
alien_defs[CD_FRIGATE_WING1].classDef = CD_FRIGATE_WING1;
alien_defs[CD_FRIGATE_WING1].AIType = AI_NORMAL;
alien_defs[CD_FRIGATE_WING1].speed = 2;
alien_defs[CD_FRIGATE_WING1].maxShield = 100;
alien_defs[CD_FRIGATE_WING1].shield = 100;
alien_defs[CD_FRIGATE_WING1].imageIndex[0] = 10;
alien_defs[CD_FRIGATE_WING1].imageIndex[1] = 11;
alien_defs[CD_FRIGATE_WING1].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_FRIGATE_WING1].weaponType[1] = W_ROCKETS;
alien_defs[CD_FRIGATE_WING1].chance[0] = 100;
alien_defs[CD_FRIGATE_WING1].chance[1] = 10;
alien_defs[CD_FRIGATE_WING1].collectChance = 100;
alien_defs[CD_FRIGATE_WING1].collectType = P_ANYTHING;
alien_defs[CD_FRIGATE_WING1].collectValue = 250;
alien_defs[CD_FRIGATE_WING1].flags = FL_WEAPCO | FL_DAMAGEOWNER;
alien_defs[CD_FRIGATE_WING2].classDef = CD_FRIGATE_WING2;
alien_defs[CD_FRIGATE_WING2].AIType = AI_NORMAL;
alien_defs[CD_FRIGATE_WING2].speed = 2;
alien_defs[CD_FRIGATE_WING2].maxShield = 100;
alien_defs[CD_FRIGATE_WING2].shield = 100;
alien_defs[CD_FRIGATE_WING2].imageIndex[0] = 12;
alien_defs[CD_FRIGATE_WING2].imageIndex[1] = 13;
alien_defs[CD_FRIGATE_WING2].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_FRIGATE_WING2].weaponType[1] = W_ROCKETS;
alien_defs[CD_FRIGATE_WING2].chance[0] = 100;
alien_defs[CD_FRIGATE_WING2].chance[1] = 10;
alien_defs[CD_FRIGATE_WING2].collectChance = 100;
alien_defs[CD_FRIGATE_WING2].collectType = P_ANYTHING;
alien_defs[CD_FRIGATE_WING2].collectValue = 250;
alien_defs[CD_FRIGATE_WING2].flags = FL_WEAPCO | FL_DAMAGEOWNER;
// Transport ship
alien_defs[CD_TRANSPORTSHIP].classDef = CD_TRANSPORTSHIP;
alien_defs[CD_TRANSPORTSHIP].AIType = AI_EVASIVE;
alien_defs[CD_TRANSPORTSHIP].speed = 4;
alien_defs[CD_TRANSPORTSHIP].maxShield = 10;
alien_defs[CD_TRANSPORTSHIP].shield = 10;
alien_defs[CD_TRANSPORTSHIP].imageIndex[0] = 14;
alien_defs[CD_TRANSPORTSHIP].imageIndex[1] = 15;
alien_defs[CD_TRANSPORTSHIP].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_TRANSPORTSHIP].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_TRANSPORTSHIP].chance[0] = 0;
alien_defs[CD_TRANSPORTSHIP].chance[1] = 0;
alien_defs[CD_TRANSPORTSHIP].collectChance = 100;
alien_defs[CD_TRANSPORTSHIP].collectType = P_WEAPONS;
alien_defs[CD_TRANSPORTSHIP].collectValue = 30;
alien_defs[CD_TRANSPORTSHIP].flags = FL_WEAPCO | FL_NOFIRE;
// Cargo ship
alien_defs[CD_CARGOSHIP].classDef = CD_CARGOSHIP;
alien_defs[CD_CARGOSHIP].AIType = AI_EVASIVE;
alien_defs[CD_CARGOSHIP].speed = 4;
alien_defs[CD_CARGOSHIP].maxShield = 10;
alien_defs[CD_CARGOSHIP].shield = 10;
alien_defs[CD_CARGOSHIP].imageIndex[0] = 22;
alien_defs[CD_CARGOSHIP].imageIndex[1] = 23;
alien_defs[CD_CARGOSHIP].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_CARGOSHIP].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_CARGOSHIP].chance[0] = 0;
alien_defs[CD_CARGOSHIP].chance[1] = 0;
alien_defs[CD_CARGOSHIP].collectChance = 50;
alien_defs[CD_CARGOSHIP].collectType = P_ANYTHING;
alien_defs[CD_CARGOSHIP].collectValue = 100;
alien_defs[CD_CARGOSHIP].flags = FL_WEAPCO | FL_NOFIRE;
// Weapco Miner
alien_defs[CD_MINER].classDef = CD_MINER;
alien_defs[CD_MINER].AIType = AI_EVASIVE;
alien_defs[CD_MINER].speed = 4;
alien_defs[CD_MINER].maxShield = 25;
alien_defs[CD_MINER].shield = 25;
alien_defs[CD_MINER].imageIndex[0] = 16;
alien_defs[CD_MINER].imageIndex[1] = 17;
alien_defs[CD_MINER].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_MINER].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_MINER].chance[0] = 0;
alien_defs[CD_MINER].chance[1] = 0;
alien_defs[CD_MINER].collectChance = 100;
alien_defs[CD_MINER].collectType = P_ANYTHING;
alien_defs[CD_MINER].collectValue = 30;
alien_defs[CD_MINER].flags = FL_WEAPCO | FL_NOFIRE | FL_DROPMINES;
// Kline
alien_defs[CD_KLINE].classDef = CD_KLINE;
alien_defs[CD_KLINE].AIType = AI_OFFENSIVE;
alien_defs[CD_KLINE].speed = 5;
alien_defs[CD_KLINE].maxShield = 500;
alien_defs[CD_KLINE].shield = 500;
alien_defs[CD_KLINE].imageIndex[0] = 18;
alien_defs[CD_KLINE].imageIndex[1] = 19;
alien_defs[CD_KLINE].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_KLINE].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_KLINE].chance[0] = 100;
alien_defs[CD_KLINE].chance[1] = 2;
alien_defs[CD_KLINE].collectChance = 0;
alien_defs[CD_KLINE].collectType = P_ANYTHING;
alien_defs[CD_KLINE].collectValue = 0;
alien_defs[CD_KLINE].flags = FL_WEAPCO | FL_CANNOTDIE | FL_ALWAYSFACE | FL_CIRCLES;
// Aim Fighter
alien_defs[CD_AIMFIGHTER].classDef = CD_AIMFIGHTER;
alien_defs[CD_AIMFIGHTER].AIType = AI_NORMAL;
alien_defs[CD_AIMFIGHTER].speed = 3;
alien_defs[CD_AIMFIGHTER].maxShield = 15;
alien_defs[CD_AIMFIGHTER].shield = 15;
alien_defs[CD_AIMFIGHTER].imageIndex[0] = 8;
alien_defs[CD_AIMFIGHTER].imageIndex[1] = 9;
alien_defs[CD_AIMFIGHTER].weaponType[0] = W_AIMED_SHOT;
alien_defs[CD_AIMFIGHTER].weaponType[1] = W_AIMED_SHOT;
alien_defs[CD_AIMFIGHTER].chance[0] = 7;
alien_defs[CD_AIMFIGHTER].chance[1] = 1;
alien_defs[CD_AIMFIGHTER].collectChance = 75;
alien_defs[CD_AIMFIGHTER].collectType = P_ANYTHING;
alien_defs[CD_AIMFIGHTER].collectValue = 100;
alien_defs[CD_AIMFIGHTER].flags = FL_WEAPCO | FL_AIMS;
// Slave ship
alien_defs[CD_SLAVETRANSPORT].classDef = CD_SLAVETRANSPORT;
alien_defs[CD_SLAVETRANSPORT].AIType = AI_EVASIVE;
alien_defs[CD_SLAVETRANSPORT].speed = 2;
alien_defs[CD_SLAVETRANSPORT].maxShield = 10;
alien_defs[CD_SLAVETRANSPORT].shield = 20;
alien_defs[CD_SLAVETRANSPORT].imageIndex[0] = 10;
alien_defs[CD_SLAVETRANSPORT].imageIndex[1] = 11;
alien_defs[CD_SLAVETRANSPORT].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_SLAVETRANSPORT].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_SLAVETRANSPORT].chance[0] = 0;
alien_defs[CD_SLAVETRANSPORT].chance[1] = 0;
alien_defs[CD_SLAVETRANSPORT].collectChance = 100;
alien_defs[CD_SLAVETRANSPORT].collectType = P_SLAVES;
alien_defs[CD_SLAVETRANSPORT].collectValue = 25;
alien_defs[CD_SLAVETRANSPORT].flags = FL_WEAPCO | FL_NOFIRE;
// Good Transport
alien_defs[CD_GOODTRANSPORT].classDef = CD_GOODTRANSPORT;
alien_defs[CD_GOODTRANSPORT].AIType = AI_EVASIVE;
alien_defs[CD_GOODTRANSPORT].speed = 3;
alien_defs[CD_GOODTRANSPORT].maxShield = 75;
alien_defs[CD_GOODTRANSPORT].shield = 75;
alien_defs[CD_GOODTRANSPORT].imageIndex[0] = 12;
alien_defs[CD_GOODTRANSPORT].imageIndex[1] = 13;
alien_defs[CD_GOODTRANSPORT].weaponType[0] = W_AIMED_SHOT;
alien_defs[CD_GOODTRANSPORT].weaponType[1] = W_AIMED_SHOT;
alien_defs[CD_GOODTRANSPORT].chance[0] = 100;
alien_defs[CD_GOODTRANSPORT].chance[1] = 100;
alien_defs[CD_GOODTRANSPORT].collectChance = 0;
alien_defs[CD_GOODTRANSPORT].collectType = P_ANYTHING;
alien_defs[CD_GOODTRANSPORT].collectValue = 0;
alien_defs[CD_GOODTRANSPORT].flags = FL_FRIEND | FL_NOFIRE | FL_AIMS;
// Sid Wilson
alien_defs[CD_SID].classDef = CD_SID;
alien_defs[CD_SID].AIType = AI_NORMAL;
alien_defs[CD_SID].speed = 3;
alien_defs[CD_SID].maxShield = 50;
alien_defs[CD_SID].shield = 50;
alien_defs[CD_SID].imageIndex[0] = 24;
alien_defs[CD_SID].imageIndex[1] = 25;
alien_defs[CD_SID].weaponType[0] = W_IONCANNON;
alien_defs[CD_SID].weaponType[1] = W_IONCANNON;
alien_defs[CD_SID].chance[0] = 100;
alien_defs[CD_SID].chance[1] = 0;
alien_defs[CD_SID].collectChance = 0;
alien_defs[CD_SID].collectType = P_ANYTHING;
alien_defs[CD_SID].collectValue = 0;
alien_defs[CD_SID].flags = FL_FRIEND | FL_AIMS;
// Mining Vessel Boss
alien_defs[CD_MINEBOSS].classDef = CD_BOSS;
alien_defs[CD_MINEBOSS].AIType = AI_NORMAL;
alien_defs[CD_MINEBOSS].speed = 3;
alien_defs[CD_MINEBOSS].maxShield = 1000;
alien_defs[CD_MINEBOSS].shield = 1000;
alien_defs[CD_MINEBOSS].imageIndex[0] = 26;
alien_defs[CD_MINEBOSS].imageIndex[1] = 27;
alien_defs[CD_MINEBOSS].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_MINEBOSS].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_MINEBOSS].chance[0] = 0;
alien_defs[CD_MINEBOSS].chance[1] = 0;
alien_defs[CD_MINEBOSS].collectChance = 100;
alien_defs[CD_MINEBOSS].collectType = P_ANYTHING;
alien_defs[CD_MINEBOSS].collectValue = 1000;
alien_defs[CD_MINEBOSS].flags = FL_WEAPCO | FL_IMMORTAL;
alien_defs[CD_BOSS2_WING1].classDef = CD_BOSS2_WING1;
alien_defs[CD_BOSS2_WING1].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING1].speed = 1;
alien_defs[CD_BOSS2_WING1].maxShield = 250;
alien_defs[CD_BOSS2_WING1].shield = 250;
alien_defs[CD_BOSS2_WING1].imageIndex[0] = 28;
alien_defs[CD_BOSS2_WING1].imageIndex[1] = 29;
alien_defs[CD_BOSS2_WING1].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING1].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING1].chance[0] = 0;
alien_defs[CD_BOSS2_WING1].chance[1] = 0;
alien_defs[CD_BOSS2_WING1].collectChance = 100;
alien_defs[CD_BOSS2_WING1].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING1].collectValue = 250;
alien_defs[CD_BOSS2_WING1].flags = FL_WEAPCO | FL_DAMAGEOWNER;
alien_defs[CD_BOSS2_WING2].classDef = CD_BOSS2_WING2;
alien_defs[CD_BOSS2_WING2].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING2].speed = 1;
alien_defs[CD_BOSS2_WING2].maxShield = 500;
alien_defs[CD_BOSS2_WING2].shield = 500;
alien_defs[CD_BOSS2_WING2].imageIndex[0] = 30;
alien_defs[CD_BOSS2_WING2].imageIndex[1] = 31;
alien_defs[CD_BOSS2_WING2].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING2].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING2].chance[0] = 0;
alien_defs[CD_BOSS2_WING2].chance[1] = 0;
alien_defs[CD_BOSS2_WING2].collectChance = 100;
alien_defs[CD_BOSS2_WING2].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING2].collectValue = 250;
alien_defs[CD_BOSS2_WING2].flags = FL_WEAPCO | FL_DEPLOYDRONES | FL_DAMAGEOWNER;
alien_defs[CD_BOSS2_WING3].classDef = CD_BOSS2_WING3;
alien_defs[CD_BOSS2_WING3].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING3].speed = 1;
alien_defs[CD_BOSS2_WING3].maxShield = 500;
alien_defs[CD_BOSS2_WING3].shield = 500;
alien_defs[CD_BOSS2_WING3].imageIndex[0] = 32;
alien_defs[CD_BOSS2_WING3].imageIndex[1] = 33;
alien_defs[CD_BOSS2_WING3].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING3].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING3].chance[0] = 0;
alien_defs[CD_BOSS2_WING3].chance[1] = 0;
alien_defs[CD_BOSS2_WING3].collectChance = 100;
alien_defs[CD_BOSS2_WING3].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING3].collectValue = 250;
alien_defs[CD_BOSS2_WING3].flags = FL_WEAPCO | FL_DEPLOYDRONES | FL_DAMAGEOWNER;
alien_defs[CD_BOSS2_WING4].classDef = CD_BOSS2_WING4;
alien_defs[CD_BOSS2_WING4].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING4].speed = 1;
alien_defs[CD_BOSS2_WING4].maxShield = 250;
alien_defs[CD_BOSS2_WING4].shield = 250;
alien_defs[CD_BOSS2_WING4].imageIndex[0] = 34;
alien_defs[CD_BOSS2_WING4].imageIndex[1] = 35;
alien_defs[CD_BOSS2_WING4].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING4].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING4].chance[0] = 0;
alien_defs[CD_BOSS2_WING4].chance[1] = 0;
alien_defs[CD_BOSS2_WING4].collectChance = 100;
alien_defs[CD_BOSS2_WING4].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING4].collectValue = 250;
alien_defs[CD_BOSS2_WING4].flags = FL_WEAPCO | FL_DAMAGEOWNER;
// Drone
alien_defs[CD_DRONE].classDef = CD_DRONE;
alien_defs[CD_DRONE].AIType = AI_OFFENSIVE;
alien_defs[CD_DRONE].speed = 8;
alien_defs[CD_DRONE].maxShield = 5;
alien_defs[CD_DRONE].shield = 5;
alien_defs[CD_DRONE].imageIndex[0] = 36;
alien_defs[CD_DRONE].imageIndex[1] = 37;
alien_defs[CD_DRONE].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_DRONE].weaponType[1] = W_LASER;
alien_defs[CD_DRONE].chance[0] = 100;
alien_defs[CD_DRONE].chance[1] = 0;
alien_defs[CD_DRONE].collectChance = 10;
alien_defs[CD_DRONE].collectType = P_SHIELD;
alien_defs[CD_DRONE].collectValue = 1;
alien_defs[CD_DRONE].flags = FL_WEAPCO;
// Experimental Fighter
alien_defs[CD_CLOAKFIGHTER].classDef = CD_CLOAKFIGHTER;
alien_defs[CD_CLOAKFIGHTER].AIType = AI_OFFENSIVE;
alien_defs[CD_CLOAKFIGHTER].speed = 6;
alien_defs[CD_CLOAKFIGHTER].maxShield = 1000;
alien_defs[CD_CLOAKFIGHTER].shield = 1000;
alien_defs[CD_CLOAKFIGHTER].imageIndex[0] = 10;
alien_defs[CD_CLOAKFIGHTER].imageIndex[1] = 11;
alien_defs[CD_CLOAKFIGHTER].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_CLOAKFIGHTER].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_CLOAKFIGHTER].chance[0] = 100;
alien_defs[CD_CLOAKFIGHTER].chance[1] = 5;
alien_defs[CD_CLOAKFIGHTER].collectChance = 100;
alien_defs[CD_CLOAKFIGHTER].collectType = P_CASH;
alien_defs[CD_CLOAKFIGHTER].collectValue = 250;
alien_defs[CD_CLOAKFIGHTER].flags = FL_WEAPCO | FL_CANCLOAK | FL_RUNSAWAY;
// Evil Ursula
alien_defs[CD_EVILURSULA].classDef = CD_EVILURSULA;
alien_defs[CD_EVILURSULA].AIType = AI_OFFENSIVE;
alien_defs[CD_EVILURSULA].speed = 5;
alien_defs[CD_EVILURSULA].maxShield = 500;
alien_defs[CD_EVILURSULA].shield = 500;
alien_defs[CD_EVILURSULA].imageIndex[0] = 12;
alien_defs[CD_EVILURSULA].imageIndex[1] = 13;
alien_defs[CD_EVILURSULA].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_EVILURSULA].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_EVILURSULA].chance[0] = 100;
alien_defs[CD_EVILURSULA].chance[1] = 100;
alien_defs[CD_EVILURSULA].collectChance = 100;
alien_defs[CD_EVILURSULA].collectType = P_ESCAPEPOD;
alien_defs[CD_EVILURSULA].collectValue = 1;
alien_defs[CD_EVILURSULA].flags = FL_WEAPCO;
// Mercenary
alien_defs[CD_KRASS].classDef = CD_KRASS;
alien_defs[CD_KRASS].AIType = AI_OFFENSIVE;
alien_defs[CD_KRASS].speed = 5;
alien_defs[CD_KRASS].maxShield = 1000;
alien_defs[CD_KRASS].shield = 1000;
alien_defs[CD_KRASS].imageIndex[0] = 26;
alien_defs[CD_KRASS].imageIndex[1] = 27;
alien_defs[CD_KRASS].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_KRASS].weaponType[1] = W_CHARGER;
alien_defs[CD_KRASS].chance[0] = 100;
alien_defs[CD_KRASS].chance[1] = 0;
alien_defs[CD_KRASS].collectChance = 100;
alien_defs[CD_KRASS].collectType = P_ANYTHING;
alien_defs[CD_KRASS].collectValue = 2250;
alien_defs[CD_KRASS].flags = FL_FRIEND | FL_IMMORTAL;
// Executive Transport
alien_defs[CD_EXEC].classDef = CD_BOSS;
alien_defs[CD_EXEC].AIType = AI_NORMAL;
alien_defs[CD_EXEC].speed = 5;
alien_defs[CD_EXEC].maxShield = 1000;
alien_defs[CD_EXEC].shield = 1000;
alien_defs[CD_EXEC].imageIndex[0] = 28;
alien_defs[CD_EXEC].imageIndex[1] = 28;
alien_defs[CD_EXEC].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_EXEC].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_EXEC].chance[0] = 0;
alien_defs[CD_EXEC].chance[1] = 0;
alien_defs[CD_EXEC].collectChance = 0;
alien_defs[CD_EXEC].collectType = P_ANYTHING;
alien_defs[CD_EXEC].collectValue = 2000;
alien_defs[CD_EXEC].flags = FL_WEAPCO | FL_NOFIRE;
// Asteroid
alien_defs[CD_ASTEROID].classDef = CD_ASTEROID;
alien_defs[CD_ASTEROID].AIType = AI_WANDER;
alien_defs[CD_ASTEROID].speed = 1;
alien_defs[CD_ASTEROID].maxShield = 50;
alien_defs[CD_ASTEROID].shield = 50;
alien_defs[CD_ASTEROID].imageIndex[0] = 38;
alien_defs[CD_ASTEROID].imageIndex[1] = 38;
alien_defs[CD_ASTEROID].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_ASTEROID].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_ASTEROID].chance[0] = 0;
alien_defs[CD_ASTEROID].chance[1] = 0;
alien_defs[CD_ASTEROID].collectChance = 25;
alien_defs[CD_ASTEROID].collectType = P_ORE;
alien_defs[CD_ASTEROID].collectValue = 1;
alien_defs[CD_ASTEROID].flags = FL_WEAPCO;
alien_defs[CD_ASTEROID2].classDef = CD_ASTEROID2;
alien_defs[CD_ASTEROID2].AIType = AI_WANDER;
alien_defs[CD_ASTEROID2].speed = 1;
alien_defs[CD_ASTEROID2].maxShield = 10;
alien_defs[CD_ASTEROID2].shield = 10;
alien_defs[CD_ASTEROID2].imageIndex[0] = 39;
alien_defs[CD_ASTEROID2].imageIndex[1] = 40;
alien_defs[CD_ASTEROID2].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_ASTEROID2].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_ASTEROID2].chance[0] = 0;
alien_defs[CD_ASTEROID2].chance[1] = 0;
alien_defs[CD_ASTEROID2].collectChance = 25;
alien_defs[CD_ASTEROID2].collectType = P_ORE;
alien_defs[CD_ASTEROID2].collectValue = 1;
alien_defs[CD_ASTEROID2].flags = FL_WEAPCO;
// Escort
alien_defs[CD_ESCORT].classDef = CD_ESCORT;
alien_defs[CD_ESCORT].AIType = AI_NORMAL;
alien_defs[CD_ESCORT].speed = 3;
alien_defs[CD_ESCORT].maxShield = 200;
alien_defs[CD_ESCORT].shield = 200;
alien_defs[CD_ESCORT].imageIndex[0] = 30;
alien_defs[CD_ESCORT].imageIndex[1] = 31;
alien_defs[CD_ESCORT].weaponType[0] = W_LASER;
alien_defs[CD_ESCORT].weaponType[1] = W_LASER;
alien_defs[CD_ESCORT].chance[0] = 25;
alien_defs[CD_ESCORT].chance[1] = 25;
alien_defs[CD_ESCORT].collectChance = 100;
alien_defs[CD_ESCORT].collectType = P_ANYTHING;
alien_defs[CD_ESCORT].collectValue = 100;
alien_defs[CD_ESCORT].flags = FL_WEAPCO;
// Mobile Ray Cannon
alien_defs[CD_MOBILE_RAY].classDef = CD_MOBILE_RAY;
alien_defs[CD_MOBILE_RAY].AIType = AI_OFFENSIVE;
alien_defs[CD_MOBILE_RAY].speed = 5;
alien_defs[CD_MOBILE_RAY].maxShield = 250;
alien_defs[CD_MOBILE_RAY].shield = 250;
alien_defs[CD_MOBILE_RAY].imageIndex[0] = 10;
alien_defs[CD_MOBILE_RAY].imageIndex[1] = 11;
alien_defs[CD_MOBILE_RAY].weaponType[0] = W_ENERGYRAY;
alien_defs[CD_MOBILE_RAY].weaponType[1] = W_ENERGYRAY;
alien_defs[CD_MOBILE_RAY].chance[0] = 50;
alien_defs[CD_MOBILE_RAY].chance[1] = 50;
alien_defs[CD_MOBILE_RAY].collectChance = 75;
alien_defs[CD_MOBILE_RAY].collectType = P_SHIELD;
alien_defs[CD_MOBILE_RAY].collectValue = 100;
alien_defs[CD_MOBILE_RAY].flags = FL_WEAPCO;
// Rebel Carrier
alien_defs[CD_REBELCARRIER].classDef = CD_REBELCARRIER;
alien_defs[CD_REBELCARRIER].AIType = AI_OFFENSIVE;
alien_defs[CD_REBELCARRIER].speed = 2;
alien_defs[CD_REBELCARRIER].maxShield = 100;
alien_defs[CD_REBELCARRIER].shield = 100;
alien_defs[CD_REBELCARRIER].imageIndex[0] = 32;
alien_defs[CD_REBELCARRIER].imageIndex[1] = 33;
alien_defs[CD_REBELCARRIER].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_REBELCARRIER].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_REBELCARRIER].chance[0] = 50;
alien_defs[CD_REBELCARRIER].chance[1] = 2;
alien_defs[CD_REBELCARRIER].collectChance = 0;
alien_defs[CD_REBELCARRIER].collectType = P_SHIELD;
alien_defs[CD_REBELCARRIER].collectValue = 0;
alien_defs[CD_REBELCARRIER].flags = FL_FRIEND;
// Pluto Boss
alien_defs[CD_PLUTOBOSS].classDef = CD_PLUTOBOSS;
alien_defs[CD_PLUTOBOSS].AIType = AI_OFFENSIVE;
alien_defs[CD_PLUTOBOSS].speed = 4;
alien_defs[CD_PLUTOBOSS].maxShield = 500;
alien_defs[CD_PLUTOBOSS].shield = 500;
alien_defs[CD_PLUTOBOSS].imageIndex[0] = 12;
alien_defs[CD_PLUTOBOSS].imageIndex[1] = 13;
alien_defs[CD_PLUTOBOSS].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_PLUTOBOSS].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_PLUTOBOSS].chance[0] = 50;
alien_defs[CD_PLUTOBOSS].chance[1] = 2;
alien_defs[CD_PLUTOBOSS].collectChance = 0;
alien_defs[CD_PLUTOBOSS].collectType = P_SHIELD;
alien_defs[CD_PLUTOBOSS].collectValue = 1000;
alien_defs[CD_PLUTOBOSS].flags = FL_WEAPCO;
// Pluto Boss Barrier
alien_defs[CD_BARRIER].classDef = CD_BARRIER;
alien_defs[CD_BARRIER].AIType = AI_OFFENSIVE;
alien_defs[CD_BARRIER].speed = 1;
alien_defs[CD_BARRIER].maxShield = 250;
alien_defs[CD_BARRIER].shield = 250;
alien_defs[CD_BARRIER].imageIndex[0] = 32;
alien_defs[CD_BARRIER].imageIndex[1] = 33;
alien_defs[CD_BARRIER].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_BARRIER].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_BARRIER].chance[0] = 0;
alien_defs[CD_BARRIER].chance[1] = 0;
alien_defs[CD_BARRIER].collectChance = 100;
alien_defs[CD_BARRIER].collectType = P_ANYTHING;
alien_defs[CD_BARRIER].collectValue = 25;
alien_defs[CD_BARRIER].flags = FL_WEAPCO | FL_NOFIRE;
// Neptune Boss
alien_defs[CD_NEPTUNEBOSS].classDef = CD_NEPTUNEBOSS;
alien_defs[CD_NEPTUNEBOSS].AIType = AI_OFFENSIVE;
alien_defs[CD_NEPTUNEBOSS].speed = 4;
alien_defs[CD_NEPTUNEBOSS].maxShield = 800;
alien_defs[CD_NEPTUNEBOSS].shield = 800;
alien_defs[CD_NEPTUNEBOSS].imageIndex[0] = 12;
alien_defs[CD_NEPTUNEBOSS].imageIndex[1] = 13;
alien_defs[CD_NEPTUNEBOSS].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_NEPTUNEBOSS].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_NEPTUNEBOSS].chance[0] = 100;
alien_defs[CD_NEPTUNEBOSS].chance[1] = 0;
alien_defs[CD_NEPTUNEBOSS].collectChance = 100;
alien_defs[CD_NEPTUNEBOSS].collectType = P_ANYTHING;
alien_defs[CD_NEPTUNEBOSS].collectValue = 1000;
alien_defs[CD_NEPTUNEBOSS].flags = FL_WEAPCO;
// Mobile Shield
alien_defs[CD_MOBILESHIELD].classDef = CD_MOBILESHIELD;
alien_defs[CD_MOBILESHIELD].AIType = AI_EVASIVE;
alien_defs[CD_MOBILESHIELD].speed = 6;
alien_defs[CD_MOBILESHIELD].maxShield = 150;
alien_defs[CD_MOBILESHIELD].shield = 150;
alien_defs[CD_MOBILESHIELD].imageIndex[0] = 34;
alien_defs[CD_MOBILESHIELD].imageIndex[1] = 35;
alien_defs[CD_MOBILESHIELD].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_MOBILESHIELD].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_MOBILESHIELD].chance[0] = 0;
alien_defs[CD_MOBILESHIELD].chance[1] = 0;
alien_defs[CD_MOBILESHIELD].collectChance = 100;
alien_defs[CD_MOBILESHIELD].collectType = P_ANYTHING;
alien_defs[CD_MOBILESHIELD].collectValue = 25;
alien_defs[CD_MOBILESHIELD].flags = FL_WEAPCO | FL_NOFIRE;
// Firefly
alien_defs[CD_FIREFLY].classDef = CD_FIREFLY;
alien_defs[CD_FIREFLY].AIType = AI_OFFENSIVE;
alien_defs[CD_FIREFLY].speed = 5;
alien_defs[CD_FIREFLY].maxShield = 250;
alien_defs[CD_FIREFLY].shield = 250;
alien_defs[CD_FIREFLY].imageIndex[0] = 0;
alien_defs[CD_FIREFLY].imageIndex[1] = 1;
alien_defs[CD_FIREFLY].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_FIREFLY].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_FIREFLY].chance[0] = 100;
alien_defs[CD_FIREFLY].chance[1] = 5;
alien_defs[CD_FIREFLY].collectChance = 100;
alien_defs[CD_FIREFLY].collectType = P_ANYTHING;
alien_defs[CD_FIREFLY].collectValue = 250;
alien_defs[CD_FIREFLY].flags = FL_WEAPCO;
// Uranus Boss
alien_defs[CD_URANUSBOSS].classDef = CD_URANUSBOSS;
alien_defs[CD_URANUSBOSS].AIType = AI_OFFENSIVE;
alien_defs[CD_URANUSBOSS].speed = 4;
alien_defs[CD_URANUSBOSS].maxShield = 750;
alien_defs[CD_URANUSBOSS].shield = 750;
alien_defs[CD_URANUSBOSS].imageIndex[0] = 41;
alien_defs[CD_URANUSBOSS].imageIndex[1] = 42;
alien_defs[CD_URANUSBOSS].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_URANUSBOSS].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSS].chance[0] = 100;
alien_defs[CD_URANUSBOSS].chance[1] = 5;
alien_defs[CD_URANUSBOSS].collectChance = 100;
alien_defs[CD_URANUSBOSS].collectType = P_ANYTHING;
alien_defs[CD_URANUSBOSS].collectValue = 500;
alien_defs[CD_URANUSBOSS].flags = FL_WEAPCO;
// Uranus Boss Wing 1
alien_defs[CD_URANUSBOSSWING1].classDef = CD_URANUSBOSSWING1;
alien_defs[CD_URANUSBOSSWING1].AIType = AI_OFFENSIVE;
alien_defs[CD_URANUSBOSSWING1].speed = 4;
alien_defs[CD_URANUSBOSSWING1].maxShield = 250;
alien_defs[CD_URANUSBOSSWING1].shield = 250;
alien_defs[CD_URANUSBOSSWING1].imageIndex[0] = 43;
alien_defs[CD_URANUSBOSSWING1].imageIndex[1] = 44;
alien_defs[CD_URANUSBOSSWING1].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING1].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING1].chance[0] = 5;
alien_defs[CD_URANUSBOSSWING1].chance[1] = 0;
alien_defs[CD_URANUSBOSSWING1].collectChance = 100;
alien_defs[CD_URANUSBOSSWING1].collectType = P_ANYTHING;
alien_defs[CD_URANUSBOSSWING1].collectValue = 250;
alien_defs[CD_URANUSBOSSWING1].flags = FL_WEAPCO | FL_IMMORTAL;
// Uranus Boss Wing 2
alien_defs[CD_URANUSBOSSWING2].classDef = CD_URANUSBOSSWING2;
alien_defs[CD_URANUSBOSSWING2].AIType = AI_OFFENSIVE;
alien_defs[CD_URANUSBOSSWING2].speed = 4;
alien_defs[CD_URANUSBOSSWING2].maxShield = 250;
alien_defs[CD_URANUSBOSSWING2].shield = 250;
alien_defs[CD_URANUSBOSSWING2].imageIndex[0] = 45;
alien_defs[CD_URANUSBOSSWING2].imageIndex[1] = 46;
alien_defs[CD_URANUSBOSSWING2].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING2].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING2].chance[0] = 5;
alien_defs[CD_URANUSBOSSWING2].chance[1] = 0;
alien_defs[CD_URANUSBOSSWING2].collectChance = 100;
alien_defs[CD_URANUSBOSSWING2].collectType = P_ANYTHING;
alien_defs[CD_URANUSBOSSWING2].collectValue = 250;
alien_defs[CD_URANUSBOSSWING2].flags = FL_WEAPCO | FL_IMMORTAL;
alien_defs_init();
setColorIndexes();

View File

@ -20,7 +20,649 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "Starfighter.h"
object alien_defs[CD_MAX];
object aliens[MAX_ALIENS];
object aliens[ALIEN_MAX];
void alien_defs_init()
{
// Dual Plasma Fighter.
alien_defs[CD_DUALFIGHTER].classDef = CD_DUALFIGHTER;
alien_defs[CD_DUALFIGHTER].AIType = AI_NORMAL;
alien_defs[CD_DUALFIGHTER].speed = 4;
alien_defs[CD_DUALFIGHTER].maxShield = 5;
alien_defs[CD_DUALFIGHTER].shield = 5;
alien_defs[CD_DUALFIGHTER].imageIndex[0] = 2;
alien_defs[CD_DUALFIGHTER].imageIndex[1] = 3;
alien_defs[CD_DUALFIGHTER].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_DUALFIGHTER].weaponType[1] = W_ROCKETS;
alien_defs[CD_DUALFIGHTER].chance[0] = 100;
alien_defs[CD_DUALFIGHTER].chance[1] = 1;
alien_defs[CD_DUALFIGHTER].collectChance = 50;
alien_defs[CD_DUALFIGHTER].collectType = P_ANYTHING;
alien_defs[CD_DUALFIGHTER].collectValue = 50;
alien_defs[CD_DUALFIGHTER].flags = FL_WEAPCO;
// Missile Boat
alien_defs[CD_MISSILEBOAT].classDef = CD_MISSILEBOAT;
alien_defs[CD_MISSILEBOAT].AIType = AI_DEFENSIVE;
alien_defs[CD_MISSILEBOAT].speed = 2;
alien_defs[CD_MISSILEBOAT].maxShield = 50;
alien_defs[CD_MISSILEBOAT].shield = 50;
alien_defs[CD_MISSILEBOAT].imageIndex[0] = 4;
alien_defs[CD_MISSILEBOAT].imageIndex[1] = 5;
alien_defs[CD_MISSILEBOAT].weaponType[0] = W_ROCKETS;
alien_defs[CD_MISSILEBOAT].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_MISSILEBOAT].chance[0] = 25;
alien_defs[CD_MISSILEBOAT].chance[1] = 4;
alien_defs[CD_MISSILEBOAT].collectChance = 25;
alien_defs[CD_MISSILEBOAT].collectType = P_ANYTHING;
alien_defs[CD_MISSILEBOAT].collectValue = 75;
alien_defs[CD_MISSILEBOAT].flags = FL_WEAPCO;
//Prototype fighter
alien_defs[CD_PROTOFIGHTER].classDef = CD_PROTOFIGHTER;
alien_defs[CD_PROTOFIGHTER].AIType = AI_DEFENSIVE;
alien_defs[CD_PROTOFIGHTER].speed = 5;
alien_defs[CD_PROTOFIGHTER].maxShield = 15;
alien_defs[CD_PROTOFIGHTER].shield = 15;
alien_defs[CD_PROTOFIGHTER].imageIndex[0] = 6;
alien_defs[CD_PROTOFIGHTER].imageIndex[1] = 7;
alien_defs[CD_PROTOFIGHTER].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_PROTOFIGHTER].weaponType[1] = P_ANYTHING;
alien_defs[CD_PROTOFIGHTER].chance[0] = 100;
alien_defs[CD_PROTOFIGHTER].chance[1] = 1;
alien_defs[CD_PROTOFIGHTER].collectChance = 50;
alien_defs[CD_PROTOFIGHTER].collectType = P_ANYTHING;
alien_defs[CD_PROTOFIGHTER].collectValue = 50;
alien_defs[CD_PROTOFIGHTER].flags = FL_WEAPCO;
// Phoebe and Ursula
alien_defs[CD_FRIEND].classDef = CD_FRIEND;
alien_defs[CD_FRIEND].AIType = AI_OFFENSIVE;
alien_defs[CD_FRIEND].speed = 3;
alien_defs[CD_FRIEND].maxShield = 50;
alien_defs[CD_FRIEND].shield = 50;
alien_defs[CD_FRIEND].imageIndex[0] = 20;
alien_defs[CD_FRIEND].imageIndex[1] = 21;
alien_defs[CD_FRIEND].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_FRIEND].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_FRIEND].chance[0] = 100;
alien_defs[CD_FRIEND].chance[1] = 5;
alien_defs[CD_FRIEND].collectChance = 0;
alien_defs[CD_FRIEND].collectType = P_CASH;
alien_defs[CD_FRIEND].collectValue = 0;
alien_defs[CD_FRIEND].flags = FL_FRIEND;
// Boss 1
alien_defs[CD_FRIGATE].classDef = CD_BOSS;
alien_defs[CD_FRIGATE].AIType = AI_NORMAL;
alien_defs[CD_FRIGATE].speed = 2;
alien_defs[CD_FRIGATE].maxShield = 550;
alien_defs[CD_FRIGATE].shield = 550;
alien_defs[CD_FRIGATE].imageIndex[0] = 8;
alien_defs[CD_FRIGATE].imageIndex[1] = 9;
alien_defs[CD_FRIGATE].weaponType[0] = W_MICRO_ROCKETS;
alien_defs[CD_FRIGATE].weaponType[1] = W_ENERGYRAY;
alien_defs[CD_FRIGATE].chance[0] = 100;
alien_defs[CD_FRIGATE].chance[1] = 85;
alien_defs[CD_FRIGATE].collectChance = 100;
alien_defs[CD_FRIGATE].collectType = P_CASH;
alien_defs[CD_FRIGATE].collectValue = 500;
alien_defs[CD_FRIGATE].flags = FL_WEAPCO;
alien_defs[CD_FRIGATE_WING1].classDef = CD_FRIGATE_WING1;
alien_defs[CD_FRIGATE_WING1].AIType = AI_NORMAL;
alien_defs[CD_FRIGATE_WING1].speed = 2;
alien_defs[CD_FRIGATE_WING1].maxShield = 100;
alien_defs[CD_FRIGATE_WING1].shield = 100;
alien_defs[CD_FRIGATE_WING1].imageIndex[0] = 10;
alien_defs[CD_FRIGATE_WING1].imageIndex[1] = 11;
alien_defs[CD_FRIGATE_WING1].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_FRIGATE_WING1].weaponType[1] = W_ROCKETS;
alien_defs[CD_FRIGATE_WING1].chance[0] = 100;
alien_defs[CD_FRIGATE_WING1].chance[1] = 10;
alien_defs[CD_FRIGATE_WING1].collectChance = 100;
alien_defs[CD_FRIGATE_WING1].collectType = P_ANYTHING;
alien_defs[CD_FRIGATE_WING1].collectValue = 250;
alien_defs[CD_FRIGATE_WING1].flags = FL_WEAPCO | FL_DAMAGEOWNER;
alien_defs[CD_FRIGATE_WING2].classDef = CD_FRIGATE_WING2;
alien_defs[CD_FRIGATE_WING2].AIType = AI_NORMAL;
alien_defs[CD_FRIGATE_WING2].speed = 2;
alien_defs[CD_FRIGATE_WING2].maxShield = 100;
alien_defs[CD_FRIGATE_WING2].shield = 100;
alien_defs[CD_FRIGATE_WING2].imageIndex[0] = 12;
alien_defs[CD_FRIGATE_WING2].imageIndex[1] = 13;
alien_defs[CD_FRIGATE_WING2].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_FRIGATE_WING2].weaponType[1] = W_ROCKETS;
alien_defs[CD_FRIGATE_WING2].chance[0] = 100;
alien_defs[CD_FRIGATE_WING2].chance[1] = 10;
alien_defs[CD_FRIGATE_WING2].collectChance = 100;
alien_defs[CD_FRIGATE_WING2].collectType = P_ANYTHING;
alien_defs[CD_FRIGATE_WING2].collectValue = 250;
alien_defs[CD_FRIGATE_WING2].flags = FL_WEAPCO | FL_DAMAGEOWNER;
// Transport ship
alien_defs[CD_TRANSPORTSHIP].classDef = CD_TRANSPORTSHIP;
alien_defs[CD_TRANSPORTSHIP].AIType = AI_EVASIVE;
alien_defs[CD_TRANSPORTSHIP].speed = 4;
alien_defs[CD_TRANSPORTSHIP].maxShield = 10;
alien_defs[CD_TRANSPORTSHIP].shield = 10;
alien_defs[CD_TRANSPORTSHIP].imageIndex[0] = 14;
alien_defs[CD_TRANSPORTSHIP].imageIndex[1] = 15;
alien_defs[CD_TRANSPORTSHIP].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_TRANSPORTSHIP].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_TRANSPORTSHIP].chance[0] = 0;
alien_defs[CD_TRANSPORTSHIP].chance[1] = 0;
alien_defs[CD_TRANSPORTSHIP].collectChance = 100;
alien_defs[CD_TRANSPORTSHIP].collectType = P_WEAPONS;
alien_defs[CD_TRANSPORTSHIP].collectValue = 30;
alien_defs[CD_TRANSPORTSHIP].flags = FL_WEAPCO | FL_NOFIRE;
// Cargo ship
alien_defs[CD_CARGOSHIP].classDef = CD_CARGOSHIP;
alien_defs[CD_CARGOSHIP].AIType = AI_EVASIVE;
alien_defs[CD_CARGOSHIP].speed = 4;
alien_defs[CD_CARGOSHIP].maxShield = 10;
alien_defs[CD_CARGOSHIP].shield = 10;
alien_defs[CD_CARGOSHIP].imageIndex[0] = 22;
alien_defs[CD_CARGOSHIP].imageIndex[1] = 23;
alien_defs[CD_CARGOSHIP].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_CARGOSHIP].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_CARGOSHIP].chance[0] = 0;
alien_defs[CD_CARGOSHIP].chance[1] = 0;
alien_defs[CD_CARGOSHIP].collectChance = 50;
alien_defs[CD_CARGOSHIP].collectType = P_ANYTHING;
alien_defs[CD_CARGOSHIP].collectValue = 100;
alien_defs[CD_CARGOSHIP].flags = FL_WEAPCO | FL_NOFIRE;
// Weapco Miner
alien_defs[CD_MINER].classDef = CD_MINER;
alien_defs[CD_MINER].AIType = AI_EVASIVE;
alien_defs[CD_MINER].speed = 4;
alien_defs[CD_MINER].maxShield = 25;
alien_defs[CD_MINER].shield = 25;
alien_defs[CD_MINER].imageIndex[0] = 16;
alien_defs[CD_MINER].imageIndex[1] = 17;
alien_defs[CD_MINER].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_MINER].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_MINER].chance[0] = 0;
alien_defs[CD_MINER].chance[1] = 0;
alien_defs[CD_MINER].collectChance = 100;
alien_defs[CD_MINER].collectType = P_ANYTHING;
alien_defs[CD_MINER].collectValue = 30;
alien_defs[CD_MINER].flags = FL_WEAPCO | FL_NOFIRE | FL_DROPMINES;
// Kline
alien_defs[CD_KLINE].classDef = CD_KLINE;
alien_defs[CD_KLINE].AIType = AI_OFFENSIVE;
alien_defs[CD_KLINE].speed = 5;
alien_defs[CD_KLINE].maxShield = 2000;
alien_defs[CD_KLINE].shield = 2000;
alien_defs[CD_KLINE].imageIndex[0] = 18;
alien_defs[CD_KLINE].imageIndex[1] = 19;
alien_defs[CD_KLINE].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_KLINE].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_KLINE].chance[0] = 100;
alien_defs[CD_KLINE].chance[1] = 2;
alien_defs[CD_KLINE].collectChance = 0;
alien_defs[CD_KLINE].collectType = P_ANYTHING;
alien_defs[CD_KLINE].collectValue = 0;
alien_defs[CD_KLINE].flags = FL_WEAPCO | FL_ALWAYSFACE | FL_CIRCLES;
// Aim Fighter
alien_defs[CD_AIMFIGHTER].classDef = CD_AIMFIGHTER;
alien_defs[CD_AIMFIGHTER].AIType = AI_NORMAL;
alien_defs[CD_AIMFIGHTER].speed = 3;
alien_defs[CD_AIMFIGHTER].maxShield = 15;
alien_defs[CD_AIMFIGHTER].shield = 15;
alien_defs[CD_AIMFIGHTER].imageIndex[0] = 8;
alien_defs[CD_AIMFIGHTER].imageIndex[1] = 9;
alien_defs[CD_AIMFIGHTER].weaponType[0] = W_AIMED_SHOT;
alien_defs[CD_AIMFIGHTER].weaponType[1] = W_AIMED_SHOT;
alien_defs[CD_AIMFIGHTER].chance[0] = 7;
alien_defs[CD_AIMFIGHTER].chance[1] = 1;
alien_defs[CD_AIMFIGHTER].collectChance = 75;
alien_defs[CD_AIMFIGHTER].collectType = P_ANYTHING;
alien_defs[CD_AIMFIGHTER].collectValue = 100;
alien_defs[CD_AIMFIGHTER].flags = FL_WEAPCO | FL_AIMS;
// Slave ship
alien_defs[CD_SLAVETRANSPORT].classDef = CD_SLAVETRANSPORT;
alien_defs[CD_SLAVETRANSPORT].AIType = AI_EVASIVE;
alien_defs[CD_SLAVETRANSPORT].speed = 2;
alien_defs[CD_SLAVETRANSPORT].maxShield = 10;
alien_defs[CD_SLAVETRANSPORT].shield = 20;
alien_defs[CD_SLAVETRANSPORT].imageIndex[0] = 10;
alien_defs[CD_SLAVETRANSPORT].imageIndex[1] = 11;
alien_defs[CD_SLAVETRANSPORT].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_SLAVETRANSPORT].weaponType[1] = W_DOUBLE_SHOT;
alien_defs[CD_SLAVETRANSPORT].chance[0] = 0;
alien_defs[CD_SLAVETRANSPORT].chance[1] = 0;
alien_defs[CD_SLAVETRANSPORT].collectChance = 100;
alien_defs[CD_SLAVETRANSPORT].collectType = P_SLAVES;
alien_defs[CD_SLAVETRANSPORT].collectValue = 25;
alien_defs[CD_SLAVETRANSPORT].flags = FL_WEAPCO | FL_NOFIRE;
// Good Transport
alien_defs[CD_GOODTRANSPORT].classDef = CD_GOODTRANSPORT;
alien_defs[CD_GOODTRANSPORT].AIType = AI_EVASIVE;
alien_defs[CD_GOODTRANSPORT].speed = 3;
alien_defs[CD_GOODTRANSPORT].maxShield = 75;
alien_defs[CD_GOODTRANSPORT].shield = 75;
alien_defs[CD_GOODTRANSPORT].imageIndex[0] = 12;
alien_defs[CD_GOODTRANSPORT].imageIndex[1] = 13;
alien_defs[CD_GOODTRANSPORT].weaponType[0] = W_AIMED_SHOT;
alien_defs[CD_GOODTRANSPORT].weaponType[1] = W_AIMED_SHOT;
alien_defs[CD_GOODTRANSPORT].chance[0] = 100;
alien_defs[CD_GOODTRANSPORT].chance[1] = 100;
alien_defs[CD_GOODTRANSPORT].collectChance = 0;
alien_defs[CD_GOODTRANSPORT].collectType = P_ANYTHING;
alien_defs[CD_GOODTRANSPORT].collectValue = 0;
alien_defs[CD_GOODTRANSPORT].flags = FL_FRIEND | FL_NOFIRE | FL_AIMS;
// Sid Wilson
alien_defs[CD_SID].classDef = CD_SID;
alien_defs[CD_SID].AIType = AI_NORMAL;
alien_defs[CD_SID].speed = 3;
alien_defs[CD_SID].maxShield = 50;
alien_defs[CD_SID].shield = 50;
alien_defs[CD_SID].imageIndex[0] = 24;
alien_defs[CD_SID].imageIndex[1] = 25;
alien_defs[CD_SID].weaponType[0] = W_IONCANNON;
alien_defs[CD_SID].weaponType[1] = W_IONCANNON;
alien_defs[CD_SID].chance[0] = 100;
alien_defs[CD_SID].chance[1] = 0;
alien_defs[CD_SID].collectChance = 0;
alien_defs[CD_SID].collectType = P_ANYTHING;
alien_defs[CD_SID].collectValue = 0;
alien_defs[CD_SID].flags = FL_FRIEND | FL_AIMS;
// Mining Vessel Boss
alien_defs[CD_MINEBOSS].classDef = CD_BOSS;
alien_defs[CD_MINEBOSS].AIType = AI_NORMAL;
alien_defs[CD_MINEBOSS].speed = 3;
alien_defs[CD_MINEBOSS].maxShield = 1000;
alien_defs[CD_MINEBOSS].shield = 1000;
alien_defs[CD_MINEBOSS].imageIndex[0] = 26;
alien_defs[CD_MINEBOSS].imageIndex[1] = 27;
alien_defs[CD_MINEBOSS].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_MINEBOSS].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_MINEBOSS].chance[0] = 0;
alien_defs[CD_MINEBOSS].chance[1] = 0;
alien_defs[CD_MINEBOSS].collectChance = 100;
alien_defs[CD_MINEBOSS].collectType = P_ANYTHING;
alien_defs[CD_MINEBOSS].collectValue = 1000;
alien_defs[CD_MINEBOSS].flags = FL_WEAPCO | FL_IMMORTAL;
alien_defs[CD_BOSS2_WING1].classDef = CD_BOSS2_WING1;
alien_defs[CD_BOSS2_WING1].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING1].speed = 1;
alien_defs[CD_BOSS2_WING1].maxShield = 250;
alien_defs[CD_BOSS2_WING1].shield = 250;
alien_defs[CD_BOSS2_WING1].imageIndex[0] = 28;
alien_defs[CD_BOSS2_WING1].imageIndex[1] = 29;
alien_defs[CD_BOSS2_WING1].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING1].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING1].chance[0] = 0;
alien_defs[CD_BOSS2_WING1].chance[1] = 0;
alien_defs[CD_BOSS2_WING1].collectChance = 100;
alien_defs[CD_BOSS2_WING1].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING1].collectValue = 250;
alien_defs[CD_BOSS2_WING1].flags = FL_WEAPCO | FL_DAMAGEOWNER;
alien_defs[CD_BOSS2_WING2].classDef = CD_BOSS2_WING2;
alien_defs[CD_BOSS2_WING2].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING2].speed = 1;
alien_defs[CD_BOSS2_WING2].maxShield = 500;
alien_defs[CD_BOSS2_WING2].shield = 500;
alien_defs[CD_BOSS2_WING2].imageIndex[0] = 30;
alien_defs[CD_BOSS2_WING2].imageIndex[1] = 31;
alien_defs[CD_BOSS2_WING2].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING2].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING2].chance[0] = 0;
alien_defs[CD_BOSS2_WING2].chance[1] = 0;
alien_defs[CD_BOSS2_WING2].collectChance = 100;
alien_defs[CD_BOSS2_WING2].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING2].collectValue = 250;
alien_defs[CD_BOSS2_WING2].flags = FL_WEAPCO | FL_DEPLOYDRONES | FL_DAMAGEOWNER;
alien_defs[CD_BOSS2_WING3].classDef = CD_BOSS2_WING3;
alien_defs[CD_BOSS2_WING3].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING3].speed = 1;
alien_defs[CD_BOSS2_WING3].maxShield = 500;
alien_defs[CD_BOSS2_WING3].shield = 500;
alien_defs[CD_BOSS2_WING3].imageIndex[0] = 32;
alien_defs[CD_BOSS2_WING3].imageIndex[1] = 33;
alien_defs[CD_BOSS2_WING3].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING3].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING3].chance[0] = 0;
alien_defs[CD_BOSS2_WING3].chance[1] = 0;
alien_defs[CD_BOSS2_WING3].collectChance = 100;
alien_defs[CD_BOSS2_WING3].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING3].collectValue = 250;
alien_defs[CD_BOSS2_WING3].flags = FL_WEAPCO | FL_DEPLOYDRONES | FL_DAMAGEOWNER;
alien_defs[CD_BOSS2_WING4].classDef = CD_BOSS2_WING4;
alien_defs[CD_BOSS2_WING4].AIType = AI_NORMAL;
alien_defs[CD_BOSS2_WING4].speed = 1;
alien_defs[CD_BOSS2_WING4].maxShield = 250;
alien_defs[CD_BOSS2_WING4].shield = 250;
alien_defs[CD_BOSS2_WING4].imageIndex[0] = 34;
alien_defs[CD_BOSS2_WING4].imageIndex[1] = 35;
alien_defs[CD_BOSS2_WING4].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_BOSS2_WING4].weaponType[1] = W_SPREADSHOT;
alien_defs[CD_BOSS2_WING4].chance[0] = 0;
alien_defs[CD_BOSS2_WING4].chance[1] = 0;
alien_defs[CD_BOSS2_WING4].collectChance = 100;
alien_defs[CD_BOSS2_WING4].collectType = P_ANYTHING;
alien_defs[CD_BOSS2_WING4].collectValue = 250;
alien_defs[CD_BOSS2_WING4].flags = FL_WEAPCO | FL_DAMAGEOWNER;
// Drone
alien_defs[CD_DRONE].classDef = CD_DRONE;
alien_defs[CD_DRONE].AIType = AI_OFFENSIVE;
alien_defs[CD_DRONE].speed = 8;
alien_defs[CD_DRONE].maxShield = 5;
alien_defs[CD_DRONE].shield = 5;
alien_defs[CD_DRONE].imageIndex[0] = 36;
alien_defs[CD_DRONE].imageIndex[1] = 37;
alien_defs[CD_DRONE].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_DRONE].weaponType[1] = W_LASER;
alien_defs[CD_DRONE].chance[0] = 100;
alien_defs[CD_DRONE].chance[1] = 0;
alien_defs[CD_DRONE].collectChance = 10;
alien_defs[CD_DRONE].collectType = P_SHIELD;
alien_defs[CD_DRONE].collectValue = 1;
alien_defs[CD_DRONE].flags = FL_WEAPCO;
// Experimental Fighter
alien_defs[CD_CLOAKFIGHTER].classDef = CD_CLOAKFIGHTER;
alien_defs[CD_CLOAKFIGHTER].AIType = AI_OFFENSIVE;
alien_defs[CD_CLOAKFIGHTER].speed = 6;
alien_defs[CD_CLOAKFIGHTER].maxShield = 1000;
alien_defs[CD_CLOAKFIGHTER].shield = 1000;
alien_defs[CD_CLOAKFIGHTER].imageIndex[0] = 10;
alien_defs[CD_CLOAKFIGHTER].imageIndex[1] = 11;
alien_defs[CD_CLOAKFIGHTER].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_CLOAKFIGHTER].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_CLOAKFIGHTER].chance[0] = 100;
alien_defs[CD_CLOAKFIGHTER].chance[1] = 5;
alien_defs[CD_CLOAKFIGHTER].collectChance = 100;
alien_defs[CD_CLOAKFIGHTER].collectType = P_CASH;
alien_defs[CD_CLOAKFIGHTER].collectValue = 250;
alien_defs[CD_CLOAKFIGHTER].flags = FL_WEAPCO | FL_CANCLOAK | FL_RUNSAWAY;
// Evil Ursula
alien_defs[CD_EVILURSULA].classDef = CD_EVILURSULA;
alien_defs[CD_EVILURSULA].AIType = AI_OFFENSIVE;
alien_defs[CD_EVILURSULA].speed = 5;
alien_defs[CD_EVILURSULA].maxShield = 500;
alien_defs[CD_EVILURSULA].shield = 500;
alien_defs[CD_EVILURSULA].imageIndex[0] = 12;
alien_defs[CD_EVILURSULA].imageIndex[1] = 13;
alien_defs[CD_EVILURSULA].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_EVILURSULA].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_EVILURSULA].chance[0] = 100;
alien_defs[CD_EVILURSULA].chance[1] = 100;
alien_defs[CD_EVILURSULA].collectChance = 100;
alien_defs[CD_EVILURSULA].collectType = P_ESCAPEPOD;
alien_defs[CD_EVILURSULA].collectValue = 1;
alien_defs[CD_EVILURSULA].flags = FL_WEAPCO;
// Mercenary
alien_defs[CD_KRASS].classDef = CD_KRASS;
alien_defs[CD_KRASS].AIType = AI_OFFENSIVE;
alien_defs[CD_KRASS].speed = 5;
alien_defs[CD_KRASS].maxShield = 1000;
alien_defs[CD_KRASS].shield = 1000;
alien_defs[CD_KRASS].imageIndex[0] = 26;
alien_defs[CD_KRASS].imageIndex[1] = 27;
alien_defs[CD_KRASS].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_KRASS].weaponType[1] = W_CHARGER;
alien_defs[CD_KRASS].chance[0] = 100;
alien_defs[CD_KRASS].chance[1] = 0;
alien_defs[CD_KRASS].collectChance = 100;
alien_defs[CD_KRASS].collectType = P_ANYTHING;
alien_defs[CD_KRASS].collectValue = 2250;
alien_defs[CD_KRASS].flags = FL_FRIEND | FL_IMMORTAL;
// Executive Transport
alien_defs[CD_EXEC].classDef = CD_BOSS;
alien_defs[CD_EXEC].AIType = AI_NORMAL;
alien_defs[CD_EXEC].speed = 5;
alien_defs[CD_EXEC].maxShield = 1000;
alien_defs[CD_EXEC].shield = 1000;
alien_defs[CD_EXEC].imageIndex[0] = 28;
alien_defs[CD_EXEC].imageIndex[1] = 28;
alien_defs[CD_EXEC].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_EXEC].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_EXEC].chance[0] = 0;
alien_defs[CD_EXEC].chance[1] = 0;
alien_defs[CD_EXEC].collectChance = 0;
alien_defs[CD_EXEC].collectType = P_ANYTHING;
alien_defs[CD_EXEC].collectValue = 2000;
alien_defs[CD_EXEC].flags = FL_WEAPCO | FL_NOFIRE;
// Asteroid
alien_defs[CD_ASTEROID].classDef = CD_ASTEROID;
alien_defs[CD_ASTEROID].AIType = AI_WANDER;
alien_defs[CD_ASTEROID].speed = 1;
alien_defs[CD_ASTEROID].maxShield = 50;
alien_defs[CD_ASTEROID].shield = 50;
alien_defs[CD_ASTEROID].imageIndex[0] = 38;
alien_defs[CD_ASTEROID].imageIndex[1] = 38;
alien_defs[CD_ASTEROID].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_ASTEROID].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_ASTEROID].chance[0] = 0;
alien_defs[CD_ASTEROID].chance[1] = 0;
alien_defs[CD_ASTEROID].collectChance = 25;
alien_defs[CD_ASTEROID].collectType = P_ORE;
alien_defs[CD_ASTEROID].collectValue = 1;
alien_defs[CD_ASTEROID].flags = FL_WEAPCO;
alien_defs[CD_ASTEROID2].classDef = CD_ASTEROID2;
alien_defs[CD_ASTEROID2].AIType = AI_WANDER;
alien_defs[CD_ASTEROID2].speed = 1;
alien_defs[CD_ASTEROID2].maxShield = 10;
alien_defs[CD_ASTEROID2].shield = 10;
alien_defs[CD_ASTEROID2].imageIndex[0] = 39;
alien_defs[CD_ASTEROID2].imageIndex[1] = 40;
alien_defs[CD_ASTEROID2].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_ASTEROID2].weaponType[1] = W_HOMING_MISSILE;
alien_defs[CD_ASTEROID2].chance[0] = 0;
alien_defs[CD_ASTEROID2].chance[1] = 0;
alien_defs[CD_ASTEROID2].collectChance = 25;
alien_defs[CD_ASTEROID2].collectType = P_ORE;
alien_defs[CD_ASTEROID2].collectValue = 1;
alien_defs[CD_ASTEROID2].flags = FL_WEAPCO;
// Escort
alien_defs[CD_ESCORT].classDef = CD_ESCORT;
alien_defs[CD_ESCORT].AIType = AI_NORMAL;
alien_defs[CD_ESCORT].speed = 3;
alien_defs[CD_ESCORT].maxShield = 200;
alien_defs[CD_ESCORT].shield = 200;
alien_defs[CD_ESCORT].imageIndex[0] = 30;
alien_defs[CD_ESCORT].imageIndex[1] = 31;
alien_defs[CD_ESCORT].weaponType[0] = W_LASER;
alien_defs[CD_ESCORT].weaponType[1] = W_LASER;
alien_defs[CD_ESCORT].chance[0] = 25;
alien_defs[CD_ESCORT].chance[1] = 25;
alien_defs[CD_ESCORT].collectChance = 100;
alien_defs[CD_ESCORT].collectType = P_ANYTHING;
alien_defs[CD_ESCORT].collectValue = 100;
alien_defs[CD_ESCORT].flags = FL_WEAPCO;
// Mobile Ray Cannon
alien_defs[CD_MOBILE_RAY].classDef = CD_MOBILE_RAY;
alien_defs[CD_MOBILE_RAY].AIType = AI_OFFENSIVE;
alien_defs[CD_MOBILE_RAY].speed = 5;
alien_defs[CD_MOBILE_RAY].maxShield = 250;
alien_defs[CD_MOBILE_RAY].shield = 250;
alien_defs[CD_MOBILE_RAY].imageIndex[0] = 10;
alien_defs[CD_MOBILE_RAY].imageIndex[1] = 11;
alien_defs[CD_MOBILE_RAY].weaponType[0] = W_ENERGYRAY;
alien_defs[CD_MOBILE_RAY].weaponType[1] = W_ENERGYRAY;
alien_defs[CD_MOBILE_RAY].chance[0] = 50;
alien_defs[CD_MOBILE_RAY].chance[1] = 50;
alien_defs[CD_MOBILE_RAY].collectChance = 75;
alien_defs[CD_MOBILE_RAY].collectType = P_SHIELD;
alien_defs[CD_MOBILE_RAY].collectValue = 100;
alien_defs[CD_MOBILE_RAY].flags = FL_WEAPCO;
// Rebel Carrier
alien_defs[CD_REBELCARRIER].classDef = CD_REBELCARRIER;
alien_defs[CD_REBELCARRIER].AIType = AI_OFFENSIVE;
alien_defs[CD_REBELCARRIER].speed = 2;
alien_defs[CD_REBELCARRIER].maxShield = 100;
alien_defs[CD_REBELCARRIER].shield = 100;
alien_defs[CD_REBELCARRIER].imageIndex[0] = 32;
alien_defs[CD_REBELCARRIER].imageIndex[1] = 33;
alien_defs[CD_REBELCARRIER].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_REBELCARRIER].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_REBELCARRIER].chance[0] = 50;
alien_defs[CD_REBELCARRIER].chance[1] = 2;
alien_defs[CD_REBELCARRIER].collectChance = 0;
alien_defs[CD_REBELCARRIER].collectType = P_SHIELD;
alien_defs[CD_REBELCARRIER].collectValue = 0;
alien_defs[CD_REBELCARRIER].flags = FL_FRIEND;
// Pluto Boss
alien_defs[CD_PLUTOBOSS].classDef = CD_PLUTOBOSS;
alien_defs[CD_PLUTOBOSS].AIType = AI_OFFENSIVE;
alien_defs[CD_PLUTOBOSS].speed = 4;
alien_defs[CD_PLUTOBOSS].maxShield = 500;
alien_defs[CD_PLUTOBOSS].shield = 500;
alien_defs[CD_PLUTOBOSS].imageIndex[0] = 12;
alien_defs[CD_PLUTOBOSS].imageIndex[1] = 13;
alien_defs[CD_PLUTOBOSS].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_PLUTOBOSS].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_PLUTOBOSS].chance[0] = 50;
alien_defs[CD_PLUTOBOSS].chance[1] = 2;
alien_defs[CD_PLUTOBOSS].collectChance = 0;
alien_defs[CD_PLUTOBOSS].collectType = P_SHIELD;
alien_defs[CD_PLUTOBOSS].collectValue = 1000;
alien_defs[CD_PLUTOBOSS].flags = FL_WEAPCO;
// Pluto Boss Barrier
alien_defs[CD_BARRIER].classDef = CD_BARRIER;
alien_defs[CD_BARRIER].AIType = AI_OFFENSIVE;
alien_defs[CD_BARRIER].speed = 1;
alien_defs[CD_BARRIER].maxShield = 250;
alien_defs[CD_BARRIER].shield = 250;
alien_defs[CD_BARRIER].imageIndex[0] = 32;
alien_defs[CD_BARRIER].imageIndex[1] = 33;
alien_defs[CD_BARRIER].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_BARRIER].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_BARRIER].chance[0] = 0;
alien_defs[CD_BARRIER].chance[1] = 0;
alien_defs[CD_BARRIER].collectChance = 100;
alien_defs[CD_BARRIER].collectType = P_ANYTHING;
alien_defs[CD_BARRIER].collectValue = 25;
alien_defs[CD_BARRIER].flags = FL_WEAPCO | FL_NOFIRE;
// Neptune Boss
alien_defs[CD_NEPTUNEBOSS].classDef = CD_NEPTUNEBOSS;
alien_defs[CD_NEPTUNEBOSS].AIType = AI_OFFENSIVE;
alien_defs[CD_NEPTUNEBOSS].speed = 4;
alien_defs[CD_NEPTUNEBOSS].maxShield = 800;
alien_defs[CD_NEPTUNEBOSS].shield = 800;
alien_defs[CD_NEPTUNEBOSS].imageIndex[0] = 12;
alien_defs[CD_NEPTUNEBOSS].imageIndex[1] = 13;
alien_defs[CD_NEPTUNEBOSS].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_NEPTUNEBOSS].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_NEPTUNEBOSS].chance[0] = 100;
alien_defs[CD_NEPTUNEBOSS].chance[1] = 0;
alien_defs[CD_NEPTUNEBOSS].collectChance = 100;
alien_defs[CD_NEPTUNEBOSS].collectType = P_ANYTHING;
alien_defs[CD_NEPTUNEBOSS].collectValue = 1000;
alien_defs[CD_NEPTUNEBOSS].flags = FL_WEAPCO;
// Mobile Shield
alien_defs[CD_MOBILESHIELD].classDef = CD_MOBILESHIELD;
alien_defs[CD_MOBILESHIELD].AIType = AI_EVASIVE;
alien_defs[CD_MOBILESHIELD].speed = 6;
alien_defs[CD_MOBILESHIELD].maxShield = 150;
alien_defs[CD_MOBILESHIELD].shield = 150;
alien_defs[CD_MOBILESHIELD].imageIndex[0] = 34;
alien_defs[CD_MOBILESHIELD].imageIndex[1] = 35;
alien_defs[CD_MOBILESHIELD].weaponType[0] = W_DOUBLE_SHOT;
alien_defs[CD_MOBILESHIELD].weaponType[1] = W_MICRO_ROCKETS;
alien_defs[CD_MOBILESHIELD].chance[0] = 0;
alien_defs[CD_MOBILESHIELD].chance[1] = 0;
alien_defs[CD_MOBILESHIELD].collectChance = 100;
alien_defs[CD_MOBILESHIELD].collectType = P_ANYTHING;
alien_defs[CD_MOBILESHIELD].collectValue = 25;
alien_defs[CD_MOBILESHIELD].flags = FL_WEAPCO | FL_NOFIRE;
// Firefly
alien_defs[CD_FIREFLY].classDef = CD_FIREFLY;
alien_defs[CD_FIREFLY].AIType = AI_OFFENSIVE;
alien_defs[CD_FIREFLY].speed = 5;
alien_defs[CD_FIREFLY].maxShield = 250;
alien_defs[CD_FIREFLY].shield = 250;
alien_defs[CD_FIREFLY].imageIndex[0] = 0;
alien_defs[CD_FIREFLY].imageIndex[1] = 1;
alien_defs[CD_FIREFLY].weaponType[0] = W_TRIPLE_SHOT;
alien_defs[CD_FIREFLY].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_FIREFLY].chance[0] = 100;
alien_defs[CD_FIREFLY].chance[1] = 5;
alien_defs[CD_FIREFLY].collectChance = 100;
alien_defs[CD_FIREFLY].collectType = P_ANYTHING;
alien_defs[CD_FIREFLY].collectValue = 250;
alien_defs[CD_FIREFLY].flags = FL_WEAPCO;
// Uranus Boss
alien_defs[CD_URANUSBOSS].classDef = CD_URANUSBOSS;
alien_defs[CD_URANUSBOSS].AIType = AI_OFFENSIVE;
alien_defs[CD_URANUSBOSS].speed = 4;
alien_defs[CD_URANUSBOSS].maxShield = 750;
alien_defs[CD_URANUSBOSS].shield = 750;
alien_defs[CD_URANUSBOSS].imageIndex[0] = 41;
alien_defs[CD_URANUSBOSS].imageIndex[1] = 42;
alien_defs[CD_URANUSBOSS].weaponType[0] = W_SPREADSHOT;
alien_defs[CD_URANUSBOSS].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSS].chance[0] = 100;
alien_defs[CD_URANUSBOSS].chance[1] = 5;
alien_defs[CD_URANUSBOSS].collectChance = 100;
alien_defs[CD_URANUSBOSS].collectType = P_ANYTHING;
alien_defs[CD_URANUSBOSS].collectValue = 500;
alien_defs[CD_URANUSBOSS].flags = FL_WEAPCO;
// Uranus Boss Wing 1
alien_defs[CD_URANUSBOSSWING1].classDef = CD_URANUSBOSSWING1;
alien_defs[CD_URANUSBOSSWING1].AIType = AI_OFFENSIVE;
alien_defs[CD_URANUSBOSSWING1].speed = 4;
alien_defs[CD_URANUSBOSSWING1].maxShield = 250;
alien_defs[CD_URANUSBOSSWING1].shield = 250;
alien_defs[CD_URANUSBOSSWING1].imageIndex[0] = 43;
alien_defs[CD_URANUSBOSSWING1].imageIndex[1] = 44;
alien_defs[CD_URANUSBOSSWING1].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING1].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING1].chance[0] = 5;
alien_defs[CD_URANUSBOSSWING1].chance[1] = 0;
alien_defs[CD_URANUSBOSSWING1].collectChance = 100;
alien_defs[CD_URANUSBOSSWING1].collectType = P_ANYTHING;
alien_defs[CD_URANUSBOSSWING1].collectValue = 250;
alien_defs[CD_URANUSBOSSWING1].flags = FL_WEAPCO | FL_IMMORTAL;
// Uranus Boss Wing 2
alien_defs[CD_URANUSBOSSWING2].classDef = CD_URANUSBOSSWING2;
alien_defs[CD_URANUSBOSSWING2].AIType = AI_OFFENSIVE;
alien_defs[CD_URANUSBOSSWING2].speed = 4;
alien_defs[CD_URANUSBOSSWING2].maxShield = 250;
alien_defs[CD_URANUSBOSSWING2].shield = 250;
alien_defs[CD_URANUSBOSSWING2].imageIndex[0] = 45;
alien_defs[CD_URANUSBOSSWING2].imageIndex[1] = 46;
alien_defs[CD_URANUSBOSSWING2].weaponType[0] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING2].weaponType[1] = W_DOUBLE_ROCKETS;
alien_defs[CD_URANUSBOSSWING2].chance[0] = 5;
alien_defs[CD_URANUSBOSSWING2].chance[1] = 0;
alien_defs[CD_URANUSBOSSWING2].collectChance = 100;
alien_defs[CD_URANUSBOSSWING2].collectType = P_ANYTHING;
alien_defs[CD_URANUSBOSSWING2].collectValue = 250;
alien_defs[CD_URANUSBOSSWING2].flags = FL_WEAPCO | FL_IMMORTAL;
}
/*
This simply pulls back an alien from the array that is
@ -271,7 +913,7 @@ void alien_addSmallAsteroid(object *hostAlien)
void alien_addFriendly(int type)
{
if (type != FR_SID)
if (type != ALIEN_SID)
aliens[type] = alien_defs[CD_FRIEND];
else
aliens[type] = alien_defs[CD_SID];
@ -290,10 +932,10 @@ void alien_addFriendly(int type)
else
aliens[type].y = rrand((int)(screen->h / 2) - 150, (int)(screen->h / 2));
if (type == FR_PHOEBE)
if (type == ALIEN_PHOEBE)
aliens[type].classDef = CD_PHOEBE;
if (type == FR_URSULA)
if (type == ALIEN_URSULA)
aliens[type].classDef = CD_URSULA;
// For the sake of it being the final battle :)
@ -319,7 +961,7 @@ bool alien_place(object *alien)
alien->y = rrand(screen->h / 3, (2 * screen->h) / 3);
}
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if ((aliens[i].owner != alien) && (aliens[i].shield > 0))
{
@ -336,7 +978,7 @@ bool alien_place(object *alien)
void alien_setAI(object *alien)
{
// Make friendly craft generally concentrate on smaller fighters
if ((alien->flags & FL_FRIEND) && (alien->target == &aliens[WC_BOSS]))
if ((alien->flags & FL_FRIEND) && (alien->target == &aliens[ALIEN_BOSS]))
{
if ((rand() % 5) == 0)
{
@ -416,15 +1058,17 @@ void alien_setAI(object *alien)
void alien_setKlineAttackMethod(object *alien)
{
alien->maxShield -= 500;
if (alien->maxShield >= 1000)
if (alien->shield <= 500)
{
setRadioMessage(FACE_KLINE, "Very good, Bainfield. Now let's get a little more serious...", 1);
alien->weaponType[0] = W_SPREADSHOT;
alien->chance[1] = 40;
setRadioMessage(FACE_KLINE, "ENOUGH!! THIS ENDS NOW!!!", 1);
alien->weaponType[0] = W_AIMED_SHOT;
alien->weaponType[1] = W_MICRO_HOMING_MISSILES;
alien->flags |= FL_CANCLOAK;
alien->chance[0] = 100;
alien->chance[1] = 2;
alien->flags &= ~FL_CANNOTDIE;
}
else if (alien->maxShield >= 500)
else if (alien->shield <= 1000)
{
setRadioMessage(FACE_KLINE, "Your ability to stay alive irritates me!! Try dodging some of these!!", 1);
alien->weaponType[0] = W_DIRSHOCKMISSILE;
@ -435,16 +1079,10 @@ void alien_setKlineAttackMethod(object *alien)
}
else
{
setRadioMessage(FACE_KLINE, "ENOUGH!! THIS ENDS NOW!!!", 1);
alien->weaponType[0] = W_AIMED_SHOT;
alien->weaponType[1] = W_MICRO_HOMING_MISSILES;
alien->flags |= FL_CANCLOAK;
alien->chance[0] = 100;
alien->chance[1] = 2;
alien->flags &= ~FL_CANNOTDIE;
setRadioMessage(FACE_KLINE, "Very good, Bainfield. Now let's get a little more serious...", 1);
alien->weaponType[0] = W_SPREADSHOT;
alien->chance[1] = 40;
}
alien->shield = 500;
}
/*
@ -520,7 +1158,7 @@ void alien_searchForTarget(object *alien)
}
}
i = rand() % MAX_ALIENS;
i = rand() % ALIEN_MAX;
object *targetEnemy = &aliens[i];
@ -613,7 +1251,7 @@ int alien_enemiesInFront(object *alien)
{
object *anEnemy = aliens;
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if ((alien != anEnemy) && (anEnemy->flags & FL_WEAPCO) &&
(anEnemy->shield > 0))
@ -672,7 +1310,7 @@ void alien_move(object *alien)
if (checkCollisions)
{
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if ((alien->flags & FL_LEAVESECTOR) ||
(alien->classDef == CD_DRONE) ||

View File

@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ALIEN_H
extern object alien_defs[CD_MAX];
extern object aliens[MAX_ALIENS];
extern object aliens[ALIEN_MAX];
void alien_defs_init();
bool alien_add();
void alien_addDrone(object *hostAlien);
void alien_addSmallAsteroid(object *hostAlien);

View File

@ -205,7 +205,8 @@ void fireBullet(object *attacker, int weaponType)
// Reset the weapon reload time. Double it if it is not friendly or
// a boss or Kline
attacker->reload[weaponType] = theWeapon->reload[0];
if ((attacker->flags & FL_WEAPCO) && (attacker != &aliens[WC_BOSS]) && (attacker != &aliens[WC_KLINE]) && (theWeapon->id != W_LASER))
if ((attacker->flags & FL_WEAPCO) && (attacker != &aliens[ALIEN_BOSS]) &&
(attacker != &aliens[ALIEN_KLINE]) && (theWeapon->id != W_LASER))
attacker->reload[weaponType] *= 2;
if ((engine.cheatAmmo) || (theWeapon->id == WT_LASER))
@ -247,7 +248,7 @@ static object *getRandomEnemy(object *bullet)
return &player;
}
i = rand() % MAX_ALIENS;
i = rand() % ALIEN_MAX;
if ((aliens[i].shield < 1) || (!aliens[i].active))
return NULL;
@ -448,7 +449,7 @@ void fireRay(object *attacker)
object *anEnemy = aliens;
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if (anEnemy->flags & FL_IMMORTAL)
continue;
@ -564,7 +565,7 @@ void doBullets()
bullet->x += engine.ssx + engine.smx;
bullet->y += engine.ssy + engine.smy;
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
alien = &aliens[i];
@ -606,26 +607,47 @@ void doBullets()
alien->hit = 5;
}
if (alien->flags & FL_CANNOTDIE)
if (alien->classDef == CD_KLINE)
{
limitInt(&alien->shield, 1, alien->maxShield);
if (alien->shield == 1)
if (currentGame.area == 11)
{
if (currentGame.area != 26)
{
if (!(alien->flags & FL_LEAVESECTOR))
if ((alien->shield <= alien->maxShield - 500) &&
!(alien->flags & FL_LEAVESECTOR))
{
alien->flags |= FL_LEAVESECTOR;
alien->flags &= ~FL_CIRCLES;
if (currentGame.area == 11)
setRadioMessage(FACE_KLINE, "Seems I underestimated you, Bainfield. We'll meet again!", 1);
}
}
else if (currentGame.area == 25)
{
if ((alien->shield <= alien->maxShield - 750) &&
!(alien->flags & FL_LEAVESECTOR))
{
alien->flags |= FL_LEAVESECTOR;
alien->flags &= ~FL_CIRCLES;
setRadioMessage(FACE_SID, "Chris, Kethlan is getting away!", 1);
}
}
else if (currentGame.area == 26)
{
if (alien->shield + bullet->damage > 1500 &&
alien->shield <= 1500)
alien_setKlineAttackMethod(alien);
else if (alien->shield + bullet->damage > 1000 &&
alien->shield <= 1000)
alien_setKlineAttackMethod(alien);
else if (alien->shield + bullet->damage > 500 &&
alien->shield <= 500)
alien_setKlineAttackMethod(alien);
}
else
{
alien_setKlineAttackMethod(alien);
if ((alien->shield <= alien->maxShield - 100) &&
!(alien->flags & FL_LEAVESECTOR))
{
alien->flags |= FL_LEAVESECTOR;
alien->flags &= ~FL_CIRCLES;
}
}
}
@ -635,17 +657,17 @@ void doBullets()
alien->flags |= FL_LEAVESECTOR;
}
if (bullet->id != WT_CHARGER)
if (bullet->id == WT_CHARGER)
{
bullet->shield -= alien->shield;
if (bullet->shield <= 0)
bullet->active = false;
}
else
{
bullet->active = false;
bullet->shield = 0;
}
else if (bullet->id == WT_CHARGER)
{
bullet->shield -= alien->shield;
if (bullet->shield < 0)
bullet->active = false;
}
audio_playSound(SFX_HIT, alien->x);
if (alien->AIType == AI_EVASIVE)
@ -659,7 +681,8 @@ void doBullets()
if (!(alien->flags & FL_DISABLED))
{
alien->flags += FL_DISABLED;
updateMissionRequirements(M_DISABLE_TARGET, alien->classDef, 1);
updateMissionRequirements(M_DISABLE_TARGET,
alien->classDef, 1);
}
alien->systemPower = 0;

View File

@ -73,9 +73,9 @@ static void becomeCollectable(int i)
}
else
{
aliens[FR_PHOEBE].active = true;
aliens[FR_PHOEBE].x = cargo[i].x;
aliens[FR_PHOEBE].y = cargo[i].y;
aliens[ALIEN_PHOEBE].active = true;
aliens[ALIEN_PHOEBE].x = cargo[i].x;
aliens[ALIEN_PHOEBE].y = cargo[i].y;
setRadioMessage(FACE_PHOEBE, "Thanks!! Watch out, WEAPCO! Phoebe's loose and she's ANGRY!!!", 1);
}

View File

@ -24,11 +24,13 @@ Create a new collectable item based on supplied arguments.
*/
void addCollectable(float x, float y, int type, int value, int life)
{
int r;
if (type == P_ANYTHING)
{
type = P_CASH;
int r = rand() % 9;
r = rand() % 9;
switch (r)
{
@ -48,7 +50,16 @@ void addCollectable(float x, float y, int type, int value, int life)
{
type = P_PLASMA_RATE;
int r = rand() % 61;
if ((currentGame.difficulty >= DIFFICULTY_NIGHTMARE) ||
((currentGame.difficulty > DIFFICULTY_EASY) &&
((currentGame.area == 5) || (currentGame.area == 11) ||
(currentGame.area == 18) || (currentGame.area == 25))))
{
// Deny the Super Charge in Nightmare difficulty, and on bosses.
r = rand() % 59;
}
else
r = rand() % 61;
if (r <= 19)
type = P_PLASMA_DAMAGE;
@ -126,18 +137,6 @@ void addCollectable(float x, float y, int type, int value, int life)
}
}
// Deny the Super Charge in Nightmare difficulty, and on bosses.
if (type == P_SUPER)
{
if ((currentGame.difficulty >= DIFFICULTY_NIGHTMARE) ||
((currentGame.difficulty > DIFFICULTY_EASY) &&
((currentGame.area == 5) || (currentGame.area == 11) ||
(currentGame.area == 18) || (currentGame.area == 25))))
{
type = P_PLASMA_DAMAGE;
}
}
// Shield bonus is useless in Nightmare difficulty; give cash instead.
if (type == P_SHIELD)
{

View File

@ -86,7 +86,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MAX_WEAPONS 20
#define MAX_SHAPES 100
#define MAX_SHIPSHAPES 120
#define MAX_ALIENS 25
#define MAX_TEXTSHAPES 150
#define MAX_FONTSHAPES 6
#define MAX_SHOPSHAPES 6
@ -108,11 +107,17 @@ enum {
// These are for Alien *indexes* NOT classdefs!!
enum {
WC_BOSS = 14,
WC_KLINE,
FR_PHOEBE,
FR_URSULA,
FR_SID
ALIEN_BOSS_PART4 = 10,
ALIEN_BOSS_PART3 = 11,
ALIEN_BOSS_PART2 = 12,
ALIEN_BOSS_PART1 = 13,
ALIEN_BOSS = 14,
ALIEN_KLINE,
ALIEN_PHOEBE,
ALIEN_URSULA,
ALIEN_SID,
ALIEN_GOODTRANSPORT = 19,
ALIEN_MAX = 25
};
// Droppables

View File

@ -143,7 +143,7 @@ int mainGameLoop()
initPlayer();
// Init aliens
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
aliens[i].active = false;
aliens[i].shield = -1;
@ -192,11 +192,9 @@ int mainGameLoop()
else if (currentGame.area == 7)
addCargo(&aliens[index], P_PHOEBE);
if (index == WC_KLINE)
if (index == ALIEN_KLINE)
{
aliens[WC_KLINE].target = &player;
if (currentGame.area == 25)
aliens[WC_KLINE].shield = 750;
aliens[ALIEN_KLINE].target = &player;
}
if (aliens[index].classDef == CD_CLOAKFIGHTER)
@ -219,7 +217,7 @@ int mainGameLoop()
if (aliens[index].classDef == CD_BARRIER)
{
aliens[index].owner = &aliens[WC_BOSS];
aliens[index].owner = &aliens[ALIEN_BOSS];
aliens[index].speed = barrierSpeed;
barrierSpeed++;
}
@ -236,7 +234,7 @@ int mainGameLoop()
if (currentGame.area == 23)
{
aliens[index].flags = FL_WEAPCO;
if (index == WC_BOSS)
if (index == ALIEN_BOSS)
aliens[index].chance[1] = 5;
}
}
@ -245,49 +243,49 @@ int mainGameLoop()
if (currentGame.area == 5)
{
aliens[WC_BOSS].target = &player;
aliens[WC_BOSS].x = -screen->w / 2;
aliens[WC_BOSS].y = screen->h / 2;
aliens[ALIEN_BOSS].target = &player;
aliens[ALIEN_BOSS].x = -screen->w / 2;
aliens[ALIEN_BOSS].y = screen->h / 2;
aliens[13].owner = &aliens[WC_BOSS];
aliens[13].target = &player;
aliens[13].dx = -25;
aliens[13].dy = -21;
aliens[ALIEN_BOSS_PART1].owner = &aliens[ALIEN_BOSS];
aliens[ALIEN_BOSS_PART1].target = &player;
aliens[ALIEN_BOSS_PART1].dx = -25;
aliens[ALIEN_BOSS_PART1].dy = -21;
aliens[12].owner = &aliens[WC_BOSS];
aliens[12].target = &player;
aliens[12].dx = -20;
aliens[12].dy = 37;
aliens[ALIEN_BOSS_PART2].owner = &aliens[ALIEN_BOSS];
aliens[ALIEN_BOSS_PART2].target = &player;
aliens[ALIEN_BOSS_PART2].dx = -20;
aliens[ALIEN_BOSS_PART2].dy = 37;
}
else if ((currentGame.area == 11) || (currentGame.area == 14))
{
aliens[WC_BOSS].target = &player;
aliens[WC_BOSS].x = -screen->w / 2;
aliens[WC_BOSS].y = screen->h / 2;
aliens[ALIEN_BOSS].target = &player;
aliens[ALIEN_BOSS].x = -screen->w / 2;
aliens[ALIEN_BOSS].y = screen->h / 2;
aliens[13].owner = &aliens[WC_BOSS];
aliens[13].target = &player;
aliens[13].dx = 15;
aliens[13].dy = -22;
aliens[ALIEN_BOSS_PART1].owner = &aliens[ALIEN_BOSS];
aliens[ALIEN_BOSS_PART1].target = &player;
aliens[ALIEN_BOSS_PART1].dx = 15;
aliens[ALIEN_BOSS_PART1].dy = -22;
aliens[12].owner = &aliens[WC_BOSS];
aliens[12].target = &player;
aliens[12].dx = 15;
aliens[12].dy = 22;
aliens[ALIEN_BOSS_PART2].owner = &aliens[ALIEN_BOSS];
aliens[ALIEN_BOSS_PART2].target = &player;
aliens[ALIEN_BOSS_PART2].dx = 15;
aliens[ALIEN_BOSS_PART2].dy = 22;
aliens[11].owner = &aliens[13];
aliens[11].target = &player;
aliens[11].dx = -35;
aliens[11].dy = -12;
aliens[ALIEN_BOSS_PART3].owner = &aliens[ALIEN_BOSS_PART1];
aliens[ALIEN_BOSS_PART3].target = &player;
aliens[ALIEN_BOSS_PART3].dx = -35;
aliens[ALIEN_BOSS_PART3].dy = -12;
aliens[10].owner = &aliens[12];
aliens[10].target = &player;
aliens[10].dx = -35;
aliens[10].dy = 20;
aliens[ALIEN_BOSS_PART4].owner = &aliens[ALIEN_BOSS_PART2];
aliens[ALIEN_BOSS_PART4].target = &player;
aliens[ALIEN_BOSS_PART4].dx = -35;
aliens[ALIEN_BOSS_PART4].dy = 20;
if (currentGame.area == 14)
{
aliens[WC_BOSS].AIType = AI_EVASIVE;
aliens[ALIEN_BOSS].AIType = AI_EVASIVE;
for (int i = 10 ; i < 15 ; i++)
{
@ -301,15 +299,15 @@ int mainGameLoop()
}
else if (currentGame.area == 21)
{
aliens[WC_BOSS].target = &player;
aliens[WC_BOSS].x = -screen->w / 2;
aliens[WC_BOSS].y = screen->h / 2;
aliens[ALIEN_BOSS].target = &player;
aliens[ALIEN_BOSS].x = -screen->w / 2;
aliens[ALIEN_BOSS].y = screen->h / 2;
aliens[13].owner = &aliens[WC_BOSS];
aliens[13].dy = 20;
aliens[ALIEN_BOSS_PART1].owner = &aliens[ALIEN_BOSS];
aliens[ALIEN_BOSS_PART1].dy = 20;
aliens[12].owner = &aliens[WC_BOSS];
aliens[12].dy = -16;
aliens[ALIEN_BOSS_PART2].owner = &aliens[ALIEN_BOSS];
aliens[ALIEN_BOSS_PART2].dy = -16;
}
}
@ -318,20 +316,20 @@ int mainGameLoop()
currentGame.hasWingMate1 = 1;
if (currentGame.area == 11)
aliens[WC_KLINE].active = false;
aliens[ALIEN_KLINE].active = false;
for (int i = 0 ; i < engine.maxAliens ; i++)
alien_add();
if (currentGame.hasWingMate1)
alien_addFriendly(FR_PHOEBE);
alien_addFriendly(ALIEN_PHOEBE);
if (currentGame.hasWingMate2)
alien_addFriendly(FR_URSULA);
alien_addFriendly(ALIEN_URSULA);
if ((currentGame.area == 9) || (currentGame.area == 17) ||
(currentGame.area == 25))
alien_addFriendly(FR_SID);
alien_addFriendly(ALIEN_SID);
// Disable Wingmates for certain missions
switch (currentGame.area)
@ -344,8 +342,8 @@ int mainGameLoop()
case 18:
case 24:
case 26:
aliens[FR_PHOEBE].active = false;
aliens[FR_URSULA].active = false;
aliens[ALIEN_PHOEBE].active = false;
aliens[ALIEN_URSULA].active = false;
break;
}
@ -360,14 +358,13 @@ int mainGameLoop()
{
if ((currentGame.system > 1) && ((rand() % 5) == 0))
{
aliens[WC_KLINE] = alien_defs[CD_KLINE];
aliens[WC_KLINE].owner = &aliens[WC_KLINE];
aliens[WC_KLINE].target = &player;
aliens[WC_KLINE].shield = 100;
aliens[WC_KLINE].active = true;
aliens[WC_KLINE].x = player.x + 1000;
aliens[WC_KLINE].y = player.y;
player_setTarget(WC_KLINE);
aliens[ALIEN_KLINE] = alien_defs[CD_KLINE];
aliens[ALIEN_KLINE].owner = &aliens[ALIEN_KLINE];
aliens[ALIEN_KLINE].target = &player;
aliens[ALIEN_KLINE].active = true;
aliens[ALIEN_KLINE].x = player.x + 1000;
aliens[ALIEN_KLINE].y = player.y;
player_setTarget(ALIEN_KLINE);
}
if ((currentGame.system == 2) && (currentGame.experimentalShield > 0))
@ -389,15 +386,11 @@ int mainGameLoop()
if (currentGame.area == 26)
{
aliens[WC_KLINE].x = player.x + 1000;
aliens[WC_KLINE].y = player.y;
aliens[WC_KLINE].deathCounter = -250;
aliens[WC_KLINE].maxShield = 1500;
aliens[WC_KLINE].shield = 500;
aliens[ALIEN_KLINE].x = player.x + 1000;
aliens[ALIEN_KLINE].y = player.y;
}
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
aliens[i].systemPower = aliens[i].maxShield;
aliens[i].deathCounter = 0 - (aliens[i].maxShield * 3);
@ -416,23 +409,23 @@ int mainGameLoop()
case 20:
case 21:
case 23:
player_setTarget(WC_BOSS);
player_setTarget(ALIEN_BOSS);
break;
case 7:
player_setTarget(FR_PHOEBE);
player_setTarget(ALIEN_PHOEBE);
break;
case 8:
player_setTarget(19);
player_setTarget(ALIEN_GOODTRANSPORT);
break;
case 9:
player_setTarget(FR_SID);
player_setTarget(ALIEN_SID);
break;
case 10:
player_setTarget(0);
break;
case 25:
case 26:
player_setTarget(WC_KLINE);
player_setTarget(ALIEN_KLINE);
break;
default:
break;
@ -469,7 +462,7 @@ int mainGameLoop()
allowableAliens = 999999999;
}
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if ((aliens[i].active) && (aliens[i].flags & FL_WEAPCO))
{
@ -512,27 +505,31 @@ int mainGameLoop()
if ((!missionFailed()) && (currentGame.area != 26))
{
leaveSector();
if ((engine.done == 2) && (currentGame.area != 10) && (currentGame.area != 15))
if ((engine.done == 2) && (currentGame.area != 10) &&
(currentGame.area != 15))
{
if ((aliens[FR_PHOEBE].shield > 0) && (currentGame.area != 25))
if ((aliens[ALIEN_PHOEBE].shield > 0) &&
(currentGame.area != 25))
{
aliens[FR_PHOEBE].x = player.x - 40;
aliens[FR_PHOEBE].y = player.y - 35;
aliens[FR_PHOEBE].face = 0;
aliens[ALIEN_PHOEBE].x = player.x - 40;
aliens[ALIEN_PHOEBE].y = player.y - 35;
aliens[ALIEN_PHOEBE].face = 0;
}
if ((aliens[FR_URSULA].shield > 0) && (currentGame.area != 25))
if ((aliens[ALIEN_URSULA].shield > 0) &&
(currentGame.area != 25))
{
aliens[FR_URSULA].x = player.x - 40;
aliens[FR_URSULA].y = player.y + 45;
aliens[FR_URSULA].face = 0;
aliens[ALIEN_URSULA].x = player.x - 40;
aliens[ALIEN_URSULA].y = player.y + 45;
aliens[ALIEN_URSULA].face = 0;
}
if ((currentGame.area == 9) || (currentGame.area == 17))
if ((currentGame.area == 9) ||
(currentGame.area == 17))
{
aliens[FR_SID].x = player.x - 100;
aliens[FR_SID].y = player.y;
aliens[FR_SID].face = 0;
aliens[ALIEN_SID].x = player.x - 100;
aliens[ALIEN_SID].y = player.y;
aliens[ALIEN_SID].face = 0;
}
}
}
@ -578,7 +575,7 @@ int mainGameLoop()
object *alien = aliens;
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if (alien->active)
{
@ -730,7 +727,8 @@ int mainGameLoop()
if (alien->classDef == CD_MOBILESHIELD)
{
limitInt(&(++aliens[WC_BOSS].shield), 0, aliens[WC_BOSS].maxShield);
limitInt(&(++aliens[ALIEN_BOSS].shield), 0,
aliens[ALIEN_BOSS].maxShield);
}
limitCharAdd(&alien->reload[0], -1, 0, 999);
@ -806,7 +804,7 @@ int mainGameLoop()
600 + rand() % 2400);
// Kline drops mines a lot more often
if ((alien == &aliens[WC_KLINE]))
if ((alien == &aliens[ALIEN_KLINE]))
{
if ((rand() % 10) == 0)
addCollectable(alien->x, alien->y, P_MINE, 25,
@ -856,7 +854,7 @@ int mainGameLoop()
{
alien->active = false;
if ((alien->classDef == CD_BOSS) ||
(alien->owner == &aliens[WC_BOSS]) ||
(alien->owner == &aliens[ALIEN_BOSS]) ||
(alien->flags & FL_FRIEND) ||
(alien->classDef == CD_ASTEROID) ||
(alien->classDef == CD_KLINE))
@ -928,16 +926,16 @@ int mainGameLoop()
engine.missionCompleteTimer = SDL_GetTicks() + 7000;
// specific to Boss 1
if ((currentGame.area == 5) && (aliens[WC_BOSS].flags & FL_ESCAPED))
if ((currentGame.area == 5) && (aliens[ALIEN_BOSS].flags & FL_ESCAPED))
{
audio_playSound(SFX_DEATH, aliens[WC_BOSS].x);
audio_playSound(SFX_DEATH, aliens[ALIEN_BOSS].x);
clearScreen(white);
updateScreen();
for (int i = 0 ; i < 300 ; i++)
{
SDL_Delay(10);
if ((rand() % 25) == 0)
audio_playSound(SFX_EXPLOSION, aliens[WC_BOSS].x);
audio_playSound(SFX_EXPLOSION, aliens[ALIEN_BOSS].x);
}
SDL_Delay(1000);
break;

View File

@ -64,7 +64,7 @@ void getKillMessage(object *ally)
bool firstPlace = false;
int faceToUse = FACE_PHOEBE;
if (ally == &aliens[FR_PHOEBE])
if (ally == &aliens[ALIEN_PHOEBE])
{
strcpy(otherName, "Ursula");
kills = currentGame.wingMate1Kills;
@ -147,13 +147,13 @@ const char *getKlineInsult()
void getPlayerDeathMessage()
{
if (aliens[WC_KLINE].active)
if (aliens[ALIEN_KLINE].active)
{
setRadioMessage(FACE_KLINE, getKlineInsult(), 1);
return;
}
if ((aliens[WC_BOSS].active) && (aliens[WC_BOSS].classDef == CD_KRASS))
if ((aliens[ALIEN_BOSS].active) && (aliens[ALIEN_BOSS].classDef == CD_KRASS))
{
setRadioMessage(FACE_KRASS, "That was the easiest $90,000,000 I've ever earned! Bwwah!! Ha!! Ha!! Ha!!", 1);
return;
@ -180,7 +180,7 @@ void getMissFireMessage(object *ally)
{
int faceToUse = FACE_PHOEBE;
if (ally == &aliens[FR_PHOEBE])
if (ally == &aliens[ALIEN_PHOEBE])
faceToUse = FACE_PHOEBE;
else
faceToUse = FACE_URSULA;
@ -192,7 +192,7 @@ void getPlayerHitMessage(object *ally)
{
int faceToUse = FACE_PHOEBE;
if (ally == &aliens[FR_PHOEBE])
if (ally == &aliens[ALIEN_PHOEBE])
faceToUse = FACE_PHOEBE;
else
faceToUse = FACE_URSULA;

View File

@ -176,7 +176,7 @@ void doInfo()
textSurface(38, text, 90, 21, FONT_WHITE);
blitText(38);
for (int i = 0; i < MAX_ALIENS; i++)
for (int i = 0; i < ALIEN_MAX; i++)
doArrow(i);
fontColor = FONT_WHITE;

View File

@ -268,9 +268,10 @@ automatically die
*/
static void mission_killAllEnemies()
{
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
{
if ((aliens[i].flags & FL_WEAPCO) && (aliens[i].active) && (aliens[i].shield > 0))
if ((aliens[i].flags & FL_WEAPCO) && (aliens[i].active) &&
(aliens[i].shield > 0))
aliens[i].shield = 0;
}
}
@ -511,11 +512,11 @@ static char revealHiddenObjectives()
{
mission_killAllEnemies();
syncScriptEvents();
aliens[WC_KLINE].active = true;
aliens[WC_KLINE].x = player.x + 1000;
aliens[WC_KLINE].y = player.y;
aliens[WC_KLINE].flags |= FL_IMMORTAL | FL_NOFIRE;
player_setTarget(WC_KLINE);
aliens[ALIEN_KLINE].active = true;
aliens[ALIEN_KLINE].x = player.x + 1000;
aliens[ALIEN_KLINE].y = player.y;
aliens[ALIEN_KLINE].flags |= FL_IMMORTAL | FL_NOFIRE;
player_setTarget(ALIEN_KLINE);
audio_playMusic("music/last_cyber_dance.ogg", -1);
}
}

View File

@ -221,7 +221,7 @@ void doPlayer()
engine.keyState[KEY_PAUSE] = 0;
}
if (((currentGame.area == 18) && (aliens[WC_BOSS].shield > 0)) ||
if (((currentGame.area == 18) && (aliens[ALIEN_BOSS].shield > 0)) ||
(currentGame.area == 24))
{
player.face = 0;
@ -312,13 +312,13 @@ void doPlayer()
player.shield--;
if (player.shield == -1)
{
if ((currentGame.hasWingMate1) || (aliens[WC_KLINE].active))
if ((currentGame.hasWingMate1) || (aliens[ALIEN_KLINE].active))
getPlayerDeathMessage();
// Make it look like the ships are all still moving...
if (currentGame.area == 18)
{
for (int i = 0 ; i < MAX_ALIENS ; i++)
for (int i = 0 ; i < ALIEN_MAX ; i++)
aliens[i].flags |= FL_LEAVESECTOR;
}
@ -338,7 +338,7 @@ void doPlayer()
limitFloat(&engine.ssy, -cameraMaxSpeed, cameraMaxSpeed);
// Specific for the mission were you have to chase the Executive Transport
if ((currentGame.area == 18) && (aliens[WC_BOSS].shield > 0) &&
if ((currentGame.area == 18) && (aliens[ALIEN_BOSS].shield > 0) &&
(player.shield > 0))
{
engine.ssx = -6;

View File

@ -49,8 +49,8 @@ void loadScriptEvents()
}
if ((currentGame.area == MAX_MISSIONS - 1) &&
(aliens[WC_KLINE].classDef == CD_KLINE) &&
(aliens[WC_KLINE].active))
(aliens[ALIEN_KLINE].classDef == CD_KLINE) &&
(aliens[ALIEN_KLINE].active))
setKlineGreeting();
char filename[255];