User effects.
UserCore
subclass.
Adds new effect or sets the time for an old effect.
Parameters:
id
Effect ID.
time
New effect time (minutes). If null, time will be taken from effect structure.
dynamic finishPost (e:EffectCore):Void
This method is called after the effect finishes.
Parameters:
e
Effect that just finished working.
getAttributeSum (attrID:String):Int
Returns sum of all effect attribute values of this type.
Parameters:
attrID
Effect attribute ID.
Returns:
Sum of all effect attribute values.
getRemainingTime (id:Int):Int
Returns remaining time for an effect by ID in seconds.
Parameters:
id
Effect ID.
Returns:
Remaining time in seconds. Returns 0, if effect not found.
Returns full time for an effect by ID in seconds.
Parameters:
id
Effect ID.
Returns:
Full effect time in seconds. Returns 0, if effect not found.
getTimeMinutes (id:Int):Int
Returns full time for an effect by ID in minutes.
Parameters:
id
Effect ID.
Returns:
Full effect time in minutes. Returns 0, if effect not found.
inline hasEffects ():Bool
Returns true, if user has any effects.
Returns:
True, if user has any effects. False otherwise.
Returns true, if user has effect with this ID.
Parameters:
id
Effect ID.
Returns:
True, if user has this effect. False otherwise.
hasStringID (sid:String):Bool
Returns true, if user has effect with this string ID.
Parameters:
sid
Effect string ID.
Returns:
True, if user has this effect. False otherwise.