Mana Cost errot

Posted by Dralnu on Wed 19 Apr 2006 04:07 AM — 3 posts, 17,126 views.

USA #0
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?
Amended on Wed 19 Apr 2006 04:10 AM by Dralnu
USA #1
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.
USA #2
Thanks. I think I'll go see about changing that.