Table of Contents

Class CappedItem

Namespace
RandomizerCore.LogicItems
Assembly
RandomizerCore.dll
public sealed record CappedItem : LogicItem, ILogicItem, ILogicItemTemplate, IEquatable<LogicItem>, IConditionalItem, IEquatable<CappedItem>
Inheritance
CappedItem
Implements
Inherited Members

Constructors

CappedItem(string, TermValue[], TermValue)

public CappedItem(string Name, TermValue[] Effects, TermValue Cap)

Parameters

Name string
Effects TermValue[]
Cap TermValue

Properties

Cap

public TermValue Cap { get; init; }

Property Value

TermValue

Effects

public TermValue[] Effects { get; init; }

Property Value

TermValue[]

Methods

AddTo(ProgressionManager)

Directly adds the item to the pm. This does not invoke the pm events, so it is best to implement this explicitly and use pm.Add instead.

public override void AddTo(ProgressionManager pm)

Parameters

pm ProgressionManager

CheckForEffect(ProgressionManager)

Returns false if AddTo(ProgressionManager) will not modify the ProgressionManager, otherwise returns true.

public bool CheckForEffect(ProgressionManager pm)

Parameters

pm ProgressionManager

Returns

bool

GetAffectedTerms()

Returns the terms potentially modified by the item.

public override IEnumerable<Term> GetAffectedTerms()

Returns

IEnumerable<Term>

TryAddTo(ProgressionManager)

Equivalent to calling CheckForEffect(ProgressionManager), then AddTo(ProgressionManager), and returning the result of the former.

public bool TryAddTo(ProgressionManager pm)

Parameters

pm ProgressionManager

Returns

bool