# This file is a part of rAthena++.
#   Copyright(C) 2021 rAthena Development Team
#   https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
# Refine Database
###########################################################################
#
# Refine Settings
#
###########################################################################
# - Group                               Refine item type.
#   Levels:                             Refinement settings per item level. (Default: null)
#     - Level                           Item level.
#       RefineLevels:                   Refinement settings per refine level. (Default: null)
#         - Level                       Refine level.
#           Bonus                       Refinement bonus. (Default: 0)
#           RandomBonus                 Extra refinement bonus of 0~RandomBonus stacked on Bonus. (Default: 0)
#           BlacksmithBlessingAmount    Amount of Blacksmith Blessing required. (Default: 0)
#           BroadcastSuccess            Broadcast to the whole server when a refine attempt at this level succeeds. (Default: false)
#           BroadcastFailure            Broadcast to the whole server when a refine attempt at this level fails. (Default: false)
#           Chances:                    Success chance based on cost type. (Default: null)
#             - Type                    Refinement cost type based on ore used.
#               Rate                    Chance of success out of 0~10000. (Default: 0)
#               Price                   Amount of zeny required to refine. (Default: 0)
#               Material                Ore item required to refine. (Default: 0)
#               BreakingRate            Chance of item breaking out of 0~10000. (Default: 0)
#               DowngradeAmount         Number of refine levels reduced on failure. (Default: 0)
###########################################################################

Header:
  Type: REFINE_DB
  Version: 2

