Table of Contents

Class StringItem

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

Constructors

StringItem(string, string, StringItemEffect)

public StringItem(string Name, string EffectString, StringItemEffect Effect)

Parameters

Name string
EffectString string
Effect StringItemEffect

Properties

Effect

public StringItemEffect Effect { get; init; }

Property Value

StringItemEffect

EffectString

public string EffectString { get; init; }

Property Value

string

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