A faction is the base of all groupment of units in Northgard. It includes both the players and the neutral factions like Kobolds or Giants. Factions are usually displayed in the Faction list at the top left of the screen.

Variables

hiddenInPlayerList:Bool

Hide the faction from the Players list at the top-left of the screen.

read onlyincomingTrade:Array<TradingPost>

Any trade bringing resources to the player from others' trades.

read onlyoutgoingTrade:Array<TradingPost>

Any trade bringing krowns to the player in exchange of other resources.

Methods

asNeutral():NeutralFaction

Returns:

NeutralFaction return the faction as a NeutralFaction if possible, else null.

asPlayer():Player

Returns:

Player return the faction as a Player if possible, else null.

@:value({ round : true })getAlignment(with:Faction, round:Bool = true):Float

Get the total alignment value toward a faction.

Parameters:

with

The other faction

round

[Optional] Do we want a rounded value to the lowest integer (floor)

Returns:

Float

getFactionRelation(with:Faction):RelationData

Get the details of a relation with a faction. Returns null if no relations were yet to be formed.

Parameters:

with

The other faction

Returns:

RelationData

isDefeated():Bool

Returns:

Bool true if the faction lost all its zones.

isNeutral():Bool

Returns:

Bool true if the faction is a neutral faction.

isPlayer():Bool

Returns:

Bool true if the faction is a player.