from core.helper import AttrDict
from siege.util import minutes, seconds


class SkillTuning(object):
    # Arcane Skills
    FIRE = AttrDict(
        NAME = "Fire",
        ICON = "mods/core/talent/arcane/fire_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [0, 300, 400, 400, 500],
        CAST_TIME = 500,
        COOLDOWN = seconds(2),
        POWERS = [40, 50, 55, 60, 70],
        SP_COSTS = [50, 55, 60, 65, 70],
        TP_AMOUNT = 12,
        TP_CHANCE = 40
    )

    BLIZZARD = AttrDict(
        NAME = "Blizzard",
        ICON = "mods/core/talent/arcane/blizzard_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = 500,
        COOLDOWN = seconds(2),
        POWERS = [40, 50, 55, 60, 70],
        SP_COSTS = [50, 55, 60, 65, 70],
        TP_AMOUNT = 12,
        TP_CHANCE = 40
    )
    AERO = AttrDict(
        NAME = "Aero",
        ICON = "mods/core/talent/arcane/aero_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = 500,
        COOLDOWN = seconds(2),
        POWERS = [40, 50, 55, 60, 70],
        SP_COSTS = [50, 55, 60, 65, 70],
        TP_AMOUNT = 12,
        TP_CHANCE = 40
    )
    STONE = AttrDict(
        NAME = "Stone",
        ICON = "mods/core/talent/arcane/stone_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = 500,
        COOLDOWN = seconds(2),
        POWERS = [40, 50, 55, 60, 70],
        SP_COSTS = [50, 55, 60, 65, 70],
        TP_AMOUNT = 12,
        TP_CHANCE = 40
    )
    ENFIRE = AttrDict(
        NAME = "Enfire",
        ICON = "mods/core/talent/arcane/enfire_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [300, 400, 400, 400, 500],
        CAST_TIME = seconds(1),
        COOLDOWN = minutes(5),
        SP_COST = 80,
        DURATIONS = [minutes(1), minutes(2), minutes(3), minutes(4), minutes(5)],
        TP_AMOUNT = 25,
        TP_CHANCE = 50
    )
    ENBLIZZARD = AttrDict(
        NAME = "Enblizzard",
        ICON = "mods/core/talent/arcane/enblizzard_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [300, 400, 400, 400, 500],
        CAST_TIME = seconds(1),
        COOLDOWN = minutes(5),
        SP_COST = 80,
        DURATIONS = [minutes(1), minutes(2), minutes(3), minutes(4), minutes(5)],
        TP_AMOUNT = 25,
        TP_CHANCE = 50
    )
    ENAERO = AttrDict(
        NAME = "Enaero",
        ICON = "mods/core/talent/arcane/enaero_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [300, 400, 400, 400, 500],
        CAST_TIME = seconds(1),
        COOLDOWN = minutes(5),
        SP_COST = 80,
        DURATIONS = [minutes(1), minutes(2), minutes(3), minutes(4), minutes(5)],
        TP_AMOUNT = 25,
        TP_CHANCE = 50
    )
    ENSTONE = AttrDict(
        NAME = "Enstone",
        ICON = "mods/core/talent/arcane/enstone_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [300, 400, 400, 400, 500],
        CAST_TIME = seconds(1),
        COOLDOWN = minutes(5),
        SP_COST = 80,
        DURATIONS = [minutes(1), minutes(2), minutes(3), minutes(4), minutes(5)],
        TP_AMOUNT = 25,
        TP_CHANCE = 50
    )
    FIRESTORM = AttrDict(
        NAME = "Firestorm",
        ICON = "mods/core/talent/arcane/firestorm_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(2),
        COOLDOWN = minutes(1),
        POWERS = [10, 13, 16, 20, 25],
        SP_COSTS = [80, 85, 90, 95, 100],
        TRIGGER_TIME = 500,
        DURATION = seconds(15),
        TP_AMOUNT = 30,
        TP_CHANCE = 40
    )
    SNOWSTORM = AttrDict(
        NAME = "Snowstorm",
        ICON = "mods/core/talent/arcane/snowstorm_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(2),
        COOLDOWN = minutes(1),
        POWERS = [10, 13, 16, 20, 25],
        SP_COSTS = [80, 85, 90, 95, 100],
        TRIGGER_TIME = 500,
        DURATION = seconds(15),
        TP_AMOUNT = 30,
        TP_CHANCE = 40
    )
    WINDSTORM = AttrDict(
        NAME = "Windstorm",
        ICON = "mods/core/talent/arcane/windstorm_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(2),
        COOLDOWN = minutes(1),
        POWERS = [10, 13, 16, 20, 25],
        SP_COSTS = [80, 85, 90, 95, 100],
        TRIGGER_TIME = 500,
        DURATION = seconds(15),
        TP_AMOUNT = 30,
        TP_CHANCE = 40
    )
    SANDSTORM = AttrDict(
        NAME = "Sandstorm",
        ICON = "mods/core/talent/arcane/sandstorm_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(2),
        COOLDOWN = minutes(1),
        POWERS = [10, 13, 16, 20, 25],
        SP_COSTS = [80, 85, 90, 95, 100],
        TRIGGER_TIME = 500,
        DURATION = seconds(15),
        TP_AMOUNT = 30,
        TP_CHANCE = 40
    )
    FLARE = AttrDict(
        NAME = "Flare",
        ICON = "mods/core/talent/arcane/flare_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [400, 500, 500, 500, 600],
        RANGE = 192,
        CAST_TIME = 500,
        COOLDOWN = seconds(10),
        POWERS = [80, 90, 100, 110, 120],
        SP_COST = 120,
        TP_AMOUNT = 30,
        TP_CHANCE = 35
    )
    FREEZE = AttrDict(
        NAME = "Freeze",
        ICON = "mods/core/talent/arcane/freeze_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [400, 500, 500, 500, 600],
        RANGE = 192,
        CAST_TIME = 500,
        COOLDOWN = seconds(10),
        POWERS = [80, 90, 100, 110, 120],
        SP_COST = 120,
        TP_AMOUNT = 30,
        TP_CHANCE = 35
    )
    TORNADO = AttrDict(
        NAME = "Tornado",
        ICON = "mods/core/talent/arcane/tornado_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [400, 500, 500, 500, 600],
        RANGE = 192,
        CAST_TIME = 500,
        COOLDOWN = seconds(10),
        POWERS = [80, 90, 100, 110, 120],
        SP_COST = 120,
        TP_AMOUNT = 30,
        TP_CHANCE = 35
    )
    UPHEAVAL = AttrDict(
        NAME = "Upheaval",
        ICON = "mods/core/talent/arcane/upheaval_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [400, 500, 500, 500, 600],
        RANGE = 192,
        CAST_TIME = 500,
        COOLDOWN = seconds(10),
        POWERS = [80, 90, 100, 110, 120],
        SP_COST = 120,
        TP_AMOUNT = 30,
        TP_CHANCE = 35
    )

    # Arms Skills
    ATTACK_BOOST = AttrDict(
        NAME = "AttackBoost",
        ICON = "mods/core/talent/arms/attack_boost_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 2.0
    )
    DEFENSE_BOOST = AttrDict(
        NAME = "DefenseBoost",
        ICON = "mods/core/talent/arms/defense_boost_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 2.0
    )
    AGILITY_BOOST = AttrDict(
        NAME = "AgilityBoost",
        ICON = "mods/core/talent/arms/agility_boost_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 2.0
    )
    SPEED_BOOST = AttrDict(
        NAME = "SpeedBoost",
        ICON = "mods/core/talent/arms/speed_boost_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 2.0
    )
    STUN = AttrDict(
        NAME = "Stun",
        ICON = "mods/core/talent/arms/stun_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [500] * 5,
        DURATIONS = [seconds(1), seconds(1.2), seconds(1.4), seconds(1.7), seconds(2)],
        SP_COST = 60,
        COOLDOWN = seconds(30),
    )
    TRIPLE_STRIKE = AttrDict(
        NAME = "TripleStrike",
        ICON = "mods/core/talent/arms/triple_strike_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [500] * 5,
        POWERS = [40, 43, 46, 50, 55],
        SP_COSTS = [60, 65, 70, 75, 80],
        COOLDOWN = seconds(30),
    )
    KNOCKUP = AttrDict(
        NAME = "Knockup",
        ICON = "mods/core/talent/arms/knockup_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [500] * 5,
    )
    RAPID_SHOT = AttrDict(
        NAME = "RapidShot",
        ICON = "mods/core/talent/arms/rapid_shot_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [500] * 5,
        DURATION = seconds(30),
        SP_COSTS = [20, 22, 24, 26, 28, 30],
        COOLDOWNS = [1000, 950, 900, 850, 800],
    )
    REGEN_BOOST = AttrDict(
        NAME = "RegenBoost",
        ICON = "mods/core/talent/arms/regen_boost_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 2.0
    )
    SHOCKWAVE = AttrDict(
        NAME = "Shockwave",
        ICON = "mods/core/talent/arms/shockwave_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [500] * 5,
        SP_COST = 80,
        POWERS = [50, 60, 70, 80, 90],
        COOLDOWN = minutes(1)
    )
    SPECTRAL_SHOT = AttrDict(
        NAME = "SpectralShot",
        ICON = "mods/core/talent/arms/spectral_shot_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [500] * 5,
        SP_COST = 60,
        POWERS = [40, 50, 60, 70, 80],
        COOLDOWN = minutes(1)
    )

    # Craft Skills
    EXPERTISE = AttrDict(
        NAME = "Expertise",
        ICON = "mods/core/talent/craft/expertise_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [400, 600, 800, 1000, 1200],
        AMOUNT_PER_LEVEL = 50.0
    )
    EFFICIENCY = AttrDict(
        NAME = "Efficiency",
        ICON = "mods/core/talent/craft/efficiency_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 2.0
    )
    ARTISAN = AttrDict(
        NAME = "Artisan",
        ICON = "mods/core/talent/craft/artisan_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500, 300, 300, 300, 300],
        AMOUNT_PER_LEVEL = 20.0,
        DURATION = minutes(10),
        COOLDOWNS = [minutes(30), minutes(27.5), minutes(25), minutes(22.5), minutes(20)]
    )
    CONCENTRATE = AttrDict(
        NAME = "Concentrate",
        ICON = "mods/core/talent/craft/concentrate_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500, 300, 300, 300, 300],
        DURATION = minutes(10),
        COOLDOWNS = [minutes(30), minutes(27.5), minutes(25), minutes(22.5), minutes(20)]
    )
    ARMORER = AttrDict(
        NAME = "Armorer",
        ICON = "mods/core/talent/craft/armorer_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [600, 700, 800, 900, 1000],
        AMOUNT_PER_LEVEL = 4.0
    )
    SMITH = AttrDict(
        NAME = "Smith",
        ICON = "mods/core/talent/craft/smith_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [600, 700, 800, 900, 1000],
        AMOUNT_PER_LEVEL = 4.0,
        CATEGORY = "Weapons"
    )
    FUNDAMENTALS = AttrDict(
        NAME = "Fundamentals",
        ICON = "mods/core/talent/craft/fundamentals_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [600, 700, 800, 900, 1000],
        START_LEVEL = 10,
        AMOUNT_PER_LEVEL = 3.0
    )
    DUPLICATE = AttrDict(
        NAME = "Duplicate",
        ICON = "mods/core/talent/craft/duplicate_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [700, 500, 500, 500, 500],
        AMOUNT_PER_LEVEL = 2.0
    )
    REFINE = AttrDict(
        NAME = "Refine",
        ICON = "mods/core/talent/craft/refine_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [500, 300, 300, 300, 300],
        DURATION = minutes(10),
        COOLDOWNS = [minutes(30), minutes(27.5), minutes(25), minutes(22.5), minutes(20)]
    )

    # Divine Skills
    HEAL = AttrDict(
        NAME = "Heal",
        ICON = "mods/core/talent/divine/heal_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [0, 400, 400, 400, 400],
        CAST_TIME = 500,
        RANGE = 112,
        SP_COSTS = [60, 65, 70, 75, 80],
        HP_AMOUNT = [80, 90, 110, 130, 150],
        COOLDOWN = seconds(10),
        TP_AMOUNT = 20,
        TP_CHANCE = 60,
        SOUND = "mods/core/audio/sfx/talent/divine/heal.ogg",
        SOUND_TIMING = 300
    )
    PROTECT = AttrDict(
        NAME = "Protect",
        ICON = "mods/core/talent/divine/protect_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(1),
        RANGE = 112,
        SP_COSTS = [50, 55, 60, 65, 70],
        DURATION = minutes(3),
        COOLDOWN = seconds(5),
        TP_AMOUNT = 35,
        TP_CHANCE = 35,
        SOUND = "mods/core/audio/sfx/talent/divine/protect.ogg",
        SOUND_TIMING = 100
    )
    SHELL = AttrDict(
        NAME = "Shell",
        ICON = "mods/core/talent/divine/shell_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(1),
        RANGE = 112,
        SP_COSTS = [50, 55, 60, 65, 70],
        DURATION = minutes(3),
        COOLDOWN = seconds(5),
        TP_AMOUNT = 35,
        TP_CHANCE = 35,
        SOUND = "mods/core/audio/sfx/talent/divine/shell.ogg",
        SOUND_TIMING = 310
    )
    REGENERATE = AttrDict(
        NAME = "Regenerate",
        ICON = "mods/core/talent/divine/regenerate_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = 640,
        RANGE = 112,
        SP_COSTS = [80, 85, 90, 95, 100],
        DURATION = seconds(20),
        COOLDOWNS = [seconds(10), seconds(9.5), seconds(9), seconds(8.5), seconds(8)],
        TP_AMOUNT = 25,
        TP_CHANCE = 45,
        SOUND = "mods/core/audio/sfx/talent/divine/regenerate.ogg",
        SOUND_TIMING = 300
    )
    DISPEL = AttrDict(
        NAME = "Dispel",
        ICON = "mods/core/talent/divine/dispel_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [400, 400, 400, 400, 400],
        CAST_TIME = seconds(1),
        RANGE = 112,
        SP_COST = 70,
        COOLDOWNS = [minutes(3), minutes(2.5), minutes(2), minutes(1.5), minutes(1)],
        TP_AMOUNT = 35,
        TP_CHANCE = 30,
        SOUND = "mods/core/audio/sfx/talent/divine/dispel.ogg",
        SOUND_TIMING = 310
    )
    INVISIBLE = AttrDict(
        NAME = "Invisible",
        ICON = "mods/core/talent/divine/invisible_icon.png",
        UNLOCK_LEVEL = 5,
        LEVEL_COSTS = [400, 400, 400, 400, 400],
        CAST_TIME = seconds(1),
        RANGE = 112,
        SP_COST = 100,
        DURATION = minutes(1),
        COOLDOWNS = [minutes(3), minutes(2.5), minutes(2), minutes(1.5), minutes(1)],
        TP_AMOUNT = 30,
        TP_CHANCE = 40,
        SOUND = "mods/core/audio/sfx/talent/divine/invisibility.ogg",
        SOUND_TIMING = 310
    )
    SP_REGEN_BOOST = AttrDict(
        NAME = "SPRegenBoost",
        ICON = "mods/core/talent/divine/sp_regen_boost_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 500, 600, 700],
        AMOUNT_PER_LEVEL = 1,
    )
    HASTE = AttrDict(
        NAME = "Haste",
        ICON = "mods/core/talent/divine/haste_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 400, 500, 600],
        CAST_TIME = seconds(2),
        RANGE = 112,
        SP_COST = 60,
        DURATION = minutes(2),
        COOLDOWN = seconds(30),
        TP_AMOUNT = 20,
        TP_CHANCE = 30,
        SOUND = "mods/core/audio/sfx/talent/divine/haste.ogg",
        SOUND_TIMING = 300
    )
    STONESKIN = AttrDict(
        NAME = "Stoneskin",
        ICON = "mods/core/talent/divine/stoneskin_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [300, 400, 400, 400, 400],
        CAST_TIME = seconds(2),
        RANGE = 112,
        SP_COST = 80,
        DURATION = minutes(5),
        COOLDOWNS = [minutes(3), minutes(2.5), minutes(2), minutes(1.5), minutes(1)],
        TP_AMOUNT = 30,
        TP_CHANCE = 40,
        SOUND = "mods/core/audio/sfx/talent/divine/stoneskin.ogg",
        SOUND_TIMING = 310
    )
    VEIL = AttrDict(
        NAME = "Veil",
        ICON = "mods/core/talent/divine/veil_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [300, 400, 400, 400, 400],
        CAST_TIME = seconds(2),
        RANGE = 112,
        SP_COST = 80,
        DURATION = minutes(5),
        COOLDOWNS = [minutes(3), minutes(2.5), minutes(2), minutes(1.5), minutes(1)],
        TP_AMOUNT = 30,
        TP_CHANCE = 40,
        SOUND = "mods/core/audio/sfx/talent/divine/veil.ogg",
        SOUND_TIMING = 310
    )
    QUICKEN = AttrDict(
        NAME = "Quicken",
        ICON = "mods/core/talent/divine/quicken_icon.png",
        UNLOCK_LEVEL = 15,
        LEVEL_COSTS = [400, 500, 500, 500, 600],
        AMOUNT_PER_LEVEL = 0.05,
    )

    # Gather Skills
    COLLECT = AttrDict(
        NAME = "Collect",
        ICON = "mods/core/talent/gather/collect_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [0, 400, 400, 400, 400],
        COOLDOWNS = [700, 650, 600, 550, 500]
    )
    TOOL_SPEED = AttrDict(
        NAME = "ToolSpeed",
        ICON = "mods/core/talent/gather/tool_speed_boost_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 3.0
    )
    TOOL_POWER = AttrDict(
        NAME = "ToolPower",
        ICON = "mods/core/talent/gather/tool_power_boost_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [500] * 5,
        AMOUNT_PER_LEVEL = 3
    )
    TOOL_REACH = AttrDict(
        NAME = "ToolReach",
        ICON = "mods/core/talent/gather/tool_reach_boost_icon.png",
        UNLOCK_LEVEL = 1,
        LEVEL_COSTS = [600] * 5,
        AMOUNT_PER_LEVEL = 8
    )
    PICKUP_REACH = AttrDict(
        NAME = "PickupReach",
        ICON = "mods/core/talent/gather/pickup_reach_boost_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [600] * 5,
        AMOUNT_PER_LEVEL = 8
    )
    SCAVENGE = AttrDict(
        NAME = "Scavenge",
        ICON = "mods/core/talent/gather/scavenge_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [800] * 5,
        AMOUNT_PER_LEVEL = 2
    )
    PRECISION = AttrDict(
        NAME = "Precision",
        ICON = "mods/core/talent/gather/precision_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [1000] * 5,
        AMOUNT_PER_LEVEL = 2
    )
    RAISE = AttrDict(
        NAME = "Haste",
        ICON = "mods/core/talent/divine/haste_icon.png",
        UNLOCK_LEVEL = 10,
        LEVEL_COSTS = [500, 500, 550, 550, 600],
        SP_COSTS = [60, 75, 90, 105, 120],
        COOLDOWNS = [minutes(3), minutes(2.8), minutes(2.6), minutes(2.3), minutes(2)]
    )
