# In def pbBattleConfusionBerry(battler,battle,item,forced,flavor,confuseMsg), under amt = (NEWEST_BATTLE_MECHANICS) ? battler.pbRecoverHP(battler.totalhp/2) : battler.pbRecoverHP(battler.totalhp/8), add
if battler.hasActiveAbility?(:RIPEN)
amt *= 2
end
# In def pbBattleStatIncreasingBerry(battler,battle,item,forced,stat,increment=1), under itemName = PBItems.getName(item), add
if battler.hasActiveAbility?(:RIPEN)
increment *=2
end
# In def pbBattleTypeWeakingBerry(type,moveType,target,mults), replace mults[FINAL_DMG_MULT] = (mults[FINAL_DMG_MULT]/2).round with
if target.hasActiveAbility?(:RIPEN)
mults[FINAL_DMG_MULT] = (mults[FINAL_DMG_MULT]/4).round
else
mults[FINAL_DMG_MULT] = (mults[FINAL_DMG_MULT]/2).round
end
# In BattleHandlers::HPHealItem.add(:ORANBERRY, replace battler.pbRecoverHP(10) with
if battler.hasActiveAbility?(:RIPEN)
battler.pbRecoverHP(20)
else
battler.pbRecoverHP(10)
end
# In BattleHandlers::HPHealItem.add(:SITRUSBERRY, replace battler.pbRecoverHP(battler.totalhp/4) with
if battler.hasActiveAbility?(:RIPEN)
battler.pbRecoverHP?(battler.totalhp/2)
else
battler.pbRecoverHP(battler.totalhp/4)
end
#In BattleHandlers::HPHealItem.add(:STARFBERRY, replace next pbBattleStatIncreasingBerry(battler,battle,item,forced,stat,2) with
if battler.hasActiveAbility(:RIPEN)
next pbBattleStatIncreasingBerry(battler,battle,item,forced,stat,4)
else
next pbBattleStatIncreasingBerry(battler,battle,item,forced,stat,2)
end
# In BattleHandlers::TargetItemOnHit.add(:JABOCABERRY, replace user.pbReduceHP(user.totalhp/8,false) with
if target.hasActiveAbility?(:RIPEN)
user.pbReduceHP(user.totalhp/4,false)
else
user.pbReduceHP(user.totalhp/8,false)
end
# In BattleHandlers::TargetItemOnHit.add(:ROWAPBERRY, replace user.pbReduceHP(user.totalhp/8,false) with
if target.hasActiveAbility?(:RIPEN)
user.pbReduceHP(user.totalhp/4,false)
else
user.pbReduceHP(user.totalhp/8,false)
end
# In BattleHandlers::TargetItemOnHitPositiveBerry.add(:ENIGMABERRY, replace battler.pbRecoverHP(battler.totalhp/4) with
if battler.hasActiveAbility?(:RIPEN)
battler.pbRecoverHP(battler.totalhp/2)
else
battler.pbRecoverHP(battler.totalhp/4)
end
# Replace all of BattleHandlers::TargetItemOnHitPositiveBerry.add(:KEEBERRY, with
BattleHandlers::TargetItemOnHitPositiveBerry.add(:KEEBERRY,
proc { |item,battler,battle,forced|
increment=1
next false if !forced && battle.pbCheckOpposingAbility(:UNNERVE,battler.index)
next false if !battler.pbCanRaiseStatStage?(PBStats::DEFENSE,battler)
itemName = PBItems.getName(item)
if battler.hasActiveAbility?(:RIPEN)
increment *=2
end
if !forced
battle.pbCommonAnimation("EatBerry",battler)
next battler.pbRaiseStatStageByCause(PBStats::DEFENSE,increment,battler,itemName)
end
PBDebug.log("[Item triggered] #{battler.pbThis}'s #{itemName}")
next battler.pbRaiseStatStage(PBStats::DEFENSE,increment,battler)
}
)
# Replace all of BattleHandlers::TargetItemOnHitPositiveBerry.add(:MARANGABERRY, with
proc { |item,battler,battle,forced|
increment=1
next false if !forced && battle.pbCheckOpposingAbility(:UNNERVE,battler.index)
next false if !battler.pbCanRaiseStatStage?(PBStats::SPDEF,battler)
itemName = PBItems.getName(item)
if battler.hasActiveAbility?(:RIPEN)
increment*=2
end
if !forced
battle.pbCommonAnimation("EatBerry",battler)
next battler.pbRaiseStatStageByCause(PBStats::SPDEF,increment,battler,itemName)
end
PBDebug.log("[Item triggered] #{battler.pbThis}'s #{itemName}")
next battler.pbRaiseStatStage(PBStats::SPDEF,increment,battler)
}
)
# (As a side note, the Enigma, Kee and Maranga berries are not consumed - I've already reported it but to fix this, just add target.pbConsumeItem to each of their respective BattleHandlers::TargetItemOnHit sections.)