tModLoader v2024.05
A mod to make and play Terraria mods
SequentialRulesNotScalingWithLuckRule Class Reference

Runs the provided rules in order, stopping after a rule succeeds.
Does not use player luck.
More...

Inherits IItemDropRule, and INestedItemDropRule.

Public Member Functions

 SequentialRulesNotScalingWithLuckRule (int chanceDenominator, int chanceNumerator, params IItemDropRule[] rules)
 
 SequentialRulesNotScalingWithLuckRule (int chanceDenominator, params IItemDropRule[] rules)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 

Public Attributes

int chanceDenominator
 
int chanceNumerator
 
IItemDropRule[] rules
 

Properties

List< IItemDropRuleChainAttemptChainedRules [get]
 
- Properties inherited from IItemDropRule
List< IItemDropRuleChainAttemptChainedRules [get]
 

Detailed Description

Runs the provided rules in order, stopping after a rule succeeds.
Does not use player luck.

Member Function Documentation

◆ CanDrop()

bool SequentialRulesNotScalingWithLuckRule.CanDrop ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ ReportDroprates()

void SequentialRulesNotScalingWithLuckRule.ReportDroprates ( List< DropRateInfo drops,
DropRateInfoChainFeed  ratesInfo 
)

Implements IItemDropRule.

◆ TryDroppingItem() [1/2]

ItemDropAttemptResult SequentialRulesNotScalingWithLuckRule.TryDroppingItem ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ TryDroppingItem() [2/2]

ItemDropAttemptResult SequentialRulesNotScalingWithLuckRule.TryDroppingItem ( DropAttemptInfo  info,
ItemDropRuleResolveAction  resolveAction 
)

Implements INestedItemDropRule.

Property Documentation

◆ ChainedRules

List<IItemDropRuleChainAttempt> SequentialRulesNotScalingWithLuckRule.ChainedRules
get

Implements IItemDropRule.