public FateCard drawTopCard() { FateCard returnCard = this.fateDeck[topCardIndex]; this.fateDeck.RemoveAt(topCardIndex); return(returnCard); }
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); }
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); }
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; } }
public FateCard getCardFromDeck(FateCard crd) { this.fateDeck.Remove(crd); return(crd); }
public void addFateCards(FateCard crd) { fateDeck.Add(crd); }
public void addCardToHand(FateCard crd) { cardsInHand.Add(crd); }
public FateCard discardCard(FateCard cardToBeDiscarded) { cardsInHand.Remove(cardToBeDiscarded); return(cardToBeDiscarded); }
public void removeCardFromDiscard(FateCard crd) { fateDiscard.Remove(crd); }
public void addCardToDiscard(FateCard crd) { this.fateDiscard.Add(crd); }