Double health, shield, and shield recharge rates, and missiles of allies.

This commit is contained in:
Steve 2017-05-20 08:32:51 +01:00
parent 315e20230d
commit 18242ad593
3 changed files with 19 additions and 2 deletions

View File

@ -98,7 +98,8 @@ void doEntities(void)
if (--e->shieldRecharge <= 0)
{
e->shield = MIN(e->shield + 1, e->maxShield);
if (e == player && !game.currentMission->challengeData.isChallenge && game.difficulty == DIFFICULTY_EASY)
if ((e == player || (player != NULL && e->side == player->side)) && !game.currentMission->challengeData.isChallenge && game.difficulty == DIFFICULTY_EASY)
{
e->shield = MIN(e->shield + 1, e->maxShield);
}

View File

@ -95,9 +95,24 @@ Entity *spawnFighter(char *name, int x, int y, int side)
e->aiAggression = 4;
}
if (game.difficulty == DIFFICULTY_EASY)
if (!game.currentMission->challengeData.isChallenge && game.difficulty == DIFFICULTY_EASY)
{
e->aiAggression = MIN(e->aiAggression, 2);
if (player != NULL)
{
if (e->side == player->side)
{
e->health = e->maxHealth = (e->maxHealth * 2);
e->shield = e->maxShield = (e->maxShield * 2);
e->missiles *= 2;
}
else
{
e->health = e->maxHealth = (e->maxHealth / 2);
e->shield = e->maxShield = (e->maxShield / 2);
}
}
}
e->action = doAI;

View File

@ -102,6 +102,7 @@ void initPlayer(void)
{
player->health = player->maxHealth = (player->maxHealth * 1.25);
player->shield = player->maxShield = (player->maxShield * 1.25);
player->missiles *= 2;
}
}