Class MagellanRegionImpl

    • Field Detail

      • wage

        public int wage
        The wage persons can earn by working in this region. Unfortunately this is not the wage peasants earn but the wage a player's persons earn and to make it worse, the eressea server puts different values into CRs depending of the race of the 'owner' faction of the report. I.e. an orc faction gets a different value than factions of other races. Therefore there is a getPeasantWage() method returning how much a peasant earns in this region depending on the biggest castle.
      • oldWage

        public int oldWage
        the wage persons have been able to earn in the past.
      • herb

        public ItemType herb
        DOCUMENT-ME
      • herbAmount

        public java.lang.String herbAmount
        DOCUMENT-ME
      • orcInfested

        public boolean orcInfested
        Indicates that there are too many orcs in this region.
      • recruits

        public int recruits
        DOCUMENT-ME
      • oldRecruits

        public int oldRecruits
        DOCUMENT-ME
      • prices

        public java.util.Map<StringID,​LuxuryPrice> prices
        The prices for luxury goods in this region. The map contains the name of the luxury good as instance of class StringID as key and instances of class LuxuryPrice as values.
      • oldPrices

        public java.util.Map<StringID,​LuxuryPrice> oldPrices
        The prices of luxury goods of the last turn.
      • messages

        public java.util.List<Message> messages
        The messages for this region. The list consists of objects of class Message.
      • events

        public java.util.List<Message> events
        Special messages related to this region. The list contains instances of class Message with type -1 and only the text set.
      • playerMessages

        public java.util.List<Message> playerMessages
        Special messages related to this region. The list contains instances of class Message with type -1 and only the text set.
      • surroundings

        public java.util.List<Message> surroundings
        Special messages related to this region. The list contains instances of class Message with type -1 and only the text set.
      • travelThru

        public java.util.List<Message> travelThru
        Special messages related to this region. The list contains instances of class Message with type -1 and only the text set.
      • travelThruShips

        public java.util.List<Message> travelThruShips
        Special messages related to this region. The list contains instances of class Message with type -1 and only the text set.
    • Constructor Detail

      • MagellanRegionImpl

        public MagellanRegionImpl​(CoordinateID id,
                                  GameData data)
        Constructs a new Region object uniquely identifiable by the specified id.
    • Method Detail

      • fogOfWar

        public boolean fogOfWar()
        Description copied from interface: Region
        Returns true if this region has fog of war.
        Specified by:
        fogOfWar in interface Region
        See Also:
        Region.fogOfWar()
      • setFogOfWar

        public void setFogOfWar​(int fog)
        Description copied from interface: Region
        Sets the fog of war property. 1 means fog of war "on", 0 means "off" and -1 will re-compute the fog from privileged units in the region.
        Specified by:
        setFogOfWar in interface Region
        See Also:
        Region.setFogOfWar(int)
      • getModifiedPeasants

        public int getModifiedPeasants()
        Returns the number of modified persons after "give 0", recruit.
        Specified by:
        getModifiedPeasants in interface Region
        Returns:
        the number of modified persons after "give 0", recruit
      • modifiedRecruit

        public int modifiedRecruit()
        DOCUMENT-ME
        Specified by:
        modifiedRecruit in interface Region
      • setIsland

        public void setIsland​(Island i)
        Sets the island this region belongs to.
        Specified by:
        setIsland in interface Region
      • getIsland

        public Island getIsland()
        Returns the island this region belongs to.
        Specified by:
        getIsland in interface Region
      • getVisibilityString

        public java.lang.String getVisibilityString()
        A string constant indicating why this region is visible.
        Specified by:
        getVisibilityString in interface Region
        Returns:
        the string object or null, if the visibility is unspecified.
      • getVisibility

        public Region.Visibility getVisibility()
        Description copied from interface: Region
        Represents the quality of the visibility as an int value. 0..very poor - no info (->visibility=null)
        1..neighbour
        2..lighthouse
        3..travel
        4..qualified unit in region (->visibility=null)
        Specified by:
        getVisibility in interface Region
        See Also:
        Region.getVisibility()
      • setVisibilityString

        public void setVisibilityString​(java.lang.String vis)
        Sets a string constant indicating why this region is visible.
        Specified by:
        setVisibilityString in interface Region
        Parameters:
        vis - a String object or null to indicate that the visibility cannot be determined.
        See Also:
        Region.setVisibilityString(java.lang.String)
      • setVisibility

        public void setVisibility​(Region.Visibility vis)
        0..very poor - no info (->visibility=null)
        1..neighbour
        2..lighthouse
        3..travel
        4..qualified unit in region (->visibility=null)
        Specified by:
        setVisibility in interface Region
        Parameters:
        vis -
      • resources

        public java.util.Collection<RegionResource> resources()
        Returns all resources of this region.
        Specified by:
        resources in interface Region
      • removeResource

        public RegionResource removeResource​(RegionResource r)
        Removes the resource with the specified numerical id or the id of its item type from this region.
        Specified by:
        removeResource in interface Region
        Returns:
        the removed resource or null if no resource with the specified id exists in this region.
      • clearRegionResources

        public void clearRegionResources()
        Removes all resources from this region.
        Specified by:
        clearRegionResources in interface Region
      • schemes

        public java.util.Collection<Scheme> schemes()
        Returns all schemes of this region.
        Specified by:
        schemes in interface Region
      • addScheme

        public Scheme addScheme​(Scheme scheme)
        Adds a scheme to this region.
        Specified by:
        addScheme in interface Region
        Throws:
        java.lang.NullPointerException
      • clearSchemes

        public void clearSchemes()
        Removes all schemes from this region.
        Specified by:
        clearSchemes in interface Region
      • getScheme

        public Scheme getScheme​(ID id)
        Returns the scheme with the specified corodinate.
        Specified by:
        getScheme in interface Region
        Returns:
        the scheme object or null if no scheme with the specified ID exists in this region.
      • borders

        public java.util.Collection<Border> borders()
        Returns all borders of this region.
        Specified by:
        borders in interface Region
      • addBorder

        public Border addBorder​(Border border)
        Adds a border to this region.
        Specified by:
        addBorder in interface Region
        Throws:
        java.lang.NullPointerException - if border is null
      • clearBorders

        public void clearBorders()
        Removes all borders from this region.
        Specified by:
        clearBorders in interface Region
      • getBorder

        public Border getBorder​(ID key)
        Returns the border with the specified id.
        Specified by:
        getBorder in interface Region
        Returns:
        the border object or null if no border with the specified id exists in this region.
      • ships

        public java.util.Collection<Ship> ships()
        Returns an unmodifiable collection of all the ships in this container.
        Specified by:
        ships in interface Region
      • getShip

        public Ship getShip​(ID key)
        Retrieve a ship in this container by id.
        Specified by:
        getShip in interface Region
      • addShip

        public void addShip​(Ship s)
        Adds a ship to this container. This method should only be invoked by Ship.setXXX() methods.
        Specified by:
        addShip in interface Region
      • removeShip

        public Ship removeShip​(Ship s)
        Removes a ship from this container. This method should only be invoked by Ship.setXXX() methods.
        Specified by:
        removeShip in interface Region
      • buildings

        public java.util.Collection<Building> buildings()
        Returns an unmodifiable collection of all the buildings in this container.
        Specified by:
        buildings in interface Region
      • getBuilding

        public Building getBuilding​(ID key)
        Retrieve a building in this container by id.
        Specified by:
        getBuilding in interface Region
      • addBuilding

        public void addBuilding​(Building u)
        Adds a building to this container. This method should only be invoked by Building.setXXX() methods.
        Specified by:
        addBuilding in interface Region
      • removeBuilding

        public Building removeBuilding​(Building b)
        Removes a building from this container. This method should only be invoked by Building.setXXX() methods.
        Specified by:
        removeBuilding in interface Region
      • items

        @Deprecated
        public java.util.Collection<Item> items()
        Returns the items of all units that are stationed in this region and belonging to a faction that has at least a privileged trust level.
        Fiete 20061224: ...and the factions with "GIVE" alliances too.
        The amount of the items of a particular item type are added up, so two units with 5 pieces of silver yield one silver item of amount 10 here.
        Specified by:
        items in interface Region
      • maxRecruit

        public int maxRecruit()
        Returns the maximum number of persons that can be recruited in this region. If it was manually set, this value is returned, otherwise the value is calculated from the number of peasants.
        Specified by:
        maxRecruit in interface Region
        See Also:
        getRecruits(), maxRecruit(int)
      • maxOldRecruit

        public int maxOldRecruit()
        Returns the maximum number of persons that can be recruited in this region.
        Specified by:
        maxOldRecruit in interface Region
      • maxEntertain

        public int maxEntertain()
        Returns the silver that can be earned through entertainment in this region.
        Specified by:
        maxEntertain in interface Region
        See Also:
        Region.maxEntertain()
      • maxOldEntertain

        public int maxOldEntertain()
        Returns the silver that could be earned through entertainment in this region in the last week.
        Specified by:
        maxOldEntertain in interface Region
      • maxLuxuries

        public int maxLuxuries()
        Returns the maximum number of luxury items that can be bought in this region without a price penalty.
        Specified by:
        maxLuxuries in interface Region
      • maxOldLuxuries

        public int maxOldLuxuries()
        Returns the maximum number of luxury items that could be bought in this region without a price penalty.
        Specified by:
        maxOldLuxuries in interface Region
      • setOldLuxuries

        public void setOldLuxuries​(int amount)
        Description copied from interface: Region
        Sets the number of luxury items that could be bought last round.
        Specified by:
        setOldLuxuries in interface Region
        Parameters:
        amount - The new value
        See Also:
        Region.setOldLuxuries(int)
      • getPeasantWage

        public int getPeasantWage()
        Calculates the wage a peasant earns according to the biggest castle in this region. While the value of the wage field is directly taken from the report and may be biased by the race of the owner faction of that report, this function tries to determine the real wage a peasant can earn in this region. Wage for player persons can be derived from that value
        Specified by:
        getPeasantWage in interface Region
      • getCoordinate

        public CoordinateID getCoordinate()
        Returns the coordinate of this region. This method is only a type-safe short cut for retrieving and converting the ID object of this region.
        Specified by:
        getCoordinate in interface Region
      • getRegionType

        public RegionType getRegionType()
        Returns the RegionType of this region. This method is only a type-safe short cut for retrieving and converting the RegionType of this region.
        Specified by:
        getRegionType in interface Region
      • refreshUnitRelations

        public void refreshUnitRelations()
        Refreshes all the relations of all units in this region. It is preferable to call this method instead of refreshing the unit relations 'manually'.
        Specified by:
        refreshUnitRelations in interface Region
      • refreshUnitRelations

        @Deprecated
        public void refreshUnitRelations​(boolean forceRefresh)
        Deprecated.
        should be triggered implicitly by UnitOrdersEvents
        Refreshes all the relations of all units in this region. It is preferable to call this method instead of refreshing the unit relations 'manually'.
        Specified by:
        refreshUnitRelations in interface Region
        Parameters:
        forceRefresh - to enforce refreshment, false for one refreshment only
      • addGuard

        public void addGuard​(Unit u)
        add guarding Unit to region
        Specified by:
        addGuard in interface Region
      • getGuards

        public java.util.List<Unit> getGuards()
        get The List of guarding Units
        Specified by:
        getGuards in interface Region
      • setNeighbours

        @Deprecated
        public void setNeighbours​(java.util.Collection<CoordinateID> neighbours)
        Deprecated.
        Description copied from interface: Region
        Sets the collection of ids for reachable regions to neighbours. If neighbours is null they will be evaluated.
        Specified by:
        setNeighbours in interface Region
        Throws:
        java.lang.IllegalArgumentException - if one of the neighbours doesn't exist in the data.
        See Also:
        Region.setNeighbours(java.util.Collection)
      • addNeighbor

        public Region addNeighbor​(Direction dir,
                                  Region newNeighbor)
        Adds a neighbor in the specified direction.
        Specified by:
        addNeighbor in interface Region
        Returns:
        The previous neighbour at that direction
      • getNeighbours

        @Deprecated
        public java.util.Collection<CoordinateID> getNeighbours()
        Deprecated.
        better use getNeighbors().
        Returns a collection of ids for reachable neighbours. This may be set by setNeighbours() if neighbours is null it will be calculated from the game data). This function may be necessary for new xml reports.
        Specified by:
        getNeighbours in interface Region
      • getNeighbors

        public java.util.Map<Direction,​Region> getNeighbors()
        Description copied from interface: Region
        Returns a map for reachable neighbors. If the neighbors have not been set by setNeighbors(), it will be calculated from the game data).
        Specified by:
        getNeighbors in interface Region
        See Also:
        Region.getNeighbors()
      • getOceanWithCoast

        public int getOceanWithCoast()
        returns 1 if coast is nearby returns 0 if there es no coast
        Specified by:
        getOceanWithCoast in interface Region
        Returns:
        the ozeanWithCoast
      • getCoordX

        public int getCoordX()
        Used for replacers..showing coordinates of region
        Specified by:
        getCoordX in interface Region
      • getCoordY

        public int getCoordY()
        Used for replacers..showing coordinates of region
        Specified by:
        getCoordY in interface Region
      • getSigns

        public java.util.Collection<Sign> getSigns()
        Specified by:
        getSigns in interface Region
        Returns:
        the signLines
      • getEvents

        public java.util.List<Message> getEvents()
        Returns the value of events.
        Specified by:
        getEvents in interface Region
        Returns:
        Returns events.
      • setEvents

        public void setEvents​(java.util.List<Message> events)
        Sets the value of events.
        Specified by:
        setEvents in interface Region
        Parameters:
        events - The value for events.
      • getHerb

        public ItemType getHerb()
        Returns the value of herb.
        Specified by:
        getHerb in interface Region
        Returns:
        Returns herb.
      • setHerb

        public void setHerb​(ItemType herb)
        Sets the value of herb.
        Specified by:
        setHerb in interface Region
        Parameters:
        herb - The value for herb.
      • getHerbAmount

        public java.lang.String getHerbAmount()
        Returns the value of herbAmount.
        Specified by:
        getHerbAmount in interface Region
        Returns:
        Returns herbAmount.
      • setHerbAmount

        public void setHerbAmount​(java.lang.String herbAmount)
        Sets the value of herbAmount.
        Specified by:
        setHerbAmount in interface Region
        Parameters:
        herbAmount - The value for herbAmount.
      • getHorses

        public int getHorses()
        Returns the value of horses.
        Specified by:
        getHorses in interface Region
        Returns:
        Returns horses.
      • setHorses

        public void setHorses​(int horses)
        Sets the value of horses.
        Specified by:
        setHorses in interface Region
        Parameters:
        horses - The value for horses.
      • getIron

        public int getIron()
        Returns the value of iron.
        Specified by:
        getIron in interface Region
        Returns:
        Returns iron.
      • setIron

        public void setIron​(int iron)
        Sets the value of iron.
        Specified by:
        setIron in interface Region
        Parameters:
        iron - The value for iron.
      • getLaen

        public int getLaen()
        Returns the value of laen.
        Specified by:
        getLaen in interface Region
        Returns:
        Returns laen.
      • setLaen

        public void setLaen​(int laen)
        Sets the value of laen.
        Specified by:
        setLaen in interface Region
        Parameters:
        laen - The value for laen.
      • isMallorn

        public boolean isMallorn()
        Returns the value of mallorn.
        Specified by:
        isMallorn in interface Region
        Returns:
        Returns mallorn.
      • setMallorn

        public void setMallorn​(boolean mallorn)
        Sets the value of mallorn.
        Specified by:
        setMallorn in interface Region
        Parameters:
        mallorn - The value for mallorn.
      • getMessages

        public java.util.List<Message> getMessages()
        Returns the value of messages.
        Specified by:
        getMessages in interface Region
        Returns:
        Returns messages.
      • setMessages

        public void setMessages​(java.util.List<Message> messages)
        Sets the value of messages.
        Specified by:
        setMessages in interface Region
        Parameters:
        messages - The value for messages.
      • getOldHorses

        public int getOldHorses()
        Returns the value of oldHorses.
        Specified by:
        getOldHorses in interface Region
        Returns:
        Returns oldHorses.
      • setOldHorses

        public void setOldHorses​(int oldHorses)
        Sets the value of oldHorses.
        Specified by:
        setOldHorses in interface Region
        Parameters:
        oldHorses - The value for oldHorses.
      • getOldIron

        public int getOldIron()
        Returns the value of oldIron.
        Specified by:
        getOldIron in interface Region
        Returns:
        Returns oldIron.
      • setOldIron

        public void setOldIron​(int oldIron)
        Sets the value of oldIron.
        Specified by:
        setOldIron in interface Region
        Parameters:
        oldIron - The value for oldIron.
      • getOldLaen

        public int getOldLaen()
        Returns the value of oldLaen.
        Specified by:
        getOldLaen in interface Region
        Returns:
        Returns oldLaen.
      • setOldLaen

        public void setOldLaen​(int oldLaen)
        Sets the value of oldLaen.
        Specified by:
        setOldLaen in interface Region
        Parameters:
        oldLaen - The value for oldLaen.
      • getOldPeasants

        public int getOldPeasants()
        Returns the value of oldPeasants.
        Specified by:
        getOldPeasants in interface Region
        Returns:
        Returns oldPeasants.
      • setOldPeasants

        public void setOldPeasants​(int oldPeasants)
        Sets the value of oldPeasants.
        Specified by:
        setOldPeasants in interface Region
        Parameters:
        oldPeasants - The value for oldPeasants.
      • getOldPrices

        public java.util.Map<StringID,​LuxuryPrice> getOldPrices()
        Returns the value of oldPrices.
        Specified by:
        getOldPrices in interface Region
        Returns:
        Returns oldPrices.
      • setOldPrices

        public void setOldPrices​(java.util.Map<StringID,​LuxuryPrice> oldPrices)
        Sets the value of oldPrices.
        Specified by:
        setOldPrices in interface Region
        Parameters:
        oldPrices - The value for oldPrices.
      • getOldRecruits

        public int getOldRecruits()
        Returns the value of oldRecruits.
        Specified by:
        getOldRecruits in interface Region
        Returns:
        Returns oldRecruits.
      • setOldRecruits

        public void setOldRecruits​(int oldRecruits)
        Sets the value of oldRecruits.
        Specified by:
        setOldRecruits in interface Region
        Parameters:
        oldRecruits - The value for oldRecruits.
      • getOldSilver

        public int getOldSilver()
        Returns the value of oldSilver.
        Specified by:
        getOldSilver in interface Region
        Returns:
        Returns oldSilver.
      • setOldSilver

        public void setOldSilver​(int oldSilver)
        Sets the value of oldSilver.
        Specified by:
        setOldSilver in interface Region
        Parameters:
        oldSilver - The value for oldSilver.
      • getOldSprouts

        public int getOldSprouts()
        Returns the value of oldSprouts.
        Specified by:
        getOldSprouts in interface Region
        Returns:
        Returns oldSprouts.
      • setOldSprouts

        public void setOldSprouts​(int oldSprouts)
        Sets the value of oldSprouts.
        Specified by:
        setOldSprouts in interface Region
        Parameters:
        oldSprouts - The value for oldSprouts.
      • getOldStones

        public int getOldStones()
        Returns the value of oldStones.
        Specified by:
        getOldStones in interface Region
        Returns:
        Returns oldStones.
      • setOldStones

        public void setOldStones​(int oldStones)
        Sets the value of oldStones.
        Specified by:
        setOldStones in interface Region
        Parameters:
        oldStones - The value for oldStones.
      • getOldTrees

        public int getOldTrees()
        Returns the value of oldTrees.
        Specified by:
        getOldTrees in interface Region
        Returns:
        Returns oldTrees.
      • setOldTrees

        public void setOldTrees​(int oldTrees)
        Sets the value of oldTrees.
        Specified by:
        setOldTrees in interface Region
        Parameters:
        oldTrees - The value for oldTrees.
      • getOldWage

        public int getOldWage()
        Returns the value of oldWage.
        Specified by:
        getOldWage in interface Region
        Returns:
        Returns oldWage.
      • setOldWage

        public void setOldWage​(int oldWage)
        Sets the value of oldWage.
        Specified by:
        setOldWage in interface Region
        Parameters:
        oldWage - The value for oldWage.
      • isOrcInfested

        public boolean isOrcInfested()
        Returns the value of orcInfested.
        Specified by:
        isOrcInfested in interface Region
        Returns:
        Returns orcInfested.
      • setOrcInfested

        public void setOrcInfested​(boolean orcInfested)
        Sets the value of orcInfested.
        Specified by:
        setOrcInfested in interface Region
        Parameters:
        orcInfested - The value for orcInfested.
      • getPeasants

        public int getPeasants()
        Returns the value of peasants.
        Specified by:
        getPeasants in interface Region
        Returns:
        Returns peasants.
      • setPeasants

        public void setPeasants​(int peasants)
        Sets the value of peasants.
        Specified by:
        setPeasants in interface Region
        Parameters:
        peasants - The value for peasants.
      • getPlayerMessages

        public java.util.List<Message> getPlayerMessages()
        Returns the value of playerMessages.
        Specified by:
        getPlayerMessages in interface Region
        Returns:
        Returns playerMessages.
      • setPlayerMessages

        public void setPlayerMessages​(java.util.List<Message> playerMessages)
        Sets the value of playerMessages.
        Specified by:
        setPlayerMessages in interface Region
        Parameters:
        playerMessages - The value for playerMessages.
      • getPrices

        public java.util.Map<StringID,​LuxuryPrice> getPrices()
        Returns the value of prices.
        Specified by:
        getPrices in interface Region
        Returns:
        Returns prices.
      • setPrices

        public void setPrices​(java.util.Map<StringID,​LuxuryPrice> prices)
        Sets the value of prices.
        Specified by:
        setPrices in interface Region
        Parameters:
        prices - The value for prices.
      • getRecruits

        public int getRecruits()
        Returns the value of recruits if it is in the report, -1 otherwise.
        Specified by:
        getRecruits in interface Region
        Returns:
        Returns recruits.
        See Also:
        maxRecruit(), maxRecruit(int)
      • setRecruits

        public void setRecruits​(int recruits)
        Sets the value of recruits.
        Specified by:
        setRecruits in interface Region
        Parameters:
        recruits - The value for recruits.
      • getSilver

        public int getSilver()
        Returns the value of silver.
        Specified by:
        getSilver in interface Region
        Returns:
        Returns silver.
      • setSilver

        public void setSilver​(int silver)
        Sets the value of silver.
        Specified by:
        setSilver in interface Region
        Parameters:
        silver - The value for silver.
      • getSprouts

        public int getSprouts()
        Returns the value of sprouts.
        Specified by:
        getSprouts in interface Region
        Returns:
        Returns sprouts.
      • setSprouts

        public void setSprouts​(int sprouts)
        Sets the value of sprouts.
        Specified by:
        setSprouts in interface Region
        Parameters:
        sprouts - The value for sprouts.
      • getStones

        public int getStones()
        Returns the value of stones.
        Specified by:
        getStones in interface Region
        Returns:
        Returns stones.
      • setStones

        public void setStones​(int stones)
        Sets the value of stones.
        Specified by:
        setStones in interface Region
        Parameters:
        stones - The value for stones.
      • getSurroundings

        public java.util.List<Message> getSurroundings()
        Returns the value of surroundings.
        Specified by:
        getSurroundings in interface Region
        Returns:
        Returns surroundings.
      • setSurroundings

        public void setSurroundings​(java.util.List<Message> surroundings)
        Sets the value of surroundings.
        Specified by:
        setSurroundings in interface Region
        Parameters:
        surroundings - The value for surroundings.
      • getTravelThru

        public java.util.List<Message> getTravelThru()
        Returns the value of travelThru.
        Specified by:
        getTravelThru in interface Region
        Returns:
        returns list of DURCHREISE messages or null
      • setTravelThru

        public void setTravelThru​(java.util.List<Message> travelThru)
        Sets the value of travelThru.
        Specified by:
        setTravelThru in interface Region
        Parameters:
        travelThru - The value for travelThru.
      • getTravelThruShips

        public java.util.List<Message> getTravelThruShips()
        Returns the value of travelThruShips.
        Specified by:
        getTravelThruShips in interface Region
        Returns:
        returns list of DURCHSCHIFFUNG messages or null
      • setTravelThruShips

        public void setTravelThruShips​(java.util.List<Message> travelThruShips)
        Sets the value of travelThruShips.
        Specified by:
        setTravelThruShips in interface Region
        Parameters:
        travelThruShips - The value for travelThruShips.
      • getTrees

        public int getTrees()
        Returns the value of trees.
        Specified by:
        getTrees in interface Region
        Returns:
        Returns trees.
      • setTrees

        public void setTrees​(int trees)
        Sets the value of trees.
        Specified by:
        setTrees in interface Region
        Parameters:
        trees - The value for trees.
      • getWage

        public int getWage()
        Returns the value of wage.
        Specified by:
        getWage in interface Region
        Returns:
        Returns wage.
      • setWage

        public void setWage​(int wage)
        Sets the value of wage.
        Specified by:
        setWage in interface Region
        Parameters:
        wage - The value for wage.
      • getCoastBitMap

        public java.lang.Integer getCoastBitMap()
        Description copied from interface: Region
        The returned integer is an BitMap representing the info, if neighboring regions are ozean or not-
        BitMask 1: dir = 0
        BitMask 2: dir = 1
        BitMask 4: dir = 2 ....
        BitMask 64: random bit 1 (for variable effects like ice)
        BitMask 128: random bit 2
        Bit = 1 -> there is land!
        Bit = 0 -> there is ozean!
        Specified by:
        getCoastBitMap in interface Region
        Returns:
        an Integer as BitMap
        See Also:
        Region.getCoastBitMap()
      • setCoastBitMap

        public void setCoastBitMap​(java.lang.Integer bitMap)
        Description copied from interface: Region
        The given integer is an BitMap representing the info, if neighboring regions are ozean or not.
        BitMask 1: dir = 0
        BitMask 2: dir = 1
        BitMask 4: dir = 2 ....
        BitMask 64: random bit 1 (for variable effects like ice)
        BitMask 128: random bit 2
        Bit = 1 -> there is land!
        Bit = 0 -> there is ozean!
        Specified by:
        setCoastBitMap in interface Region
        Parameters:
        bitMap - an Integer as BitMap
        See Also:
        Region.setCoastBitMap(java.lang.Integer)
      • hasUID

        public boolean hasUID()
        Description copied from interface: Region
        Returns true if a UID has been set.
        Specified by:
        hasUID in interface Region
      • getUID

        public long getUID()
        Returns the value of uID, the unique regionID generated and sent by the eressea server (starting in turn 570)
        Specified by:
        getUID in interface Region
        Returns:
        Returns uID.
      • setUID

        public void setUID​(long uid)
        Sets the value of uID, the unique regionID generated and sent by the eressea server (starting in turn 570)
        Specified by:
        setUID in interface Region
        Parameters:
        uid - The value for uID.
      • getMorale

        public int getMorale()
        Description copied from interface: Region
        Gets the region's morale (from 0 to 5(?)) or -1 if not defined or known.
        Specified by:
        getMorale in interface Region
        See Also:
        Region.getMorale()
      • setMorale

        public void setMorale​(int morale)
        Description copied from interface: Region
        Sets the region's morale (from 0 to 5(?)).
        Specified by:
        setMorale in interface Region
        See Also:
        Region.setMorale(int)
      • getMourning

        public int getMourning()
        Description copied from interface: Region
        Returns the current mourning state or -1 if unknown.
        Specified by:
        getMourning in interface Region
        See Also:
        Region.getMourning()
      • getMaintained

        public java.util.Set<Unit> getMaintained()
        Description copied from interface: Region
        Returns a set of units that may be new in this region and thus need to be maintained. Does not include units from UnitContainer.units(), but may contain units that won't actually be in this region. Check Unit.getNewRegion() to verify.
        Specified by:
        getMaintained in interface Region
        Returns:
        The set of additional units
        See Also:
        Region.getMaintained()