execute unless items entity @s weapon.mainhand * run return run tellraw @s {"translate":"fisherman.sellempty"}
execute unless items entity @s weapon.mainhand *[minecraft:custom_data~{fishing:1}] run return run function ws:work/misc/fisherman/fail
execute store result score @s fisherman.count if items entity @s weapon.mainhand *[minecraft:custom_data~{fishing:1}]
execute unless score .eventor eventchoose matches 5 unless score .eventor eventchoose matches 6 store result score @s fisherman.capital run data get entity @s SelectedItem.components."minecraft:custom_data".price
execute if score .eventor eventchoose matches 5 store result score @s fisherman.capital run data get entity @s SelectedItem.components."minecraft:custom_data".price 2
execute if score .eventor eventchoose matches 6 store result score @s fisherman.capital run data get entity @s SelectedItem.components."minecraft:custom_data".price 3
scoreboard players operation @s fisherman.capital *= @s fisherman.count
scoreboard players operation @s pay += @s fisherman.capital
execute as @s[scores={starterbonus.fisherman=1..}] run function ws:work/misc/fisherman/starterbonus
execute store result storage ws:temp fisherman int 1 run scoreboard players get @s fisherman.capital
execute at @s run function ws:work/misc/fisherman/display with storage ws:temp
data remove storage ws:temp fisherman
execute at @s run particle minecraft:happy_villager ~ ~2 ~ 0.1 0.1 0.1 1 10
execute at @s run playsound minecraft:entity.experience_orb.pickup player @p ~ ~ ~ 0.7
scoreboard players reset @s fisherman.capital
execute unless entity @s[advancements={ws:workersimulator/fishing=true}] run function ws:work/misc/fisherman/adv
item replace entity @s weapon.mainhand with air