public override void DoEffect(Tile t) { CardPicker.CreateAndQueue(Owner.Deck.GetAllCardsWithTag(Tag.Fairy), 1, 1, "Select a card to add to your hand", Owner, delegate(List <Card> cards) { cards[0].MoveToCardPile(Owner.Hand, card); }); }
public override void DoEffect(Tile t) { CardPicker.CreateAndQueue(card.Owner.Hand.CardList, 1, 1, "Select a card to discard", card.Owner, delegate(List <Card> cards) { cards[0].MoveToCardPile(card.Owner.Graveyard, card); card.Owner.DrawCards(2); }); }
private void deployEff(object sender, EventArgs e) { CardPicker.CreateAndQueue(creature.Controller.Hand.GetAllCardsWithType(CardType.Creature), 1, 1, "Select a card to give +1/+1", creature.Controller, delegate(List <Card> cardList) { (cardList[0] as CreatureCard).Creature.Health += 1; (cardList[0] as CreatureCard).Creature.BaseAttack += 1; }); }
public override void DoEffect(Tile t) { CardPicker.CreateAndQueue(Owner.Graveyard.GetAllCardsWithType(CardType.Spell).FindAll(c => c.CardId != (int)CardIds.SpellRecycling), 1, 2, "Select cards to add to your hand", Owner, delegate(List <Card> cards) { foreach (Card c in cards) { c.MoveToCardPile(Owner.Hand, card); } }); }
public override void DoEffect(Tile t) { CardPicker.CreateAndQueue(card.Owner.Deck.GetAllCardsWithTag(Tag.Arcane), 1, 1, "Select a card to add to your hand", card.Owner, delegate(List <Card> cards) { cards[0].MoveToCardPile(card.Owner.Hand, card); if (card.Owner.ControlledCreatures.Find(c => c.HasTag(Tag.Arcane))) { card.Owner.Mana += 1; } }); }
IEnumerator OnlineGameSetupCoroutine() { System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); Player localPlayer = NetInterface.Get().LocalPlayerIsP1 ? player1 : player2; NetInterface.Get().localPlayer = localPlayer; // disable end turn button if going second endTurnButton.gameObject.SetActive(NetInterface.Get().LocalPlayerIsP1); // lock local player if they are going second if (!NetInterface.Get().LocalPlayerIsP1) { localPlayer.AddLock(activePlayerLock); } // send opponent starting deck NetInterface.Get().SyncStartingDeck(); stopwatch.Stop(); //Debug.Log("Finished instantiating cards " + stopwatch.ElapsedMilliseconds + "ms"); // wait for opponent to finish sending their deck while (!NetInterface.Get().opponentFinishedSendingCards) { yield return(null); } // place starting engi int engiCoord = NetInterface.Get().LocalPlayerIsP1 ? 1 : 6; Tile engiTile = board.GetTileByCoordinate(engiCoord, engiCoord); Card engineer = CreateCardById((int)CardIds.Engineer, localPlayer); engineer.Play(engiTile); (engineer as CreatureCard).Creature.Counters.Add(CounterType.Build, 3); // place HQ int hqCoord = NetInterface.Get().LocalPlayerIsP1 ? 0 : board.boardWidth - 1; Tile hqTile = board.GetTileByCoordinate(hqCoord, hqCoord); Card hq = CreateCardById((int)CardIds.Headquarters, localPlayer); hq.Owner = NetInterface.Get().localPlayer; hq.Play(hqTile); // draw starting hand Deck localPlayerDeck = localPlayer.Deck; NetInterface.Get().SignalSetupComplete(); // network setup is done so wait for opponent to catch up if needed while (!NetInterface.Get().finishedWithSetup) { yield return(null); } NetInterface.Get().gameSetupComplete = true; // starting mulligan List <Card> mullList = localPlayerDeck.CardList.Take(STARTING_HAND_SIZE).ToList(); CardPicker.CreateAndQueue(mullList, 0, STARTING_HAND_SIZE, "Select cards to return to deck", localPlayer, delegate(List <Card> cardList) { mullList.RemoveAll(c => cardList.Contains(c)); foreach (Card c in mullList) { c.MoveToCardPile(localPlayer.Hand, null); } while (localPlayer.Hand.CardList.Count < STARTING_HAND_SIZE) { localPlayer.Deck.CardList[0].MoveToCardPile(localPlayer.Hand, null); } localPlayer.Deck.Shuffle(); ActivePlayer = localPlayer; NonActivePlayer = GetOppositePlayer(localPlayer); }); }