CardBuff,Exhaustible

This commit is contained in:
SoulliesOfficial
2025-11-01 06:13:58 -04:00
parent ee1d3d9c0a
commit abc540809f
30 changed files with 395 additions and 46 deletions

View File

@@ -238,13 +238,33 @@ namespace Continentis.MainGame.Card
return;
}
if (HasKeyword("Exhaust"))
{
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(cardInstance));
return;
}
if(HasKeyword("Exhaustible"))
{
if (!cardInstance.cardLogic.HasAttribute("ExhaustibleCount"))
{
Debug.LogError("Exhaustible card missing ExhaustibleCount attribute: " + contentSubmodule.cardName);
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(cardInstance));
return;
}
cardInstance.cardLogic.ModifyAttribute("ExhaustibleCount", -1);
if(cardInstance.cardLogic.GetAttribute("ExhaustibleCount") <= 0)
{
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(cardInstance));
return;
}
}
if (user is PlayerHero playerHero)
{
if (HasKeyword("Exhaust"))
{
CommandQueueManager.Instance.AddCommand(playerHero.deckSubmodule.ExhaustCard(cardInstance));
}
else if(!HasKeyword("Reuse"))
if(!HasKeyword("Reuse"))
{
CommandQueueManager.Instance.AddCommand(playerHero.deckSubmodule.DiscardCard(cardInstance, false));
CommandQueueManager.Instance.AddCommand(new Cmd_Function(() =>
@@ -258,10 +278,7 @@ namespace Continentis.MainGame.Card
}
else if (user is CombatNPC npc)
{
if (HasKeyword("Exhaust"))
{
CommandQueueManager.Instance.AddCommand(npc.deckSubmodule.ExhaustCard(cardInstance));
}
}
}
}