status/MoreRerollsStatus.cs

A Status class named MoreRerollsStatus that grants the player additional rerolls per level. It sets title and icon, applies an additive modifier to the player's NumRerollsPerLevel stat in Refresh, and provides description and upgrade text based on level.

File Access
using System;
using System.Collections.Generic;
using System.Linq;
using Sandbox;

[Status(3, 0, 1f, maxDifficulty: 2, isCurse: false )]
public class MoreRerollsStatus : Status
{
	public MoreRerollsStatus()
    {
		Title = "More Rerolls";
		IconPath = "textures/icons/more_rerolls.png";
	}

	public override void Init(Player player)
	{
		base.Init(player);
	}

	public override void Refresh()
    {
		Description = GetDescription(Level);

		Player.Modify(this, PlayerStat.NumRerollsPerLevel, GetAddForLevel(Level), ModifierType.Add);
	}

	public override string GetDescription(int newLevel)
	{
		return string.Format("Gain {0} addition reroll each level", GetAddForLevel(Level));
	}

	public override string GetUpgradeDescription(int newLevel)
    {
		return newLevel > 1 ? string.Format("Gain {0}→{1} addition rerolls each level", GetAddForLevel(newLevel - 1), GetAddForLevel(newLevel)) : GetDescription(newLevel);
	}

	public float GetAddForLevel(int level)
    {
		return 1f * level;
    }
}