-- Path of Building
--
-- Other active skills
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...

#skill RepeatingShockwave
#flags spell area
	fromItem = true,
#mods

#skill Affliction
#flags spell area
	fromTree = true,
#mods

#skill AnimateGuardiansWeapon
#flags spell minion duration
	fromItem = true,
	minionHasItemSet = true,
	minionUses = {
		["Weapon 1"] = true,
	},
	minionList = {
		"AnimatedWeapon",
	},
	statMap = {
		["active_skill_damage_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }),
		},
		["attack_minimum_added_physical_damage"] = {
			mod("MinionModifier", "LIST", { mod = mod("PhysicalMin", "BASE", nil, 0, KeywordFlag.Attack) }),
		},
		["attack_maximum_added_physical_damage"] = {
			mod("MinionModifier", "LIST", { mod = mod("PhysicalMax", "BASE", nil, 0, KeywordFlag.Attack) }),
		},
		["number_of_animated_weapons_allowed"] = {
			mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
		},
	},
#mods

#skill ApproachingFlames
#flags spell
	fromItem = true,
	statMap = {
		["display_touch_of_fire"] = {
			flag("FlameTouched", { type = "GlobalEffect", effectType = "Buff" })
		}
	},
#mods

#skill SupportTriggerSpellOnBowAttack Asenath's Chant
	fromItem = true,
#mods

