- 1,224
- Posts
- 10
- Years
- Age 30
- Omnipresence
- Seen Aug 8, 2023
In PokeBattle_Battle, right under # Harvest - should go here
add
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)
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:
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
firstberryletter=PBItems.getName(i.item).split(//).first
if firstberryletter=="A" || firstberryletter=="E" || firstberryletter=="I" ||
firstberryletter=="O" || firstberryletter=="U"
pbDisplay(_INTL("{1} harvested an {2}!",i.pbThis,PBItems.getName(i.item)))
else
pbDisplay(_INTL("{1} harvested a {2}!",i.pbThis,PBItems.getName(i.item)))
end
pbBerryCureCheck(true)
end
end
Last edited: