Method BuyStat
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
BuyStat(Stat, int)
Spends available stat points to increase a specific stat.
public static void BuyStat(Stat stat, int amount)
Parameters
stat
StatThe stat to increase (Strength, Dexterity, Intelligence, etc)
amount
intNumber 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
// Spend 5 points on strength
Hero.BuyStat(Stat.Strength, 5);
if (Hero.StatPoints >= 5)
{
// Spend points if we have enough
Hero.BuyStat(Stat.Strength, 3);
Hero.BuyStat(Stat.Dexterity, 2);
Hero.Say($"Spent 5 stat points! {Hero.StatPoints} remaining");
}
else
{
Hero.Say($"Need more stat points! Only have {Hero.StatPoints}");
}