Changed a lot of Actions.cs and a few other things to be more easily

extendable.
This commit is contained in:
2025-09-03 23:32:20 -05:00
parent 69e6699e26
commit e4b230a0ad
21 changed files with 834 additions and 314 deletions

35
Menu.cs Normal file
View File

@@ -0,0 +1,35 @@
public struct Menu
{
public static void BuildMenu(Character character)
{
int index = 1;
foreach (string action in character.CharacterEnabledActions)
{
if (action == "Health Potion")
{
Console.WriteLine($"{index}. {action} ({GameState.Instance.heroPotionsAvailable})");
}
else
{
Console.WriteLine($"{index}. {action}");
}
index++;
}
}
public static void BuildItemsMenu(Character character)
{
int index = 1;
if (character.equipedItems.Any())
{
Console.WriteLine($"{index}. Unequip {character.equipedItems[0].Description}");
index++;
}
foreach (Item item in GameState.Instance.heroInventory)
{
Console.WriteLine($"{index}. {item.Description}");
index++;
}
Console.WriteLine($"{index}. Go back");
}
}