Class CastleType

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

    public class CastleType
    extends BuildingType
    Stores attributes for a type of castle, that is, a building that influences the peasants.
    Version:
    $Revision: 203 $
    Author:
    $Author: $
    • Field Detail

      • fallBackMaterial

        protected boolean fallBackMaterial
    • Constructor Detail

      • CastleType

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

      • init

        public void init​(ItemType stone)
      • setPeasantWage

        public void setPeasantWage​(int w)
        Sets the wage of peasants that this castle type implies.
        Parameters:
        w -
      • getPeasantWage

        public int getPeasantWage()
        Returns the wage of peasants that this castle type implies.
      • setTradeTax

        public void setTradeTax​(int t)
        Sets the tax (in percent) that this castle type's owners get from trade.
        Parameters:
        t -
      • getTradeTax

        public int getTradeTax()
        Returns the tax (in percent) that this castle type's owners get from trade.
      • setMinSize

        public void setMinSize​(int s)
        Sets the minimum size of a building to qualify as this type.
      • getMinSize

        public int getMinSize()
        Returns the minimum size of this type.
      • compareTo

        public int compareTo​(java.lang.Object obj)
        Imposes a natural ordering on CastleType objects according to their minimum size attribute. If obj is an instance of class BuildingType the return value reflects the natural ordering of the ids of this object and obj.
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.Object>
        Specified by:
        compareTo in interface Identifiable
        Overrides:
        compareTo in class MagellanIdentifiableImpl
        See Also:
        Identifiable.compareTo(java.lang.Object)