package tradeskills

import "time"

// Animation IDs for different tradeskill techniques
const (
	// Tradeskill technique animation IDs for success
	TechniqueSuccessAnim_Fletching     = 17 // Fletching success animation
	TechniqueSuccessAnim_Tailoring     = 18 // Tailoring success animation
	TechniqueSuccessAnim_Transmuting   = 19 // Transmuting success animation
	TechniqueSuccessAnim_Alchemy       = 20 // Alchemy success animation
	TechniqueSuccessAnim_Scribing      = 21 // Scribing success animation
	TechniqueSuccessAnim_Jewelcrafting = 22 // Jewelcrafting success animation
	TechniqueSuccessAnim_Provisioning  = 23 // Provisioning success animation
	TechniqueSuccessAnim_Artistry      = 24 // Artistry success animation
	TechniqueSuccessAnim_Carpentry     = 25 // Carpentry success animation
	TechniqueSuccessAnim_Metalworking  = 26 // Metalworking success animation
	TechniqueSuccessAnim_Metalshaping  = 27 // Metalshaping success animation
	TechniqueSuccessAnim_Stoneworking  = 28 // Stoneworking success animation

	// Tradeskill technique animation IDs for failure
	TechniqueFailureAnim_Fletching     = 29 // Fletching failure animation
	TechniqueFailureAnim_Tailoring     = 30 // Tailoring failure animation
	TechniqueFailureAnim_Transmuting   = 31 // Transmuting failure animation
	TechniqueFailureAnim_Alchemy       = 32 // Alchemy failure animation
	TechniqueFailureAnim_Scribing      = 33 // Scribing failure animation
	TechniqueFailureAnim_Jewelcrafting = 34 // Jewelcrafting failure animation
	TechniqueFailureAnim_Provisioning  = 35 // Provisioning failure animation
	TechniqueFailureAnim_Artistry      = 36 // Artistry failure animation
	TechniqueFailureAnim_Carpentry     = 37 // Carpentry failure animation
	TechniqueFailureAnim_Metalworking  = 38 // Metalworking failure animation
	TechniqueFailureAnim_Metalshaping  = 39 // Metalshaping failure animation
	TechniqueFailureAnim_Stoneworking  = 40 // Stoneworking failure animation

	// Tradeskill technique animation IDs for idle/working
	TechniqueIdleAnim_Fletching     = 41 // Fletching idle animation
	TechniqueIdleAnim_Tailoring     = 42 // Tailoring idle animation
	TechniqueIdleAnim_Transmuting   = 43 // Transmuting idle animation
	TechniqueIdleAnim_Alchemy       = 44 // Alchemy idle animation
	TechniqueIdleAnim_Scribing      = 45 // Scribing idle animation
	TechniqueIdleAnim_Jewelcrafting = 46 // Jewelcrafting idle animation
	TechniqueIdleAnim_Provisioning  = 47 // Provisioning idle animation
	TechniqueIdleAnim_Artistry      = 48 // Artistry idle animation
	TechniqueIdleAnim_Carpentry     = 49 // Carpentry idle animation
	TechniqueIdleAnim_Metalworking  = 50 // Metalworking idle animation
	TechniqueIdleAnim_Metalshaping  = 51 // Metalshaping idle animation
	TechniqueIdleAnim_Stoneworking  = 52 // Stoneworking idle animation

	// Miss target animation IDs
	MissTargetAnim     = 53 // Miss target animation
	KillMissTargetAnim = 54 // Kill miss target animation
)

// Tradeskill technique skill IDs
const (
	TechniqueSkillFletching     = uint32(510901003) // Fletching skill ID
	TechniqueSkillTailoring     = uint32(510901002) // Tailoring skill ID
	TechniqueSkillTransmuting   = uint32(510901008) // Transmuting skill ID
	TechniqueSkillAlchemy       = uint32(510901001) // Alchemy skill ID
	TechniqueSkillScribing      = uint32(510901007) // Scribing skill ID
	TechniqueSkillJewelcrafting = uint32(510901004) // Jewelcrafting skill ID
	TechniqueSkillProvisioning  = uint32(510901005) // Provisioning skill ID
	TechniqueSkillArtistry      = uint32(510901009) // Artistry skill ID
	TechniqueSkillCarpentry     = uint32(510901010) // Carpentry skill ID
	TechniqueSkillMetalworking  = uint32(510901011) // Metalworking skill ID
	TechniqueSkillMetalshaping  = uint32(510901012) // Metalshaping skill ID
	TechniqueSkillStoneworking  = uint32(510901013) // Stoneworking skill ID
)

// Recipe component slots
const (
	ComponentSlotPrimary = 0 // Primary component slot
	ComponentSlotBuild1  = 1 // Build component slot 1
	ComponentSlotBuild2  = 2 // Build component slot 2
	ComponentSlotBuild3  = 3 // Build component slot 3
	ComponentSlotBuild4  = 4 // Build component slot 4
	ComponentSlotFuel    = 5 // Fuel component slot
)

// Crafting progress and durability limits
const (
	MaxProgress   = 1000 // Maximum progress value
	MaxDurability = 1000 // Maximum durability value
	MinProgress   = 0    // Minimum progress value
	MinDurability = 0    // Minimum durability value
)

// Crafting update timing
const (
	CraftingUpdateInterval = 4 * time.Second // How often crafting is processed
)

// Event outcome types
const (
	EventOutcomeSuccess = "success" // Event was successfully countered
	EventOutcomeFailure = "failure" // Event was not countered or failed
	EventOutcomeIgnored = "ignored" // Event was ignored (no action taken)
)

// Mass production quantities
var MassProductionQuantities = []int32{1, 5, 10, 15, 20, 25} // Available mass production quantities

// Default rule values for crafting calculations
const (
	DefaultCritFailChance    = 0.05 // 5% critical failure chance
	DefaultCritSuccessChance = 0.15 // 15% critical success chance
	DefaultFailChance        = 0.25 // 25% failure chance
	DefaultSuccessChance     = 0.55 // 55% success chance
	DefaultEventChance       = 0.30 // 30% event chance
)

// Progress stage thresholds for recipe completion
const (
	ProgressStage1 = 400  // Stage 1 progress threshold
	ProgressStage2 = 600  // Stage 2 progress threshold
	ProgressStage3 = 800  // Stage 3 progress threshold
	ProgressStage4 = 1000 // Stage 4 progress threshold (completion)
)

// Tradeskill UI constants
const (
	MaxSkillSlotsUI       = 6          // Maximum skill slots shown in UI
	DefaultUnknown2Value1 = 1045220557 // Unknown packet value 1
	DefaultUnknown2Value2 = 1061997773 // Unknown packet value 2
	DefaultUnknown3Value  = 18         // Unknown packet value 3
	DefaultUnknown6Value  = 11         // Unknown packet value 6
)
