Domain: Guilds

A Guild is a group of players who come together to collaborate and face common challenges. It is a social entity that allows players to:

  • Join forces to fight boss enemies
  • Compete with other guilds via a global leaderboard
  • Organize themselves through roles and hierarchies
  • Invite new members and manage membership

Each guild member is identified by:

  • A unique Avatar ID that identifies them in the system
  • A Nickname visible to other members
  • A Role within the guild

Organizational Structure

Each guild has a hierarchical structure with three roles:

  1. Leader (Guild Master)
  2. The one who created the guild
  3. Has full control over the guild
  4. Can invite new members
  5. Can remove members
  6. Can promote members to other roles

  7. Officer

  8. Intermediate role of trust
  9. Obtained through promotion by the Leader
  10. Has no particular administrative powers

  11. Member

  12. Base role of all new members
  13. Can participate in battles
  14. Can leave the guild voluntarily

Invite System

The process of joining a guild works through an invite system:

  1. Only the Leader can send invites
  2. An invite is composed of:
  3. Unique invite ID
  4. ID of the inviting guild
  5. ID of the avatar to invite
  6. Invite expiration date

  7. Invites remain pending until:

  8. The invited player accepts
  9. They expire (via the expiration date)
  10. They are rejected

  11. When an invite is accepted:

  12. The invite is removed from the pending invites list
  13. The player becomes a guild member with the Member role

Valid State Transitions

For Guilds:

  • Created → Active (with members)
  • Active → With ongoing battle
  • Active → Cancelled

Guild Invariants

  1. Leader Uniqueness: each guild has exactly one Leader at the time of creation
  2. Authorization: only the Leader can:
  3. Send invites
  4. Remove members
  5. Promote members
  6. Duplicate Prevention: it is not possible to invite an avatar who is already a guild member
  7. Invite Validity: an invite can only be accepted by the correct recipient
  8. ID Immutability: the guild ID cannot be modified after creation