[Crossfire-wiki] [Crossfire DokuWiki] page changed: dev_todo:make_slaying_consistent
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Sun May 27 13:43:10 CDT 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/05/27 13:43
User :
Edit Summary:
@@ -1 +1,4 @@
Slaying is sloppy in that it uses strstr. This, an item that has 'slaying giant' (like holyword of mostrai) will kill ants. strstr matching was most likely added to support comma seperated slaying lists (slaying demon,undead). However, the code should really insist on exact matching, and if necessarybreak apart the comma seperated list. Probably best to make something like a 'does_slay()' function which can be used all over the place (consistent behaviour is a good thing). If performance for this becomes an issue, making a slaying a set of pointers could be done (char **slaying), and it gets filled in at load time, and at save time, gets filled in the opposite direction. However, from a simple basis, a check in does_slay() can be done to see if slaying does contain a comma, and if not, just do simple strcmp, and only if it does does extra work need to be done. MSW 2003-03-28
+
+ (Is this actually [still] true? It looks like the code still uses strstr, but goes off of "race" rather than "name" - so "slaying giant" shouldn't affect ants [race: insect]. So long as the "race" names used throughout the arches are appropriate and carefully chosen this should work fine...and allow a hypothetical "firehose" spell having "slaying: fire" to affect any race with "fire" in it e.g. "fire elemental"- and "race" ends up being usable as glorified keywords? I think?)
+ Epicanis 20070527
IP-Address : 199.104.112.34
Old Revision: http://wiki.metalforge.net/doku.php/dev_todo:make_slaying_consistent?rev=1158474135
New Revision: http://wiki.metalforge.net/doku.php/dev_todo:make_slaying_consistent
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list