
# -> Add to counter
scoreboard players add @s OverlyRealistic.Player.WisdomSpecialized.CropsWashed 1

# -> If non passable then return
execute unless score @s OverlyRealistic.Player.WisdomSpecialized.CropsWashed matches 25.. run \
    return fail

# -> Add to skill XP
scoreboard players add @s OverlyRealistic.Player.WisdomStats.Husbandry_XP 6
scoreboard players add @s OverlyRealistic.Player.WisdomStats.Cookery_XP 9

# -> Intelligence buff
scoreboard players operation #or.intelligence_level OverlyRealistic.General.ArbitraryData = @s OverlyRealistic.Player.Stats.Intelligence
scoreboard players operation #or.intelligence_level OverlyRealistic.General.ArbitraryData /= #or.static_num_2 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.Player.WisdomStats.Husbandry_XP += #or.intelligence_level OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.Player.WisdomStats.Cookery_XP += #or.intelligence_level OverlyRealistic.General.ArbitraryData

# -> Remove other skills' xp
function overly_realistic:players/wisdom/conjoined/husbandry_and_cookery/add_to_skill_xp_c_wash_crops

# -> If current XP is greater than the cap then increase level
execute if score @s OverlyRealistic.Player.WisdomStats.Husbandry_XP >= @s OverlyRealistic.Player.WisdomStats.Husbandry_XP_Max run \
    function overly_realistic:players/wisdom/husbandry/increase_level

# -> If current XP is greater than the cap then increase level
execute if score @s OverlyRealistic.Player.WisdomStats.Cookery_XP >= @s OverlyRealistic.Player.WisdomStats.Cookery_XP_Max run \
    function overly_realistic:players/wisdom/cookery/increase_level
