• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Harvest

1,224
Posts
10
Years
In PokeBattle_Battle, right under # Harvest - should go here
add

Code:
if i.hasWorkingAbility(:HARVEST) && i.item<=0 && i.pokemon.itemRecycle>0 #if an item was recycled, check
          if pbIsBerry?(i.pokemon.itemRecycle) && (rand(100)>50 || pbWeather==PBWeather::SUNNYDAY)
              i.item=i.pokemon.itemRecycle
              i.pokemon.itemRecycle=0
              pbDisplay(_INTL("{1} harvested a {2}!",i.pbThis,PBItems.getName(i.item)))
              pbBerryCureCheck(true)
          end
      end

Tested, but probably not in all circumstances. Seems to work fine though.

I'm not sure if it's perfect, but it seems to work

For v14+ (hasWorkingAbility is a method of v14, so you might need to add things or just upgrade for this to work in prior versions)

Edit:
Grammatically correct version(In English, may not apply for other languages)
Spoiler:
 
Last edited:
Back
Top