In a message dated 4/19/00 4:05:10 PM Central Daylight Time, whatley@lewiston.com writes: > Ok, got the shield to actually do some damage now my problem is with who it's > doing the damage to. Currently it's doing damage to the player who's > affected > by the spell, heh. Here's what I have: > > if (AFF_FLAGGED(victim, AFF_ISHIELD) && dam >= 1) { > temp = dice(1, GET_LEVEL(victim) / 4); > damage(victim, ch, temp, SPELL_ICE_SHIELD);<----Change This Somehow? > sprintf(buf, "&bIce Shield&n hits your enemy! [&r%d&n]\r\n", temp); > send_to_char(buf, victim); > sprintf(buf, "You are hit by &bIce Shield&n! [&r%d&n]\r\n", temp); > send_to_char(buf, ch); > } > > I start monkeying with the damage() statement i have there, assuming that by > flipping around the victim and ch it would deal damage to the other person, > but > to no avail. > > Any Ideas? > > Thanks in Advance, and thanks for the previous assistance. > > Whatley My question for you is this: What are you switching to ch? Does your code look like this: <snip> if (AFF_FLAGGED(ch, AFF_ISHIELD) && dam >= 1) { temp = dice(1, GET_LEVEL(ch) / 4); damage(ch, victim, temp, SPELL_ICE_SHIELD); <snip> or like this: <snip> if (AFF_FLAGGED(victim, AFF_ISHIELD) && dam >= 1) { temp = dice(1, GET_LEVEL(victim) / 4); damage(ch, ch, temp, SPELL_ICE_SHIELD); <snip> Because if it's like the first one, you'd be checking to see if the attacker has the Ice Shield, whereas if yours is like the second one then I don't see why it wouldn't work (unless circle has a builtin check against damage(ch, ch, ...) in which case you could swap it to damage(ch, victim, ...) If that's not the problem, then, unfortunately, I can be of no further help at this time. Good Luck, -Praetor +------------------------------------------------------------+ | 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