Mags no longer ignore shields.
This commit is contained in:
parent
f076b37620
commit
c492115bbc
|
@ -327,6 +327,7 @@ void doFighter(void)
|
|||
adjustObjectiveTargetValue(self->name, TT_ESCAPED, -1);
|
||||
|
||||
updateCondition(self->name, TT_DESTROY);
|
||||
updateCondition(self->groupName, TT_DESTROY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -411,6 +412,12 @@ void damageFighter(Entity *e, int amount, long flags)
|
|||
e->aiDamagePerSec += amount;
|
||||
|
||||
if (flags & BF_SYSTEM_DAMAGE)
|
||||
{
|
||||
if (e->shield > 0)
|
||||
{
|
||||
e->shield = MAX(0, e->shield - amount / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
playBattleSound(SND_MAG_HIT, e->x, e->y);
|
||||
|
||||
|
@ -424,6 +431,7 @@ void damageFighter(Entity *e, int amount, long flags)
|
|||
e->action = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (flags & BF_SHIELD_DAMAGE)
|
||||
{
|
||||
e->shield -= amount;
|
||||
|
@ -441,13 +449,7 @@ void damageFighter(Entity *e, int amount, long flags)
|
|||
{
|
||||
if (e->shield > 0)
|
||||
{
|
||||
e->shield -= amount;
|
||||
|
||||
if (e->shield < 0)
|
||||
{
|
||||
e->health += e->shield;
|
||||
e->shield = 0;
|
||||
}
|
||||
e->shield = MAX(0, e->shield - amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue