- 1,224
- Posts
- 11
- Years
- Omnipresence
- Seen Aug 8, 2023
Adding Destiny Knot's breeding effect
in PokemonDayCare, replace
with
in PokemonDayCare, replace
Code:
i=0; stats=[PBStats::HP,PBStats::ATTACK,PBStats::DEFENSE,
PBStats::SPEED,PBStats::SPATK,PBStats::SPDEF]
loop do
r=stats[rand(stats.length)]
if !ivinherit.include?(r)
parent=[mother,father][rand(2)]
ivs[r]=parent.iv[r]
ivinherit.push(r)
i+=1
end
break if i==2
end
with
Code:
i=0; stats=[PBStats::HP,PBStats::ATTACK,PBStats::DEFENSE,
PBStats::SPEED,PBStats::SPATK,PBStats::SPDEF]
stats.shuffle!
loop do
r=stats[i]
if !ivinherit.include?(r)
parent=[mother,father][rand(2)]
ivs[r]=parent.iv[r]
ivinherit.push(r)
end
i+=1
#Destiny Knot inheritance included
break if (i==2 && !(isConst?([mother,father][0].item,PBItems,:DESTINYKNOT) ||
isConst?([mother,father][1].item,PBItems,:DESTINYKNOT))) || i==4
end