Generalised form inheritance, making use of species flags

This commit is contained in:
Maruno17
2021-09-02 21:05:53 +01:00
parent 86cbcad382
commit cef3d08917
11 changed files with 266 additions and 21 deletions

View File

@@ -223,6 +223,13 @@ module GameData
return GameData::GenderRatio.get(@gender_ratio).single_gendered?
end
def base_form
@flags.each do |flag|
return $~[1].to_i if flag[/^DefaultForm(\d+)$/i]
end
return @form
end
def has_flag?(flag)
return @flags.any? { |f| f.downcase == flag.downcase }
end