Role.Inheritance

From Intrigues Wiki

Role Class - Inheritance Property

Overview

The Inheritance property in the Role class indicates whether a role is inheritable, meaning it can be passed down to another actor, typically upon the role holder's death or retirement.

Syntax

[field: SerializeField] public bool Inheritance { get; private set; }

Description

This property determines whether a role within a clan, family, or other entity can be transferred to another member, often as part of succession mechanics. For example, a "Leader" role might be inheritable, allowing for smooth transition of power.

Usage

Inheritance is a key property for roles that are integral to the narrative or organizational structure of the game's world, especially in systems where succession and lineage are important.

Example of Usage

public class CheckRoleInheritance : MonoBehaviour {
    void Start() {
        // Access the current player's role
        var playerRole = IM.Player.Role;

        if (playerRole != null) {
            // Check if the player's role is inheritable
            bool isRoleInheritable = playerRole.Inheritance;
            Debug.Log($"Player's Role Inheritable: {isRoleInheritable}");
        }
    }
}

Remarks

  • The Inheritance property is crucial for narrative-driven and strategy games where lineage and succession play a significant role in the game mechanics.
  • It allows developers to design intricate systems of power transfer, adding depth to clan or family dynamics within the game.