I would think each status effect would need:
name duration attributeAffectedList specialFunctionCallCode repeatcount currentlyEffected
so name is obvious, duration is number or rounds it lasts (-1 fo perm), attreffectlist is an array of + or - values applied to the attribtes of a target entity, specialCode is for a switch/case with a set of methods for unusual actions that cant go anywhere, like fuse two items in inventory and make a mass of useless junk, repeatcount is for how many times the attributeeffect is applied, so you could have a that deal -5blocking for 6 turns in a row and lasts 100 turns before wearing off or whatever. current effected is a boolean in case you want to see if something is already affected in case it only woks once.
anyway, thats one way to do it, any other ideas? Oscar, do you have something in mind already?
Code: Select all
string name; int duration; effectList EList; int effectCode; int repeatCount; boolean alreadyAffected