#skill Barkskin
#flags spell
	fromTree = true,
	statMap = {
		["physical_attack_damage_taken_+_per_barkskin_stack"] = {
			mod("PhysicalDamageTakenFromAttacks", "BASE", nil, 0, 0, { type = "Multiplier", var = "BarkskinStacks", limitVar = "BarkskinMaxStacks" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Barkskin" }),
		},
		["chance_to_evade_attacks_+%_final_per_missing_barkskin_stack"] = {
			mod("EvadeChance", "MORE", nil, 0, 0, { type = "Multiplier", var = "MissingBarkskinStacks" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Barkskin" }),
		},
		["max_barkskin_stacks"] = {
			mod("Multiplier:BarkskinMaxStacks", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
			mod("Multiplier:MissingBarkskinStacks", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill AilmentBearer
#flags spell
	fromTree = true,
#mods

#skill AspectOfTheAvian
#flags cast duration
	fromItem = true,
	statMap = {
		["chance_to_deal_double_damage_%"] = {
			mod("DoubleDamageChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Might", effectCond = "AviansMightActive" }),
		},
		["minion_chance_to_deal_double_damage_%"] = {
			mod("MinionModifier", "LIST", { mod = mod("DoubleDamageChance", "BASE", nil) }, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Might", effectCond = "AviansMightActive" }),
		},
		["base_movement_velocity_+%"] = {
			mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Flight", effectCond = "AviansFlightActive" }),
		},
		["minion_movement_speed_+%"] = {
			mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", nil) }, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Flight", effectCond = "AviansFlightActive" }),
		},
	},
#mods

#skill AspectOfTheCat
#flags cast duration
	fromItem = true,
	statMap = {
		["skill_buff_grants_critical_strike_chance_+%"] = {
			mod("CritChance", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Cat's Stealth", effectCond = "CatsStealthActive" }),
		},
		["avoid_damage_%"] = {
			mod("AvoidAllDamageFromHitsChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Cat's Stealth", effectCond = "CatsStealthActive" }),
		},
		["attack_speed_+%_granted_from_skill"] = {
			mod("Speed", "INC", nil, ModFlag.Attack, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Cat's Agility", effectCond = "CatsAgilityActive" }),
		},
		["cast_speed_+%_granted_from_skill"] = {
			mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Cat's Agility", effectCond = "CatsAgilityActive" }),
		},
	},
#mods

#skill AspectOfTheCrab
#flags cast
	fromItem = true,
	statMap = {
		["physical_damage_reduction_%_per_crab_aspect_stack"] = {
			mod("PhysicalDamageReduction", "BASE", nil, 0, 0, { type = "Multiplier", var = "CrabBarrier" }, { type = "GlobalEffect", effectType = "Buff" }),
		},
		["max_crab_aspect_stacks"] = {
			mod("CrabBarriersMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill AspectOfTheSpider
#flags cast duration
	fromItem = true,
	statMap = {
		["base_damage_taken_+%"] = {
			mod("DamageTaken", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Spider's Web" })
		},
		["spider_aspect_max_web_count"] = {
			mod("Multiplier:SpiderWebApplyStackMax", "BASE", nil),
		},
	},
#baseMod skill("debuff", true)
#baseMod skill("stackCount", 1, { type = "Multiplier", var = "SpiderWebApplyStack", limitVar = "SpiderWebApplyStackMax" })
#mods

#skill SupportBloodMagicUniquePrismGuardian Blood Magic
	fromItem = true,
#mods

#noGem
#skill BloodOffering
#flags spell duration
	fromItem = true,
	statMap = {
		["damage_+%"] = {
			mod("Damage", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
		},
		["blood_offering_%_of_life_to_lose"] = {
			mod("Multiplier:BloodOfferingLifeSacrificed", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "PerStat", stat = "LifeUnreserved", actor = "parent" }),
			div = 100,
		},
		["blood_offering_%_of_lost_life_to_regenerate_as_life_per_second"] = {
			mod("LifeRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }),
			mod("Multiplier:BloodOfferingBaseRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }),
			div = 100,
		},
		["blood_offering_life_regenerated_+%_final_per_corpse"] = {
			mod("LifeRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "Multiplier", var = "BloodOfferingBaseRegen"},  { type = "Multiplier", var = "CorpseConsumedRecently", limit = 5 }),
			mod("LifeRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "Multiplier", var = "BloodOfferingBaseRegen"},  { type = "Multiplier", var = "CorpseConsumedRecently", limit = 5, actor="parent" }),
			div = 100,
		},
	},
#baseMod skill("buffMinions", true)
#baseMod skill("buffNotPlayer", true)
#mods

#skill BloodSacramentUnique
#baseMod skill("radius", 5)
#baseMod mod("Multiplier:BloodSacramentMaxStages", "BASE", 33)
#baseMod flag("HasUncancellableReservation", { type = "Condition", var = "BloodSacramentReservationEHP" })
#flags spell area
	fromItem = true,
	initialFunc = function(activeSkill, output)
		if output.LifeReservedPercent >= 100 then
			return
		end
		local lifeReservedPercent = activeSkill.skillData["LifeReservedPercent"] or 3
		local lifeReserved = activeSkill.skillData["LifeReservedBase"] or math.huge
		activeSkill.skillModList:NewMod("Multiplier:ChannelledLifeReservedPercentPerStage", "BASE", lifeReservedPercent, "Blood Sacrament")
		activeSkill.skillModList:NewMod("Multiplier:ChannelledLifeReservedPerStage", "BASE", lifeReserved, "Blood Sacrament")
	end,
	statMap = {
		["flameblast_hundred_times_radius_+_per_1%_life_reserved"] = {
			skill("radiusExtra", nil, { type = "Multiplier", var = "ChannelledLifeReservedPercentPerStage" }),
			div = 100,
		},
		["flameblast_damage_+%_final_per_10_life_reserved"] = {
			mod("Damage", "MORE", nil, ModFlag.Hit, 0, { type = "Multiplier", var = "ChannelledLifeReservedPerStage", div = 10 }),
		},
		["flameblast_ailment_damage_+%_final_per_10_life_reserved"] = {
			mod("Damage", "MORE", nil, ModFlag.Ailment, 0, { type = "Multiplier", var = "ChannelledLifeReservedPerStage", div = 10 }),
		},
	},
#mods

#noGem
#skill BoneArmour
#flags duration spell
	fromTree = true,
	statMap = {
		["quick_guard_damage_absorbed_%"] = {
			mod("GuardAbsorbRate", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Guard", unscalable = true }),
		},
		["quick_guard_damage_absorb_limit"] = {
			mod("GuardAbsorbLimit", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Guard", unscalable = true }),
		},
	},
#baseMod mod("AvoidBleed", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Guard" })
#mods

#skill BoneNova
#flags attack projectile
	fromItem = true,
#mods

#skill Brandsurge
#flags spell area
	fromItem = true,
#mods

#skill ColdAegis
#flags spell
	fromItem = true,
	statMap = {
		["aegis_unique_shield_max_value"] = {
			mod("ColdAegisValue", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill UniqueEnchantmentOfInfernoOnCrit
#flags spell area hit
	fromItem = true,
#mods

#skill TriggeredConsecrate Consecrate
#flags spell duration area
	fromItem = true,
#mods

#skill CreateFungalGroundOnKill
#flags duration area
	fromItem = true,
#mods

#skill CorpseWalk
#flags area
	fromItem = true,
#mods

#skill SupportUniqueCosprisMaliceColdSpellsCastOnMeleeCriticalStrike Cospri's Malice
	fromItem = true,
#mods

#skill TriggeredSummonLesserShrine
#flags spell duration
	fromItem = true,
#baseMod flag("Condition:CanHaveLesserShrines", { type = "GlobalEffect", effectType = "Buff", effectName = "Shrines" })
#mods

#noGem
#skill DeathAura
#flags spell aura area
	fromItem = true,
#baseMod skill("dotIsArea", true)
#baseMod skill("radius", 30)
#mods

#skill DeathWalk
#flags cast area
	fromItem = true,
#baseMod skill("explodeCorpse", true)
#baseMod skill("showAverage", true)
#mods

#skill DeathWish
#flags spell area
	fromItem = true,
	parts = {
		{
			name = "Channelling",
			spell = true,
			cast = false,
		},
		{
			name = "Minion Explosion",
			spell = false,
			cast = true,
			stages = true,
		},
	},
	preDamageFunc = function(activeSkill, output)
		if activeSkill.skillPart == 2 then
			local skillData = activeSkill.skillData
			skillData.FireBonusMin = output.Life * skillData.selfFireExplosionLifeMultiplier
			skillData.FireBonusMax = output.Life * skillData.selfFireExplosionLifeMultiplier
		end
	end,
	statMap = {
		["spell_minimum_base_fire_damage"] = {
			skill("FireMin", nil, { type = "SkillPart", skillPart = 2 }),
		},
		["spell_maximum_base_fire_damage"] = {
			skill("FireMax", nil, { type = "SkillPart", skillPart = 2 }),
		},
		["death_wish_attack_speed_+%"] = {
			mod("Speed", "INC", nil, ModFlag.Attack, 0, { type = "GlobalEffect", effectType = "Buff" }),
		},
		["death_wish_cast_speed_+%"] = {
			mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "GlobalEffect", effectType = "Buff" }),
		},
		["death_wish_movement_speed_+%"] = {
			mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
		},
		["death_wish_hit_and_ailment_damage_+%_final_per_stage"] = {
			mod("Damage", "MORE", nil, 0, bit.bor(KeywordFlag.Hit, KeywordFlag.Ailment), { type = "Multiplier", var = "DeathWishStage" }, { type = "SkillPart", skillPart = 2 }),
		},
		["death_wish_max_stages"] = {
			mod("Multiplier:DeathWishMaxStages", "BASE", nil, 0, 0, { type = "SkillPart", skillPart = 2 }),
		},
	},
	#baseMod skill("explodeCorpse", true, { type = "SkillPart", skillPart = 2 })
	#baseMod skill("radius", 10, { type = "SkillPart", skillPart = 2 })
	#baseMod skill("buffMinions", true)
	#baseMod skill("buffNotPlayer", true)
#mods

#skill Melee Default Attack
#flags attack melee projectile
#mods

#skill MeleeUseContactPoint Default Attack
#flags attack melee projectile
#mods

#skill GemDetonateMines
#flags spell
#mods

#skill SupportDivineBlessing
	fromItem = true,
	statMap = {
		["support_aura_duration_base_buff_duration"] = {
			skill("auraDuration", nil),
			div = 1000,
		},
	},
#mods

#noGem
#skill DoryanisTouch
#flags attack area melee
	fromItem = true,
#mods

#skill ElementalAegis
#flags spell
	fromItem = true,
	statMap = {
		["aegis_unique_shield_max_value"] = {
			mod("ElementalAegisValue", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill SupportEarthbreaker
	fromItem = true,
	addFlags = {
		totem = true,
	},
	statMap = {
		["support_ancestor_slam_totem_attack_speed_+%_final"] = {
			mod("Speed", "MORE", nil, ModFlag.Attack),
		},
		["support_ancestor_slam_totem_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
		["ancestor_totem_grants_owner_area_of_effect_+%_with_melee_skills"] = {
			mod("AreaOfEffect", "INC", nil, ModFlag.Melee),
		},
	},
#mods

#skill SupportElementalPenetration Elemental Penetration
	fromItem = true,
#mods

#skill ElementalWarding
#flags spell projectile duration
	fromItem = true,
	parts = {
		{
			name = "Convert to fire",
		},
		{
			name = "Convert to cold",
		},
		{
			name = "Convert to lightning",
		},
	},
	#baseMod mod("SkillPhysicalDamageConvertToFire", "BASE", 100, 0, 0, { type = "SkillPart", skillPart = 1 })
	#baseMod mod("SkillPhysicalDamageConvertToCold", "BASE", 100, 0, 0, { type = "SkillPart", skillPart = 2 })
	#baseMod mod("SkillPhysicalDamageConvertToLightning", "BASE", 100, 0, 0, { type = "SkillPart", skillPart = 3 })
#mods

#skill EmbraceMadness
#flags spell
	fromItem = true,
#mods

#noGem
#skill Envy
#flags spell aura area
	fromItem = true,
	statMap = {
		["attack_minimum_added_chaos_damage"] = {
			mod("ChaosMin", "BASE", nil, 0, KeywordFlag.Attack, { type = "GlobalEffect", effectType = "Aura" }),
		},
		["attack_maximum_added_chaos_damage"] = {
			mod("ChaosMax", "BASE", nil, 0, KeywordFlag.Attack, { type = "GlobalEffect", effectType = "Aura" }),
		},
		["spell_minimum_added_chaos_damage"] = {
			mod("ChaosMin", "BASE", nil, 0, KeywordFlag.Spell, { type = "GlobalEffect", effectType = "Aura" }),
		},
		["spell_maximum_added_chaos_damage"] = {
			mod("ChaosMax", "BASE", nil, 0, KeywordFlag.Spell, { type = "GlobalEffect", effectType = "Aura" }),
		},
	},
#baseMod skill("radius", 40)
#mods

#skill FireAegis
#flags spell
	fromItem = true,
	statMap = {
		["aegis_unique_shield_max_value"] = {
			mod("FireAegisValue", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill FireBurstOnHit
#flags spell area
	fromItem = true,
#baseMod skill("radius", 24)
#mods

#skill FieryImpactHeistMaceImplicit
#flags attack area melee
	fromItem = true,
#mods

#skill AtziriUniqueStaffFlameblast
#flags spell area
	fromItem = true,
#baseMod skill("triggerSource", "Queen's Demand")
#mods

#skill Focus
#mods

#skill SupportTriggerSpellFromHelmet Focus
	fromItem = true,
#mods

#skill FogOfWar
#flags spell
	fromItem = true,
#mods

#noGem
#skill GluttonyOfElements
#flags spell aura area duration
	fromItem = true,
	statMap = {
		["immune_to_curses"] = {
			--Display Only
		},
	},
#baseMod skill("radius", 40)
#baseMod mod("AvoidCurse", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true })
#mods

#skill GoreShockwave
#flags attack area melee
	fromItem = true,
#mods

#skill SupportGreaterSpellEcho Greater Spell Echo
	fromItem = true,
	statMap = {
		["support_greater_spell_echo_spell_damage_+%_final_per_repeat"] = {
			mod("RepeatPerRepeatDamage", "MORE", nil, 0, 0, { type = "Condition", var = "HaveBladeVortex", neg = true }, { type = "Condition", var = "CastOnFrostbolt", neg = true }, { type = "Condition", varList = {"averageRepeat", "alwaysFinalRepeat"} }),
		},
		["support_greater_spell_echo_area_of_effect_+%_per_repeat"] = {
			mod("RepeatPerRepeatAreaOfEffect", "INC", nil, 0, 0, { type = "Condition", var = "CastOnFrostbolt", neg = true }),
		},
	},
#baseMod flag("Condition:HaveGreaterSpellEcho")
#mods

#skill Icestorm
#flags spell area duration
	fromItem = true,
	statMap = {
		["skill_effect_duration_per_100_int"] = {
			mod("Duration", "BASE", nil, 0, 0, { type = "PerStat", stat = "Int", div = 100 }),
			div = 1000,
		},
	},
#baseMod skill("radiusSecondary", 22)
#baseMod skill("radiusLabel", "Ice projectile:")
#baseMod skill("radiusSecondaryLabel", "Target area:")
#mods

#skill IcicleBurst
#flags attack projectile
#baseMod skill("showAverage", true)
	fromItem = true,
#mods

#skill IllusoryWarp
#flags spell area duration
	fromItem = true,
#mods

#skill CatsStealthTriggeredIntimidatingCry
#flags warcry area duration
	fromItem = true,
	statMap = {
		["skill_empowers_next_x_melee_attacks"] = {
			mod("IntimidatingExertedAttacks", "BASE", nil),
		},
		["intimidating_cry_movement_speed_+%_per_5_power_up_to_cap"] = {
			mod("IntimidatingMovementSpeedPer5MP", "BASE", nil),
		},
	},
#baseMod skill("radius", 60)
#mods

#skill SupportCastOnManaSpent Kitava's Thirst
	fromItem = true,
#mods

#skill LightningAegis
#flags spell
	fromItem = true,
	statMap = {
		["aegis_unique_shield_max_value"] = {
			mod("LightningAegisValue", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill LightningBolt
#flags spell area
	fromItem = true,
	preDamageFunc = function(activeSkill, output)
		activeSkill.skillData.hitTimeOverride = output.Cooldown
	end,
#mods

#skill SupportTriggerBowSkillOnBowAttack Maloney's Mechanism
	fromItem = true,
#mods

#skill ManifestDancingDervishes
#flags spell minion
	fromItem = true,
	minionList = {
		"UniqueAnimatedWeapon",
	},
	minionUses = {
		["Weapon 1"] = true,
	},
	statMap = {
		["attack_damage_+%"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", nil, ModFlag.Attack) }),
		},
		["attack_speed_+%"] = {
			mod("MinionModifier", "LIST", { mod = mod("Speed", "INC", nil, ModFlag.Attack) }),
		},
	},
#baseMod mod("DisableWeapons", "FLAG", true, 0, 0, { type = "GlobalEffect", effectType = "Buff" })
#baseMod mod("Condition:Onslaught", "FLAG", true, 0, 0, { type = "GlobalEffect", effectType = "Buff" })
#baseMod skill("minionLevel", 65)
#mods

#skill SupportUniqueMjolnerLightningSpellsCastOnHit Mjolner
	fromItem = true,
#mods

#skill TriggeredMoltenStrike
#flags attack projectile area
	fromItem = true,
#baseMod flag("CannotSplit")
#mods

#skill PenanceMark
#flags spell curse duration mark
	fromTree = true,
#baseMod skill("debuff", true)
#mods

#skill PhysicalAegis
#flags spell
	fromItem = true,
	statMap = {
		["aegis_unique_shield_max_value"] = {
			mod("PhysicalAegisValue", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
		},
	},
#mods

#skill SupportTriggerSpellOnAttack Poet's Pen
	fromItem = true,
#mods

#skill Portal
#flags spell
#mods

#skill QueensDemand
	fromItem = true,
#mods

#skill PrimalAegis
	fromTree = true,
#mods

#skill Pacify
#flags spell curse area duration hex
	fromTree = true,
#baseMod skill("debuff", true)
#mods

#skill Ravenous
#flags spell
	fromTree = true,
	statMap = {
		["ravenous_buff_magnitude"] = {
			{
				mod("DamageTaken", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectCond = "RavenousCorpseConsumed" }),
				mult = -1,
			},
			{
				mod("Damage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectCond = "RavenousCorpseConsumed" }),
			},
		},
	},
#mods

#skill RaiseSpiders
#flags spell minion duration
	fromItem = true,
	minionList = {
		"SpiderMinion",
	},
	statMap = {
		["summoned_spider_grants_attack_speed_+%"] = {
			mod("Speed", "INC", nil, ModFlag.Attack, 0, { type = "Multiplier", var = "RaisedSpider" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Raised Spider" }),
		},
		["summoned_spider_grants_poison_damage_+%"] = {
			mod("Damage", "INC", nil, 0, KeywordFlag.Poison, { type = "Multiplier", var = "RaisedSpider" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Raised Spider" }),
		},
	},
#mods

#skill UniqueMirageWarriors
#flags spell duration minion
	fromItem = true,
	statMap = {
		["skill_used_by_mirage_warrior_damage_+%_final"] = {
			mod("SaviourMirageWarriorLessDamage", "BASE", nil),
		},
		["maximum_number_of_mirage_warriors"] = {
			mod("SaviourMirageWarriorMaxCount", "BASE", nil),
		},
	},
#mods

#skill SupportTriggerSpellOnUnarmedMeleeCriticalHit Seven Teachings
	fromItem = true,
	statMap = {
		["spell_is_triggered_on_hit"] = {
			skill("triggeredBySevenTeachings", true, { type = "SkillType", skillType = SkillType.Triggerable }, { type = "SkillType", skillType = SkillType.Spell }),
			skill("triggerOnCrit", true, { type = "SkillType", skillType = SkillType.Triggerable }, { type = "SkillType", skillType = SkillType.Spell }),
		},
	},
#mods

#skill ShadeForm
#flags spell duration
	fromItem = true,
#mods

#skill SummonShaperApparition
#flags spell
	fromItem = true,
#mods

#skill ShaperApparitionTeleportSlam
#flags attack area melee
	fromItem = true,
#baseMod skill("showAverage", true)
#mods

#skill ShaperApparitionBeam
#flags spell duration
	fromItem = true,
#baseMod skill("showAverage", true)
#mods

#skill ShaperApparitionProjectiles
#flags spell projectile
	fromItem = true,
#baseMod skill("showAverage", true)
#mods

#skill ShieldShatter
#flags spell area
	fromItem = true,
	statMap = {
		["spell_minimum_base_physical_damage_per_shield_quality"] = {
			skill("PhysicalMin", nil, { type = "Multiplier", var = "QualityOnWeapon 2" }),
		},
		["spell_maximum_base_physical_damage_per_shield_quality"] = {
			skill("PhysicalMax", nil, { type = "Multiplier", var = "QualityOnWeapon 2" }),
		},
		["buff_added_spell_minimum_base_physical_damage_per_shield_quality"] = {
			mod("PhysicalMin", "BASE", nil, ModFlag.Spell, 0, { type = "Multiplier", var = "QualityOnWeapon 2" }, { type = "Condition", var = "BlockedRecently"}, { type = "GlobalEffect", effectType = "Buff"}),
		},
		["buff_added_spell_maximum_base_physical_damage_per_shield_quality"] = {
			mod("PhysicalMax", "BASE", nil, ModFlag.Spell, 0, { type = "Multiplier", var = "QualityOnWeapon 2" }, { type = "Condition", var = "BlockedRecently"}, { type = "GlobalEffect", effectType = "Buff"}),
		},
	},
#baseMod skill("showAverage", true)
#mods

#skill TriggeredShockedGround
#flags spell area duration
	fromItem = true,
#baseMod mod("ShockedGroundEffect", "BASE", 15)
#mods

#skill SpectralSpirits
#flags spell minion
	fromItem = true,
	minionList = {
		"SummonedEssenceSpirit",
	},
#mods

#skill SpiritBurst
#flags spell projectile
	fromItem = true,
#baseMod skill("showAverage", true)
#mods

#skill StalkingPustule
#flags spell
	fromItem = true,
	statMap = {
		["volatile_dead_core_explosion_radius_+"] = {
			skill("radius", "BASE", nil),
		},
	},
#baseMod skill("radiusLabel", "Orb explosion:")
#baseMod skill("radiusSecondaryLabel", "Corpse explosion:")
#mods

#skill TriggeredStarfall
#flags attack projectile area
	fromItem = true,
#mods

#skill StormCascadeTriggered
#flags spell area
	fromItem = true,
#mods

#skill AtziriUniqueStaffStormCall
#flags spell area
	fromItem = true,
#baseMod skill("triggerSource", "Queen's Demand")
#mods

#skill SummonArbalists
#flags spell minion
	fromItem = true,
	minionList = {
		"SummonedArbalists",
	},
#mods

#skill SummonBeastialRhoa
#flags spell minion
	fromItem = true,
	minionList = {
		"RhoaUniqueSummoned",
	},
	statMap = {
		["base_number_of_beast_minions_allowed"] = {
			mod("ActiveBeastMinionLimit", "BASE", nil),
		},
	},
#baseMod skill("allowTotemBuff", true)
#baseMod flag("Condition:HaveBestialMinion", { type = "GlobalEffect", effectType = "Buff" })
#mods

#skill SummonBeastialSnake
#flags spell minion
	fromItem = true,
	minionList = {
		"SnakeSpitUniqueSummoned",
	},
	statMap = {
		["base_number_of_beast_minions_allowed"] = {
			mod("ActiveBeastMinionLimit", "BASE", nil),
		},
	},
#baseMod skill("allowTotemBuff", true)
#baseMod flag("Condition:HaveBestialMinion", { type = "GlobalEffect", effectType = "Buff" })
#mods

#skill SummonBeastialUrsa
#flags spell minion
	fromItem = true,
	minionList = {
		"DropBearUniqueSummoned",
	},
	statMap = {
		["base_number_of_beast_minions_allowed"] = {
			mod("ActiveBeastMinionLimit", "BASE", nil),
		},
	},
#baseMod skill("allowTotemBuff", true)
#baseMod flag("Condition:HaveBestialMinion", { type = "GlobalEffect", effectType = "Buff" })
#mods

#skill SummonDoedresEffigy
#flags duration
	fromItem = true,
#mods

#skill SupportCursePillarTriggerCurses Doedre's Effigy
	fromItem = true,
#baseMod skill("manaReservationPercent", 0)
#mods

#skill SummonElementalRelic
#flags spell minion duration
	fromTree = true,
	minionList = {
		"GuardianRelicAll",
	},
#mods

#skill SummonHarbingerOfTheArcaneUber
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfBrutalityUber
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfDirectionsUber
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfFocusUber
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfStormsUber
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfTimeUber
#flags spell minion
	fromItem = true,
#baseMod mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Greater Harbinger of Time", modCond = "GreaterHarbingerOfTime" })
#baseMod skill("buffAllies", true)
#mods

#skill SummonHarbingerOfTheArcane
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfFocusAscendancy
#flags spell minion
	fromTree = true,
#mods

#skill SummonHarbingerOfTimeAscendancy
#flags spell minion
	fromTree = true,
#baseMod mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Harbinger of Time", modCond = "HarbingerOfTime" })
#baseMod skill("buffAllies", true)
#mods

#skill SummonHarbingerOfTheArcaneAscendancy
#flags spell minion
	fromTree = true,
#mods

#skill SummonHarbingerOfBrutality
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfDirections
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfFocus
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfStorms
#flags spell minion
	fromItem = true,
#mods

#skill SummonHarbingerOfTime
#flags spell minion
	fromItem = true,
#baseMod mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Harbinger of Time", modCond = "HarbingerOfTime" })
#baseMod skill("buffAllies", true)
#mods

#skill TriggeredSummonGhostOnKill Triggered Summon Phantasm
#flags spell minion
	fromItem = true,
	minionList = {
		"SummonedPhantasm",
	},
	statMap = {
		["base_number_of_support_ghosts_allowed"] = {
			mod("ActivePhantasmLimit", "BASE", nil),
		},
	},
#mods

#skill SummonSentinelOfRadiance
#flags spell minion duration
	fromTree = true,
	minionList = {
		"GuardianSentinel",
	},
	statMap = {
		["radiant_sentinel_minion_fire_%_of_life_to_deal_nearby_per_minute"] = {
			mod("MinionModifier", "LIST", { mod = mod("Multiplier:GuardianSentinelFireAuraBaseDamage", "BASE", nil) }),
			div = 60,
			mod("ExtraMinionSkill", "LIST", { skillId = "GuardianSentinelFireAura" }),
		},
		["radiant_sentinel_minion_burning_effect_radius"] = {
			mod("MinionModifier", "LIST", { mod = mod("Multiplier:GuardianSentinelFireAuraRadius", "BASE", nil) }),
		},
	},
#mods

#skill SummonSpectralWolf
#flags spell minion duration
	fromItem = true,
	minionList = {
		"SummonedSpectralWolf",
	},
	statMap = {
		["spectral_wolf_grants_attack_minimum_added_physical_damage"] = {
			mod("PhysicalMin", "BASE", nil, 0, KeywordFlag.Attack, { type = "Multiplier", var = "SpectralWolfCount" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spectral Wolf" }),
		},
		["spectral_wolf_grants_attack_maximum_added_physical_damage"] = {
			mod("PhysicalMax", "BASE", nil, 0, KeywordFlag.Attack, { type = "Multiplier", var = "SpectralWolfCount" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spectral Wolf" }),
		},
		["modifiers_to_claw_critical_strike_chance_apply_minion_critical_strike_chance"] = {
			flag("ClawCritChanceAppliesToMinions"),
		},
		["modifiers_to_claw_critical_strike_multiplier_apply_minion_critical_strike_multiplier"] = {
			flag("ClawCritMultiplierAppliesToMinions"),
		},
	},
#mods

#skill SummonTauntingContraption
#flags spell minion duration
	fromItem = true,
#mods

#skill SummonVoidSpawn
#flags spell minion
	fromItem = true,
	minionList = {
		"VoidSpawn",
	},
	statMap = {
		["void_spawn_withered_on_hit_chance_%"] = {
			flag("Condition:CanWither"),
		},
	},
#mods

#skill VolatileAnomaly Summon Volatile Anomaly
#flags spell area duration
	fromItem = true,
#baseMod skill("dotIsArea", true)
#mods

#skill SummonMirageChieftain
#flags spell duration
	fromTree = true,
	statMap = {
		["skill_used_by_mirage_chieftain_damage_+%_final"] = {
			mod("ChieftainMirageChieftainMoreDamage", "BASE", nil),
		},
	},
#mods

#skill TentacleSmash
#flags attack area
	fromItem = true,
#mods

#skill ThirstForBlood
#flags spell
	fromItem = true,
	statMap = {
		["vampiric_icon_max_bleeding_beam_targets"] = {
			mod("Multiplier:ThirstForBloodMaxTargets", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
		},
		["skill_life_regeneration_per_minute_per_affected_enemy"] = {
			mod("LifeRegen", "BASE", nil, 0, 0, { type = "Multiplier", var = "NearbyBleedingEnemies", limitVar = "ThirstForBloodMaxTargets" }, { type = "GlobalEffect", effectType = "Buff" }),
			div = 60,
		},
		["vampiric_icon_bleeding_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, KeywordFlag.Bleed, { type = "GlobalEffect", effectType = "Buff" }),
		},
	},
#mods

#skill SupportTriggerSpellOnSkillUse Trigger Craft
	fromItem = true,
#mods

#skill SupportTriggerElementalSpellOnBlock
	fromItem = true,
#mods

#skill SupportTriggerSpellOnKill Squirming Terror
	fromItem = true,
#mods

#skill Twister
#flags spell projectile duration
	fromItem = true,
#baseMod skill("showAverage", true)
#mods

#skill Unhinge
#flags spell
	fromItem = true,
#mods

#skill UnseenStrike
#flags attack projectile forceMainHand
	fromItem = true,
#mods

#skill VaalBreach
#flags spell
#mods

#skill VoidGaze
#flags spell duration
	fromItem = true,
	statMap = {
		["base_chaos_damage_resistance_%"] = {
			mod("ChaosResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
		},
	},
#mods

#skill VoidShot
#flags attack projectile area
	fromItem = true,
#mods

#skill TriggerSummonedAncestorAhuana
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralAhuanaMinion",
	},
	statMap = {
		["ancestral_buff_base_spell_damage_%_suppressed"] = {
			mod("SpellSuppressionEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Ahuana" }, { type = "Multiplier", var = "RamakoTattooEffect", noFloor = true }),
		},
		["ancestral_embrace_effect_+%_per_ramako_tattoo"] = {
			mod("Multiplier:RamakoTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "RamakoTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorAkoya
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralAkoyaMinion",
	},
	statMap = {
		["ancestral_buff_base_rage_regeneration_per_minute"] = {
			mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Akoya" }, { type = "Multiplier", var = "TukohamaTattooEffect", noFloor = true }),
			div = 60,
		},
		["ancestral_embrace_effect_+%_per_tukohama_tattoo"] = {
			mod("Multiplier:TukohamaTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "TukohamaTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorIkiaho
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralIkiahoMinion",
	},
	statMap = {
		["ancestral_buff_travel_skill_cooldown_speed_+%"] = {
			mod("CooldownRecovery", "INC", nil, 0, 0, { type = "SkillType", skillType = SkillType.Travel }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Ikiaho" }, { type = "Multiplier", var = "ArohonguiTattooEffect", noFloor = true }),
		},
		["ancestral_embrace_effect_+%_per_arohongui_tattoo"] = {
			mod("Multiplier:ArohonguiTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "ArohonguiTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorKahuturoa
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralKahuturoaMinion",
	},
	statMap = {
		["ancestral_buff_armour_%_applies_to_all_damage_from_hits"] = {
			mod("ArmourAppliesToFireDamageTaken", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kahuturoa" }, { type = "Multiplier", var = "RongokuraiTattooEffect", noFloor = true }),
			mod("ArmourAppliesToColdDamageTaken", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kahuturoa" }, { type = "Multiplier", var = "RongokuraiTattooEffect", noFloor = true }),
			mod("ArmourAppliesToLightningDamageTaken", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kahuturoa" }, { type = "Multiplier", var = "RongokuraiTattooEffect", noFloor = true }),
			mod("ArmourAppliesToChaosDamageTaken", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kahuturoa" }, { type = "Multiplier", var = "RongokuraiTattooEffect", noFloor = true }),
		},
		["ancestral_embrace_effect_+%_per_rongokurai_tattoo"] = {
			mod("Multiplier:RongokuraiTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "RongokuraiTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorKaom
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralKaomMinion",
	},
	statMap = {
		["ancestral_buff_damage_removed_from_your_nearest_totem_before_life_or_es_%"] = {
			mod("takenFromTotemsBeforeYou", "BASE", nil, 0, 0, { type = "Condition", var = "HaveTotem" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kaom" }, { type = "Multiplier", var = "NgamahuTattooEffect", noFloor = true }),
		},
		["ancestral_embrace_effect_+%_per_ngamahu_tattoo"] = {
			mod("Multiplier:NgamahuTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "NgamahuTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorKiloava
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralKiloavaMinion",
	},
	statMap = {
		["ancestral_buff_recover_%_of_maximum_life_mana_energy_shield_on_block"] = {
			mod("Multiplier:KiloavaRecoverOnBlock", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "ValakoTattooEffect", noFloor = true }),
		},
		["ancestral_embrace_effect_+%_per_valako_tattoo"] = {
			mod("Multiplier:ValakoTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "ValakoTattoo", base = 1 }),
			div = 100,
		},
	},
#baseMod mod("LifeOnBlock", "BASE", 1, 0, 0, { type = "PercentStat", stat = "Life", percentVar = "KiloavaRecoverOnBlock", floor = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kiloava" })
#baseMod mod("EnergyShieldOnBlock", "BASE", 1, 0, 0, { type = "PercentStat", stat = "EnergyShield", percentVar = "KiloavaRecoverOnBlock", floor = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kiloava" })
#baseMod mod("ManaOnBlock", "BASE", 1, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "KiloavaRecoverOnBlock", floor = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Kiloava" })
#mods

#skill TriggerSummonedAncestorMaata
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralMaataMinion",
	},
	statMap = {
		["ancestral_buff_flask_charges_recovered_per_3_seconds"] = {
			mod("FlaskChargesGenerated", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Maata" }, { type = "Multiplier", var = "TawhoaTattooEffect", noFloor = true }),
			div = 3,
		},
		["ancestral_embrace_effect_+%_per_tawhoa_tattoo"] = {
			mod("Multiplier:TawhoaTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "TawhoaTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorRakiata
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralRakiataMinion",
	},
	statMap = {
		["ancestral_buff_action_speed_+%_minimum_value"] = {
			mod("MinimumActionSpeed", "MAX", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Rakiata" }, { type = "Multiplier", var = "TasalioTattooEffect", noFloor = true, base = 100 }),
		},
		["ancestral_embrace_effect_+%_per_tasalio_tattoo"] = {
			mod("Multiplier:TasalioTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "TasalioTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorTawhanuku
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralTawhanukuMinion",
	},
	statMap = {
		["ancestral_buff_base_mana_regeneration_rate_per_minute"] = {
			mod("ManaRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Tawhanuku" }, { type = "Multiplier", var = "HinekoraTattooEffect", noFloor = true }),
			div = 60,
		},
		["ancestral_embrace_effect_+%_per_hinekora_tattoo"] = {
			mod("Multiplier:HinekoraTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "HinekoraTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill TriggerSummonedAncestorUtula
#flags spell duration minion
	fromTree = true,
	minionList = {
		"AncestralUtulaMinion",
	},
	statMap = {
		["ancestral_buff_leech_%_is_instant"] = {
			mod("InstantLifeLeech", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Utula" }, { type = "Multiplier", var = "KitavaTattooEffect", noFloor = true }),
			mod("InstantManaLeech", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Utula" }, { type = "Multiplier", var = "KitavaTattooEffect", noFloor = true }),
			mod("InstantEnergyShieldLeech", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Spirit of Utula" }, { type = "Multiplier", var = "KitavaTattooEffect", noFloor = true }),
		},
		["ancestral_embrace_effect_+%_per_kitava_tattoo"] = {
			mod("Multiplier:KitavaTattooEffect", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "KitavaTattoo", base = 1 }),
			div = 100,
		},
	},
#mods

#skill SupportUniqueCastCurseOnCurse Vixen's Entrapment
#flags spell curse
	fromItem = true,
#mods

#skill SupportTriggerFireSpellOnHit
	fromItem = true,
	statMap = {
		["spell_is_triggered_on_hit"] = {
			skill("triggeredBySettlersEnchantTrigger", true)
		}
	},
#mods

skills["EnemyExplode"] = {
	name = "On Kill Monster Explosion",
	hidden = true,
	color = 4,
	skillTypes = { [SkillType.Damage] = true, [SkillType.Area] = true },
	castTime = 0,
	parts = {
		{
			name = "This Source Only",
		},
		{
			name = "This Source Only, Ignoring Chance",
		},
		{
			name = "Average Of All Sources",
		},
	},
	preDamageFunc = function(activeSkill, output)
		output.ExplodeChance = 0
		if activeSkill.skillPart ~= 3 then
			local allExplodeMods = activeSkill.skillModList:Tabulate("LIST", activeSkill.skillCfg, "ExplodeMod")
			for _, explodeMod in ipairs(allExplodeMods) do
				local activeEffectSource = activeSkill.activeEffect.srcInstance.explodeSource.modSource or "Tree:"..activeSkill.activeEffect.srcInstance.explodeSource.id
				if explodeMod.mod.source == activeEffectSource then
					local explodeMod = explodeMod.value
					if explodeMod.type == "RandomElement" then
						activeSkill.skillData["FireEffectiveExplodePercentage"] = explodeMod.amount / 3
						activeSkill.skillData["ColdEffectiveExplodePercentage"] = explodeMod.amount / 3
						activeSkill.skillData["LightningEffectiveExplodePercentage"] = explodeMod.amount / 3
					else
						activeSkill.skillData[explodeMod.type.."EffectiveExplodePercentage"] = explodeMod.amount
					end
					output.ExplodeChance = activeSkill.skillPart == 2 and 1 or explodeMod.chance
				end
			end
		else
			local typeAmountChances = { }
			local explodeModList = activeSkill.skillModList:List(activeSkill.skillCfg, "ExplodeMod")
			for _, explodeMod in ipairs(explodeModList) do
				local amountChance = typeAmountChances[explodeMod.type] or {}
				amountChance[explodeMod.amount] = (amountChance[explodeMod.amount] or 0) + explodeMod.chance
				typeAmountChances[explodeMod.type] = amountChance
			end
			for type, amountChance in pairs(typeAmountChances) do
				local physExplodeChance = 0
				for amount, chance in pairs(amountChance) do
					local amountXChance = amount * chance
					if type == "RandomElement" then
						activeSkill.skillData["FireEffectiveExplodePercentage"] = (activeSkill.skillData["FireEffectiveExplodePercentage"] or 0) + amountXChance / 3
						activeSkill.skillData["ColdEffectiveExplodePercentage"] = (activeSkill.skillData["ColdEffectiveExplodePercentage"] or 0) + amountXChance / 3
						activeSkill.skillData["LightningEffectiveExplodePercentage"] = (activeSkill.skillData["LightningEffectiveExplodePercentage"] or 0) + amountXChance / 3
					else
						activeSkill.skillData[type.."EffectiveExplodePercentage"] = (activeSkill.skillData[type.."EffectiveExplodePercentage"] or 0) + amountXChance
					end
					if type == "Physical" then
						physExplodeChance = 1 - ((1 - physExplodeChance) * (1 - chance))
					end
					output.ExplodeChance = 1 - ((1 - output.ExplodeChance) * (1 - chance))
				end
				if type == "Physical" and physExplodeChance ~= 0 then
					activeSkill.skillModList:NewMod("CalcArmourAsThoughDealing", "MORE", 100 / math.min(physExplodeChance, 1) - 100)
				end
			end
		end
		output.ExplodeChance = math.min(output.ExplodeChance * 100, 100)
	end,
	baseMods = {
		skill("radius", 22),
		skill("showAverage", true),
		skill("explodeCorpse", true),
		skill("corpseExplosionLifeMultiplier", 0),
		skill("hitChanceIsExplodeChance", true, { type = "SkillPart", skillPart = 1 }),
	},
	baseFlags = {
		area = true,
		monsterExplode = true
	},
	stats = {
		"is_area_damage",
		"base_skill_show_average_damage_instead_of_dps",
		"display_skill_deals_secondary_damage",
		"damage_cannot_be_reflected",
		"skill_can_add_multiple_charges_per_action",
	},
	levels = {
		[1] = { damageEffectiveness = 1, baseMultiplier = 1, levelRequirement = 1, }
	}
}
