Page 13 of 13 FirstFirst ... 3 11 12 13
Results 121 to 125 of 125

Thread: finally damage for word of power !

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

    Steam ID: dragonslover

    Default Re: finally damage for word of power !

    Back to the subject, I'm just curious: what's the "hit type" in the configuration file for the spell? And how is the range based, is it the amount of slabs or subtiles (considering a slab is 3x3 subtiles)? Thanks for the clarification!

    My goal is simply to increase the pushback effect of the spell without necessarily affecting its range. I don't know if it's possible.
    Last edited by DragonsLover; August 8th, 2012 at 02:32.
    I like dragons! They're the center of my life! I'll never forget them...



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

    Default Re: finally damage for word of power !

    Hit type selects which things the spell affects:
    Code:
    TbBool explosion_can_affect_thing(struct Thing *thing, long hit_type, long explode_owner)
    {
        if (thing_is_invalid(thing))
        {
            WARNLOG("Invalid thing tries to interact with explosion");
            return false;
        }
        switch (hit_type)
        {
        case 1:
            if ((thing->class_id != TCls_Creature) && (thing->class_id != TCls_Object))
              return false;
            return true;
        case 2:
            if (thing->class_id != TCls_Creature)
                return false;
            return true;
        case 3:
            if ((thing->class_id != TCls_Creature) && (thing->class_id != TCls_Object))
                return false;
            if (thing->owner == explode_owner)
                return false;
            return true;
        case 4:
            if (thing->class_id != TCls_Creature)
                return false;
            if (thing->owner == explode_owner)
                return false;
            return true;
        case 7:
            if (thing->class_id != TCls_Object)
                return false;
            if (!thing_is_dungeon_heart(thing))
                return false;
            return true;
        case 8:
            return true;
        default:
            WARNLOG("Illegal hit thing type %d for explosion",(int)hit_type);
            return true;
        }
    }
    I improved the comment in CFG file:
    Code:
    [spell24]
    Name = WORD_OF_POWER
    Duration = 0
    ; For spells that can damage surrounding area - hit type, range and damage.
    ; Hit type controls which things will be affected by the spell (1..4).
    ; The damage will be at its max only very near to the casting point;
    ; at distance it will start decaying, until zero is reached at given range.
    ; Range is in subtiles, damage is in points per turn.
    ; Note that range and duration are increased by 20% x caster exp level.
    AreaDamage = 4 3 85
    EDIT:
    Oh, and the pushback effect strength is currently hard-coded, and applied only for explosions (not to WOP trap, but to WOP spell - yes).
    Last edited by mefistotelis; August 9th, 2012 at 21:52.

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

    Steam ID: dragonslover

    Default Re: finally damage for word of power !

    Quote Originally Posted by mefistotelis
    Oh, and the pushback effect strength is currently hard-coded, and applied only for explosions (not to WOP trap, but to WOP spell - yes).
    Nuuuuuu... D:

    I remember in the original game, the spell really caused creatures to be blown away to a rather far distance. Now, unless the creature is at the exact same spot as the enemy, creatures aren't pushed very much and this should be altered, since a part of this spell should make sort that creatures could use more of their ranged attacks. Do you think, you could alter it?
    I like dragons! They're the center of my life! I'll never forget them...



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

    Default Re: finally damage for word of power !

    I'm moving the code in direction of placing these values in config files.
    Sooner or later, the pushback effect will be editable.

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

    Steam ID: dragonslover

    Default Re: finally damage for word of power !

    I hope so, because I tested under Dos and even though it doesn't cause damage, it pushes the creatures far away. Under FX, it doesn't push much.
    I like dragons! They're the center of my life! I'll never forget them...



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
  •