Class LevelRulesDef
Level-wide economy and M2 authoring data.
public sealed class LevelRulesDef
- Inheritance
-
LevelRulesDef
- Inherited Members
Constructors
LevelRulesDef(float, float, float?, bool, float, SpellDef[], IMovementPolicy, ILevelCompletionRule)
Creates level-wide behavior settings.
public LevelRulesDef(float leakBountyShare = 0, float refundShare = 0.6, float? earlyCallRewardRate = null, bool earlyCallSpellCooldownCut = true, float earlyCallCutThreshold = 0, SpellDef[] spells = null, IMovementPolicy movement = null, ILevelCompletionRule completion = null)
Parameters
leakBountySharefloatrefundSharefloatearlyCallRewardRatefloat?earlyCallSpellCooldownCutboolearlyCallCutThresholdfloatspellsSpellDef[]movementIMovementPolicycompletionILevelCompletionRule
Properties
Completion
Optional additional victory condition for authored level actions.
public ILevelCompletionRule Completion { get; }
Property Value
EarlyCallCutThreshold
Time credit must strictly exceed this value.
public float EarlyCallCutThreshold { get; }
Property Value
EarlyCallRewardRate
Reward per rounded second; null preserves each legacy wave's reward rate.
public float? EarlyCallRewardRate { get; }
Property Value
EarlyCallSpellCooldownCut
Applies early-call time credit to cooling, unlocked spells.
public bool EarlyCallSpellCooldownCut { get; }
Property Value
LeakBountyShare
Share of enemy bounty paid on a leak; defaults to zero.
public float LeakBountyShare { get; }
Property Value
Movement
Optional walkable-waypoint provider; null uses direct friendly movement.
public IMovementPolicy Movement { get; }
Property Value
RefundShare
Post-start sale share of all actual investment.
public float RefundShare { get; }
Property Value
Spells
Spell definitions resolved by AvailableSpells identifiers.
public IReadOnlyList<SpellDef> Spells { get; }
Property Value
VictoryRating
Victory rating bands. The product default grants two stars at half lives and three at full lives.
public VictoryRatingDef VictoryRating { get; }
Property Value
Methods
WithVictoryRating(VictoryRatingDef)
Copies all level rules and replaces only the victory-rating bands.
public LevelRulesDef WithVictoryRating(VictoryRatingDef rating)
Parameters
ratingVictoryRatingDef
Returns
Examples
var rules = new LevelRulesDef().WithVictoryRating(new VictoryRatingDef(0.6f, 0.9f));