On Sat, 8 Jun 1996, Fionn Colvin wrote: > Anyone have any ideas how I could make it so a mob that a caster > summons could have a duration. After which it would dissapear back the way > it came. Eg for spells like summon swarm, gate, etc. I'd like to have > summon swarm where the mage summons a mob called swarm who assists the > caster, but then disperses after a period of time. Also can AC ever get My girlfriend wrote a pretty nice swarm spell that does exactly what you're describing... I think its just a mob special, something along the lines of a check like this... if (!FIGHTING(mob) && !number(0, 10)) { act("A buzzing swarm of insects disburses and flies away.", <etc...> ); extract_char(mob); } The durration is, a little while after they stop fighting (its a battle spell) and they hunt as well too, so sometimes they last a while if the victim takes off running... > below -10/-100? If I made the AC of the swarm -11 and then in do_hit made > a check for whether ac was -11, in which case it would always be a miss, > would that work? I'd like to be able to set ac to -11 for all mobs who > can only be hit by spells. Erm... I just use resistances, and set it to 100% vs weapon types for stuff like this, but heres a real simple way to do it... make some flag, or some other way to determine what has this ability to not be hit, say AFF_NOHIT just for the example... in the damage() function in fight.c, right before GET_HIT(victim) -= dam; make a check of the attacktype (already defined in that function) and if its higher than MAX_SPELLS its a skill or weapon type of attack. if (IS_AFFECTED(victim, AFF_NOHIT) && attacktype > MAX_SPELLS) dam = 0; /* 0 damage reports as a miss */ That should do it... -Sky
This archive was generated by hypermail 2b30 : 12/18/00 PST