Interface Faction

    • Field Detail

      • TL_DEFAULT

        static final int TL_DEFAULT
        Any faction has this trust level if not otherwise specified.
        See Also:
        Constant Field Values
      • TL_PRIVILEGED

        static final int TL_PRIVILEGED
        This trust level indicates that units of this faction may receive new orders and similar privileges.
        See Also:
        Constant Field Values
    • Method Detail

      • isPrivileged

        boolean isPrivileged()
        Returns true iff this faction has trustlevel at least 100 TL_PRIVILEGED
      • setLocale

        void setLocale​(java.util.Locale l)
        Assigns this faction a locale indicating the language of its report and the orders.
      • getLocale

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

        void setRaceNamePrefix​(java.lang.String prefix)
        Sets the faction dependent prefix for the race name.
      • getRaceNamePrefix

        java.lang.String getRaceNamePrefix()
        Returns the faction dependent prefix for the race name.
        Returns:
        May return null
      • getRace

        Race getRace()
        Returns the race of this faction. This method is an alias for the getType() method.
      • toString

        java.lang.String toString()
        Returns a string representation of this faction.
        Overrides:
        toString in class java.lang.Object
      • getAge

        int getAge()
        Returns the value of age.
        Returns:
        Returns age.
      • setAge

        void setAge​(int age)
        Sets the value of age.
        Parameters:
        age - The value for age.
      • getAllies

        java.util.Map<EntityID,​Alliance> getAllies()
        Returns the value of allies (HELP statuses).
        Returns:
        Returns allies. May return null
      • setAllies

        void setAllies​(java.util.Map<EntityID,​Alliance> allies)
        Sets the value of allies (HELP statuses).
        Parameters:
        allies - The value for allies. May be null.
      • getAlliance

        AllianceGroup getAlliance()
        Returns the alliance this faction is a member of or null (E3 ALLIANCE order).
      • setAlliance

        void setAlliance​(AllianceGroup alliance)
        Sets the alliance this faction is a member of (E3 ALLIANCE order).
      • getAverageScore

        int getAverageScore()
        Returns the value of averageScore.
        Returns:
        Returns averageScore.
      • setAverageScore

        void setAverageScore​(int averageScore)
        Sets the value of averageScore.
        Parameters:
        averageScore - The value for averageScore.
      • getBattles

        java.util.List<Battle> getBattles()
        Returns the value of battles.
        Returns:
        Returns battles. May return null.
      • setBattles

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

        java.lang.String getEmail()
        Returns the value of email.
        Returns:
        Returns email.
      • setEmail

        void setEmail​(java.lang.String email)
        Sets the value of email.
        Parameters:
        email - The value for email.
      • getErrors

        java.util.List<java.lang.String> getErrors()
        Returns the value of errors.
        Returns:
        Returns errors. May return null.
      • setErrors

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

        java.util.Map<IntegerID,​Group> getGroups()
        Returns the value of groups.
        Returns:
        Returns groups. May return null.
      • setGroups

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

        boolean isHasGiveAlliance()
        Returns the value of hasGiveAlliance.
        Returns:
        Returns hasGiveAlliance.
      • setHasGiveAlliance

        void setHasGiveAlliance​(boolean hasGiveAlliance)
        Sets the value of hasGiveAlliance.
        Parameters:
        hasGiveAlliance - The value for hasGiveAlliance.
      • getHeroes

        int getHeroes()
        Returns the value of heroes.
        Returns:
        Returns heroes.
      • setHeroes

        void setHeroes​(int heroes)
        Sets the value of heroes.
        Parameters:
        heroes - The value for heroes.
      • getMaxHeroes

        int getMaxHeroes()
        Returns the value of maxHeroes.
        Returns:
        Returns maxHeroes.
      • setMaxHeroes

        void setMaxHeroes​(int maxHeroes)
        Sets the value of maxHeroes.
        Parameters:
        maxHeroes - The value for maxHeroes.
      • getMaxMigrants

        int getMaxMigrants()
        Returns the value of maxMigrants.
        Returns:
        Returns maxMigrants.
      • setMaxMigrants

        void setMaxMigrants​(int maxMigrants)
        Sets the value of maxMigrants.
        Parameters:
        maxMigrants - The value for maxMigrants.
      • getMessages

        java.util.List<Message> getMessages()
        Returns the value of messages.
        Returns:
        Returns messages. May return null.
      • setMessages

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

        int getMigrants()
        Returns the value of migrants.
        Returns:
        Returns migrants.
      • setMigrants

        void setMigrants​(int migrants)
        Sets the value of migrants.
        Parameters:
        migrants - The value for migrants.
      • getOptions

        Options getOptions()
        Returns the value of options.
        Returns:
        Returns options. May return null.
      • setOptions

        void setOptions​(Options options)
        Sets the value of options.
        Parameters:
        options - The value for options.
      • getPassword

        java.lang.String getPassword()
        Returns the value of password.
        Returns:
        Returns password. Returns null if no password is known.
      • setPassword

        void setPassword​(java.lang.String password)
        Sets the value of password.
        Parameters:
        password - The value for password.
      • getPersons

        int getPersons()
        Returns the value of persons.
        Returns:
        Returns persons.
      • setPersons

        void setPersons​(int persons)
        Sets the value of persons.
        Parameters:
        persons - The value for persons.
      • getScore

        int getScore()
        Returns the value of score.
        Returns:
        Returns score.
      • setScore

        void setScore​(int score)
        Sets the value of score.
        Parameters:
        score - The value for score.
      • getSpellSchool

        java.lang.String getSpellSchool()
        Returns the value of spellSchool.
        Returns:
        Returns spellSchool. May return null.
      • setSpellSchool

        void setSpellSchool​(java.lang.String spellSchool)
        Sets the value of spellSchool.
        Parameters:
        spellSchool - The value for spellSchool.
      • getTrustLevel

        int getTrustLevel()
        Returns the value of trustLevel.
        Returns:
        Returns trustLevel.
      • setTrustLevel

        void setTrustLevel​(int trustLevel)
        Sets the value of trustLevel.
        Parameters:
        trustLevel - The value for trustLevel.
      • isTrustLevelSetByUser

        boolean isTrustLevelSetByUser()
        Returns the value of trustLevelSetByUser.
        Returns:
        Returns trustLevelSetByUser.
      • setTrustLevelSetByUser

        void setTrustLevelSetByUser​(boolean trustLevelSetByUser)
        Sets the value of trustLevelSetByUser.
        Parameters:
        trustLevelSetByUser - The value for trustLevelSetByUser.
      • hasGiveAlliance

        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
      • setTreasury

        void setTreasury​(int silver)
        Sets the faction treasury for this faction. If the value is negative or zero, this attribute is disabled (default).
      • getTreasury

        int getTreasury()
        Returns the faction treasury for this faction. This value can be negative - that means this attribute is disabled (default).