• Home
  • API reference
  • Source code
Show / Hide Table of Contents
  • osrlib.Controllers
    • GameManager
  • osrlib.Core
    • Ability
    • AbilityType
    • Adventure
    • Alignment
    • Being
    • BeingTargetingEventArgs
    • BeingTargetingEventHandler
    • CharacterClass
    • Dungeon
    • Encounter
    • GameAction
    • GameActionEventArgs
    • GameActionEventHandler
    • GamePosition
    • Modifier
    • Party
    • Quest
    • User
    • Weapon
    • WeaponType
  • osrlib.Dice
    • DiceHand
    • DiceRoll
    • DiceRolledEventArgs
    • DiceRolledEventHandler
    • Die
  • osrlib.SaveLoad
    • SaveLoadLocal
    • SaveType
  • osrlib.Tests
    • CoreRulesTests
    • DiceTests
    • PartyGenerator
    • ReadMeTests
    • SaveLoadTests
    • SteppedBattleTests
  • osrlib.Utility
    • Randomizer

Class Party

Represents a collection of Beings. Two Parties are pit against each other in combat.

Inheritance
System.Object
Party
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: osrlib.Core
Assembly: osrlib.Core.dll
Syntax
public class Party

Properties

| Improve this Doc View Source

IsAlive

Gets whether at least one member of this Party is alive. If there are no Beings alive in a Party, the Party is considered dead.

Declaration
public bool IsAlive { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LivingMembers

Gets a collection of Beings in this party that are alive.

Declaration
public ReadOnlyCollection<Being> LivingMembers { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<Being>
Remarks

To add or remove party members, use AddPartyMember(Being) and RemovePartyMember(Being).

| Improve this Doc View Source

Members

Gets a collection of all Beings in this party, living or otherwise.

Declaration
public List<Being> Members { get; }
Property Value
Type Description
System.Collections.Generic.List<Being>
Remarks

To add or remove party members, use AddPartyMember(Being) and RemovePartyMember(Being).

| Improve this Doc View Source

UserId

Gets or sets the owner of this party.

Declaration
public User UserId { get; set; }
Property Value
Type Description
User

Methods

| Improve this Doc View Source

AddPartyMember(Being)

Adds the specified Being to this Party.

Declaration
public void AddPartyMember(Being being)
Parameters
Type Name Description
Being being

The Being to add to this Party.

| Improve this Doc View Source

AddPartyMembers(IList<Being>)

Adds the specified Beings to the Party.

Declaration
public void AddPartyMembers(IList<Being> newMembers)
Parameters
Type Name Description
System.Collections.Generic.IList<Being> newMembers

The collection of Beings to add.

| Improve this Doc View Source

ClearParty()

Removes all Beings from this Party.

Declaration
public void ClearParty()
| Improve this Doc View Source

RemovePartyMember(Being)

Removes the specified Being from this Party.

Declaration
public void RemovePartyMember(Being being)
Parameters
Type Name Description
Being being

The Being to remove from this Party.

| Improve this Doc View Source

ToString()

Gets a string representation of the Party.

Declaration
public override string ToString()
Returns
Type Description
System.String

A multiline list of the party members and their health status.

Overrides
System.Object.ToString()

Events

| Improve this Doc View Source

Defeated

Event raised when the last living member of the party is Killed.

Declaration
public event EventHandler Defeated
Event Type
Type Description
System.EventHandler
  • Improve this Doc
  • View Source
Back to top Generated by DocFX