CharmDash component that represents a dash charm item. It defines an item id, a description, and on run start it increases the player's NumDashes stat and sets NumDashesAvailable from the stat.
public class CharmDash : Charm
{
public const string ItemId = "charm_dash";
public static string Description() => $"+1 dash";
public override void OnRunStart()
{
Player.Modify( this, PlayerStat.NumDashes, 1, ModifierType.Add );
Player.NumDashesAvailable = (int)Player.Stats[PlayerStat.NumDashes];
}
}