tModLoader v2024.09
A mod to make and play Terraria mods
Chains Class Reference

Classes

class  TryIfDoesntFillConditions
 
class  TryIfFailedRandomRoll
 
class  TryIfSucceeded
 

Static Public Member Functions

static IItemDropRule OnFailedConditions (this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport=false)
 Chains a rule to this rule. The chained rule will be evaluated if this rule doesn't meets all conditions. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples. More...
 
static IItemDropRule OnFailedRoll (this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport=false)
 Chains a rule to this rule. The chained rule will be evaluated if this rule meets all conditions but fails a random chance. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples. More...
 
static IItemDropRule OnSuccess (this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport=false)
 Chains a rule to this rule. The chained rule will be evaluated if this rule succeeds, meaning it met all conditions and passed a random chance, if any. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples. More...
 
static void ReportDroprates (List< IItemDropRuleChainAttempt > ChainedRules, float personalDropRate, List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 

Member Function Documentation

◆ OnFailedConditions()

static IItemDropRule Chains.OnFailedConditions ( this IItemDropRule  rule,
IItemDropRule  ruleToChain,
bool  hideLootReport = false 
)
static

Chains a rule to this rule. The chained rule will be evaluated if this rule doesn't meets all conditions. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples.

Parameters
rule
ruleToChain
hideLootReport
Returns

◆ OnFailedRoll()

static IItemDropRule Chains.OnFailedRoll ( this IItemDropRule  rule,
IItemDropRule  ruleToChain,
bool  hideLootReport = false 
)
static

Chains a rule to this rule. The chained rule will be evaluated if this rule meets all conditions but fails a random chance. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples.

Parameters
rule
ruleToChain
hideLootReport
Returns

◆ OnSuccess()

static IItemDropRule Chains.OnSuccess ( this IItemDropRule  rule,
IItemDropRule  ruleToChain,
bool  hideLootReport = false 
)
static

Chains a rule to this rule. The chained rule will be evaluated if this rule succeeds, meaning it met all conditions and passed a random chance, if any. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples.

Parameters
rule
ruleToChain
hideLootReport
Returns