Show / Hide Table of Contents

    Interface ICombatant

    Interface for all creatures that can participate in combat.

    Inherited Members
    ICreatureWithSkills.SkillChanged
    ICreatureWithSkills.Skills
    ICreatureThatSensesOthers.CreatureSensed
    ICreatureThatSensesOthers.CreatureSeen
    ICreatureThatSensesOthers.CreatureLost
    ICreatureThatSensesOthers.TrackedCreatures
    ICreatureThatSensesOthers.StartSensingCreature(ICreature)
    ICreatureThatSensesOthers.StopSensingCreature(ICreature)
    ICreature.StatChanged
    ICreature.Id
    ICreature.BloodType
    ICreature.Article
    ICreature.Name
    ICreature.CorpseTypeId
    ICreature.EmittedLightLevel
    ICreature.EmittedLightColor
    ICreature.Speed
    ICreature.Flags
    ICreature.Inventory
    ICreature.IsDead
    ICreature.CanWalk
    ICreature.Outfit
    ICreature.Direction
    ICreature.LastMovementCostModifier
    ICreature.WalkPlan
    ICreature.Stats
    ICreature.CanSee(ICreature)
    ICreature.CanSee(Location)
    IThing.LocationChanged
    IThing.TypeId
    IThing.UniqueId
    IThing.CanBeMoved
    IThing.TrackedEvents
    IThing.DescribeForLogger()
    IThing.StartTrackingEvent(IEvent, String)
    IThing.StopTrackingEvent(IEvent, String)
    IContainedThing.ParentContainer
    System.IEquatable<Fibula.Common.Contracts.Abstractions.IThing>.Equals(Fibula.Common.Contracts.Abstractions.IThing)
    ICloneableThing<IThing>.Clone()
    IThingContainer.FindThingAtIndex(Byte)
    IThingContainer.AddContent(IThingFactory, IThing, Byte)
    IThingContainer.RemoveContent(IThingFactory, IThing, Byte, Byte)
    IThingContainer.ReplaceContent(IThingFactory, IThing, IThing, Byte, Byte)
    ILocatable.Location
    ILocatable.CarryLocation
    System.IEquatable<Fibula.Creatures.Contracts.Abstractions.ICreature>.Equals(Fibula.Creatures.Contracts.Abstractions.ICreature)
    Namespace: Fibula.Mechanics.Contracts.Abstractions
    Assembly: Fibula.Mechanics.Contracts.dll
    Syntax
    public interface ICombatant : ICreatureWithSkills, ICreatureThatSensesOthers, ICreature, IThing, IContainedThing, IEquatable<IThing>, ICloneableThing<IThing>, IThingContainer, ILocatable, IEquatable<ICreature>

    Properties

    | Improve this Doc View Source

    AttackedBy

    Gets the collection of combatants currently attacking this combatant.

    Declaration
    IEnumerable<ICombatant> AttackedBy { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ICombatant>
    | Improve this Doc View Source

    AttackSpeed

    Gets a metric of how fast a combatant can earn an attack credit per combat round.

    Declaration
    decimal AttackSpeed { get; }
    Property Value
    Type Description
    System.Decimal
    | Improve this Doc View Source

    AutoAttackRange

    Gets the range that the auto attack has.

    Declaration
    byte AutoAttackRange { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    AutoAttackTarget

    Gets the current target combatant, if any.

    Declaration
    ICombatant AutoAttackTarget { get; }
    Property Value
    Type Description
    ICombatant
    | Improve this Doc View Source

    ChaseMode

    Gets or sets the chase mode selected by this combatant.

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

    ChaseTarget

    Gets the current target being chased, if any.

    Declaration
    ICreature ChaseTarget { get; }
    Property Value
    Type Description
    ICreature
    | Improve this Doc View Source

    DamageTakenInSession

    Gets the distribution of damage taken by any combatant that has attacked this combatant while the current combat is active.

    Declaration
    IEnumerable<(uint CombatantId, uint Damage)> DamageTakenInSession { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.ValueTuple<System.UInt32, System.UInt32>>
    | Improve this Doc View Source

    DefenseSpeed

    Gets a metric of how fast a combatant can earn a defense credit per combat round.

    Declaration
    decimal DefenseSpeed { get; }
    Property Value
    Type Description
    System.Decimal
    | Improve this Doc View Source

    FightMode

    Gets or sets the fight mode selected by this combatant.

    Declaration
    FightMode FightMode { get; set; }
    Property Value
    Type Description
    FightMode

    Methods

    | Improve this Doc View Source

    AddExperience(Int64)

    Adds a value of experience to the combatant, which can be positive or negative.

    Declaration
    void AddExperience(long expToGiveOrTake)
    Parameters
    Type Name Description
    System.Int64 expToGiveOrTake

    The experience value to give or take.

    | Improve this Doc View Source

    AddToCombatList(ICombatant)

    Adds a combatant to the combat list of this one.

    Declaration
    void AddToCombatList(ICombatant otherCombatant)
    Parameters
    Type Name Description
    ICombatant otherCombatant

    The combatant to add to the list.

    | Improve this Doc View Source

    ApplyDamage(DamageInfo, UInt32)

    Applies damage to the combatant, which is expected to apply reductions and protections.

    Declaration
    DamageInfo ApplyDamage(DamageInfo damageInfo, uint fromCombatantId = 0U)
    Parameters
    Type Name Description
    DamageInfo damageInfo

    The information of the damage to make, without reductions.

    System.UInt32 fromCombatantId

    The combatant from which to track the damage, if any.

    Returns
    Type Description
    DamageInfo

    The information about the damage actually done.

    | Improve this Doc View Source

    DecreaseAttackSpeed(Decimal)

    Decreases the attack speed of this combatant.

    Declaration
    void DecreaseAttackSpeed(decimal decreaseAmount)
    Parameters
    Type Name Description
    System.Decimal decreaseAmount

    The amount by which to decrease.

    | Improve this Doc View Source

    DecreaseDefenseSpeed(Decimal)

    Decreases the defense speed of this combatant.

    Declaration
    void DecreaseDefenseSpeed(decimal decreaseAmount)
    Parameters
    Type Name Description
    System.Decimal decreaseAmount

    The amount by which to decrease.

    | Improve this Doc View Source

    IncreaseAttackSpeed(Decimal)

    Increases the attack speed of this combatant.

    Declaration
    void IncreaseAttackSpeed(decimal increaseAmount)
    Parameters
    Type Name Description
    System.Decimal increaseAmount

    The amount by which to increase.

    | Improve this Doc View Source

    IncreaseDefenseSpeed(Decimal)

    Increases the defense speed of this combatant.

    Declaration
    void IncreaseDefenseSpeed(decimal increaseAmount)
    Parameters
    Type Name Description
    System.Decimal increaseAmount

    The amount by which to increase.

    | Improve this Doc View Source

    RemoveFromCombatList(ICombatant)

    Removes a combatant from the combat list of this one.

    Declaration
    void RemoveFromCombatList(ICombatant otherCombatant)
    Parameters
    Type Name Description
    ICombatant otherCombatant

    The combatant to remove from the list.

    | Improve this Doc View Source

    SetAttackedBy(ICombatant)

    Sets this combatant as being attacked by another.

    Declaration
    void SetAttackedBy(ICombatant combatant)
    Parameters
    Type Name Description
    ICombatant combatant

    The combatant attacking this one, if any.

    | Improve this Doc View Source

    SetAttackTarget(ICombatant)

    Sets the attack target of this combatant.

    Declaration
    bool SetAttackTarget(ICombatant otherCombatant)
    Parameters
    Type Name Description
    ICombatant otherCombatant

    The other target combatant, if any.

    Returns
    Type Description
    System.Boolean

    True if the target was actually changed, false otherwise.

    | Improve this Doc View Source

    SetFollowTarget(ICreature)

    Sets the chasing target of this combatant.

    Declaration
    bool SetFollowTarget(ICreature target)
    Parameters
    Type Name Description
    ICreature target

    The target to chase, if any.

    Returns
    Type Description
    System.Boolean

    True if the target was actually changed, false otherwise.

    | Improve this Doc View Source

    UnsetAttackedBy(ICombatant)

    Unsets this combatant as being attacked by another.

    Declaration
    void UnsetAttackedBy(ICombatant combatant)
    Parameters
    Type Name Description
    ICombatant combatant

    The combatant no longer attacking this one, if any.

    Events

    | Improve this Doc View Source

    AttackTargetChanged

    Event to call when the attack target changes.

    Declaration
    event OnAttackTargetChanged AttackTargetChanged
    Event Type
    Type Description
    OnAttackTargetChanged
    | Improve this Doc View Source

    Death

    Event to call when the combatant dies.

    Declaration
    event OnDeath Death
    Event Type
    Type Description
    OnDeath
    | Improve this Doc View Source

    FollowTargetChanged

    Event to call when the chase target changes.

    Declaration
    event OnFollowTargetChanged FollowTargetChanged
    Event Type
    Type Description
    OnFollowTargetChanged

    Extension Methods

    ContainerExtensions.GetParentContainerHierarchy(IContainedThing, Boolean)
    ContainerExtensions.GetParentContainerHierarchy(IThingContainer, Boolean)
    CreatureExtensions.CalculateStepDuration(ICreature, ITile)
    CreatureExtensions.TryRetrieveTrackedOperation(ICreature, String, out IOperation)
    CreatureExtensions.LocationInFront(ICreature)
    CreatureExtensions.RandomAdjacentDirection(ICreature, Boolean, Random)
    CreatureExtensions.RandomAdjacentLocation(ICreature, Boolean, Random)
    ThingExtensions.RemainingExhaustionTime(IThing, ExhaustionType, DateTimeOffset)
    ThingExtensions.HasCondition(IThing, ConditionType)
    ThingExtensions.IsExhausted(IThing, ExhaustionType)
    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.