2011-08-24 14:14:44 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2003 Parallel Realities
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2011-08-26 21:29:04 +02:00
|
|
|
#include "Starfighter.h"
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2012-03-11 14:02:58 +01:00
|
|
|
static const char *deathMessage[6] = {
|
|
|
|
"Oh my God... No!",
|
|
|
|
"NOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!",
|
|
|
|
"Please tell me that didn't just happen...",
|
|
|
|
"Chris, Answer Me!!",
|
|
|
|
"What the hell happened?!",
|
|
|
|
"Chriiiiiiiiiiiiiiiiiiiiiiiiiiis!!!!",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *killMessage[10] = {
|
|
|
|
"Chalk another one up for me!",
|
|
|
|
"That'll teach you!",
|
|
|
|
"One more for me!",
|
|
|
|
"Target destroyed!",
|
|
|
|
"You aint so tough!",
|
|
|
|
"Kicked your ass!",
|
|
|
|
|
|
|
|
"That takes me up to %d",
|
|
|
|
|
|
|
|
"Hey %s, you asleep over there?!",
|
|
|
|
"I'm catching up with you, %s!",
|
|
|
|
|
|
|
|
"Number One, Baby!",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *missFireMessage[5] = {
|
|
|
|
"I am NOT your enemy!",
|
|
|
|
"Hey! Watch it!",
|
|
|
|
"What are you doing?! Shoot THEM!",
|
|
|
|
"OW!!! I hope that was an accident!",
|
|
|
|
"Open your eyes!!",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *playerHitMessage[3] = {
|
|
|
|
"Oops! Sorry!",
|
|
|
|
"Get out of the way!",
|
|
|
|
"Don't fly into my missiles!",
|
|
|
|
};
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
void getKillMessage(object *ally)
|
|
|
|
{
|
2012-03-11 14:09:04 +01:00
|
|
|
char in[50], otherName[30];
|
2011-08-24 14:14:44 +02:00
|
|
|
int kills, difference;
|
2011-08-26 16:55:46 +02:00
|
|
|
bool firstPlace = false;
|
2011-08-24 14:14:44 +02:00
|
|
|
int faceToUse = FACE_PHOEBE;
|
|
|
|
|
|
|
|
if (ally == &enemy[FR_PHOEBE])
|
|
|
|
{
|
|
|
|
strcpy(otherName, "Ursula");
|
|
|
|
kills = currentGame.wingMate1Kills;
|
|
|
|
difference = currentGame.wingMate1Kills - currentGame.wingMate2Kills;
|
|
|
|
if ((currentGame.wingMate1Kills > currentGame.wingMate2Kills) && (currentGame.wingMate1Kills > currentGame.totalKills))
|
2011-08-26 16:55:46 +02:00
|
|
|
firstPlace = true;
|
2011-08-24 14:14:44 +02:00
|
|
|
faceToUse = FACE_PHOEBE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
strcpy(otherName, "Phoebe");
|
|
|
|
kills = currentGame.wingMate2Kills;
|
|
|
|
difference = currentGame.wingMate2Kills - currentGame.wingMate1Kills;
|
|
|
|
if ((currentGame.wingMate2Kills > currentGame.wingMate1Kills) && (currentGame.wingMate2Kills > currentGame.totalKills))
|
2011-08-26 16:55:46 +02:00
|
|
|
firstPlace = true;
|
2011-08-24 14:14:44 +02:00
|
|
|
faceToUse = FACE_URSULA;
|
|
|
|
}
|
|
|
|
|
|
|
|
int r = rand() % 10;
|
|
|
|
|
|
|
|
if (currentGame.hasWingMate2 == 0)
|
|
|
|
r = rand() % 7;
|
|
|
|
|
|
|
|
switch(r)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 3:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
2012-12-09 16:53:21 +01:00
|
|
|
strcpy(in, killMessage[rand() % 6]);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
case 7:
|
|
|
|
sprintf(in, killMessage[6], kills);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8:
|
|
|
|
if (difference > 0)
|
|
|
|
{
|
|
|
|
sprintf(in, killMessage[7], otherName);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sprintf(in, killMessage[8], otherName);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9:
|
2011-08-26 16:55:46 +02:00
|
|
|
if (firstPlace)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2012-12-09 16:53:21 +01:00
|
|
|
strcpy(in, killMessage[9]);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-12-09 16:53:21 +01:00
|
|
|
strcpy(in, killMessage[rand() % 6]);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
setRadioMessage(faceToUse, in, 0);
|
|
|
|
}
|
|
|
|
|
2011-08-24 14:42:59 +02:00
|
|
|
const char *getKlineInsult()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2012-03-11 14:09:04 +01:00
|
|
|
static const char *insult[] = {
|
2011-08-24 14:14:44 +02:00
|
|
|
"Pathetic", "How very disappointing...", "Heroic. And stupid", "Fool", "And now you're nothing but a DEAD hero"
|
|
|
|
};
|
|
|
|
|
|
|
|
if (currentGame.area != 26)
|
|
|
|
return (insult[rand() % 3]);
|
|
|
|
else
|
|
|
|
return (insult[3 + (rand() % 2)]);
|
|
|
|
}
|
|
|
|
|
|
|
|
void getPlayerDeathMessage()
|
|
|
|
{
|
|
|
|
if (enemy[WC_KLINE].active)
|
|
|
|
{
|
|
|
|
setRadioMessage(FACE_KLINE, getKlineInsult(), 1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((enemy[WC_BOSS].active) && (enemy[WC_BOSS].classDef == CD_KRASS))
|
|
|
|
{
|
|
|
|
setRadioMessage(FACE_KRASS, "That was the easiest $90,000,000 I've ever earned! Bwwah!! Ha!! Ha!! Ha!!", 1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
int faceToUse = FACE_PHOEBE;
|
|
|
|
|
|
|
|
|
2012-03-11 13:54:21 +01:00
|
|
|
if ((currentGame.area == 9) || (currentGame.area == 17) || (currentGame.area == 25)) {
|
|
|
|
faceToUse = FACE_SID;
|
|
|
|
}
|
|
|
|
else if (currentGame.hasWingMate2)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
if ((rand() % 2) == 0)
|
|
|
|
faceToUse = FACE_URSULA;
|
|
|
|
}
|
|
|
|
|
2012-03-11 13:54:21 +01:00
|
|
|
setRadioMessage(faceToUse, deathMessage[rand() % 6], 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void getMissFireMessage(object *ally)
|
|
|
|
{
|
|
|
|
int faceToUse = FACE_PHOEBE;
|
|
|
|
|
|
|
|
if (ally == &enemy[FR_PHOEBE])
|
|
|
|
faceToUse = FACE_PHOEBE;
|
|
|
|
else
|
|
|
|
faceToUse = FACE_URSULA;
|
|
|
|
|
2012-03-11 14:09:04 +01:00
|
|
|
setRadioMessage(faceToUse, missFireMessage[rand() % 5], 0);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void getPlayerHitMessage(object *ally)
|
|
|
|
{
|
|
|
|
int faceToUse = FACE_PHOEBE;
|
|
|
|
|
|
|
|
if (ally == &enemy[FR_PHOEBE])
|
|
|
|
faceToUse = FACE_PHOEBE;
|
|
|
|
else
|
|
|
|
faceToUse = FACE_URSULA;
|
|
|
|
|
2012-03-11 14:09:04 +01:00
|
|
|
setRadioMessage(faceToUse, playerHitMessage[rand() % 3], 0);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|