Class RunState
- Namespace
- SurvivorsMaker.Run
- Assembly
- SurvivorsMaker.Run.dll
Everything that persists between waves. Systems in Run/ read and write it.
public sealed class RunState
- Inheritance
-
RunState
- Inherited Members
Constructors
RunState()
public RunState()
Fields
Arena
public ArenaDef Arena
Field Value
BanishedItemIds
public List<string> BanishedItemIds
Field Value
BanishedWeaponIds
public List<string> BanishedWeaponIds
Field Value
BanishesUsed
public int BanishesUsed
Field Value
CarriedHealth
Field mode: health carried into the next wave; 0 = start full.
public int CarriedHealth
Field Value
CarriedTriggerCounters
public readonly List<TriggerCounterSnapshot> CarriedTriggerCounters
Field Value
Character
public CharacterDef Character
Field Value
CharacterEffectStates
public List<EffectLeaseState> CharacterEffectStates
Field Value
Choices
public readonly List<LevelUpChoice> Choices
Field Value
CombatWallet
public StatWallet CombatWallet
Field Value
Content
public RunContent Content
Field Value
ContinuingEffects
public List<WaveEffectLease> ContinuingEffects
Field Value
Currency
public int Currency
Field Value
Difficulty
public int Difficulty
Field Value
Experience
public float Experience
Field Value
GuaranteeUses
public List<GuaranteeUse> GuaranteeUses
Field Value
HandlerEffects
Per-character/item application payloads, separate from immutable definitions.
public List<WaveEffectLease> HandlerEffects
Field Value
InventoryRevision
public long InventoryRevision
Field Value
ItemInstances
public List<OwnedItemState> ItemInstances
Field Value
Items
Items and chosen upgrades in the order they were gained.
public readonly List<ItemDef> Items
Field Value
LastWaveCurrency
Currency from the last survived wave and how much of it was the completion reward.
public int LastWaveCurrency
Field Value
LastWaveReward
public int LastWaveReward
Field Value
Level
public int Level
Field Value
LevelUpPoolResult
public OfferPoolResult LevelUpPoolResult
Field Value
Mode
public RunMode Mode
Field Value
NextEffectCarryId
public long NextEffectCarryId
Field Value
NextItemInstanceId
public long NextItemInstanceId
Field Value
PendingLevelUps
public int PendingLevelUps
Field Value
Phase
public RunPhase Phase
Field Value
PlaytestInvulnerable
public bool PlaytestInvulnerable
Field Value
PlaytestResumeWave
public bool PlaytestResumeWave
Field Value
Random
Level-up and shop rolls. Waves use their own seeded random.
public SimRandom Random
Field Value
Request
public RunRequest Request
Field Value
Rerolls
public int Rerolls
Field Value
RunTriggers
public readonly List<TriggerState> RunTriggers
Field Value
Settings
public RunSettings Settings
Field Value
Shop
public readonly List<ShopOffer> Shop
Field Value
ShopPoolResult
public OfferPoolResult ShopPoolResult
Field Value
ShopVisit
public long ShopVisit
Field Value
SimSettings
public SimSettings SimSettings
Field Value
TierScratch
Scratch list for tier weights, reused to avoid allocations.
public readonly List<float> TierScratch
Field Value
TotalIncome
Gross combat receipts, kept separately from the spendable net balance.
public long TotalIncome
Field Value
TotalKills
public int TotalKills
Field Value
TriggerEvents
public readonly List<RunTriggerFact> TriggerEvents
Field Value
TriggerSequence
public long TriggerSequence
Field Value
UsedCheats
public bool UsedCheats
Field Value
Wave
The wave being played, or null between waves.
public WaveSimulation Wave
Field Value
WaveIndex
0-based index into Arena.Waves.
public int WaveIndex
Field Value
Weapons
Weapons in slot order.
public readonly List<WeaponItemDef> Weapons
Field Value
Properties
BanishesRemaining
public int BanishesRemaining { get; }
Property Value
CurrentCurrency
public int CurrentCurrency { get; }
Property Value
WaveNumber
public int WaveNumber { get; }
Property Value
Methods
AddItem(ItemDef)
Acquisition eligibility is validated by the caller; this owns the ordered pair mutation.
public RunResult AddItem(ItemDef definition)
Parameters
definitionItemDef
Returns
Banish(int, OfferChannel)
Validates all conditions before consuming a charge or clearing an offer.
public RunResult Banish(int index, OfferChannel channel = OfferChannel.Shop)
Parameters
indexintchannelOfferChannel
Returns
BeginCombatWallet()
Initializes the wave wallet from run currency at a legal combat boundary.
public RunResult BeginCombatWallet()
Returns
ExpireItems(int)
Removes item copies whose wave lifetime has ended and returns the number removed.
public int ExpireItems(int wave)
Parameters
waveint
Returns
InitializeItemInstances()
Imports a legacy list or appended suffix. Never guesses identity after removal/reorder.
public bool InitializeItemInstances()
Returns
ItemInstancesAligned()
Checks that owned definitions and per-copy instance state have matching order and identity.
public bool ItemInstancesAligned()
Returns
MergeItems(int, int, ItemDef)
Caller validates result eligibility first. No removal replacement rewards or attack state transfer.
public RunResult MergeItems(int target, int material, ItemDef result)
Parameters
Returns
RemoveItem(int)
Removes the indexed owned item together with its instance state, or rejects an invalid index.
public RunResult RemoveItem(int index)
Parameters
indexint
Returns
ReplaceItem(int, ItemDef)
Replaces an owned definition while keeping the paired item-instance list synchronized.
public RunResult ReplaceItem(int index, ItemDef definition)
Parameters
Returns
SettleCombatWallet()
Flow calls on success or defeat, instead of adding gross wave income.
public RunResult SettleCombatWallet()
Returns
TryCreditCurrency(int)
Credits currency through the active combat wallet or run balance; failure leaves state unchanged.
public bool TryCreditCurrency(int amount)
Parameters
amountint
Returns
TryDebitCurrency(int)
Debits available currency through the active combat wallet or run balance; failure leaves state unchanged.
public bool TryDebitCurrency(int amount)
Parameters
amountint