Class MagellanFactionImpl

    • Field Detail

      • password

        protected java.lang.String password
        The password of this faction required for authentication of orders sent to the Eressea server.
      • email

        protected java.lang.String email
        The email address of the Faction
      • options

        protected Options options
        Optionen
      • score

        protected int score
        Punkte
      • averageScore

        protected int averageScore
        Durchschnittlicher Punktestand
      • persons

        protected int persons
        Personen
      • migrants

        protected int migrants
        aktuelle Migranten
      • maxMigrants

        protected int maxMigrants
        erlaubte Migranten
      • spellSchool

        protected java.lang.String spellSchool
        Magiegebite
      • hasGiveAlliance

        protected boolean hasGiveAlliance
        Indicates, if one priviliged faction has set the "GIVE" right to this faction. used for showing unit capacity only for items of such factions
      • heroes

        protected int heroes
        taken from the cr: actual amount of heroes (Fiete)
      • maxHeroes

        protected int maxHeroes
        taken from the cr: actual max amount of heroes (Fiete)
      • age

        protected int age
        taken from the cr: actual age of faction (Fiete)
      • trustLevelSetByUser

        public boolean trustLevelSetByUser
        true: indicates that this trustlevel was explicitly set by the user or read from a CR-file false: indicates that this is either a default level or was calculated by Magellan based on the alliances of the privileged factions.
      • messages

        protected java.util.List<Message> messages
        contains all messages for this faction as Message objects
      • errors

        protected java.util.List<java.lang.String> errors
        contains error messages for this faction as String objects
      • battles

        protected java.util.List<Battle> battles
        contains the battles, this faction had in the current round, as Battle objects
      • allies

        protected java.util.Map<EntityID,​Alliance> allies
        The allies of this faction are stored in this map with the faction ID of the ally as key and an Alliance object as value.
      • groups

        protected java.util.Map<IntegerID,​Group> groups
        The different groups in this faction. The map contains ID objects with the group id as keys and Group objects as values.
      • factionTreasury

        protected int factionTreasury
        The treasury of this faction. If the value is zero this feature is not set.
    • Constructor Detail

      • MagellanFactionImpl

        public MagellanFactionImpl​(EntityID id,
                                   GameData data)
        Creates a new Faction object with the specified id on top of the specified game data object.
    • Method Detail

      • setLocale

        public void setLocale​(java.util.Locale l)
        Assigns this faction a locale indicating the language of its report and the orders.
        Specified by:
        setLocale in interface Faction
      • getLocale

        public java.util.Locale getLocale()
        Returns the locale of this faction indicating the language of its report and orders.
        Specified by:
        getLocale in interface Faction
        Returns:
        My return null.
      • setRaceNamePrefix

        public void setRaceNamePrefix​(java.lang.String prefix)
        Sets the faction dependent prefix for the race name.
        Specified by:
        setRaceNamePrefix in interface Faction
      • getRaceNamePrefix

        public java.lang.String getRaceNamePrefix()
        Returns the faction dependent prefix for the race name.
        Specified by:
        getRaceNamePrefix in interface Faction
        Returns:
        May return null
      • getRace

        public Race getRace()
        Returns the race of this faction. This method is an alias for the getType() method.
        Specified by:
        getRace in interface Faction
      • getAge

        public int getAge()
        Returns the value of age.
        Specified by:
        getAge in interface Faction
        Returns:
        Returns age.
      • setAge

        public void setAge​(int age)
        Sets the value of age.
        Specified by:
        setAge in interface Faction
        Parameters:
        age - The value for age.
      • getAllies

        public java.util.Map<EntityID,​Alliance> getAllies()
        Returns the value of allies.
        Specified by:
        getAllies in interface Faction
        Returns:
        Returns allies.
      • setAllies

        public void setAllies​(java.util.Map<EntityID,​Alliance> allies)
        Sets the value of allies.
        Specified by:
        setAllies in interface Faction
        Parameters:
        allies - The value for allies.
      • getAverageScore

        public int getAverageScore()
        Returns the value of averageScore.
        Specified by:
        getAverageScore in interface Faction
        Returns:
        Returns averageScore.
      • setAverageScore

        public void setAverageScore​(int averageScore)
        Sets the value of averageScore.
        Specified by:
        setAverageScore in interface Faction
        Parameters:
        averageScore - The value for averageScore.
      • getBattles

        public java.util.List<Battle> getBattles()
        Returns the value of battles.
        Specified by:
        getBattles in interface Faction
        Returns:
        Returns battles.
      • setBattles

        public void setBattles​(java.util.List<Battle> battles)
        Sets the value of battles.
        Specified by:
        setBattles in interface Faction
        Parameters:
        battles - The value for battles.
      • getEmail

        public java.lang.String getEmail()
        Returns the value of email.
        Specified by:
        getEmail in interface Faction
        Returns:
        Returns email.
      • setEmail

        public void setEmail​(java.lang.String email)
        Sets the value of email.
        Specified by:
        setEmail in interface Faction
        Parameters:
        email - The value for email.
      • getErrors

        public java.util.List<java.lang.String> getErrors()
        Returns the value of errors.
        Specified by:
        getErrors in interface Faction
        Returns:
        Returns errors.
      • setErrors

        public void setErrors​(java.util.List<java.lang.String> errors)
        Sets the value of errors.
        Specified by:
        setErrors in interface Faction
        Parameters:
        errors - The value for errors.
      • getGroups

        public java.util.Map<IntegerID,​Group> getGroups()
        Returns the value of groups.
        Specified by:
        getGroups in interface Faction
        Returns:
        Returns groups.
      • setGroups

        public void setGroups​(java.util.Map<IntegerID,​Group> groups)
        Sets the value of groups.
        Specified by:
        setGroups in interface Faction
        Parameters:
        groups - The value for groups.
      • isHasGiveAlliance

        public boolean isHasGiveAlliance()
        Returns the value of hasGiveAlliance.
        Specified by:
        isHasGiveAlliance in interface Faction
        Returns:
        Returns hasGiveAlliance.
      • hasGiveAlliance

        public boolean hasGiveAlliance()
        Returns the value of hasGiveAlliance.
        Specified by:
        hasGiveAlliance in interface Faction
        Returns:
        Returns hasGiveAlliance.
      • setHasGiveAlliance

        public void setHasGiveAlliance​(boolean hasGiveAlliance)
        Sets the value of hasGiveAlliance.
        Specified by:
        setHasGiveAlliance in interface Faction
        Parameters:
        hasGiveAlliance - The value for hasGiveAlliance.
      • getHeroes

        public int getHeroes()
        Returns the value of heroes.
        Specified by:
        getHeroes in interface Faction
        Returns:
        Returns heroes.
      • setHeroes

        public void setHeroes​(int heroes)
        Sets the value of heroes.
        Specified by:
        setHeroes in interface Faction
        Parameters:
        heroes - The value for heroes.
      • getMaxHeroes

        public int getMaxHeroes()
        Returns the value of maxHeroes.
        Specified by:
        getMaxHeroes in interface Faction
        Returns:
        Returns maxHeroes.
      • setMaxHeroes

        public void setMaxHeroes​(int maxHeroes)
        Sets the value of maxHeroes.
        Specified by:
        setMaxHeroes in interface Faction
        Parameters:
        maxHeroes - The value for maxHeroes.
      • getMaxMigrants

        public int getMaxMigrants()
        Returns the value of maxMigrants.
        Specified by:
        getMaxMigrants in interface Faction
        Returns:
        Returns maxMigrants.
      • setMaxMigrants

        public void setMaxMigrants​(int maxMigrants)
        Sets the value of maxMigrants.
        Specified by:
        setMaxMigrants in interface Faction
        Parameters:
        maxMigrants - The value for maxMigrants.
      • getMessages

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

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

        public int getMigrants()
        Returns the value of migrants.
        Specified by:
        getMigrants in interface Faction
        Returns:
        Returns migrants.
      • setMigrants

        public void setMigrants​(int migrants)
        Sets the value of migrants.
        Specified by:
        setMigrants in interface Faction
        Parameters:
        migrants - The value for migrants.
      • getOptions

        public Options getOptions()
        Returns the value of options.
        Specified by:
        getOptions in interface Faction
        Returns:
        Returns options.
      • setOptions

        public void setOptions​(Options options)
        Sets the value of options.
        Specified by:
        setOptions in interface Faction
        Parameters:
        options - The value for options.
      • getPassword

        public java.lang.String getPassword()
        Returns the value of password.
        Specified by:
        getPassword in interface Faction
        Returns:
        Returns password.
      • setPassword

        public void setPassword​(java.lang.String password)
        Sets the value of password.
        Specified by:
        setPassword in interface Faction
        Parameters:
        password - The value for password.
      • getPersons

        public int getPersons()
        Returns the value of persons.
        Specified by:
        getPersons in interface Faction
        Returns:
        Returns persons.
      • setPersons

        public void setPersons​(int persons)
        Sets the value of persons.
        Specified by:
        setPersons in interface Faction
        Parameters:
        persons - The value for persons.
      • getScore

        public int getScore()
        Returns the value of score.
        Specified by:
        getScore in interface Faction
        Returns:
        Returns score.
      • setScore

        public void setScore​(int score)
        Sets the value of score.
        Specified by:
        setScore in interface Faction
        Parameters:
        score - The value for score.
      • getSpellSchool

        public java.lang.String getSpellSchool()
        Returns the value of spellSchool.
        Specified by:
        getSpellSchool in interface Faction
        Returns:
        Returns spellSchool.
      • setSpellSchool

        public void setSpellSchool​(java.lang.String spellSchool)
        Sets the value of spellSchool.
        Specified by:
        setSpellSchool in interface Faction
        Parameters:
        spellSchool - The value for spellSchool.
      • getTrustLevel

        public int getTrustLevel()
        Returns the value of trustLevel.
        Specified by:
        getTrustLevel in interface Faction
        Returns:
        Returns trustLevel.
      • setTrustLevel

        public void setTrustLevel​(int trustLevel)
        Sets the value of trustLevel.
        Specified by:
        setTrustLevel in interface Faction
        Parameters:
        trustLevel - The value for trustLevel.
      • isTrustLevelSetByUser

        public boolean isTrustLevelSetByUser()
        Returns the value of trustLevelSetByUser.
        Specified by:
        isTrustLevelSetByUser in interface Faction
        Returns:
        Returns trustLevelSetByUser.
      • setTrustLevelSetByUser

        public void setTrustLevelSetByUser​(boolean trustLevelSetByUser)
        Sets the value of trustLevelSetByUser.
        Specified by:
        setTrustLevelSetByUser in interface Faction
        Parameters:
        trustLevelSetByUser - The value for trustLevelSetByUser.
      • getTreasury

        public int getTreasury()
        Description copied from interface: Faction
        Returns the faction treasury for this faction. This value can be negative - that means this attribute is disabled (default).
        Specified by:
        getTreasury in interface Faction
        See Also:
        Faction.getTreasury()
      • setTreasury

        public void setTreasury​(int silver)
        Description copied from interface: Faction
        Sets the faction treasury for this faction. If the value is negative or zero, this attribute is disabled (default).
        Specified by:
        setTreasury in interface Faction
        See Also:
        Faction.setTreasury(int)