public override void ReadyClicked(ReadyButton button)
 {
     if (cardSelected != null)
     {
         CardPlay(cardSelected);
     }
     AnyIsClicked = true;
 }
예제 #2
0
 public override void ReadyClicked(ReadyButton button)
 {
     if (cardSelected != null)
     {
         CardPlay(cardSelected);
     }
     else
     {
         new SelectInvestigatorAction(ActiveInvestigator).AddActionTo();
         new DrawInitialHand(ActiveInvestigator).AddActionTo();
         new MulliganEnd(ActiveInvestigator).AddActionTo();
     }
     AnyIsClicked = true;
 }
예제 #3
0
 public override void ReadyClicked(ReadyButton button)
 {
     if (cardSelected != null)
     {
         CardPlay(cardSelected);
     }
     else
     {
         IsCancel = true;
         if (cancelableCardEffect != null)
         {
             cancelableCardEffect.IsCancel = true;
         }
     }
     AnyIsClicked = true;
 }
 public void BuildingComponents()
 {
     CenterPreview    = _centerPreview;
     ReadyButton      = _readyButton;
     PanelSkillTest   = _panelSkillTest;
     PanelHistory     = _panelHistory;
     PanelCampaign    = _panelCampaign;
     Table            = _table;
     CardBuilder      = _cardBuilder;
     CardBuilder.Zone = new Zone(Zones.CardBuilder)
     {
         ZoneBehaviour = CardBuilder.ZoneBehaviour
     };
     TokenStacks = _tokenStacks;
     ChaosBag    = _chaosBag;
     InvestigatorManagerComponent = _investigatorManagerComponent;
     PhasesUI           = _phasesUI;
     ShowHideChooseCard = _showHideChooseCard;
     AudioComponent     = _audioComponent;
 }
        public void UpdatePanel()
        {
            value.text     = SkillTest.TotalInvestigatorValue.ToString();
            testValue.text = SkillTest.TotalTestValue.ToString();
            SetPercentList();

            void SetPercentList()
            {
                int mod = -3;

                foreach (TextMeshProUGUI percent in listPercent)
                {
                    double porcent = CalculatePosibilities(mod++);
                    percent.text = porcent.ToString() + "%";
                    if (mod == 1)
                    {
                        ReadyButton.SkillTestButtonGlowColor((float)porcent / 100);
                    }
                }
            }

            double CalculatePosibilities(int mod)
            {
                int winner         = 0;
                int modifierBackup = SkillTest.InitialModifier;

                foreach (ChaosTokenComponent token in AllComponents.ChaosBag.tokenList)
                {
                    SkillTest.InitialModifier += mod;
                    SkillTest.InitialModifier += (int)token.Value;
                    if (SkillTest.TotalInvestigatorValue >= SkillTest.TotalTestValue && token.Type != ChaosTokenType.Fail)
                    {
                        winner++;
                    }
                    SkillTest.InitialModifier = modifierBackup;
                }
                return(Math.Round(((float)winner / AllComponents.ChaosBag.tokenList.Count) * 100));
            }
        }
예제 #6
0
 public override void ReadyClicked(ReadyButton button) => AnyIsClicked = true;
예제 #7
0
 public abstract void ReadyClicked(ReadyButton button);
 public void ReadyClicked(ReadyButton button) => StartCoroutine(HideThisPanel());
 public void ReadyClicked(ReadyButton button) => readyButtonIsClicked = true;