At 01:35 PM 1/21/98 , Justin wrote: >I was just going thru my WAY backed-up mailbox and saw someone's elemental >post. This spurred me to write everyone here about a little puzzle I >face. >I have in my mud types of damage, very similar to elemental stuff: fire, >cold, electricity, poison, and just general damage. I have it >bit-vectored, so damage could be both fire and electric, or cold and >poisoned, or something like that. Problem comes around when I come to my >resist _blank_ damage and _blank_ immunity code. If an attack has >multiple qualities to it, but one damage call, how would I reduce a >portion of the damage? >If I am not making sense, let's say I'm in a fight against someone with a >flaming sword. The item "flaming sword" has both bits for fire and >general damage, and has a 3d8 damage roll. But I have fire resistance at >75%; currently, the resistance code will--upon a successfull roll--reduce >damage from a total 3d8 roll, even though some of the damage is due to the >hard steel hitting my head, which fire resistance has nothing to do with! Hmm. I'd consider having objects/mobs have more than on damage entry: Flaming Sword~ ... 3d8+3 * Normal 'non-magic' damage 2d6+2 * Fire Damage 0d0+0 * Electrical Damage ... 'course, if you plan on not having there being things like 'Flaming Electric sword of Freezing' (multiple resistantences would apply here) You could reduce the above to: 3d8+3 * Normal 'non-magic' damage 2d6+2 * 'magic' Damage Fire * Damage type ... This would involve some changes in the way damage is calculated and determined, but you're already doing that anyway, so passing an extra value or two won't matter too much. :) +------------------------------------------------------------+ | 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