package spells

// Spell effect modification types - from SpellProcess.h
const (
	ModifyHealth               = 1
	ModifyFocus                = 2
	ModifyDefense              = 3
	ModifyPower                = 4
	ModifySpeed                = 5
	ModifyInt                  = 6
	ModifyWis                  = 7
	ModifyStr                  = 8
	ModifyAgi                  = 9
	ModifySta                  = 10
	ModifyColdResist           = 11
	ModifyHeatResist           = 12
	ModifyDiseaseResist        = 13
	ModifyPoisonResist         = 14
	ModifyMagicResist          = 15
	ModifyMentalResist         = 16
	ModifyDivineResist         = 17
	ModifyAttack               = 18
	ModifyMitigation           = 19
	ModifyAvoidance            = 20
	ModifyConcentration        = 21
	ModifyExp                  = 22
	ModifyFaction              = 23
	ChangeSize                 = 24
	ChangeRace                 = 25
	ChangeLocation             = 26
	ChangeZone                 = 27
	ChangePrefixTitle          = 28
	ChangeDeity                = 29
	ChangeLastName             = 30
	ModifyHaste                = 31
	ModifySkill                = 32
	ChangeTarget               = 33
	ChangeLevel                = 34
	ModifySpellCastTime        = 35
	ModifySpellPowerReq        = 36
	ModifySpellHealthReq       = 37
	ModifySpellRecovery        = 38
	ModifySpellRecastTime      = 39
	ModifySpellRadius          = 40
	ModifySpellAOETargets      = 41
	ModifySpellRange           = 42
	ModifySpellDuration        = 43
	ModifySpellResistibility   = 44
	ModifyDamage               = 45
	ModifyDelay                = 46
	ModifyTradeskillExp        = 47
	AddMount                   = 48
	RemoveMount                = 49
	ModifySpellCritChance      = 50
	ModifyCritChance           = 51
	SummonItem                 = 52
	ModifyJump                 = 53
	ModifyFallSpeed            = 54
	InflictDamage              = 55
	AddDot                     = 56
	RemoveDot                  = 57
	HealTarget                 = 58
	HealAOE                    = 59
	InflictAOEDamage           = 60
	HealGroupAOE               = 61
	AddAOEDot                  = 62
	RemoveAOEDot               = 63
	AddHot                     = 64
	RemoveHot                  = 65
	ModifyAggroRange           = 66
	BlindTarget                = 67
	UnblindTarget              = 68
	KillTarget                 = 69
	ResurrectTarget            = 70
	ChangeSuffixTitle          = 71
	SummonPet                  = 72
	ModifyHate                 = 73
	AddReactiveHeal            = 74
	ModifyPowerRegen           = 75
	ModifyHPRegen              = 76
	FeignDeath                 = 77
	ModifyVision               = 78
	Invisibility               = 79
	CharmTarget                = 80
	ModifyTradeskillDurability = 81
	ModifyTradeskillProgress   = 82
)

// Active spell states
const (
	ActiveSpellNormal = 0
	ActiveSpellAdd    = 1
	ActiveSpellRemove = 2
)

// Spell process constants
const (
	GetValueBadValue     = 0xFFFFFFFF
	ProcessCheckInterval = 50 // milliseconds between process checks
)

// Cast timer states
const (
	CastTimerActive   = 0
	CastTimerComplete = 1
	CastTimerExpired  = 2
	CastTimerCanceled = 3
)

// Interrupt error codes
const (
	InterruptErrorNone                      = 0
	InterruptErrorMovement                  = 1
	InterruptErrorDamage                    = 2
	InterruptErrorStun                      = 3
	InterruptErrorMesmerize                 = 4
	InterruptErrorFear                      = 5
	InterruptErrorRoot                      = 6
	InterruptErrorCanceled                  = 7
	InterruptErrorInvalidTarget             = 8
	InterruptErrorOutOfRange                = 9
	InterruptErrorInsufficientPower         = 10
	InterruptErrorInsufficientHealth        = 11
	InterruptErrorInsufficientConcentration = 12
)

// Spell queue priorities
const (
	QueuePriorityLow    = 0
	QueuePriorityNormal = 1
	QueuePriorityHigh   = 2
	QueuePriorityUrgent = 3
)

// Heroic Opportunity states
const (
	HeroicOpInactive = 0
	HeroicOpActive   = 1
	HeroicOpComplete = 2
	HeroicOpFailed   = 3
	HeroicOpCanceled = 4
)

// Resource check types
const (
	ResourceCheckPower         = 1
	ResourceCheckHealth        = 2
	ResourceCheckConcentration = 3
	ResourceCheckSavagery      = 4
	ResourceCheckDissonance    = 5
)

