Even More Modifiers  1.0.0.0
A mod for rolling various bonus stats on items
Loot.Cubes.PoorCube Class Reference
+ Inheritance diagram for Loot.Cubes.PoorCube:
+ Collaboration diagram for Loot.Cubes.PoorCube:

Public Member Functions

override RollingStrategy GetRollingStrategy (Item item, RollingStrategyProperties properties)
 
- Public Member Functions inherited from Loot.Api.Cubes.RerollingCube
override void SetStaticDefaults ()
 
- Public Member Functions inherited from Loot.Api.Cubes.MagicalCube
override void ModifyTooltips (List< TooltipLine > tooltips)
 
sealed override void SetDefaults ()
 
override void SetStaticDefaults ()
 

Public Attributes

override int EssenceCraftCost => 10
 

Protected Member Functions

override void SafeDefaults ()
 
override void SafeStaticDefaults ()
 

Protected Attributes

override string CubeName => "Poor Cube"
 
override TooltipLine ExtraTooltip
 
override Color OverrideNameColor => Color.White
 
- Protected Attributes inherited from Loot.Api.Cubes.MagicalCube
virtual TooltipLine ExtraTooltip => null
 
virtual Color OverrideNameColor => null
 

Additional Inherited Members

- Properties inherited from Loot.Api.Cubes.MagicalCube
abstract string CubeName [get]
 
abstract int EssenceCraftCost [get]
 

Detailed Description

Definition at line 12 of file PoorCube.cs.

Member Function Documentation

override RollingStrategy Loot.Cubes.PoorCube.GetRollingStrategy ( Item  item,
RollingStrategyProperties  properties 
)
virtual

Implements Loot.Api.Cubes.RerollingCube.

Definition at line 35 of file PoorCube.cs.

References Loot.Api.Strategy.RollingStrategyProperties.CanUpgradeRarity, Loot.Api.Ext.RollingUtils.Strategies.Default, Loot.Api.Strategy.RollingStrategyProperties.ForceModifierPool, Loot.Api.Strategy.RollingStrategyProperties.ForceModifierRarity, Loot.LootModItem.GetInfo(), Loot.Api.Strategy.RollingStrategyProperties.MaxRollableLines, and Loot.LootModItem.Rarity.

36  {
37  var currentRarity = LootModItem.GetInfo(item).Rarity;
38  bool isLegendary = currentRarity?.GetType() == typeof(LegendaryRarity);
39  bool isEpic = currentRarity?.GetType() == typeof(EpicRarity);
40  bool forcedDowngrade = currentRarity != null && isLegendary || isEpic;
41  if (forcedDowngrade)
42  {
43  properties.CanUpgradeRarity = ctx => false;
44  properties.ForceModifierRarity = mod.GetModifierRarity<RareRarity>();
45  }
46 
47  properties.MaxRollableLines = 2;
48  properties.ForceModifierPool = mod.GetModifierPool<AllModifiersPool>();
49  if (!forcedDowngrade)
50  {
51  properties.CanUpgradeRarity = ctx => ctx.Rarity.GetType() == typeof(CommonRarity);
52  }
54  }
Defines a set of rolling utilities
Definition: RollingUtils.cs:9
int MaxRollableLines
The maximum amount of modifiers that can roll
The legendary rarity, before transcendent but after epic
The epic rarity, before legendary but after rare
Definition: EpicRarity.cs:10
A modifier pool that always consists of all modifiers Cannot be rolled normally
ModifierPool ForceModifierPool
Force a specific pool to roll Note that OverrideRollModifierPool will override this property ...
static DefaultRollingStrategy Default
Definition: RollingUtils.cs:23
Describes the common rarity, which every item starts with
Definition: CommonRarity.cs:10
The rare rarity, before epic but after common
Definition: RareRarity.cs:10

+ Here is the call graph for this function:

override void Loot.Cubes.PoorCube.SafeDefaults ( )
protectedvirtual

Reimplemented from Loot.Api.Cubes.MagicalCube.

Definition at line 26 of file PoorCube.cs.

27  {
28  item.value = Item.buyPrice(copper: 1);
29  }
override void Loot.Cubes.PoorCube.SafeStaticDefaults ( )
protectedvirtual

Reimplemented from Loot.Api.Cubes.MagicalCube.

Definition at line 31 of file PoorCube.cs.

32  {
33  }

Member Data Documentation

override string Loot.Cubes.PoorCube.CubeName => "Poor Cube"
protected

Definition at line 15 of file PoorCube.cs.

override int Loot.Cubes.PoorCube.EssenceCraftCost => 10

Definition at line 14 of file PoorCube.cs.

override TooltipLine Loot.Cubes.PoorCube.ExtraTooltip
protected
Initial value:
=> new TooltipLine(mod, "PoorCube::Description::Add_Box",
"Maximum lines: 2" +
"\nMaximum potential: Rare" +
"\nAlways rolls from random modifiers")
{
overrideColor = OverrideNameColor
}

Definition at line 18 of file PoorCube.cs.

override Color Loot.Cubes.PoorCube.OverrideNameColor => Color.White
protected

Definition at line 16 of file PoorCube.cs.