Spell
Fields:
Align DispelType
The type of spells to dispel 0 = all spells 1 = positive 2 = negative
BaseIntensity number
The base amount of damage for this spell
BaseMana number
Mana cost
BaseRangeConstant number
BaseRangeMod number
Boost number
The minimum amount of vital boost from a life spell
BoostVariance number
Boost + BoostVariance = the maximum amount of vital boost from a life spell
CasterEffect PlayScript
The scripting effect to play on the caster
Category SpellCategory
Spell category
ComponentLoss number
Components SpellComponent[]
List of SpellComponents this spell requires. This looks at your character's inventory and chooses between foci / oldschool formulas depending on if you have the required foci / infused magic augmentation.
CreateOffset Vector3
The offset to apply to the spawn position
CritFrequency number
The critical chance frequency for this spell
CritMultiplier number
The critical damage multiplier for this spell
DamageRatio number
The percentage of DrainPercentage to damage a target for life projectiles
DamageType DamageType
The damage type for this spell
DefaultLaunchAngle number
The default angle to launch this spell (relative to player, or global?)
DegradeLimit number
DegradeModifier number
Description string
Spell description
Destination Vital
The destination vital for a life spell
DestinationLandcell number
The destination landcell for a spell
DestinationOrientation Quaternion
The destination orientation for a spell
DestinationOrigin Vector3
The destination origin for a spell
DispelSchool MagicSchool
The magic school to dispel, or undefined for all schools
DisplayOrder number
DotDuration number
Damage over Time Duration?
DrainPercentage number
The amount of source vital to drain for a life spell
Duration number
ElementalModifier number
The elemental damage multiplier for this spell
FizzleEffect PlayScript
The scripting effect to play on the caster when the spell fizzles
Flags SpellFlags
Spell flags
FociComponents SpellComponent[]
List of spell components this spell requires assuming the current character has the required foci / infused magic augmentation.
Formula number[]
A list of component ids for the spell formula. This is the old non-Foci formula.
FormulaVersion number
What formula version to use when calculating spell components
Icon number
Icon id
Id number
Spell Id
IgnoreMagicResist boolean
If TRUE, ignores magic resistance
ImbuedEffect number
The imbued effect for this spell
Index number
Unknown index?
Level number
Uses the client spell level formula, which is used for things like spell filtering a 'rough heuristic' based on the first component of the spell, which is expected to be a scarab
Link number
For SpellType.PortalSummon spells, Link is set to either 1 for LinkedPortalOneDID or 2 for LinkedPortalTwoDID
LossPercent number
The percent of source vital loss for a life magic transfer spell
ManaMod number
MaxBoostAllowed number
The maximum destination vital boost for a life magic transfer spell? Unused / unknown?
MaxPower number
The maximum spell power to dispel
MetaSpellId number
MetaSpellType SpellType
MinPower number
The minimum spell power to dispel (unused?)
Name string
Spell name
NonComponentTargetType number
NonTracking boolean
If this is on then projectile spells won't lead a target. Arc spells have this set to true.
Number number
The maximum # of spells to dispel
NumberVariance number
Number * NumberVariance = the minimum # of spells to dispel
NumProjectiles number
The total # of projectiles launched for this spell
NumProjectilesVariance number
The maximum # of additional projectiles possibly launched
OldSchoolComponents SpellComponent[]
List of old school (non-foci) spell components this spell requires
Peturbation Vector3
The maximum variation for spawn position
PortalLifetime number
Portal duration for spells of type SpellType.PortalSummon
Power number
Spell power / difficulty
PowerVariance number
Possible RNG for spell power to dispel (unused?)
Proportion number
The propotion of source vital to transfer to destination vital
RecoveryAmount number
RecoveryInterval number
School MagicSchool
The school of magic this spell belongs to
SlayerCreatureType CreatureType
The creature class for a slayer spell
SlayerDamageBonus number
The amount of additional damage for a slayer spell
SourceLoss number
A static amount of source vital loss for a life magic transfer spell? Unused / unknown?
SpellEconomyMod number
SpreadAngle number
The total angle for multi-projectile spells, ie. 90 degrees for 3-5 projectiles, or 360 degrees for ring spells
StatModAttribute AttributeId
The attribute this StatMod is for, if any.
StatModFloatProp FloatId
The float property this StatMod is for, if any.
StatModIntProp IntId
The int property this StatMod is for, if any.
StatModKey number
The stat modifier key, used for lookup in the enchantment registry
StatModSkill SkillId
The skill this StatMod is for, if any.
StatModType EnchantmentFlags
The stat modifier type, usually EnchantmentTypeFlags
StatModVal number
The amount to modify a stat
StatModVital Vital
The vital this StatMod is for, if any.
TargetEffect PlayScript
The scripting effect to play on the target
TransferCap number
The maximum amount of vital transferred by a life magic spell
TransferFlags TransferFlags
Indicates the source and destination for life magic transfer spells
Variance number
The maximum additional daamage for this spell
VerticalAngle number
The vertical angle to launch this spell
VitalDamageType DamageType
DamageType used by LifeMagic spells that specifies Health, Mana, or Stamina for the Boost type spells
WeenieClassId number
The weenie class ID associated for this spell, ie. the projectile weenie class id
Methods:
GetPropertyKeys() : string[]
Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts
HasComponents() : boolean, SpellComponent[]
Check if the current character has the required spell components to cast this spell. It automatically chooses between OldSchoolComponents and FociComponents depending on if the current character has the required foci / infused magic augmentation.
Type | Summary |
boolean | true if the current character has the required components, false otherwise |
SpellComponent[] | A list of missing SpellComponents |
HasComponents() : boolean
Check if the current character has the required spell components to cast this spell. It automatically chooses between OldSchoolComponents and FociComponents depending on if the current character has the required foci / infused magic augmentation.
HasFociOrInfusedAugmentation() : boolean
Check if the current character has the needed foci or infused magic augmentation
HasSkill(spellDifficultyModifier?: number = 20) : boolean
Checks if the current character has the skill required to cast this spell successfully.
Name | Type | Default | Summary |
spellDifficultyModifier | number | 20 | The number of skill points above the spell's difficulty that you must have in order for this check to pass |