spell_parser.c - TRUE

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 8 months ago - 1 year 8 months ago #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: 1 year 8 months ago by JTP.

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

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 8 months ago #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
1 year 8 months ago #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.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 8 months ago #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
1 year 8 months ago #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..
  if (SINFO.violent && cvict && IS_NPC(cvict))
  {
        hit(cvict, caster, TYPE_UNDEFINED);
  }

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

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 8 months ago #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: 1.795 seconds