(fixed) Spell Experience

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

(fixed) Spell Experience

Post by TheMormegil »

Do you get experience for casting spells yet?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

TheMormegil wrote:Do you get experience for casting spells yet?
Oops! :oops:
Now you do. I calculated the xp but I forgot the line that actually gives it.

It's simple to add if you feel like it. Near the end of the function "sys_spell_cast" in system.lua, look for a block of code like:

Code: Select all

local itime = dsb_get_idle(ppos)
if (itime > 80) then itime = 80 end
dsb_set_idle(ppos, itime + spell[sr].idleness + ext_delay)
And right after this add:

Code: Select all

xp_up(who, spell[sr].class, spell[sr].subskill, xp_gain)
If you don't feel like bothering, the fix will be in 0.7 of course.
Post Reply