MagicalEffect(effect)
This function sets the effects sub type to magical.
effect MagicalEffect(
effect eEffect
);
Parameters
- eEffect
- Effect to change to magical
Description
Effects are one of four SUBTYPE_* (EXTRAORDINARY, MAGICAL, SUPERNATURAL, UNYIELDING).
This function sets the specified effects subtype to SUBTYPE_MAGICAL. Acts as a mutator for an effects subtype.
Effects, by default, start as magical and there is normally no need to use this function.
Magical effects can be dispelled (if applied from a spell script) and removed when resting.
If you put a link of effects as eEffect, then the entire link and all the effects within it are made magical.
You cannot change existing effect's subtypes with this function, only ones you have created via. the "effect" declaration.
Remarks
SUBTYPTE_MAGICAL is the default subtype for all effects. See 3rd Edition DMG page 71 or MM page 7 for a description of ability classifications.
Effect Subtype overview:
| Effect Subtype | Duration Type | Dispellable | Removed by Resting if effect on self | Removed by Resting if effect cast by self (on any object) | Removed by Dying if effect on self |
|---|---|---|---|---|---|
| Magical | Any | ✓ | ✓ | ✓ | ✓ |
| Extraordinary | Any | ✖ | ✓ | ✖ | ✓ |
| Supernatural | Temporary | ✖ | ✓ | ✖ | ✓ |
| Supernatural | Permanent | ✖ | ✖ | ✖ | ✓ |
| Unyielding | Any | ✖ | ✖ | ✖ | ✖ |
| Item Properties | Temporary | ✖ | ✖ | ✓ | ✖ |
| Item Properties | Permanent | ✖ | ✖ | ✖ | ✖ |
Example
void main()
{
//Create a new polymorph effect.
effect ePolymorph = EffectPolymorph(POLYMORPH_TYPE_PENGUIN);
//Pick your target
object oPC = GetFirstPC();
//Make it a magical effect
ePolymorph = MagicalEffect(ePolymorph);
//Apply the effect
ApplyEffectToObject (DURATION_TYPE_TEMPORARY, ePolymorph, oPC, 300.0);
}
See Also
| functions: | |
| constants: |
author: Michael Nork, editor: Jasperre, additional contributor(s): Jasperre, Cjreek