Class Race

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, Identifiable, Named, Unique

    public class Race
    extends UnitContainerType
    Holds rule relevant information about a race.
    • Constructor Detail

      • Race

        public Race​(StringID id)
        Creates a new Race object.
    • Method Detail

      • setRecruitmentCosts

        public void setRecruitmentCosts​(int r)
        Sets the price in silver to recruit one person of this race.
      • getRecruitmentCosts

        public int getRecruitmentCosts()
        Returns the cost for creating one person of this race.
      • setRecruitmentFactor

        public void setRecruitmentFactor​(int factor)
        Sets the number of persons that can be recruited for one peasant.
      • getRecruitmentFactor

        public int getRecruitmentFactor()
        Returns the number of persons that can be recruited for one peasant.
      • setMaintenance

        public void setMaintenance​(int maintenance)
        Set the amount of silver needed to sustain one person of this race in one week.
      • getMaintenance

        public int getMaintenance()
        Returns the amount of silver needed to sustain one person of this race in one week. The default value is 10.
      • setWeight

        public void setWeight​(float w)
        Set the weight of one person (in GE).
      • getWeight

        public float getWeight()
        Returns the weight of one person (in GE).
      • setCapacity

        public void setCapacity​(float c)
        Set the carrying capacity (in GE).
      • getCapacity

        public float getCapacity()
        Returns the carrying capacity (in GE).
      • getSkillBonus

        public int getSkillBonus​(SkillType skillType)
        Returns the bonus this race has on the specified skill.
        Returns:
        the bonus for the specified skill or 0, if no bonus-information is available for this skill.
      • setSkillBonus

        public void setSkillBonus​(SkillType skillType,
                                  int bonus)
        Sets the bonus this race has on the specified skill.
      • getSkillBonus

        public int getSkillBonus​(SkillType skillType,
                                 RegionType regionType)
        Returns the bonus this race has in certain region terrains.
      • setSkillBonus

        public void setSkillBonus​(SkillType skillType,
                                  RegionType regionType,
                                  int bonus)
        Sets the bonus this race has in certain region terrains.
      • getAdditiveShipBonus

        public int getAdditiveShipBonus()
        Returns the bonus that is added to the ship radius for this race.
        Returns:
        The bonus
      • setAdditiveShipBonus

        public void setAdditiveShipBonus​(int bon)
        Returns the bonus (or malus) that is added to the ship radius for this race.
        Parameters:
        bon -