Table of Contents

Method BuyStat

Namespace
GrindFest
Assembly
GrindFest.dll

BuyStat(Stat, int)

Spends available stat points to increase a specific stat.

public void BuyStat(Stat stat, int amount)

Parameters

stat Stat

The stat to increase (Strength, Dexterity, Intelligence, etc)

amount int

Number of stat points to spend

Remarks

Stats influence various character attributes:

  • Strength: Increases physical damage and amount of health
  • Dexterity: Improves attack speed and dodge chance
  • Intelligence: Enhances magic damage and mana pool
Basic stat allocation:
// Spend 5 points on strength
BuyStat(Stat.Strength, 5);
Check available points before spending:
if (StatPoints >= 5)
{
    // Spend points if we have enough
    BuyStat(Stat.Strength, 3);
    BuyStat(Stat.Dexterity, 2);
    Say($"Spent 5 stat points! {StatPoints} remaining");
}
else
{
    Say($"Need more stat points! Only have {StatPoints}");
}