Update
This commit is contained in:
@@ -313,26 +313,6 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
public virtual void GetIntendedCards()
|
||||
{
|
||||
bool CanAfford(CardInstance card, int stamina, int mana)
|
||||
{
|
||||
return card.GetAttribute("StaminaCost") <= stamina &&
|
||||
card.GetAttribute("ManaCost") <= mana;
|
||||
}
|
||||
|
||||
bool CheckAvailabilityAndSetTargets(CardInstance card, out List<CharacterBase> targets)
|
||||
{
|
||||
card.DetectTargetsValidity(out List<CharacterBase> valid, out _, out _);
|
||||
if (valid.Count == 0)
|
||||
{
|
||||
targets = null;
|
||||
return false; // 无有效目标或无法使用则跳过
|
||||
}
|
||||
|
||||
targets = card.SetRandomTargets(valid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IntentionBase currentIntention = intentionSubmodule.currentIntention;
|
||||
List<CardInstance> availableCards = deckSubmodule.PoolPile;
|
||||
List<IntendedCard> intended = new List<IntendedCard>();
|
||||
@@ -425,5 +405,25 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
intentionSubmodule.intendedCards.AddRange(intended);
|
||||
}
|
||||
|
||||
bool CanAfford(CardInstance card, int stamina, int mana)
|
||||
{
|
||||
return card.GetAttribute("StaminaCost") <= stamina &&
|
||||
card.GetAttribute("ManaCost") <= mana;
|
||||
}
|
||||
|
||||
public bool CheckAvailabilityAndSetTargets(CardInstance card, out List<CharacterBase> targets)
|
||||
{
|
||||
card.DetectTargetsValidity(out List<CharacterBase> valid, out _, out _);
|
||||
if (valid.Count == 0)
|
||||
{
|
||||
targets = null;
|
||||
return false; // 无有效目标或无法使用则跳过
|
||||
}
|
||||
|
||||
targets = card.SetRandomTargets(valid);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user