• 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 GameAction

The GameAction represents an act initiated by one entity on another, such as a melee attack from one Being on another, or a lockpick attempt from a Being on a locked treasure chest.

Inheritance
System.Object
GameAction
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)
System.Object.ToString()
Namespace: osrlib.Core
Assembly: osrlib.Core.dll
Syntax
public class GameAction

Constructors

| Improve this Doc View Source

GameAction(Being, Being)

Creates a new instance of the GameAction with the specified attacker and defender.

Declaration
public GameAction(Being source, Being target)
Parameters
Type Name Description
Being source

The Being performing the action.

Being target

The Being that is the target of the action.

Properties

| Improve this Doc View Source

ActionSource

Gets or sets the Being performing the action.

Declaration
public Being ActionSource { get; set; }
Property Value
Type Description
Being
| Improve this Doc View Source

ActionTarget

Gets or sets the target Being.

Declaration
public Being ActionTarget { get; set; }
Property Value
Type Description
Being
| Improve this Doc View Source

AttackRoll

Gets the attack roll result of the GameAction.

Declaration
public DiceRoll AttackRoll { get; }
Property Value
Type Description
DiceRoll

The attack roll associated with the GameAction's attack operation.

| Improve this Doc View Source

DamageRoll

Gets the damage roll result of the GameAction.

Declaration
public DiceRoll DamageRoll { get; }
Property Value
Type Description
DiceRoll

The damage roll associated with the GameAction's damage operation.

| Improve this Doc View Source

Victor

Gets the victor of the GameAction.

Declaration
public Being Victor { get; }
Property Value
Type Description
Being

Methods

| Improve this Doc View Source

PerformAction()

Performs the GameAction by applying the attacker's attack roll to the defender's defense value, and applying damage to the defender if the attack roll succeeded.

Declaration
public Being PerformAction()
Returns
Type Description
Being

The victor in the GameAction.

Remarks

The victor in the GameAction can be the defending GamePiece.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX