| Message |
If I may be so bold, you forgot the following, Meerclar:
if ( IS_NPC(victim) && xIS_SET(victim->act, ACT_SENTINEL)
&& ch->in_room != victim->in_room )
{
/*
* letsee, if they're high enough.. attack back with fireballs
* long distance or maybe some minions... go herne! heh..
*
* For now, just always miss if not in same room -Thoric
*/
So, actually, you always miss if you're attacking a sentinel mob not in your room. That makes sense, since the sentinel will never move, and it would be unfair to let players whack away without danger... In fact, right after the sentinel check:
if ( number_percent() > 50 || (projectile && weapon
&& can_use_skill(ch, number_percent(), gsn_missile_weapons)) )
{
if ( projectile )
global_retcode = projectile_hit(ch, victim, weapon, projectile, dist );
else
global_retcode = spell_attack( dt, ch->level, ch, victim );
}
... which is where you actually roll to see if you hit the target. Also notice that if there is no projectile, it does a spell_attack - which implies that there is probably support for ranged spells.
I'm pretty sure that pseudo-ranged combat is completely implemented. It's kind of funky, sure, but it's there.
Getting mobs to use ranged weapons correctly is going to be a toughie, since you need to manually enter a fire command. You need to say: fire east fred. From skills.c:
/*
* Fire <direction> <target>
*
* Fire a projectile from a missile weapon (bow, crossbow, etc)
*
* Design by Thoric, coding by Thoric and Tricops.
*
* Support code (see projectile_hit(), quiver support, other changes to
* fight.c, etc by Thoric.
*/
So, a mob would have to know how to "type in" that command. That's the tricky part.
As for doing it as a player, I'm not sure why it doesn't work. If you're in "normal fighting", yes, you'll be whacking with your bow like it was a club, but if you use the fire command there's no reason why it shouldn't work. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|