# DoMagicEnergy

Objects
Status
4.6.5.0 CP4.9.6.0 CR
bool
int change Change of magic value (positive or negative).
bool allow_partial If true, the function will also transfer magical energy partially instead of failing. In this case, the function will only fail if the magical energy is not changed at all. Since CR.
Adjusts the magic value of an object. The change is only performed as a whole - if the specified change would pass the upper or lower physical limit of the object, it is not performed and the function returns false. The effect is that with only one call you can make a change and check whether the change is even possible.
if
(DoMagicEnergy(-10)) CreateObject(MLGT)->Activate(this);
Casts a lightning spell if enough magic energy is available.
GetMagicEnergy
Sven2
2001-11