Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Mana Cost errot

Mana Cost errot

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Dralnu   USA  (277 posts)  Bio
Date Wed 19 Apr 2006 04:07 AM (UTC)

Amended on Wed 19 Apr 2006 04:10 AM (UTC) by Dralnu

Message
Ok, I added Tend to my Ranger class for a heal. Well, here is my problem: Originally, it cost 60 mana to use (which I thought was pretty high), so I changed it down to 5. Once I did that, (which I did outside the MUD), then hotbooted, and the mana cost remained the same. That bugged me, so I rebooted the MUD entirely, and then it now cost 6 mana, while slookup reads:


<40hp 97m 108mv> slookup tend
Sn:  245 Slot:    0 Skill: 'tend                '
Saves: none  SaveEffect: none
Type: Skill  Target: defensive  Minpos: 8  Mana: 5  Beats: 12  Range: 0
Flags: 0  Guild: -1  Value: 0  Info: 0  Code: spell_smaug
Sectors Allowed: All
Dammsg:
Wearoff: (none set)
Components: V@65

Affect 1 modifies hit by 'l*2'

Hitchar   : You kneel down and tend to $N's wounds.
Hitvict   : Your wounds are soothed and lessened.
--------------------------[CLASS USE]--------------------------
Mag) lvl:  51 max: 95%  Cle) lvl:  51 max: 95%  Thi) lvl:  51 max: 95%
War) lvl:  51 max: 95%    Dru) lvl:  51 max: 95%
Ran) lvl:  50 max: 85%



Well, I think that pretty much states that. It doesn't make much sense to me. Anyone got any idea what could be causing the mana issue?
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #1 on Wed 19 Apr 2006 02:11 PM (UTC)
Message
It's because of this formula:

mana = IS_NPC( ch ) ? 0 : UMAX( skill->min_mana, 100 / ( 2 + ch->level - skill->skill_level[ch->Class] ) );

The mana setting in the skill system is actually a minimum required mana, not an actual mana used. So the above formula will take whichever value is larger and use that as the mana cost for a skill or spell. It's not an error, but it can be unexpected if you don't realize what's going on.
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #2 on Wed 19 Apr 2006 02:25 PM (UTC)
Message
Thanks. I think I'll go see about changing that.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,154 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.