Role.Capacity

From Intrigues Wiki

Role Class - Capacity Property

Overview

The Capacity property in the Role class specifies the maximum number of individuals who can hold a particular role within a clan or similar group.

Syntax

[field: SerializeField] public int Capacity { get; private set; }

Description

This property defines the limit on how many actors can simultaneously hold a given role. For example, there might only be one "Leader" role available in a clan.

Usage

Capacity is essential in scenarios where roles need to be restricted to a certain number of actors, thereby ensuring proper role management within clans or organizations.

Example of Usage

public class RoleCapacityCheck : MonoBehaviour {
    void Start() {
        // Retrieve a specific role, such as "Guard"
        var guardRole = IM.GetRole("Guard");

        if (guardRole != null) {
            // Display the capacity of the "Guard" role
            Debug.Log($"Capacity for Guard Role: {guardRole.Capacity}");
        }
    }
}

Remarks

  • This property is crucial for managing roles within clans, ensuring that the number of individuals in specific roles doesn't exceed logical or narrative bounds.
  • It is particularly relevant in strategic or role-based simulations where the number of roles like guards, advisors, or specialists is a critical aspect of gameplay and clan dynamics.