JoinClan

From Intrigues Wiki

JoinClan Methods in Actor Class

Overview

The JoinClan methods in the Actor class are designed to enable an actor to join a specified clan, either through a direct Clan object or by using a clan name or ID. These methods are important in games where clan affiliations play a significant role in the narrative, character development, or gameplay mechanics.

Method 1: Join Clan by Object

Syntax

public void JoinClan(Clan clan)

Parameters

  • clan (Clan): The Clan object that the actor will join.

Description

This method allows an actor to join a clan represented by a Clan object. It is used when the specific clan to be joined is directly available as an object within the game.

Usage Example

public Actor john;

// John joins the Dragon Clan
john.JoinClan(dragonClan);

In this example, the actor John joins the Dragon Clan. The clan is represented by a Clan object, allowing for a direct association.

Method 2: Join Clan by Name or ID

Syntax

public void JoinClan(string clanNameOrId)

Parameters

  • clanNameOrId (string): Name or ID of the clan to join.

Description

This method enables the actor to join a clan based on the clan's name or ID. It is useful when the specific Clan object is not directly accessible, and the clan is instead identified by its name or ID.

Usage Example

string wolfClanName = "Wolf Clan";
public Actor emma;

// Emma joins the Wolf Clan using the clan's name
emma.JoinClan(wolfClanName);

In this example, Emma joins the Wolf Clan using just the clan's name. This method is particularly useful in scenarios where clans need to be referenced or modified dynamically based on game events or player choices.

Remarks

  • Both methods enhance the game's dynamics by allowing characters to change or affirm their clan affiliations, impacting their role in the game world.
  • These methods are essential in games with a focus on social structures, allegiances, and clan-based conflicts or alliances.
  • The ability to join clans either by object or by name/ID adds flexibility and depth to the game's clan system, catering to various gameplay scenarios and narrative needs.