#14 new targetting keyword

open
nobody
None
5
2004-05-10
2004-05-10
rick peplinski
No

An absolutely wonderful targetting feature would to
allow targetting of the opponent of somebody. Right
now I was just thinking of adding it to do_cast(), but
maybe it can be extended elsewhere.

So if Joe is fighting an orc and Delina wants to cast a
magic missile at Joe's orc:

cast 'magic missile' opp:Joe

Beirdo came up with the "opp:" keyword prefix and I
really like it.

This would be a huge saving grace for casters of all
kinds, and unless it is a bigger issue than what I
understand, it would be a nice low-hanging fruit.

Also it would be very interesting to consolidate the
targetting functionality of the code as a larger project.
Anytime a mob is being targetted, it calls the:
char_data target_mob(char *argument, int flags)
function.

The flags would be the "where should we look for the
target" keys. Such as look for a player, a mob, or
either. Look in the whole world, look in the zone, look in
the room. Look only for visible characters, all characters.

Similar could be put in place for objects.

Consolidating and tightening up the code in this way is
one of those big projects that wouldn't really change
much for the playerbase. It would probably get rid of
thousands of lines of code and give us more control over
functionality. It's a biggie though, so let's see if it's a
good work/reward candidate.

Discussion

  • Gavin Hurlbut
    Gavin Hurlbut
    2004-07-16

    Logged In: YES
    user_id=19513

    This is a fairly large code change and needs to be thought
    through before implementation.