crat. I am doing this more of a coding exercise. I suppose trying to follow a logical path to a solution.
The simple answer is a check in /verbs/players/attack.c that prevents players
from attacking creators.
Nod.Cratylus this is where my logic led me. This check would return the message that I wanted.
I suppose my question is , is there an example that would give me a general idea of syntax for this check.
attack.c IS where i was looking. However, looking at the structure of attack.c I couldnt figure out exactly how to go about this.
p.s. I know there are others. but the shoot verb will be a moot point as it will be unused on Parodox Destiny.
hokay, so then doing it in attack.c means you want to do it in the do_ functions rather than the can_ functions.
In that verb it looks like the primary do_ function is do_attack_lvs(), meaning that do_attack_lv() (the singular
rather than plural) just sends its argument to do_attack_lvs() in the form of an array.
A check for whether a singular target is a creator should probably go in do_attack_lv(), looking something like
if( creatorp(target) ) { return "Nuh uh uhhh!"; }
Obviously this check should be before the part that just sends the argument to do_attack_lvs().
In do_attack_lvs() you should probably do something like this:
foreach(mixed target in targets) {
if( creatorp(target) ) {
targets -= ({ target });
}
}
This (if I drunkcoded it sensibly) would remove creators from the list of creatures to kill when
a player issues an "
attack all"
NB: These are general guidelines. Exceptions and sneaky ways around this exist. If
the problem is "I worry that my players can kill my immortals" then the solution is different.
-Crat