Wednesday, April 19, 2000, Shawn wrote:
SK> I'm trying to add a shield spell that does damage to the attacker if he hits
SK> the victim. In this case it's called Ice Shield, so I added an AFF_ISHIELD to
SK> check against and am having problems figuring out where to place it in fight.c.
SK> Currently I have it in void hit() right below where it figures that you've hit
In that place (RIGHT below), your check will be always false because dam = 0;
SK> if (AFF_FLAGGED(victim, AFF_ISHIELD) && dam >= 1) {
You'll need to place your code in hit() after calculate all damage.
/* at least 1 hp damage min per hit */
dam = MAX(1, dam);
--> + check against SHIELD
if (type == SKILL_BACKSTAB) {
dam *= backstab_mult(GET_LEVEL(ch));
--
Best regards,
Lavrenty mailto:crush@vtc.ru
Ìäàà.. õîðîøèå áûëè êîãäà òî îðèäæèíû. *sigh*
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT