ELAYER_OVERWRITE, // overwrites first effect of same type applied. Can cancel out eq effects if strong enough
ELAYER_RESET, // resets first effect of same type applied. Equipment effects absorb the reset
ELAYER_CUMULATIVE, // just shoves another effect onto the target to allow multiples of the same type
ELAYER_COMBINE, // adds duration, mod, layer and resist values of new effect to old one
MAX_ELAYER // add new effect layer types above here
void * target; // what this effect is currently attached to.
short resistVal; // resist/save strength. -val = susceptible, 0 = N/A, +val = resistance. Range -100…100
// for effects that modify resistance or saving throws
short maxDuration; // how long the effect will exist. -1 is permanent(only for effects added by worn eq)
short timeTillExpire; // time left till the effect expires
short effectType; // what effect, if any, it adds to the target(effects in _aff_flags enum above)
short targetType; // what the effect can be placed on, characters, eq, rooms, some combination
short statModType; // what stat, if any, gets modified. See enum _apply_types above.
short statModVal; // mod value for the specified stat
short layerMode; // what happens when the same effect is applied to target multiple times
short layerStrength; // how strong the effect is. helps determine layer behavior
short numTargetType; // how many targets it can encompass.
// 0 = caster, 1 = group(of caster), 2 = target, 3 = group(of target), 4 = room
std::string casterMsg; // message caster sees when spell is finished. not used for eq effects that target wearer
std::string targetMsg; // message target sees when hit by effect, if any
std::string othersMsg; // message others in the room see when the effect hits the target
std::string offTarMsg; // message for visible/tangible wearoff effects to affected target
std::string offOthMsg; // message for visible/tangible wearoff effects to others in the room
// TODO: add get/set functions for the private stuff up above
void apply(/*?????*/); // use function overloading? void pointers? strings(<O/R/M><vnum/name>)? Not sure.
void remove(); // handle removal of this effect
void countdown(); // decrement timeTillExpire at one second intervals. When it reaches 0 remove the effect and destroy.
// Change return type to short? Can an object call it's own destructor without problems? Hmmm…
Mage A casts fireball, and immediately after, Mage B casts air blast. Mage B's air blast is not created, but instead it changes to fire blast, dealing more damage than air blast would normally (and changing it's damtype to fire, among other things).
Mage A casts fireball. Mage B casts fireball immediately after. Both fireballs hit, except Mage B's fireball damage is augmented slightly because of a chain bonus (Target got hit with the same affect more than once in a round)
Mage A's fireball singes An Armed Guard. (97 dmg)
Your fireball chars An Armed Guard! (142 dmg) Chain x2!
Mage A casts a spell which damages an opponent multiple times, 3 or 4 hits in this case. The first hit deals normal damage and the subsequent three hits deal additional damage due to chain bonuses, each hit increasing a chain bonus.
Your meteor storm smashes An Armed Guard! (202 dmg)
Your meteor storm smashes An Armed Guard! (212 dmg) Chain x 2
Your meteor storm | CRUSHES | An Armed Guard! (222 dmg) Chain x 3
Your meteor storm PULVERIZES An Armed Guard! (233 dmg) Chain x 4