Originally Posted by
VoidWeaver
Be honest, I doubt you're right, but I can not say for sure. The fact that I recently played on a map "Imps" of PostAK campaign and there was inhabited imps with 255 Armor. They are practically immortal. But the fact checking difficult due a lot of their hp. I'll be very grateful if anyone confirm or disprove the assumption about cap armor value at 204.
Assumption? I didn't assume anything, I confirmed this through KeeperFX's code.
Look here:
Code:
cctrl = creature_control_get_from_thing(thing);
crstat = creature_stats_get_from_thing(thing);
if ((cctrl->flgfield_1 & CCFlg_Immortal) == 0)
{
// Compute armor value
carmor = compute_creature_max_armour(crstat->armour,cctrl->explevel);
if ((cctrl->spell_flags & CSF_Armour) != 0)
carmor = (320 * carmor) / 256;
// This limit makes armor absorb up to 80% of damage, never more
if (carmor > 204)
carmor = 204;
if (carmor < 0)
carmor = 0;
// Now compute damage
cdamage = (dmg * (256 - carmor)) / 256;
if (cdamage <= 0)
cdamage = 1;
// Apply damage to the thing
thing->health -= cdamage;
thing->word_17 = 8;
thing->field_4F |= 0x80;
// Red palette if the possessed creature is hit very strong
if (thing->owner != game.neutral_player_num)
{
player = get_player(thing->owner);
if (thing_get(player->controlled_thing_idx) == thing)
{
i = (10 * cdamage) / compute_creature_max_health(crstat->health,cctrl->explevel);
if (i > 10)
{
i = 10;
} else
if (i <= 0)
{
i = 1;
}
PaletteApplyPainToPlayer(player, i);
}
}
}
This is part of damage handling code from KeeperFX 0.40 source code. Note the colored part.
As for the PostAK campaign, the creator probably greatly enhanced the health stat of the imp, making them nearly invincible anyway.