Refactored checking whether a Pokémon/species is single gendered, tweaked console message.

This commit is contained in:
Maruno17
2021-08-31 00:17:30 +01:00
parent 0405497868
commit 3c88c897f0
7 changed files with 38 additions and 24 deletions

View File

@@ -26,6 +26,12 @@ module GameData
def name
return _INTL(@real_name)
end
# @return [Boolean] whether a Pokémon with this gender ratio can only ever
# be a single gender
def single_gendered?
return @female_chance.nil?
end
end
end

View File

@@ -216,6 +216,10 @@ module GameData
return pbGetMessageFromHash(MessageTypes::Entries, @real_pokedex_entry)
end
def single_gendered?
return GameData::GenderRatio.get(@gender_ratio).single_gendered?
end
def apply_metrics_to_sprite(sprite, index, shadow = false)
if shadow
if (index & 1) == 1 # Foe Pokémon