Finalised AI scripts and added in some limitations to mana and hand size, removed auto draw at the end of each turn, as well as reducing mana top-up each round to 1

This commit is contained in:
SHOUTING_PIRATE
2025-04-28 17:25:10 +01:00
parent 11297a3078
commit ab6878fa69
56 changed files with 69508 additions and 5065 deletions

View File

@@ -19,6 +19,8 @@ public class DeckController : MonoBehaviour
public float waitBetweenDrawingCards = .25f;
public int maxHandSize = 7;
private List<CardScriptableObject> activeCards = new List<CardScriptableObject>();
// Start is called once before the first execution of Update after the MonoBehaviour is created
@@ -73,14 +75,23 @@ public class DeckController : MonoBehaviour
public void DrawCardForMana()
{
if (BattleController.instance.playerMana >= drawCardCost)
if (BattleController.instance.playerMana >= drawCardCost && HandController.instance.heldCards.Count < maxHandSize)
{
DrawCardToHand();
BattleController.instance.SpendPlayerMana(drawCardCost);
}
else
{
UIController.instance.ShowManaWarning();
if(BattleController.instance.playerMana < drawCardCost)
{
UIController.instance.ShowManaWarning();
}
else if (HandController.instance.heldCards.Count >= maxHandSize)
{
UIController.instance.ShowHandSizeWarning();
}
//UIController.instance.ShowManaWarning();
UIController.instance.drawCardBtn.SetActive(false);
}
}