Body:
  - Group: Armor
    Levels:
      - Level: 1
        RefineLevels:
          - Level: 1
            Bonus: 70
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 2000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Elunium
          - Level: 2
            Bonus: 140
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 2000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Elunium
          - Level: 3
            Bonus: 210
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 2000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Elunium
          - Level: 4
            Bonus: 280
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 2000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Elunium
          - Level: 5
            Bonus: 350
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 2000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 2000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 6
            Bonus: 420
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 2000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 2000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 7
            Bonus: 490
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 2000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 2000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 8
            Bonus: 560
            BlacksmithBlessingAmount: 1
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 2000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 9
            Bonus: 630
            BlacksmithBlessingAmount: 2
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 2000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 10
            Bonus: 700
            BlacksmithBlessingAmount: 4
            Chances:
              - Type: Normal
                Rate: 1000
                Price: 2000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 2000
                Price: 2000
                Material: Enriched_Elunium
                BreakingRate: 10000
  - Group: Weapon
    Levels:
      - Level: 1
        RefineLevels:
          - Level: 1
            Bonus: 200
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 2
            Bonus: 400
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 3
            Bonus: 600
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 4
            Bonus: 800
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 5
            Bonus: 1000
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 6
            Bonus: 1200
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 7
            Bonus: 1400
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 50
                Material: Phracon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 8
            Bonus: 1600
            RandomBonus: 300
            BlacksmithBlessingAmount: 1
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 50
                Material: Phracon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 9
            Bonus: 1800
            RandomBonus: 600
            BlacksmithBlessingAmount: 2
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 50
                Material: Phracon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 10
            Bonus: 2000
            RandomBonus: 900
            BlacksmithBlessingAmount: 4
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 50
                Material: Phracon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 3000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
      - Level: 2
        RefineLevels:
          - Level: 1
            Bonus: 300
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 200
                Material: Emveretarcon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 2
            Bonus: 600
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 200
                Material: Emveretarcon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 3
            Bonus: 900
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 200
                Material: Emveretarcon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 4
            Bonus: 1200
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 200
                Material: Emveretarcon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 5
            Bonus: 1500
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 200
                Material: Emveretarcon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 6
            Bonus: 1800
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 200
                Material: Emveretarcon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 7
            Bonus: 2100
            RandomBonus: 500
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 200
                Material: Emveretarcon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 8
            Bonus: 2400
            RandomBonus: 1000
            BlacksmithBlessingAmount: 1
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 200
                Material: Emveretarcon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 9
            Bonus: 2700
            RandomBonus: 1500
            BlacksmithBlessingAmount: 2
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 200
                Material: Emveretarcon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 10
            Bonus: 3000
            RandomBonus: 2000
            BlacksmithBlessingAmount: 4
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 200
                Material: Emveretarcon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 3000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
      - Level: 3
        RefineLevels:
          - Level: 1
            Bonus: 500
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 5000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 2
            Bonus: 1000
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 5000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 3
            Bonus: 1500
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 5000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 4
            Bonus: 2000
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 5000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 5
            Bonus: 2500
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 5000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 6
            Bonus: 3000
            RandomBonus: 800
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 5000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 7
            Bonus: 3500
            RandomBonus: 1600
            Chances:
              - Type: Normal
                Rate: 5000
                Price: 5000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 8000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 8
            Bonus: 4000
            RandomBonus: 2400
            BlacksmithBlessingAmount: 1
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 5000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 9
            Bonus: 4500
            RandomBonus: 3200
            BlacksmithBlessingAmount: 2
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 5000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 10
            Bonus: 5000
            RandomBonus: 4000
            BlacksmithBlessingAmount: 4
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 5000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 3000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000

      - Level: 4
        RefineLevels:
          - Level: 1
            Bonus: 700
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 20000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 2
            Bonus: 1400
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 20000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 3
            Bonus: 2100
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 20000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 4
            Bonus: 2800
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 20000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 2000
                Material: Enriched_Oridecon
          - Level: 5
            Bonus: 3500
            RandomBonus: 1300
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 20000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 6
            Bonus: 4200
            RandomBonus: 2600
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 20000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 7
            Bonus: 4900
            RandomBonus: 3900
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 20000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 8
            Bonus: 5600
            RandomBonus: 5200
            BlacksmithBlessingAmount: 1
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 20000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 9
            Bonus: 6300
            RandomBonus: 6500
            BlacksmithBlessingAmount: 2
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 20000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 10
            Bonus: 7000
            RandomBonus: 7800
            BlacksmithBlessingAmount: 4
            Chances:
              - Type: Normal
                Rate: 1000
                Price: 20000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 2000
                Price: 2000
                Material: Enriched_Oridecon
                BreakingRate: 10000
  - Group: Shadow_Armor
    Levels:
      - Level: 1
        RefineLevels:
          - Level: 1
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Elunium
          - Level: 2
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Elunium
          - Level: 3
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Elunium
          - Level: 4
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Elunium
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Elunium
          - Level: 5
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 10000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 10000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 6
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 10000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 10000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 7
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 10000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 10000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 8
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 10000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 10000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 9
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 10000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 10000
                Material: Enriched_Elunium
                BreakingRate: 10000
          - Level: 10
            Chances:
              - Type: Normal
                Rate: 900
                Price: 10000
                Material: Elunium
                BreakingRate: 10000
              - Type: Enriched
                Rate: 2000
                Price: 10000
                Material: Enriched_Elunium
                BreakingRate: 10000
  - Group: Shadow_Weapon
    Levels:
      - Level: 1
        RefineLevels:
          - Level: 1
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Oridecon
          - Level: 2
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Oridecon
          - Level: 3
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Oridecon
          - Level: 4
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 10000
                Material: Oridecon
              - Type: Enriched
                Rate: 10000
                Price: 10000
                Material: Enriched_Oridecon
          - Level: 5
            Chances:
              - Type: Normal
                Rate: 6000
                Price: 10000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 9000
                Price: 10000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 6
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 10000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 10000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 7
            Chances:
              - Type: Normal
                Rate: 4000
                Price: 10000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 7000
                Price: 10000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 8
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 10000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 10000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 9
            Chances:
              - Type: Normal
                Rate: 2000
                Price: 10000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 4000
                Price: 10000
                Material: Enriched_Oridecon
                BreakingRate: 10000
          - Level: 10
            Chances:
              - Type: Normal
                Rate: 900
                Price: 10000
                Material: Oridecon
                BreakingRate: 10000
              - Type: Enriched
                Rate: 2000
                Price: 10000
                Material: Enriched_Oridecon
                BreakingRate: 10000