On Mon, 18 May 1998, Christian Loth wrote: > I guess more general would maybe be: > >if (attacktype == SKILL_BASH && dam != 0) { > GET_POS(victim) = POS_SITTING; > WAIT_STATE(victim, PULSE_VIOLENCE); >} That's somewhat better. :) I think the "best" way would be for 'damage' to return something other than void, for how much damage it did do, or maybe a success field. Then we wouldn't have a general function like damage() worried about what all the specific skill effects are. >but unlike you George, I'm not a 'general' circle coder, but am used >to the Realm of Magic code, which is very different at many places. >But I promise to improve ;) If you start piling on hacks, your code will eventually degrade into a jumbled mess of hacks. I'd classify the SillyMUD magic system (as I last saw it) as that. Generalization like the CircleMUD magic system is good too, less repeated code. -- George Greer, greerga@circlemud.org | Genius may have its limitations, but http://patches.van.ml.org/ | stupidity is not thus handicapped. http://www.van.ml.org/CircleMUD/ | -- Elbert Hubbard +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST