コード例 #1
0
        public FateCard drawTopCard()
        {
            FateCard returnCard = this.fateDeck[topCardIndex];

            this.fateDeck.RemoveAt(topCardIndex);
            return(returnCard);
        }
コード例 #2
0
        public override bool applyEffects(Gamestate gs)
        {
            bool returnValue       = true;
            int  numCardsinDiscard = gs.performingPlayer.pFateDiscard.numberOfCardsDiscarded();


            FateCard fCard = (FateCard)gs.pickTarget(this.effectTarget.returnTargetList(gs, this.effectCondition), gs.performingPlayer);

            try
            {
                gs.performingPlayer.pHand.discardCard(fCard);
                this.effectOwner.focusValueDiscard = fCard.focusValue;
                gs.performingPlayer.pFateDiscard.addCardToDiscard(fCard);
            }
            catch
            {
            }

            if (gs.performingPlayer.pFateDiscard.numberOfCardsDiscarded() > numCardsinDiscard)
            {
                returnValue = true;
            }
            else
            {
                returnValue = false;
            }
            gs.performingPlayer = gs.getOpposingPlayer(gs.performingPlayer);
            return(returnValue);
        }
コード例 #3
0
ファイル: ETactician.cs プロジェクト: mikeucc/L5RServer
        public override bool applyEffects(Gamestate gs)
        {
            FateCard chosenCard = (FateCard)gs.pickTarget(new TargetACardInHand().returnTargetList(gs, new ConditionNull()), gs.performingPlayer);

            this.cardOwner.tempforceModifier += chosenCard.focusValue;
            gs.performingPlayer = gs.getOpposingPlayer(gs.performingPlayer);
            return(true);
        }
コード例 #4
0
        public void shuffleDeck()
        {
            int n = this.fateDeck.Count;

            while (n > 1)
            {
                n--;
                Random   rnd     = new Random();
                int      k       = rnd.Next(n + 1);
                FateCard rndCard = this.fateDeck[k];
                this.fateDeck[k] = this.fateDeck[n];
                this.fateDeck[n] = rndCard;
            }
        }
コード例 #5
0
 public FateCard getCardFromDeck(FateCard crd)
 {
     this.fateDeck.Remove(crd);
     return(crd);
 }
コード例 #6
0
 public void addFateCards(FateCard crd)
 {
     fateDeck.Add(crd);
 }
コード例 #7
0
 public void addCardToHand(FateCard crd)
 {
     cardsInHand.Add(crd);
 }
コード例 #8
0
 public FateCard discardCard(FateCard cardToBeDiscarded)
 {
     cardsInHand.Remove(cardToBeDiscarded);
     return(cardToBeDiscarded);
 }
コード例 #9
0
 public void removeCardFromDiscard(FateCard crd)
 {
     fateDiscard.Remove(crd);
 }
コード例 #10
0
 public void addCardToDiscard(FateCard crd)
 {
     this.fateDiscard.Add(crd);
 }