예제 #1
0
    // 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));
    }
예제 #2
0
    public bool CanApplyEffects(CardEffectsSet cardEffectsSet)
    {
        List <CardEffect> get  = cardEffectsSet.GetReward();
        List <CardEffect> cost = cardEffectsSet.GetCost();

        return(CanApplyEffects(get, cost));
    }
예제 #3
0
 // 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();
     }
 }