// Return true iff inventory has enough free space to handle the given cardEffectsSet from a card. public bool HasSpaceForItems(CardEffectsSet cardEffectsSet) { List <CardEffect> get = cardEffectsSet.GetReward(); List <CardEffect> cost = cardEffectsSet.GetCost(); return(HasSpaceForItems(get, cost)); }
public bool CanApplyEffects(CardEffectsSet cardEffectsSet) { List <CardEffect> get = cardEffectsSet.GetReward(); List <CardEffect> cost = cardEffectsSet.GetCost(); return(CanApplyEffects(get, cost)); }
// Tries to perform this item's night effect with the given quantity of this item and returns true if successful public void TryPerformNightEffect() { if (GameManager.instance.player.CanPayCost(cardEffectsSet.GetCost())) { if (GameManager.instance.player.CanApplyEffects(cardEffectsSet)) { PerformNightEffect(); } } else { OnFailEffect(); } }