mob/var/list/buffs
buffs
proc
passive_effects(mob/m)
visuals(mob/m)
New(mob/m,dur)
src.duration = dur
src.effects(m)
src.visuals(m)
if(!m.buffs) buffs = new
m.buffs += src
spawn(dur) del src
I'd then continue to make buffs children for each and every buff/debuff like so.
buffs
attack_up
passive_effects(mob/m)
m.atk_multiplier += 0.5 //adds 50% damage
exploding_punches
//no passive effects
//is checked when mobs "punch"?
This is where I run into my issue. What about buffs that don't have a global passiveness? Things that are only applied to specific situations. Should I check them like so?
mob/verb/punch()
var/dmg = 10
if(src.buffs)
var/buffs/exploding_punches/ep = locate() in src.buffs
if(ep) dmg += 10
You could vary this in several ways by changing, for example, the way you handle event information and how your buffs apply that information. Like I said, this is just one idea.
Edit:
I also wanted to note that if you're going to be using these procs frequently, it might also be worthwhile to create cache lists of which buffs could handle the event. For example: