Updated ResultRefine

* Converted ResultRefine to a ResultRefine array
* Converted the values between ResultRefineMinimum and ResultRefineMaximum to a ResultRefine array
This commit is contained in:
Atemo 2024-01-16 15:12:24 +01:00
parent 5c8555791e
commit c8729f5bd6
7 changed files with 247 additions and 201 deletions

View File

@ -24,13 +24,9 @@
########################################################################### ###########################################################################
# - Item Item that triggers Laphine Upgrade. # - Item Item that triggers Laphine Upgrade.
# RandomOptionGroup Name of the random option group that will be applied. (Default: none) # RandomOptionGroup Name of the random option group that will be applied. (Default: none)
# ResultRefine Absolute refine level after the upgrade. (Default: none) # ResultRefine: Refine level after the upgrade. (Default: none)
# ResultRefineMinimum Minimum refine level after the upgrade. (Default: none)
# ResultRefineMaximum Maximum refine level after the upgrade. (Default: none)
# ResultRefineRate: Table of rate per refine level. (Default: none)
# By default the rate per level is 1. When defined the total rate is the sum of the rates between the minimum and maximum refinements.
# - Level Refine level. # - Level Refine level.
# Rate Rate per level. (Default: 1. Max: 10000) # Rate Rate per level. The total rate is the sum of the rates. (Default: 1)
# MinimumRefine Minimum refine level of the required items. (Default: 0) # MinimumRefine Minimum refine level of the required items. (Default: 0)
# MaximumRefine Maximum refine level of the required items. (Default: MAX_REFINE) # MaximumRefine Maximum refine level of the required items. (Default: MAX_REFINE)
# RequiredRandomOptions How many random options have to be in the item? (Default: 0) # RequiredRandomOptions How many random options have to be in the item? (Default: 0)

View File

@ -24,13 +24,9 @@
########################################################################### ###########################################################################
# - Item Item that triggers Laphine Upgrade. # - Item Item that triggers Laphine Upgrade.
# RandomOptionGroup Name of the random option group that will be applied. (Default: none) # RandomOptionGroup Name of the random option group that will be applied. (Default: none)
# ResultRefine Absolute refine level after the upgrade. (Default: none) # ResultRefine: Refine level after the upgrade. (Default: none)
# ResultRefineMinimum Minimum refine level after the upgrade. (Default: none)
# ResultRefineMaximum Maximum refine level after the upgrade. (Default: none)
# ResultRefineRate: Table of rate per refine level. (Default: none)
# By default the rate per level is 1. When defined the total rate is the sum of the rates between the minimum and maximum refinements.
# - Level Refine level. # - Level Refine level.
# Rate Rate per level. (Default: 1. Max: 10000) # Rate Rate per level. The total rate is the sum of the rates. (Default: 1)
# MinimumRefine Minimum refine level of the required items. (Default: 0) # MinimumRefine Minimum refine level of the required items. (Default: 0)
# MaximumRefine Maximum refine level of the required items. (Default: MAX_REFINE) # MaximumRefine Maximum refine level of the required items. (Default: MAX_REFINE)
# RequiredRandomOptions How many random options have to be in the item? (Default: 0) # RequiredRandomOptions How many random options have to be in the item? (Default: 0)

View File

@ -1,5 +1,5 @@
# This file is a part of rAthena. # This file is a part of rAthena.
# Copyright(C) 2022 rAthena Development Team # Copyright(C) 2024 rAthena Development Team
# https://rathena.org - https://github.com/rathena # https://rathena.org - https://github.com/rathena
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -24,13 +24,9 @@
########################################################################### ###########################################################################
# - Item Item that triggers Laphine Upgrade. # - Item Item that triggers Laphine Upgrade.
# RandomOptionGroup Name of the random option group that will be applied. (Default: none) # RandomOptionGroup Name of the random option group that will be applied. (Default: none)
# ResultRefine Absolute refine level after the upgrade. (Default: none) # ResultRefine: Refine level after the upgrade. (Default: none)
# ResultRefineMinimum Minimum refine level after the upgrade. (Default: none)
# ResultRefineMaximum Maximum refine level after the upgrade. (Default: none)
# ResultRefineRate: Table of rate per refine level. (Default: none)
# By default the rate per level is 1. When defined the total rate is the sum of the rates between the minimum and maximum refinements.
# - Level Refine level. # - Level Refine level.
# Rate Rate per level. (Default: 1. Max: 10000) # Rate Rate per level. The total rate is the sum of the rates. (Default: 1)
# MinimumRefine Minimum refine level of the required items. (Default: 0) # MinimumRefine Minimum refine level of the required items. (Default: 0)
# MaximumRefine Maximum refine level of the required items. (Default: MAX_REFINE) # MaximumRefine Maximum refine level of the required items. (Default: MAX_REFINE)
# RequiredRandomOptions How many random options have to be in the item? (Default: 0) # RequiredRandomOptions How many random options have to be in the item? (Default: 0)
@ -66,7 +62,8 @@ Body:
- Item: Ein_1HGUN - Item: Ein_1HGUN
- Item: Ein_1H_Foxtail - Item: Ein_1H_Foxtail
- Item: Metal_Rifine_Ticket - Item: Metal_Rifine_Ticket
ResultRefine: 7 ResultRefine:
- Level: 7
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
- Item: Metal_Katar - Item: Metal_Katar
@ -121,8 +118,11 @@ Body:
- Item: Temporal_M_Dex - Item: Temporal_M_Dex
- Item: Temporal_M_Luk - Item: Temporal_M_Luk
- Item: Frozen_Box_IL - Item: Frozen_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -133,7 +133,8 @@ Body:
- Item: Clack_Of_Servival_IL - Item: Clack_Of_Servival_IL
- Item: Herald_Of_GOD_IL - Item: Herald_Of_GOD_IL
- Item: True_Hunting_9Refine - Item: True_Hunting_9Refine
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -156,9 +157,7 @@ Body:
# - Item: True_Hunting_Ring2 # - Item: True_Hunting_Ring2
# Source: https://ro.gnjoy.com/news/probability/View.asp?seq=3954806 # Source: https://ro.gnjoy.com/news/probability/View.asp?seq=3954806
- Item: Shadow_Refine_Hammer - Item: Shadow_Refine_Hammer
ResultRefineMinimum: 1 ResultRefine:
ResultRefineMaximum: 10
ResultRefineRate:
- Level: 1 - Level: 1
Rate: 440 Rate: 440
- Level: 2 - Level: 2
@ -1720,7 +1719,8 @@ Body:
- Item: Lava_Leather_Suits - Item: Lava_Leather_Suits
- Item: Lava_Leather_Robe - Item: Lava_Leather_Robe
- Item: Shadow_9_Refine_Hammer - Item: Shadow_9_Refine_Hammer
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -2708,7 +2708,8 @@ Body:
- Item: Comp_Light_Blade - Item: Comp_Light_Blade
- Item: Comp_Scalet_DragonL_Bow - Item: Comp_Scalet_DragonL_Bow
- Item: Boost_Up_1 - Item: Boost_Up_1
ResultRefine: 10 ResultRefine:
- Level: 10
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -2725,7 +2726,8 @@ Body:
- Item: Defn_Muffler - Item: Defn_Muffler
- Item: Defn_Shoes - Item: Defn_Shoes
- Item: Boost_Up_2 - Item: Boost_Up_2
ResultRefine: 10 ResultRefine:
- Level: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
- Item: Boost_TH_Sword - Item: Boost_TH_Sword
@ -2747,7 +2749,8 @@ Body:
- Item: Boost_Soul_Rod - Item: Boost_Soul_Rod
- Item: Boost_Foxtail - Item: Boost_Foxtail
- Item: Metal_7_Ticket - Item: Metal_7_Ticket
ResultRefine: 7 ResultRefine:
- Level: 7
MaximumRefine: 6 MaximumRefine: 6
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -2764,7 +2767,8 @@ Body:
- Item: Metal_Revolver - Item: Metal_Revolver
- Item: Metal_Huuma_Shuriken - Item: Metal_Huuma_Shuriken
- Item: Noblesse_Rifine_Ticket - Item: Noblesse_Rifine_Ticket
ResultRefine: 9 ResultRefine:
- Level: 9
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
- Item: Noblesse_Breath_Armor - Item: Noblesse_Breath_Armor
@ -2808,7 +2812,8 @@ Body:
- Item: Noblesse_Attack_Manteau - Item: Noblesse_Attack_Manteau
- Item: Noblesse_Magic_Manteau - Item: Noblesse_Magic_Manteau
- Item: Imperial_Rifine_Ticket - Item: Imperial_Rifine_Ticket
ResultRefine: 9 ResultRefine:
- Level: 9
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
- Item: Imperial_Breath_Armor - Item: Imperial_Breath_Armor
@ -2852,7 +2857,8 @@ Body:
- Item: Imperial_Attack_Manteau - Item: Imperial_Attack_Manteau
- Item: Imperial_Magic_Manteau - Item: Imperial_Magic_Manteau
- Item: Grace_Rifine_Ticket - Item: Grace_Rifine_Ticket
ResultRefine: 9 ResultRefine:
- Level: 9
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
- Item: Grace_Breath_Armor - Item: Grace_Breath_Armor
@ -3856,7 +3862,8 @@ Body:
# - Item: S_Evilcurse_Pendant # - Item: S_Evilcurse_Pendant
# - Item: S_Evilcurse_Shoes # - Item: S_Evilcurse_Shoes
- Item: Illu_Enhance_Cube - Item: Illu_Enhance_Cube
ResultRefine: 7 ResultRefine:
- Level: 7
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 6 MaximumRefine: 6
CardsAllowed: true CardsAllowed: true
@ -3868,7 +3875,8 @@ Body:
- Item: Illusion_Leg_A - Item: Illusion_Leg_A
- Item: Illusion_Leg_B - Item: Illusion_Leg_B
- Item: Auto_Enhance_Cube - Item: Auto_Enhance_Cube
ResultRefine: 7 ResultRefine:
- Level: 7
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 6 MaximumRefine: 6
CardsAllowed: true CardsAllowed: true
@ -3880,7 +3888,8 @@ Body:
- Item: Auto_Leg_A - Item: Auto_Leg_A
- Item: Auto_Leg_B - Item: Auto_Leg_B
- Item: Temporal_Refine_Cube - Item: Temporal_Refine_Cube
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -3921,7 +3930,8 @@ Body:
- Item: Modify_Dex_Boots_ - Item: Modify_Dex_Boots_
- Item: Modify_Luk_Boots_ - Item: Modify_Luk_Boots_
- Item: Geffen_Refine_Cube - Item: Geffen_Refine_Cube
ResultRefine: 12 ResultRefine:
- Level: 12
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -3930,7 +3940,8 @@ Body:
- Item: Geffen_Magic_Muffler - Item: Geffen_Magic_Muffler
- Item: Anti_Magic_Manteau - Item: Anti_Magic_Manteau
- Item: Old_Refine_Cube - Item: Old_Refine_Cube
ResultRefine: 12 ResultRefine:
- Level: 12
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -3949,7 +3960,8 @@ Body:
- Item: Old_Protect_Of_Crown - Item: Old_Protect_Of_Crown
- Item: Old_Camo_RabbitHood - Item: Old_Camo_RabbitHood
- Item: Refine_Hero_Weapon - Item: Refine_Hero_Weapon
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -3990,13 +4002,15 @@ Body:
- Item: Blue_Crystal_Staff - Item: Blue_Crystal_Staff
- Item: Freezing_Rod - Item: Freezing_Rod
- Item: Refine_Hero_Boots - Item: Refine_Hero_Boots
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
- Item: Ancient_Hero_Boots - Item: Ancient_Hero_Boots
- Item: OS_Weapon_Refine_Cube - Item: OS_Weapon_Refine_Cube
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4017,7 +4031,8 @@ Body:
- Item: Kuroiro_OS - Item: Kuroiro_OS
- Item: Boost_Lance_OS - Item: Boost_Lance_OS
- Item: Racecap_Refine_Cube - Item: Racecap_Refine_Cube
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4041,7 +4056,8 @@ Body:
- Item: Racing_C_Star - Item: Racing_C_Star
- Item: Racing_C_Soul - Item: Racing_C_Soul
- Item: Booster_W_Up_1 - Item: Booster_W_Up_1
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4071,7 +4087,8 @@ Body:
- Item: MV_B_Violin - Item: MV_B_Violin
- Item: MV_B_Whip - Item: MV_B_Whip
- Item: Booster_W_Up_2 - Item: Booster_W_Up_2
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4101,7 +4118,8 @@ Body:
- Item: MV_B_Violin - Item: MV_B_Violin
- Item: MV_B_Whip - Item: MV_B_Whip
- Item: Booster_W_Up_3 - Item: Booster_W_Up_3
ResultRefine: 13 ResultRefine:
- Level: 13
MaximumRefine: 12 MaximumRefine: 12
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4144,7 +4162,8 @@ Body:
- Item: SP_B_Saber - Item: SP_B_Saber
- Item: SI_B_Saber - Item: SI_B_Saber
- Item: E_ILL_Up - Item: E_ILL_Up
ResultRefine: 10 ResultRefine:
- Level: 10
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4155,7 +4174,8 @@ Body:
- Item: E_Illusion_Leg_A - Item: E_Illusion_Leg_A
- Item: E_Illusion_Leg_B - Item: E_Illusion_Leg_B
- Item: Auto_Armor_Refine_Cube - Item: Auto_Armor_Refine_Cube
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4166,7 +4186,8 @@ Body:
- Item: Auto_Leg_A - Item: Auto_Leg_A
- Item: Auto_Leg_B - Item: Auto_Leg_B
- Item: Bio_Weapon_Refine_Cube - Item: Bio_Weapon_Refine_Cube
ResultRefine: 12 ResultRefine:
- Level: 12
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4232,8 +4253,11 @@ Body:
# - Item: MD_Geffen_Shield # - Item: MD_Geffen_Shield
# - Item: MD_Geffen_Shield2 # - Item: MD_Geffen_Shield2
- Item: Moonlight_Box_IL - Item: Moonlight_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4248,8 +4272,11 @@ Body:
- Item: Puente_Robe_IL - Item: Puente_Robe_IL
- Item: Apple_Of_Archer_IL - Item: Apple_Of_Archer_IL
- Item: S_Moonlight_Box_IL - Item: S_Moonlight_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4340,8 +4367,11 @@ Body:
- Item: Up_OneSkyOneSun - Item: Up_OneSkyOneSun
- Item: Up_SoulWeight - Item: Up_SoulWeight
- Item: Vampire_Box_IL - Item: Vampire_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4353,8 +4383,11 @@ Body:
- Item: Ghoul_Leg_IL - Item: Ghoul_Leg_IL
- Item: Cape_Of_Ancient_Lord_IL - Item: Cape_Of_Ancient_Lord_IL
- Item: S_Vampire_Box_IL - Item: S_Vampire_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4366,8 +4399,11 @@ Body:
- Item: Ghoul_Leg_IL - Item: Ghoul_Leg_IL
- Item: Cape_Of_Ancient_Lord_IL - Item: Cape_Of_Ancient_Lord_IL
- Item: S_Frozen_Box_IL - Item: S_Frozen_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4378,8 +4414,11 @@ Body:
- Item: Clack_Of_Servival_IL - Item: Clack_Of_Servival_IL
- Item: Herald_Of_GOD_IL - Item: Herald_Of_GOD_IL
- Item: Turtle_Is_Box_IL - Item: Turtle_Is_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4391,8 +4430,11 @@ Body:
- Item: Pole_Axe_IL - Item: Pole_Axe_IL
- Item: Fancy_Flower_IL - Item: Fancy_Flower_IL
- Item: S_Turtle_Is_Box_IL - Item: S_Turtle_Is_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4404,8 +4446,11 @@ Body:
- Item: Pole_Axe_IL - Item: Pole_Axe_IL
- Item: Fancy_Flower_IL - Item: Fancy_Flower_IL
- Item: Teddy_Bear_Box_IL - Item: Teddy_Bear_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4416,8 +4461,11 @@ Body:
- Item: Headband_Of_Power_IL - Item: Headband_Of_Power_IL
- Item: Boots_IL - Item: Boots_IL
- Item: S_Teddy_Bear_Box_IL - Item: S_Teddy_Bear_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4428,8 +4476,11 @@ Body:
- Item: Headband_Of_Power_IL - Item: Headband_Of_Power_IL
- Item: Boots_IL - Item: Boots_IL
- Item: Luanda_Box_IL - Item: Luanda_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4441,8 +4492,11 @@ Body:
- Item: Goibne_Shoulder_IL - Item: Goibne_Shoulder_IL
- Item: Goibne_Boots_IL - Item: Goibne_Boots_IL
- Item: S_Luanda_Box_IL - Item: S_Luanda_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4454,8 +4508,11 @@ Body:
- Item: Goibne_Shoulder_IL - Item: Goibne_Shoulder_IL
- Item: Goibne_Boots_IL - Item: Goibne_Boots_IL
- Item: Labyrinth_Box_IL - Item: Labyrinth_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4467,8 +4524,11 @@ Body:
- Item: Morpheus_Hood_IL - Item: Morpheus_Hood_IL
- Item: Morpheus_Shawl_IL - Item: Morpheus_Shawl_IL
- Item: S_Teddy_Labyrinth_IL - Item: S_Teddy_Labyrinth_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4480,8 +4540,11 @@ Body:
- Item: Morpheus_Hood_IL - Item: Morpheus_Hood_IL
- Item: Morpheus_Shawl_IL - Item: Morpheus_Shawl_IL
- Item: Underwater_Box_IL - Item: Underwater_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4498,8 +4561,11 @@ Body:
- Item: Morrigane_Helm_IL - Item: Morrigane_Helm_IL
- Item: Morrigane_Manyeau_IL - Item: Morrigane_Manyeau_IL
- Item: S_Underwater_Box_IL - Item: S_Underwater_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -4516,7 +4582,8 @@ Body:
- Item: Morrigane_Helm_IL - Item: Morrigane_Helm_IL
- Item: Morrigane_Manyeau_IL - Item: Morrigane_Manyeau_IL
- Item: Circlet_Refine_Cube - Item: Circlet_Refine_Cube
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4731,7 +4798,8 @@ Body:
# - Item: Blue_Mental_Pendant # - Item: Blue_Mental_Pendant
# - Item: Red_Force_Pendant # - Item: Red_Force_Pendant
- Item: GrayWolf_7_Ticket - Item: GrayWolf_7_Ticket
ResultRefine: 7 ResultRefine:
- Level: 7
MaximumRefine: 6 MaximumRefine: 6
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4742,7 +4810,8 @@ Body:
- Item: Gray_W_Boots - Item: Gray_W_Boots
- Item: Gray_W_Shoes - Item: Gray_W_Shoes
- Item: GrayWolf_9_Ticket - Item: GrayWolf_9_Ticket
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4917,7 +4986,8 @@ Body:
# - Item: Vivatus_F_C_Humma # - Item: Vivatus_F_C_Humma
# - Item: Vivatus_F_Humma # - Item: Vivatus_F_Humma
- Item: Bio_Helm_Refine_Cube - Item: Bio_Helm_Refine_Cube
ResultRefine: 11 ResultRefine:
- Level: 11
MaximumRefine: 10 MaximumRefine: 10
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -4934,8 +5004,11 @@ Body:
- Item: BioWeapon_Helm_SC - Item: BioWeapon_Helm_SC
- Item: BioWeapon_Helm_GC - Item: BioWeapon_Helm_GC
- Item: Twins_Box_IL - Item: Twins_Box_IL
ResultRefineMinimum: 7 ResultRefine:
ResultRefineMaximum: 10 - Level: 7
- Level: 8
- Level: 9
- Level: 10
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 9 MaximumRefine: 9
CardsAllowed: true CardsAllowed: true
@ -4952,8 +5025,11 @@ Body:
- Item: Dea_Staff_IL - Item: Dea_Staff_IL
- Item: Sprint_Mail_IL - Item: Sprint_Mail_IL
- Item: S_Twins_Box_IL - Item: S_Twins_Box_IL
ResultRefineMinimum: 9 ResultRefine:
ResultRefineMaximum: 12 - Level: 9
- Level: 10
- Level: 11
- Level: 12
MinimumRefine: 4 MinimumRefine: 4
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
@ -5170,7 +5246,8 @@ Body:
# - Item: S_Creative_Weapon # - Item: S_Creative_Weapon
# - Item: S_Creative_Shield # - Item: S_Creative_Shield
- Item: Snow_F_Refine - Item: Snow_F_Refine
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -5181,7 +5258,8 @@ Body:
- Item: Snowflower_Boots - Item: Snowflower_Boots
- Item: Snowflower_Shoes - Item: Snowflower_Shoes
- Item: Glacier_W_Refine - Item: Glacier_W_Refine
ResultRefine: 9 ResultRefine:
- Level: 9
MaximumRefine: 8 MaximumRefine: 8
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -5236,7 +5314,8 @@ Body:
# - Item: S_M_Mammoth_Earring # - Item: S_M_Mammoth_Earring
# - Item: S_M_Mammoth_Pendant # - Item: S_M_Mammoth_Pendant
- Item: SubjectCape_Refine_Cube - Item: SubjectCape_Refine_Cube
ResultRefine: 12 ResultRefine:
- Level: 12
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:
@ -5244,7 +5323,8 @@ Body:
- Item: Subject_CapeMagic_TH - Item: Subject_CapeMagic_TH
- Item: Subject_CapeMelee_TH - Item: Subject_CapeMelee_TH
- Item: GMT_Robe_Stone - Item: GMT_Robe_Stone
ResultRefine: 12 ResultRefine:
- Level: 12
MaximumRefine: 11 MaximumRefine: 11
CardsAllowed: true CardsAllowed: true
TargetItems: TargetItems:

View File

@ -23568,55 +23568,30 @@ void clif_parse_laphine_upgrade( int fd, map_session_data* sd ){
} }
// Change the refine rate if needed // Change the refine rate if needed
if( upgrade->resultRefine > 0 ){ if (!upgrade->resultRefine.empty()) {
// Absolute refine level change int total_rate = 0;
item->refine = max( item->refine, upgrade->resultRefine );
}else {
uint16 min_value = 0;
uint16 max_value = MAX_REFINE;
if( upgrade->resultRefineMaximum > 0 ){ // Get the total rate (sum of the rate)
// If a minimum is specified it can also downgrade for ( const auto& it : upgrade->resultRefine ) {
if( upgrade->resultRefineMinimum ){ if (it.second == 0) // Level removed on import
min_value = upgrade->resultRefineMinimum; continue;
}else{ total_rate += it.second;
// Otherwise it can only be upgraded until the maximum, but not downgraded
min_value = item->refine;
}
max_value = upgrade->resultRefineMaximum;
}else if( upgrade->resultRefineMinimum > 0 ){
// No maximum has been specified, so it can be anything between minimum and MAX_REFINE
min_value = upgrade->resultRefineMinimum;
} }
if (upgrade->resultRefineRate.empty()) { if (total_rate > 0) {
item->refine = rnd_value( min_value, max_value ); int chance = rnd_value( 1, total_rate );
} int sum_rate = 0;
else {
int level, total = 0, rate = 0;
// Get the total rate between min_value and max_value for ( const auto& it : upgrade->resultRefine ) {
for ( level = min_value; level <= max_value; level++ ) { if (it.second == 0)
if (upgrade->resultRefineRate.count(level) > 0) continue;
total += upgrade->resultRefineRate[level]; sum_rate += it.second;
else
total += 1;
}
int r = rnd_value( 1, total ); if (chance <= sum_rate) {
item->refine = cap_value( it.first, 0, MAX_REFINE );
for ( level = min_value; level <= max_value; level++ ) {
if (upgrade->resultRefineRate.count(level) > 0)
rate += upgrade->resultRefineRate[level];
else
rate += 1;
if (r <= rate) {
item->refine = level;
break; break;
} }
} }
} }
} }

View File

@ -1793,77 +1793,16 @@ uint64 LaphineUpgradeDatabase::parseBodyNode( const ryml::NodeRef& node ){
} }
} }
if( this->nodeExists( node, "ResultRefine" ) ){ if (this->nodeExists( node, "ResultRefine" )) {
uint16 refine; const auto& refineNode = node["ResultRefine"];
if( !this->asUInt16( node, "ResultRefine", refine ) ){
return 0;
}
if( refine > MAX_REFINE ){
this->invalidWarning( node["ResultRefine"], "Result refine %hu is too high, capping to MAX_REFINE...\n", refine );
refine = MAX_REFINE;
}
entry->resultRefine = refine;
}else{
if( !exists ){
entry->resultRefine = 0;
}
}
if( this->nodeExists( node, "ResultRefineMinimum" ) ){
uint16 refine;
if( !this->asUInt16( node, "ResultRefineMinimum", refine ) ){
return 0;
}
if( refine > MAX_REFINE ){
this->invalidWarning( node["ResultRefineMinimum"], "Result refine minimum %hu is too high, capping to MAX_REFINE...\n", refine );
refine = MAX_REFINE;
}
entry->resultRefineMinimum = refine;
}else{
if( !exists ){
entry->resultRefineMinimum = 0;
}
}
if( this->nodeExists( node, "ResultRefineMaximum" ) ){
uint16 refine;
if( !this->asUInt16( node, "ResultRefineMaximum", refine ) ){
return 0;
}
if( refine > MAX_REFINE ){
this->invalidWarning( node["ResultRefineMaximum"], "Result refine maximum %hu is too high, capping to MAX_REFINE...\n", refine );
refine = MAX_REFINE;
}
entry->resultRefineMaximum = refine;
}else{
if( !exists ){
entry->resultRefineMaximum = 0;
}
}
if (this->nodeExists( node, "ResultRefineRate" )) {
const auto& refineNode = node["ResultRefineRate"];
for (const auto& refineit : refineNode) { for (const auto& refineit : refineNode) {
if (!this->nodesExist(refineit, { "Level", "Rate" })) {
return 0;
}
uint16 level; uint16 level;
if (!this->asUInt16Rate(refineit, "Level", level, MAX_REFINE)) if (!this->asUInt16Rate(refineit, "Level", level, MAX_REFINE))
return 0; return 0;
bool refine_exists = util::umap_find( entry->resultRefineRate, level ) != nullptr; bool refine_exists = util::umap_find( entry->resultRefine, level ) != nullptr;
if (this->nodeExists( refineit, "Rate" )) { if (this->nodeExists( refineit, "Rate" )) {
uint16 rate; uint16 rate;
@ -1871,10 +1810,10 @@ uint64 LaphineUpgradeDatabase::parseBodyNode( const ryml::NodeRef& node ){
if (!this->asUInt16Rate( refineit, "Rate", rate )) { if (!this->asUInt16Rate( refineit, "Rate", rate )) {
return 0; return 0;
} }
entry->resultRefineRate[level] = rate; entry->resultRefine[level] = rate;
} else { } else {
if (!refine_exists) { if (!refine_exists) {
entry->resultRefineRate[level] = 1; entry->resultRefine[level] = 1;
} }
} }
} }

View File

@ -2417,10 +2417,7 @@ struct s_laphine_upgrade{
uint16 requiredRandomOptions; uint16 requiredRandomOptions;
bool cardsAllowed; bool cardsAllowed;
std::shared_ptr<s_random_opt_group> randomOptionGroup; std::shared_ptr<s_random_opt_group> randomOptionGroup;
uint16 resultRefine; std::unordered_map<uint16, uint16> resultRefine;
uint16 resultRefineMinimum;
uint16 resultRefineMaximum;
std::unordered_map<uint16, uint16> resultRefineRate;
}; };
class LaphineUpgradeDatabase : public TypesafeYamlDatabase<t_itemid, s_laphine_upgrade>{ class LaphineUpgradeDatabase : public TypesafeYamlDatabase<t_itemid, s_laphine_upgrade>{

View File

@ -12,6 +12,7 @@ static bool upgrade_status_db(std::string file, const uint32 source_version);
static bool upgrade_map_drops_db(std::string file, const uint32 source_version); static bool upgrade_map_drops_db(std::string file, const uint32 source_version);
static bool upgrade_enchantgrade_db( std::string file, const uint32 source_version ); static bool upgrade_enchantgrade_db( std::string file, const uint32 source_version );
static bool upgrade_item_group_db( std::string file, const uint32 source_version ); static bool upgrade_item_group_db( std::string file, const uint32 source_version );
static bool upgrade_laphine_upgrade( std::string file, const uint32 source_version );
template<typename Func> template<typename Func>
bool process(const std::string &type, uint32 version, const std::vector<std::string> &paths, const std::string &name, Func lambda) { bool process(const std::string &type, uint32 version, const std::vector<std::string> &paths, const std::string &name, Func lambda) {
@ -150,6 +151,11 @@ bool YamlUpgradeTool::initialize( int argc, char* argv[] ){
} ) ){ } ) ){
return false; return false;
} }
if( !process( "LAPHINE_UPGRADE_DB", 2, root_paths, "laphine_upgrade", []( const std::string& path, const std::string& name_ext, uint32 source_version ) -> bool {
return upgrade_laphine_upgrade( path + name_ext, source_version );
} ) ){
return false;
}
return true; return true;
} }
@ -516,6 +522,63 @@ static bool upgrade_item_group_db( std::string file, const uint32 source_version
return true; return true;
} }
static bool upgrade_laphine_upgrade( std::string file, const uint32 source_version ){
size_t entries = 0;
for( auto input : inNode["Body"] ){
if( source_version < 2 ){
if( input["ResultRefine"].IsDefined() ){
// Convert ResultRefine to a ResultRefine array
uint16 refine_level = input["ResultRefine"].as<uint16>();
// Remove the existing Refine entry
input.remove( "ResultRefine" );
// Add the ResultRefine array
auto RatesNode = input["ResultRefine"];
auto RateNode = RatesNode[0];
RateNode["Level"] = refine_level;
}
// Convert the values between ResultRefineMinimum and ResultRefineMaximum to a ResultRefine array
if( input["ResultRefineMinimum"].IsDefined() || input["ResultRefineMaximum"].IsDefined() ){
uint16 refine_level_min = 0, refine_level_max = MAX_REFINE;
// Save data and remove the existing ResultRefineMinimum/ResultRefineMaximum entry
if( input["ResultRefineMinimum"].IsDefined() ) {
refine_level_min = input["ResultRefineMinimum"].as<uint16>();
input.remove( "ResultRefineMinimum" );
}
if( input["ResultRefineMaximum"].IsDefined() ) {
refine_level_max = input["ResultRefineMaximum"].as<uint16>();
input.remove( "ResultRefineMaximum" );
}
// Remove existing ResultRefine entry (shouldn't happen)
if( input["ResultRefine"].IsDefined() )
input.remove( "ResultRefine" );
// Add the ResultRefine array
auto RatesNode = input["ResultRefine"];
for( int i = refine_level_min, j = 0; i <= refine_level_max; i++, j++ ){
auto RateNode = RatesNode[j];
RateNode["Level"] = i;
}
}
}
body << input;
entries++;
}
ShowStatus( "Done converting/upgrading '" CL_WHITE "%zu" CL_RESET "' entries in '" CL_WHITE "%s" CL_RESET "'.\n", entries, file.c_str() );
return true;
}
int main( int argc, char *argv[] ){ int main( int argc, char *argv[] ){
return main_core<YamlUpgradeTool>( argc, argv ); return main_core<YamlUpgradeTool>( argc, argv );