Tweaks to comments, Destiny Knot no longer affects breeding in Gen 5 mechanics

This commit is contained in:
Maruno17
2022-05-17 23:52:53 +01:00
parent e12b6fde1d
commit 04f3b29fe3
14 changed files with 36 additions and 33 deletions

View File

@@ -173,15 +173,15 @@ class DayCare
end
end
# NOTE: Destiny Bond's effect is only in Gen 6+, but I don't think it's
# worth excluding it if the mechanics generation is 5 or lower.
def inherit_IVs(egg, mother, father)
# Get all stats
stats = []
GameData::Stat.each_main { |s| stats.push(s) }
# Get the number of stats to inherit
inherit_count = 3
inherit_count = 5 if mother.hasItem?(:DESTINYKNOT) || father.hasItem?(:DESTINYKNOT)
if Settings::MECHANICS_GENERATION >= 6
inherit_count = 5 if mother.hasItem?(:DESTINYKNOT) || father.hasItem?(:DESTINYKNOT)
end
# Inherit IV because of Power items (if both parents have a Power item,
# then only a random one of them is inherited)
power_items = [