Welcome to the Builder Academy

Question Spell memorization/cooldowns

More
17 Aug 2022 17:21 - 17 Aug 2022 17:58 #10132 by ironfist
I've got a preliminary patch for memorization/cooldown from a month ago that should work off tba, but it is missing a couple things that I have since fixed.  The code has since moved on past this in spell_parser (such as damage types) where I have added yet new fields for other things, so it will take me a bit to make the most current patch.  This is from the version I wrote for strifemud back in the early 2000s, so it might be missing stuff that others have since added.

I'm not sure of the best procedure to post snippets these days, but at the moment it is at:
byte-a-wolf.com/strifemud/snippets/patch.memorization07212022

Issues: 
-- Designed for 100(101 with level 0)/110 mort/imm levels, so some of the constants in memorization.c need to be trimmed down for stock (level 0-30 mort levels).
-- references to a couple strife classes/races
-- The line that reads if (!stat_mod) slots = 0; should be if (!spell_mod) slots = 0; This means if a class doesn't get a slot type, they shouldn't get any wisbonus.
-- the cooldown timers should replace any innate timers as they do the same thing, except that any spell/skill can have one now (previously faerie fire, lay on hands, kata, etc).
-- strife only had memorization, but this time around leaving mana in so either can be used optionally (use IS_MANA_USER macro appropriately).
-- the automem toggle code was not quite displaying messages correctly, it has changed in tbamud so I haven't totally figured that out yet.
-- also need to free your memory in handler.c/extract_char_final after save_char and Crash_delete_crashfile(ch)
Code:
    if(ch->cooldown) {       for (cd = ch->cooldown; cd; cd = next_cd) {          next_cd = cd->next;          cooldown_remove(ch, cd);       }     }     if(ch->memorized) {         for (mem = ch->memorized; mem; mem = next_mem) {          next_mem = mem->next;          memorize_remove(ch, mem);       }     }


-Cyric
strifemud
 
Last edit: 17 Aug 2022 17:58 by ironfist.

Please Log in or Create an account to join the conversation.

Time to create page: 0.197 seconds