Welcome to the Builder Academy

Question spell_parser.c - TRUE

More
04 Nov 2016 18:42 - 05 Nov 2016 13:12 #6253 by JTP
spell_parser.c - TRUE was created by JTP
I made my dispel magic and it Works like a charm, but it doesnt start the fight, I set TRUE like dispel good/evil, those two Begins fight. So how come my dispel magic dont ? What did i miss ?


spello(SPELL_DISPEL_EVIL, "dispel evil", 40, 25, 3, POS_FIGHTING,
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
NULL);

spello(SPELL_DISPEL_GOOD, "dispel good", 40, 25, 3, POS_FIGHTING,
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
NULL);

spello(SPELL_DISPEL_MAGIC, "dispel magic", 40, 25, 3, POS_FIGHTING,
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_UNAFFECTS,
NULL);
Last edit: 05 Nov 2016 13:12 by JTP.

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

More
07 Nov 2016 20:54 #6254 by JTP
Replied by JTP on topic spell_parser.c - TRUE
Noone have any ideas ?

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

More
11 Nov 2016 02:54 #6258 by WhiskyTest
Replied by WhiskyTest on topic spell_parser.c - TRUE
Stock code should start a fight from do_cast in spell_parser.c if these conditions are met:
spell is violent
target exists
target is NPC

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

More
11 Nov 2016 14:55 #6260 by JTP
Replied by JTP on topic spell_parser.c - TRUE
The only difference between dispel good/evil and my dispel, is yea my dispel magic doesnt do damage, but it should still be a violet act and begin fight.

Dispelling a char should not how ever.

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

More
12 Nov 2016 21:25 #6266 by WhiskyTest
Replied by WhiskyTest on topic spell_parser.c - TRUE
Yeah you're right, same on my MUD - it looks like the violent part isn't handled.
I would have thought adding something like this before the return(1); in call_magic() would work..
Code:
if (SINFO.violent && cvict && IS_NPC(cvict)) { hit(cvict, caster, TYPE_UNDEFINED); }

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

More
12 Nov 2016 23:10 #6267 by JTP
Replied by JTP on topic spell_parser.c - TRUE
Great that works like a charm. Only problem now, is that when its true, then i cant cast dispel magic on myself.

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

Time to create page: 0.215 seconds