Welcome to the Builder Academy

Question Spell Affect and Damage

More
30 Mar 2023 02:04 #10284 by soth
Spell Affect and Damage was created by soth
Hello,
Just wondering if this is possible or not.  Still looking through code and trying to get more familiar with it.
Is it possible to create a spell called <pestilence> which would set some aff flags and also do initial damage to the target?  Ideally it would be nice if every 2-5 seconds it would repeat the damage from all the infections and blisters seeping through your skin, but I imagine this would be much more tedious to code.

Thanks!

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

More
30 Mar 2023 11:48 #10285 by Vatiken
Replied by Vatiken on topic Spell Affect and Damage
Absolutely possible.

Off the top of my head the two simplest ways to do this would be:
  1. See SPELL_CHILL_TOUCH as an example. It does instant damage and places an affect on the victim. Then somewhere in heartbeat() inflict damage to characters who have been affected. Probably in point_update().
  2.  See SKILL_WHIRLWIND as an example. You would need to create a manual spell for this like SPELL_DETECT_MAGIC but you could then use the event system like Whirlwind does do cause damage to the victim every X seconds. 

tbaMUD developer/programmer

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

More
30 Mar 2023 18:16 #10286 by soth
Replied by soth on topic Spell Affect and Damage
Thanks Vatiken.
I will take a look at those examples. I have not delved much into the event system yet, but it looks promising. I'll report back if I have time today, it's been a busy day for sure.

thanks again.

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

More
30 Mar 2023 18:37 #10287 by soth
Replied by soth on topic Spell Affect and Damage
Was able to modify magic.c and spell_parser.c easily to get the desired results :) Well to make it have damage and an affect that is. Now to look into the heartbeat and event functions.

ty!

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

Time to create page: 0.219 seconds