// Spell targeting types
const (
	TargetTypeSelf     = 0
	TargetTypeSingle   = 1
	TargetTypeGroup    = 2
	TargetTypeGroupAE  = 3
	TargetTypeAE       = 4
	TargetTypePBAE     = 5 // Point Blank Area Effect
	TargetTypeCorpse   = 6
	TargetTypeItem     = 7
	TargetTypeLocation = 8
	TargetTypeNone     = 9
)

// Spell resist types
const (
	ResistTypeNone      = 0
	ResistTypeMagic     = 1
	ResistTypeDivine    = 2
	ResistTypeMental    = 3
	ResistTypeCold      = 4
	ResistTypeHeat      = 5
	ResistTypeDisease   = 6
	ResistTypePoison    = 7
	ResistTypeArcane    = 8
	ResistTypeNoxious   = 9
	ResistTypeElemental = 10
)

// Spell damage types
const (
	DamageTypeSlashing = 0
	DamageTypeCrushing = 1
	DamageTypePiercing = 2
	DamageTypeBurning  = 3
	DamageTypeFreezing = 4
	DamageTypeAcid     = 5
	DamageTypePoison   = 6
	DamageTypeDisease  = 7
	DamageTypeMental   = 8
	DamageTypeDivine   = 9
	DamageTypeMagic    = 10
)

// Spell effect duration types
const (
	DurationTypeInstant       = 0
	DurationTypeTemporary     = 1
	DurationTypePermanent     = 2
	DurationTypeUntilCanceled = 3
	DurationTypeConditional   = 4
)

// Maximum values for spell system limits
const (
	MaxCastTimers   = 1000  // Maximum number of active cast timers
	MaxRecastTimers = 5000  // Maximum number of active recast timers
	MaxActiveSpells = 10000 // Maximum number of active spells
	MaxQueuedSpells = 50    // Maximum spells per player queue
	MaxSpellTargets = 100   // Maximum targets per spell
	MaxInterrupts   = 500   // Maximum queued interrupts
	MaxHeroicOps    = 100   // Maximum active heroic opportunities
)

// Spell book constants
const (
	SpellBookTabGeneral         = 0
	SpellBookTabCombatArts      = 1
	SpellBookTabSpells          = 2
	SpellBookTabTradeskills     = 3
	SpellBookTabReligious       = 4
	SpellBookTabTempSpells      = 5
	SpellBookTabCharacteristics = 6
	SpellBookTabKnowledgeSpells = 7
	SpellBookTabHeroicOps       = 8
)

// Spell effect categories for organization
const (
	EffectCategoryBuff      = "Buff"
	EffectCategoryDebuff    = "Debuff"
	EffectCategoryDamage    = "Damage"
	EffectCategoryHealing   = "Healing"
	EffectCategorySummon    = "Summon"
	EffectCategoryTransport = "Transport"
	EffectCategoryUtility   = "Utility"
	EffectCategoryControl   = "Control"
)

// Spell component types
const (
	ComponentTypeNone     = 0
	ComponentTypeVerbal   = 1
	ComponentTypeSomatic  = 2
	ComponentTypeMaterial = 3
	ComponentTypeFocus    = 4
	ComponentTypeDivine   = 5
)

// Spell school types
const (
	SchoolTypeGeneral   = 0
	SchoolTypeElemental = 1
	SchoolTypeSpiritual = 2
	SchoolTypeArcane    = 3
	SchoolTypeNature    = 4
	SchoolTypeTemporal  = 5
)

// Casting requirement flags
const (
	RequireLineOfSight = 1 << 0
	RequireNotMoving   = 1 << 1
	RequireNotInCombat = 1 << 2
	RequireTargetAlive = 1 << 3
	RequireTargetDead  = 1 << 4
	RequireGrouped     = 1 << 5
	RequireNotGrouped  = 1 << 6
	RequireGuild       = 1 << 7
	RequirePeaceful    = 1 << 8
)

// Spell failure reasons
const (
	FailureReasonNone               = 0
	FailureReasonInsufficientPower  = 1
	FailureReasonInsufficientHealth = 2
	FailureReasonInsufficientConc   = 3
	FailureReasonInterrupted        = 4
	FailureReasonOutOfRange         = 5
	FailureReasonInvalidTarget      = 6
	FailureReasonResisted           = 7
	FailureReasonImmune             = 8
	FailureReasonBlocked            = 9
	FailureReasonReflected          = 10
	FailureReasonAbsorbed           = 11
	FailureReasonFizzled            = 12
	FailureReasonMissed             = 13
	FailureReasonRequirementNotMet  = 14
)

// Special spell flags for unique behaviors
const (
	SpellFlagCannotBeResisted  = 1 << 0
	SpellFlagCannotBeReflected = 1 << 1
	SpellFlagCannotBeAbsorbed  = 1 << 2
	SpellFlagIgnoreImmunity    = 1 << 3
	SpellFlagBypassProtections = 1 << 4
	SpellFlagAlwaysHits        = 1 << 5
	SpellFlagCanCritical       = 1 << 6
	SpellFlagNoInterrupt       = 1 << 7
)
