Added a new paradigm for how Kline works.
For difficulties above Easy difficulty which are not Classic difficulty, Kline's run shield now changes depending on whether or not other WEAPCO ships are still alive. If he's alone, the previous 100 shield threshold was used. If any of the other ships are alive, though, he only runs if he takes 500 damage (the same amount that you have to inflict the first time you see him). The result of this is that he doesn't run away real early in the battle (100 shield is so low that you can easily make him run away with a quick laser shot); you have to either fight real hard, or more realistically, defeat all the other enemies first, making him feel like an actual threat rather than a gimmick. This is of course is excluded from Classic difficulty, and it's also excluded from Easy and Super Easy difficulty.
This commit is contained in:
parent
7b594c9fa7
commit
5ee90df2f3
21
src/alien.c
21
src/alien.c
|
@ -2186,6 +2186,7 @@ void alien_hurt(Object *alien, Object *attacker, int damage, int ion)
|
|||
int ai_type;
|
||||
double run_chance;
|
||||
int stage1_shield, stage2_shield, stage3_shield;
|
||||
int i;
|
||||
|
||||
ai_type = ((game.difficulty == DIFFICULTY_ORIGINAL) ?
|
||||
alien->AITypeOriginal : alien->AIType);
|
||||
|
@ -2267,21 +2268,31 @@ void alien_hurt(Object *alien, Object *attacker, int damage, int ion)
|
|||
else
|
||||
{
|
||||
stage1_shield = KLINE_SHIELD_TINY;
|
||||
if ((game.difficulty != DIFFICULTY_ORIGINAL)
|
||||
&& (game.difficulty > DIFFICULTY_EASY))
|
||||
{
|
||||
for (int i = 0 ; i < ALIEN_MAX ; i++)
|
||||
{
|
||||
if (aliens[i].active && (i != ALIEN_KLINE)
|
||||
&& (aliens[i].flags & FL_WEAPCO)
|
||||
&& (aliens[i].shield > 0))
|
||||
{
|
||||
stage1_shield = KLINE_SHIELD_SMALL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((alien->shield <= alien->maxShield - stage1_shield)
|
||||
&& !(alien->flags & FL_LEAVESECTOR))
|
||||
{
|
||||
&& !(alien->flags & FL_LEAVESECTOR))
|
||||
alien->flags |= FL_LEAVESECTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run_chance = (game.difficulty == DIFFICULTY_ORIGINAL) ? 0.02 : damage / 50.;
|
||||
|
||||
if ((alien->flags & FL_RUNSAWAY) && CHANCE(run_chance))
|
||||
{
|
||||
alien->flags |= FL_LEAVESECTOR;
|
||||
}
|
||||
|
||||
audio_playSound(SFX_HIT, alien->x, alien->y);
|
||||
if (ai_type == AI_EVASIVE)
|
||||
|
|
Loading…
Reference in New Issue