Table of Contents

Struct PluginSpellInfo

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

Everything the client knows about one spell, read from its loaded content. It describes the spell itself, not a particular cast of it.

public readonly record struct PluginSpellInfo : IEquatable<PluginSpellInfo>
Implements
Inherited Members

Constructors

PluginSpellInfo(uint, string, uint, int, int, int, float, uint, string, bool, bool)

Everything the client knows about one spell, read from its loaded content. It describes the spell itself, not a particular cast of it.

public PluginSpellInfo(uint SpellId, string Name, uint Family, int Tier, int Difficulty, int ManaCost, float DurationSeconds, uint School, string Description, bool IsSelfTargeted, bool IsBeneficial)

Parameters

SpellId uint

The spell's id.

Name string

The spell's name as shown to the player.

Family uint

The group of spells that do the same thing at different strengths. Two spells of one family cannot both be in force at once.

Tier int

The spell's rank within its family; higher is stronger.

Difficulty int

The skill level the spell demands to cast reliably.

ManaCost int

Mana one cast costs.

DurationSeconds float

How long the effect lasts once it lands, in seconds; 0 for a spell with no lasting effect.

School uint

The id of the magic skill the spell is cast with, or 0 when the client cannot map the spell's school to one.

Description string

The spell's description text.

IsSelfTargeted bool

Whether the spell can only be cast on the caster.

IsBeneficial bool

Whether the spell helps rather than harms its target.

Properties

BaseRangeConstant

The fixed part of the spell's range, in metres. The whole range is this plus BaseRangeModifier times the caster's skill in the spell's school.

public float BaseRangeConstant { get; init; }

Property Value

float

BaseRangeModifier

The metres of range each point of the caster's school skill adds; see BaseRangeConstant.

public float BaseRangeModifier { get; init; }

Property Value

float

CasterEffect

The visual effect played on the caster when the spell goes off, as the spell table's effect-script number; 0 when it names none.

public uint CasterEffect { get; init; }

Property Value

uint

ComponentLoss

The spell table's component-loss factor, which scales how readily a cast of this spell consumes its components. Decal-era tools read it as the spell's speed.

public float ComponentLoss { get; init; }

Property Value

float

ComponentSet

The four component slots that identify the spell's formula.

public PluginSpellComponentSet ComponentSet { get; init; }

Property Value

PluginSpellComponentSet

Description

The spell's description text.

public string Description { get; init; }

Property Value

string

Difficulty

The skill level the spell demands to cast reliably.

public int Difficulty { get; init; }

Property Value

int

DisplayOrder

Where the spell sits in the spellbook: spells are listed in rising order of this number. Decal-era tools call it the sort key.

public int DisplayOrder { get; init; }

Property Value

int

DurationSeconds

How long the effect lasts once it lands, in seconds; 0 for a spell with no lasting effect.

public float DurationSeconds { get; init; }

Property Value

float

Family

The group of spells that do the same thing at different strengths. Two spells of one family cannot both be in force at once.

public uint Family { get; init; }

Property Value

uint

FormulaComponentIds

The components the spell's formula consumes, in casting order. Empty when the content has no formula for it.

public IReadOnlyList<uint> FormulaComponentIds { get; init; }

Property Value

IReadOnlyList<uint>

FormulaVersion

The spell table's formula version: the number that, with the character's name, decides which components this character's version of the formula uses. Decal-era tools call it the spell's generation.

public uint FormulaVersion { get; init; }

Property Value

uint

IconId

The spell's icon, as a full icon id; 0 when it has none.

public uint IconId { get; init; }

Property Value

uint

IsBeneficial

Whether the spell helps rather than harms its target.

public bool IsBeneficial { get; init; }

Property Value

bool

IsDamageOverTime

Whether the spell keeps damaging its target over time.

public bool IsDamageOverTime { get; init; }

Property Value

bool

IsDebuff

Whether the spell weakens its target.

public bool IsDebuff { get; init; }

Property Value

bool

IsFellowship

Whether the spell affects the caster's whole fellowship.

public bool IsFellowship { get; init; }

Property Value

bool

IsOffensive

Whether the spell is cast at an enemy.

public bool IsOffensive { get; init; }

Property Value

bool

IsProjectile

Whether the spell launches a missile that has to travel to its target, rather than taking effect where it is aimed.

public bool IsProjectile { get; init; }

Property Value

bool

IsSelfTargeted

Whether the spell can only be cast on the caster.

public bool IsSelfTargeted { get; init; }

Property Value

bool

IsUntargeted

Whether the spell is cast without picking a target.

public bool IsUntargeted { get; init; }

Property Value

bool

ManaCost

Mana one cast costs.

public int ManaCost { get; init; }

Property Value

int

Name

The spell's name as shown to the player.

public string Name { get; init; }

Property Value

string

Quality

The spell's quality: QualityOverride when one is set, otherwise Difficulty.

public int Quality { get; }

Property Value

int

QualityOverride

VTank's spell quality. It is the portal spell difficulty unless its official GameInfoDB override supplies a replacement.

public int? QualityOverride { get; init; }

Property Value

int?

RawFlags

The spell's raw flag bits from the content table, for rules this type does not model as its own property.

public uint RawFlags { get; init; }

Property Value

uint

RequiresTurnTo

VTank's spell-facing rule: targeted spells require facing except the authored family range 222..235.

public bool RequiresTurnTo { get; init; }

Property Value

bool

Saying

The words spoken while casting; empty when the spell has none.

public string Saying { get; init; }

Property Value

string

School

The id of the magic skill the spell is cast with, or 0 when the client cannot map the spell's school to one.

public uint School { get; init; }

Property Value

uint

SpellId

The spell's id.

public uint SpellId { get; init; }

Property Value

uint

SpellType

The spell's category number from the content table.

public int SpellType { get; init; }

Property Value

int

TargetEffect

The visual effect played on the target when the spell lands, as the spell table's effect-script number; 0 when it names none.

public uint TargetEffect { get; init; }

Property Value

uint

TargetMask

Bits describing what kinds of thing the spell may be cast on. 0 means the content declares no targets for it.

public uint TargetMask { get; init; }

Property Value

uint

Tier

The spell's rank within its family; higher is stronger.

public int Tier { get; init; }

Property Value

int