- 148
- Posts
- 12
- Years
- Upstate New York
- Seen Oct 31, 2024
I was looking through some older threads and found one where Nickalooose wrote out code for Parental Bond. It works great, but I wanted to try and edit it so instead of always hitting twice it would have a thirty percent chance to do so.
Here's a link to the thread with her code.
I thought just changing this part
to something like this
would work, but it didn't. This is a bit over my head. Could anyone point me in the direction to get this done?
Here's a link to the thread with her code.
I thought just changing this part
Code:
# Parental Bond
if isConst?(user.ability,PBAbilities,:PARENTALBOND) && thismove.basedamage>0 && realnumhits==2
@battle.pbDisplay(_INTL("{1}'s {2} hit twice with Parental Bond!",user.pbThis,thismove.name))
end
to something like this
Code:
# Parental Bond
if isConst?(user.ability,PBAbilities,:PARENTALBOND) && self.pbRandom(10)<3 && thismove.basedamage>0 && realnumhits==2
@battle.pbDisplay(_INTL("{1}'s {2} hit twice with Parental Bond!",user.pbThis,thismove.name))
end
would work, but it didn't. This is a bit over my head. Could anyone point me in the direction to get this done?