View Full Version : The truth about the Protect spell

July 21st, 2010, 05:54
I was wondering if the Protect spell really adds some armour to the creature so I performed a test and here's the result: it doesn't. :eek: I tried over a creature with 20 health points and 0 armour against an enemy with a strength of 20 and the Missile spell (which does 20 points of damage as well). And either with or without the spell, the SAME amount of damage is done.

Apparently, the only use of the Protect spell is to nullifies the Lightning strikes from the enemy Keepers. That's all!

But I must say, that's very ugly. I mean, that spell should preferably be used in combat to make the caster more tougher. Mefisto, if you read that, do you think you could get the part of the code about that spell and show it here to confirm if I'm right? I'd be very curious.

July 21st, 2010, 14:16
A FAQ I found says " Similar to the Protect spell as owned by certain high leveled
creatures this spell will lessen any damage from incoming attacks by
25%. Most of the time you don't really need it, but certain battles
especially longer ones give you a clear benefit when this spell is
used. The increase in power makes the spell last longer (up to about
~1 minute at most)."

So maybe it increases armour by 25% and the FAQ is not totally true either? I suppose it can't increase armour if your creature has 0 to begin with, then. A Creature with 25 armour should thus have 30 with Protect (which still is hardly noticeable, though), right?

July 21st, 2010, 18:55
If you've tested it on creatures with 0 armor 25% will remain 0

July 21st, 2010, 21:11
I can't see any problem with that spell - it should work (at least in KeweperFX).

cctrl = creature_control_get_from_thing(thing);
crstat = creature_stats_get_from_thing(thing);
if ((cctrl->flgfield_1 & 0x04) == 0)
// Compute armor value
carmor = crstat->armour;
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->field_2F) == 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);

July 21st, 2010, 23:22
If you've tested it on creatures with 0 armor 25% will remain 0

I thought about that, I did another test with a creature of 10 of armour and I didn't notice a difference. By looking at the code, I know I'm wrong because there's one, but very minimal.

Thanks for the clarification, Mefisto.