public void Edit() { for (int i = SC_DeckBuilder.deckCards.Count; i > 0; i--) { SC_DeckBuilder.TryAddRemove(SC_DeckBuilder.deckCards.Keys.ElementAt(0), false); } foreach (SC_BaseCard c in SC_Global.CodeToCardsList(SelectedDeck.Deck)) { SC_DeckBuilder.TryAddRemove(c, true); } gameObject.SetActive(false); deckBuilder.Show(true); }
protected override IEnumerator MakeChoices() { yield return(StartCoroutine(base.MakeChoices())); if (!Ephemeral) { if (activePlayer.Hand.Count > 2 && CanUse(activePlayer, 2)) { if (activePlayer.AI) { if (SC_Global.RandomBool()) { activePlayer.StartDoubleDiscard(() => { activePlayer.SetIntChoiceServerRpc("Stomps", 1); MakingChoices = false; }); } } else { yield return(StartCoroutine(MakeChoice(() => { UI.ShowBooleanChoiceUI("Discard 2 to Chain 4", "Skip", (b) => { if (b) { localPlayer.StartDoubleDiscard(() => { localPlayer.SetIntChoiceServerRpc("Stomps", 1); MakingChoices = false; }); } else { localPlayer.SetIntChoiceServerRpc("Stomps", 0); MakingChoices = false; } }); }))); } } else { Caller.SetIntChoiceServerRpc("Stomps", 0); } } }
protected override IEnumerator MakeChoices() { yield return(StartCoroutine(base.MakeChoices())); if (SC_Player.activePlayer.AI) { List <SC_BaseCard> list = SC_Global.CodeToCardsList(SC_Player.deckCode); SC_Player.activePlayer.StringChoices["KnowYourOpponent"] = list[Random.Range(0, list.Count)].name; } else { yield return(StartCoroutine(MakeChoice(() => { UI.ShowMessage("KnowYourOpponent"); UI.knowYourOpponentChoice.text = ""; UI.knowYourOpponentChoice.transform.parent.gameObject.SetActive(true); UI.knowYourOpponentChoice.Select(); }))); } }