Even More Modifiers  1.0.0.0
A mod for rolling various bonus stats on items
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Pages
BlackCube.cs
Go to the documentation of this file.
1 using Loot.Api.Cubes;
2 using Loot.Api.Ext;
3 using Loot.Api.Strategy;
4 using Microsoft.Xna.Framework;
5 using Terraria;
6 using Terraria.ModLoader;
7 
8 namespace Loot.Cubes
9 {
10  public class BlackCube : RerollingCube
11  {
12  public override int EssenceCraftCost => 10;
13  protected override string CubeName => "Black Cube";
14  protected override Color? OverrideNameColor => Color.LightSlateGray;
15 
16  protected override TooltipLine ExtraTooltip => new TooltipLine(mod, "BlackCube::Description::Add_Box",
17  "Always rolls 4 lines" +
18  "\nMaximum potential: Legendary" +
19  "\nCan roll 25% stronger modifiers" +
20  "\n+4 luck with this cube")
21  {
22  overrideColor = OverrideNameColor
23  };
24 
25  protected override void SafeDefaults()
26  {
27  item.value = Item.buyPrice(copper: 1);
28  }
29 
30  protected override void SafeStaticDefaults()
31  {
32  }
33 
34  public override RollingStrategy GetRollingStrategy(Item item, RollingStrategyProperties properties)
35  {
36  properties.MinRollableLines = 4;
37  properties.MagnitudePower = 1.25f;
38  properties.ExtraLuck = 4;
40  }
41  }
42 }
Defines a set of rolling utilities
Definition: RollingUtils.cs:9
float ExtraLuck
Gives extra luck when rolling modifiers
Defines properties that will be used when an item is being rolled in a IRollingStrategy<T> These can ...
override void SafeDefaults()
Definition: BlackCube.cs:25
static DefaultRollingStrategy Default
Definition: RollingUtils.cs:23
override void SafeStaticDefaults()
Definition: BlackCube.cs:30
float MagnitudePower
The minimum strength of lines to roll
override RollingStrategy GetRollingStrategy(Item item, RollingStrategyProperties properties)
Definition: BlackCube.cs:34
int MinRollableLines
The minimum amount of modifiers to roll
Defines a rerolling cube that opens the rerolling UI on right click The method M:GetRollingStrategy c...