Class Party
Represents a collection of Beings. Two Parties are pit against each other in combat.
Inheritance
Inherited Members
Namespace: osrlib.Core
Assembly: osrlib.Core.dll
Syntax
public class Party
Properties
| Improve this Doc View SourceIsAlive
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 |
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).
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).
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 SourceAddPartyMember(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. |
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. |
ClearParty()
Removes all Beings from this Party.
Declaration
public void ClearParty()
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. |
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
Events
| Improve this Doc View SourceDefeated
Event raised when the last living member of the party is Killed.
Declaration
public event EventHandler Defeated
Event Type
Type | Description |
---|---|
System.EventHandler |