City of Arabel
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Keen Edge - Sorcerer

    Scheduled Pinned Locked Moved Closed Bugs
    4 Posts 3 Posters 78 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dela
      last edited by

      It does not seem to expire when it should if at all. Have had a sorcerer cast it on me twice and it has last like 5-7 irl hours.

      1 Reply Last reply Reply Quote
      • ZoolZ
        Zool
        last edited by Zool

        Duration: 10 minutes / level
        

        https://nwn.fandom.com/wiki/Keen_edge

        So, level 10, should be 100 minutes

        10 minutes is 60 * 10 = 600

        10 * 10 (100) minutes = 6000 seconds

        Code does

        
        int nDuration = 60 * GetAdjustedCasterLevel(OBJECT_SELF);
        
        

        This is 60 * level (10 * 60) = 600

        AddKeenEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration));
        

        // Convert nTurns into a number of seconds
        // A turn is always 60.0 seconds
        float TurnsToSeconds(int nTurns)

        so this sends 600 turns into turns to seconds.

        600 turns, is 600 * 60 seconds

        36000 seconds

        That looks like too many seconds.

        I think the code should just do

        
        int nDuration = 10 * GetAdjustedCasterLevel(OBJECT_SELF);
        AddKeenEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration));
        
        

        As that would send 10 per level into turns to seconds, which would be ten minutes, per level.

        Right?

        Also it doesn't handle metamagic, should it?

        > !!!MOLES for the MOLE GOD!!!

        Mr.MolochM 1 Reply Last reply Reply Quote
        • Mr.MolochM
          Mr.Moloch @Zool
          last edited by

          @Zool Yes, that's all kinds of messed up. Too long, and should handle metamagic.

          In the future, there are two simple rules to remember:

          NO SPITTING.

          DO NOT CROSS MISTER MOLOCH.

          https://youtu.be/dQw4w9WgXcQ?si=uHdfqTMS7FMTWREf

          Mr.MolochM 1 Reply Last reply Reply Quote
          • Mr.MolochM
            Mr.Moloch @Mr.Moloch
            last edited by

            Found the origin of the problem, someone needed to pass a function but the function was looking for a float; so they just multiplied the nDuration by 60 again to turn it into a float without removing the first check.

            Also put back in support for Extend metamagic.

            In the future, there are two simple rules to remember:

            NO SPITTING.

            DO NOT CROSS MISTER MOLOCH.

            https://youtu.be/dQw4w9WgXcQ?si=uHdfqTMS7FMTWREf

            1 Reply Last reply Reply Quote
            • Mr.MolochM Mr.Moloch moved this topic from Bug Reports
            • 1 / 1
            • First post
              Last post