コード例 #1
0
ファイル: GameState.cs プロジェクト: techmatt/Centauri
 public bool cardPlayableToCorp(CardEntry c, Player p, Corporation corp)
 {
     if (p.compute < c.computeCost)
     {
         return(false);
     }
     if (c.type == CardType.Fragmentation)
     {
         return(false);
     }
     if (c.type == CardType.Agenda || c.type == CardType.Conflict)
     {
         if (c.requiredCorp != CorporationType.None && c.requiredCorp != corp.type)
         {
             return(false);
         }
     }
     if (c.type == CardType.Augmentation || c.type == CardType.Technology)
     {
         if (!corp.playerInStealth(p))
         {
             return(false);
         }
     }
     if (!c.requirement.satisfied(this, p))
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
ファイル: GameState.cs プロジェクト: techmatt/Centauri
        public bool cardPlayableToTable(CardEntry c, Player p)
        {
            int actualCreditCost = c.getCreditCost(p);

            if (p.credits < actualCreditCost || p.compute < c.computeCost)
            {
                return(false);
            }
            if (!c.requirement.satisfied(this, p))
            {
                return(false);
            }
            return(true);
        }
コード例 #3
0
 public Card(CardEntry _entry)
 {
     entry = _entry;
 }