-- CONSTANTS USED IN FORMS

-- OVR Calculation formula
-- key - position_id
--     - key - attribute (component name in GUI)
--     - value - percent of the ovr
OVR_FORMULA = {
    ["0"]= {
        ReactionsEdit = 0.11,
        GKDivingEdit = 0.21,
        GKHandlingEdit = 0.21,
        GKKickingEdit = 0.05,
        GKReflexEdit = 0.21,
        GKPositioningEdit = 0.21,
    },
    ["2"]= {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.06,
        StaminaEdit = 0.10,
        InterceptionsEdit = 0.12,
        BallControlEdit = 0.08,
        CrossingEdit = 0.12,
        DribblingEdit = 0.04,
        ShortPassingEdit = 0.10,
        MarkingEdit = 0.07,
        StandingTackleEdit = 0.08,
        SlidingTackleEdit = 0.11,
    },
    ["3"]= {
        AccelerationEdit = 0.05,
        SprintSpeedEdit = 0.07,
        StaminaEdit = 0.08,
        ReactionsEdit = 0.08,
        InterceptionsEdit = 0.12,
        BallControlEdit = 0.07,
        CrossingEdit = 0.09,
        HeadingAccuracyEdit = 0.04,
        ShortPassingEdit = 0.07,
        MarkingEdit = 0.08,
        StandingTackleEdit = 0.11,
        SlidingTackleEdit = 0.14,
    },
    ["4"]= {
        SprintSpeedEdit = 0.02,
        JumpingEdit = 0.03,
        StrengthEdit = 0.10,
        ReactionsEdit = 0.05,
        AggressionEdit = 0.07,
        InterceptionsEdit = 0.13,
        BallControlEdit = 0.04,
        HeadingAccuracyEdit = 0.10,
        ShortPassingEdit = 0.05,
        MarkingEdit = 0.14,
        StandingTackleEdit = 0.17,
        SlidingTackleEdit = 0.10,
    },
    ["5"]= {
        SprintSpeedEdit = 0.02,
        JumpingEdit = 0.03,
        StrengthEdit = 0.10,
        ReactionsEdit = 0.05,
        AggressionEdit = 0.07,
        InterceptionsEdit = 0.13,
        BallControlEdit = 0.04,
        HeadingAccuracyEdit = 0.10,
        ShortPassingEdit = 0.05,
        MarkingEdit = 0.14,
        StandingTackleEdit = 0.17,
        SlidingTackleEdit = 0.10,
    },
    ["6"]= {
        SprintSpeedEdit = 0.02,
        JumpingEdit = 0.03,
        StrengthEdit = 0.10,
        ReactionsEdit = 0.05,
        AggressionEdit = 0.07,
        InterceptionsEdit = 0.13,
        BallControlEdit = 0.04,
        HeadingAccuracyEdit = 0.10,
        ShortPassingEdit = 0.05,
        MarkingEdit = 0.14,
        StandingTackleEdit = 0.17,
        SlidingTackleEdit = 0.10,
    },
    ["7"]= {
        AccelerationEdit = 0.05,
        SprintSpeedEdit = 0.07,
        StaminaEdit = 0.08,
        ReactionsEdit = 0.08,
        InterceptionsEdit = 0.12,
        BallControlEdit = 0.07,
        CrossingEdit = 0.09,
        HeadingAccuracyEdit = 0.04,
        ShortPassingEdit = 0.07,
        MarkingEdit = 0.08,
        StandingTackleEdit = 0.11,
        SlidingTackleEdit = 0.14,
    },
    ["8"]= {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.06,
        StaminaEdit = 0.10,
        InterceptionsEdit = 0.12,
        BallControlEdit = 0.08,
        CrossingEdit = 0.12,
        DribblingEdit = 0.04,
        ShortPassingEdit = 0.10,
        MarkingEdit = 0.07,
        StandingTackleEdit = 0.08,
        SlidingTackleEdit = 0.11,
    },
    ["9"]= {
        StaminaEdit = 0.06,
        StrengthEdit = 0.04,
        ReactionsEdit = 0.07,
        AggressionEdit = 0.05,
        InterceptionsEdit = 0.14,
        VisionEdit = 0.04,
        BallControlEdit = 0.10,
        LongPassingEdit = 0.10,
        ShortPassingEdit = 0.14,
        MarkingEdit = 0.09,
        StandingTackleEdit = 0.12,
        SlidingTackleEdit = 0.05,
    },
    ["10"] = {
        StaminaEdit = 0.06,
        StrengthEdit = 0.04,
        ReactionsEdit = 0.07,
        AggressionEdit = 0.05,
        InterceptionsEdit = 0.14,
        VisionEdit = 0.04,
        BallControlEdit = 0.10,
        LongPassingEdit = 0.10,
        ShortPassingEdit = 0.14,
        MarkingEdit = 0.09,
        StandingTackleEdit = 0.12,
        SlidingTackleEdit = 0.05,
    },
    ["11"] = {
        StaminaEdit = 0.06,
        StrengthEdit = 0.04,
        ReactionsEdit = 0.07,
        AggressionEdit = 0.05,
        InterceptionsEdit = 0.14,
        VisionEdit = 0.04,
        BallControlEdit = 0.10,
        LongPassingEdit = 0.10,
        ShortPassingEdit = 0.14,
        MarkingEdit = 0.09,
        StandingTackleEdit = 0.12,
        SlidingTackleEdit = 0.05,
    },
    ["12"] = {
        AccelerationEdit = 0.07,
        SprintSpeedEdit = 0.06,
        StaminaEdit = 0.05,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.08,
        VisionEdit = 0.07,
        BallControlEdit = 0.13,
        CrossingEdit = 0.10,
        DribblingEdit = 0.15,
        FinishingEdit = 0.06,
        LongPassingEdit = 0.05,
        ShortPassingEdit = 0.11,
    },
    ["13"] = {
        StaminaEdit = 0.06,
        ReactionsEdit = 0.08,
        InterceptionsEdit = 0.05,
        AttackPositioningEdit = 0.06,
        VisionEdit = 0.13,
        BallControlEdit = 0.14,
        DribblingEdit = 0.07,
        FinishingEdit = 0.02,
        LongPassingEdit = 0.13,
        ShortPassingEdit = 0.17,
        LongShotsEdit = 0.04,
        StandingTackleEdit = 0.05,
    },
    ["14"] = {
        StaminaEdit = 0.06,
        ReactionsEdit = 0.08,
        InterceptionsEdit = 0.05,
        AttackPositioningEdit = 0.06,
        VisionEdit = 0.13,
        BallControlEdit = 0.14,
        DribblingEdit = 0.07,
        FinishingEdit = 0.02,
        LongPassingEdit = 0.13,
        ShortPassingEdit = 0.17,
        LongShotsEdit = 0.04,
        StandingTackleEdit = 0.05,
    },
    ["15"] = {
        StaminaEdit = 0.06,
        ReactionsEdit = 0.08,
        InterceptionsEdit = 0.05,
        AttackPositioningEdit = 0.06,
        VisionEdit = 0.13,
        BallControlEdit = 0.14,
        DribblingEdit = 0.07,
        FinishingEdit = 0.02,
        LongPassingEdit = 0.13,
        ShortPassingEdit = 0.17,
        LongShotsEdit = 0.04,
        StandingTackleEdit = 0.05,
    },
    ["16"] = {
        AccelerationEdit = 0.07,
        SprintSpeedEdit = 0.06,
        StaminaEdit = 0.05,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.08,
        VisionEdit = 0.07,
        BallControlEdit = 0.13,
        CrossingEdit = 0.10,
        DribblingEdit = 0.15,
        FinishingEdit = 0.06,
        LongPassingEdit = 0.05,
        ShortPassingEdit = 0.11,
    },
    ["17"] = {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.03,
        AgilityEdit = 0.03,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.09,
        VisionEdit = 0.14,
        BallControlEdit = 0.15,
        DribblingEdit = 0.13,
        FinishingEdit = 0.07,
        LongPassingEdit = 0.04,
        ShortPassingEdit = 0.16,
        LongShotsEdit = 0.05,
    },
    ["18"] = {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.03,
        AgilityEdit = 0.03,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.09,
        VisionEdit = 0.14,
        BallControlEdit = 0.15,
        DribblingEdit = 0.13,
        FinishingEdit = 0.07,
        LongPassingEdit = 0.04,
        ShortPassingEdit = 0.16,
        LongShotsEdit = 0.05,
    },
    ["19"] = {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.03,
        AgilityEdit = 0.03,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.09,
        VisionEdit = 0.14,
        BallControlEdit = 0.15,
        DribblingEdit = 0.13,
        FinishingEdit = 0.07,
        LongPassingEdit = 0.04,
        ShortPassingEdit = 0.16,
        LongShotsEdit = 0.05,
    },
    ["20"] = {
        AccelerationEdit = 0.05,
        SprintSpeedEdit = 0.05,
        ReactionsEdit = 0.09,
        AttackPositioningEdit = 0.13,
        VisionEdit = 0.08,
        BallControlEdit = 0.15,
        DribblingEdit = 0.14,
        FinishingEdit = 0.11,
        HeadingAccuracyEdit = 0.02,
        ShortPassingEdit = 0.09,
        ShotPowerEdit = 0.05,
        LongShotsEdit = 0.04,
    },
    ["21"] = {
        AccelerationEdit = 0.05,
        SprintSpeedEdit = 0.05,
        ReactionsEdit = 0.09,
        AttackPositioningEdit = 0.13,
        VisionEdit = 0.08,
        BallControlEdit = 0.15,
        DribblingEdit = 0.14,
        FinishingEdit = 0.11,
        HeadingAccuracyEdit = 0.02,
        ShortPassingEdit = 0.09,
        ShotPowerEdit = 0.05,
        LongShotsEdit = 0.04,
    },
    ["22"] = {
        AccelerationEdit = 0.05,
        SprintSpeedEdit = 0.05,
        ReactionsEdit = 0.09,
        AttackPositioningEdit = 0.13,
        VisionEdit = 0.08,
        BallControlEdit = 0.15,
        DribblingEdit = 0.14,
        FinishingEdit = 0.11,
        HeadingAccuracyEdit = 0.02,
        ShortPassingEdit = 0.09,
        ShotPowerEdit = 0.05,
        LongShotsEdit = 0.04,
    },
    ["23"] = {
        AccelerationEdit = 0.07,
        SprintSpeedEdit = 0.06,
        AgilityEdit = 0.03,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.09,
        VisionEdit = 0.06,
        BallControlEdit = 0.14,
        CrossingEdit = 0.09,
        DribblingEdit = 0.16,
        FinishingEdit = 0.10,
        ShortPassingEdit = 0.09,
        LongShotsEdit = 0.04,
    },
    ["24"] = {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.05,
        StrengthEdit = 0.05,
        ReactionsEdit = 0.08,
        AttackPositioningEdit = 0.13,
        BallControlEdit = 0.10,
        DribblingEdit = 0.07,
        FinishingEdit = 0.18,
        HeadingAccuracyEdit = 0.10,
        ShortPassingEdit = 0.05,
        ShotPowerEdit = 0.10,
        LongShotsEdit = 0.03,
        VolleysEdit = 0.02,
    },
    ["25"] = {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.05,
        StrengthEdit = 0.05,
        ReactionsEdit = 0.08,
        AttackPositioningEdit = 0.13,
        BallControlEdit = 0.10,
        DribblingEdit = 0.07,
        FinishingEdit = 0.18,
        HeadingAccuracyEdit = 0.10,
        ShortPassingEdit = 0.05,
        ShotPowerEdit = 0.10,
        LongShotsEdit = 0.03,
        VolleysEdit = 0.02,
    },
    ["26"] = {
        AccelerationEdit = 0.04,
        SprintSpeedEdit = 0.05,
        StrengthEdit = 0.05,
        ReactionsEdit = 0.08,
        AttackPositioningEdit = 0.13,
        BallControlEdit = 0.10,
        DribblingEdit = 0.07,
        FinishingEdit = 0.18,
        HeadingAccuracyEdit = 0.10,
        ShortPassingEdit = 0.05,
        ShotPowerEdit = 0.10,
        LongShotsEdit = 0.03,
        VolleysEdit = 0.02,
    },
    ["27"] = {
        AccelerationEdit = 0.07,
        SprintSpeedEdit = 0.06,
        AgilityEdit = 0.03,
        ReactionsEdit = 0.07,
        AttackPositioningEdit = 0.09,
        VisionEdit = 0.06,
        BallControlEdit = 0.14,
        CrossingEdit = 0.09,
        DribblingEdit = 0.16,
        FinishingEdit = 0.10,
        ShortPassingEdit = 0.09,
        LongShotsEdit = 0.04,
    },
}


-- Min and max value that attribute/potential/overall can be.
ATTRIBUTE_BOUNDS = {
    min = 1,
    max = 99,
}


-- FIFA epoch time
-- os.time{year=1582, month=10, day=14, hour=0, min=0, sec=0} = -12219379200
FIFA_EPOCH_TIME = -12219379200