[Home] [Downloads] [Search] [Help/forum]

Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Mana Cost errot

Mana Cost errot

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

Posted by Dralnu   USA  (277 posts)  [Biography] bio
Date Wed 19 Apr 2006 04:07 AM (UTC)

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

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
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?
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #1 on Wed 19 Apr 2006 02:11 PM (UTC)
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.
[Go to top] top

Posted by Dralnu   USA  (277 posts)  [Biography] bio
Date Reply #2 on Wed 19 Apr 2006 02:25 PM (UTC)
Thanks. I think I'll go see about changing that.
[Go to top] 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.


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

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]