Results 1 to 5 of 5

Thread: The truth about the Protect spell

  
  1. #1
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default The truth about the Protect spell

    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. 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.
    I like dragons! They're the center of my life! I'll never forget them...



  2. #2
    Fly Trotim's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    90

    Default Re: The truth about the Protect spell

    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?

  3. #3
    Demon Spawn Necror's Avatar
    Join Date
    Feb 2010
    Location
    qqluqq
    Posts
    199
    Gamer IDs

    Steam ID: qqluqq

    Default Re: The truth about the Protect spell

    If you've tested it on creatures with 0 armor 25% will remain 0

  4. #4
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: The truth about the Protect spell

    I can't see any problem with that spell - it should work (at least in KeweperFX).
    Code:
            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);
                    }
                }
            }
    Last edited by mefistotelis; July 21st, 2010 at 22:17.

  5. #5
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: The truth about the Protect spell

    Quote Originally Posted by Necror
    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.
    Last edited by DragonsLover; July 22nd, 2010 at 00:28.
    I like dragons! They're the center of my life! I'll never forget them...



Similar Threads

  1. Spell duration lvl 10 fixing?
    By CargoOfDarkness in forum Dungeon Keeper 1
    Replies: 1
    Last Post: March 5th, 2010, 14:40
  2. The truth about EA (and the sims especially)
    By Monsterbaby in forum Off Topic
    Replies: 0
    Last Post: November 29th, 2009, 18:51

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •