Interface GameSpecificRules

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canLandInRegion​(Ship ship, Region region)
      This method checks if a ship can land in a specific region
      Unit getMaintainer​(Building b)
      Returns the unit that pays maintenance for a building.
      java.lang.Integer getMaxEntertain​(Region region)
      Returns the amount of max entertainment in a specific region.
      int getMaxHorsesRiding​(Unit u)
      Returns the maximum number of horses the unit can handle while riding.
      int getMaxHorsesWalking​(Unit u)
      Returns the maximum number of horses the unit can handle while walking.
      java.lang.Integer getMaxOldEntertain​(Region region)
      Returns the amount of max entertainment in a specific region.
      int getMaxTrade​(Region region)
      Returns the trade volume of the region
      java.lang.Integer getMaxWorkers​(Region region)
      Returns the amount of max workers in a specific region.
      int getPeasantMaintenance​(Region region)
      Returns the amount of silver that peasants need to survive.
      int getRecruitmentLimit​(Unit u, Race race)
      Returns the maximum possible number of recruits that the specified unit can recruit in the specified race.
      int getShipRange​(Ship s)
      Returns the current maximum range of a ship.
      int getSilverPerWeightUnit()
      Returns the number of silver pieces per weight unit (GE).
      int getTeachFactor()
      Returns the amount of students that one teacher can teach.
      int getWage​(Region region, Race race)
      Returns the wage for race in region or -1 if unknown or not applicable.
      boolean isAllied​(Faction faction, Faction ally, int aState)
      Returns true if the faction has the specified HELP state to an ally.
      boolean isCastle​(UnitContainerType type)
      Returns true if the type is a castle (Befestigung, Turm, ...)
      boolean isPooled​(Unit unit, ItemType type)
      Returns true if the specified unit can access the pool for the specified item.
      boolean isPooled​(Unit unit, StringID typeID)
      Returns true if the specified unit can access the pool for the specified item.
      boolean isShip​(Ship ship)
      Returns true, if the given ship is really a ship, because f.e. in Allanon a Karawane is marked as a ship, but it's travelling on land.
    • Method Detail

      • getMaxWorkers

        java.lang.Integer getMaxWorkers​(Region region)
        Returns the amount of max workers in a specific region.
      • getMaxEntertain

        java.lang.Integer getMaxEntertain​(Region region)
        Returns the amount of max entertainment in a specific region.
      • getMaxOldEntertain

        java.lang.Integer getMaxOldEntertain​(Region region)
        Returns the amount of max entertainment in a specific region.
      • isShip

        boolean isShip​(Ship ship)
        Returns true, if the given ship is really a ship, because f.e. in Allanon a Karawane is marked as a ship, but it's travelling on land.
      • canLandInRegion

        boolean canLandInRegion​(Ship ship,
                                Region region)
        This method checks if a ship can land in a specific region
      • getShipRange

        int getShipRange​(Ship s)
        Returns the current maximum range of a ship.
      • getWage

        int getWage​(Region region,
                    Race race)
        Returns the wage for race in region or -1 if unknown or not applicable.
      • getPeasantMaintenance

        int getPeasantMaintenance​(Region region)
        Returns the amount of silver that peasants need to survive.
      • getTeachFactor

        int getTeachFactor()
        Returns the amount of students that one teacher can teach.
      • getSilverPerWeightUnit

        int getSilverPerWeightUnit()
        Returns the number of silver pieces per weight unit (GE).
      • isCastle

        boolean isCastle​(UnitContainerType type)
        Returns true if the type is a castle (Befestigung, Turm, ...)
      • getMaxHorsesWalking

        int getMaxHorsesWalking​(Unit u)
        Returns the maximum number of horses the unit can handle while walking.
        Parameters:
        u -
      • getMaxHorsesRiding

        int getMaxHorsesRiding​(Unit u)
        Returns the maximum number of horses the unit can handle while riding.
        Parameters:
        u -
      • isPooled

        boolean isPooled​(Unit unit,
                         StringID typeID)
        Returns true if the specified unit can access the pool for the specified item.
        Parameters:
        unit -
        typeID - May be null. In that case, the status of the general material pool is returned.
        Returns:
        true if the unit can access the pool for the type.
      • isPooled

        boolean isPooled​(Unit unit,
                         ItemType type)
        Returns true if the specified unit can access the pool for the specified item.
        Parameters:
        unit -
        type - May be null. In that case, the status of the general material pool is returned.
        Returns:
        true if the unit can access the pool for the type.
      • getRecruitmentLimit

        int getRecruitmentLimit​(Unit u,
                                Race race)
        Returns the maximum possible number of recruits that the specified unit can recruit in the specified race.
        Parameters:
        u -
        race -
      • isAllied

        boolean isAllied​(Faction faction,
                         Faction ally,
                         int aState)
        Returns true if the faction has the specified HELP state to an ally.
      • getMaxTrade

        int getMaxTrade​(Region region)
        Returns the trade volume of the region
      • getMaintainer

        Unit getMaintainer​(Building b)
        Returns the unit that pays maintenance for a building.
        Returns:
        if there is no such building or the owner is not paying