Exemple #1
0
        public static async Task ExchangeCard(bool IsPlayerWash = true)
        {
            await WashCard();
            await DrawCard();

            CardBoardCommand.LoadCardList(RowsInfo.GetMyCardList(RegionTypes.Hand));
            //UiCommand.CardBoardReload();
        }
Exemple #2
0
        public static async Task DisCard(Card card = null)
        {
            Card TargetCard = card == null ? GlobalBattleInfo.PlayerPlayCard : card;

            TargetCard.IsPrePrepareToPlay = false;
            TargetCard.Row.Remove(TargetCard);
            RowsInfo.GetMyCardList(RegionTypes.Grave).Add(TargetCard);
            TargetCard.Trigger <TriggerType.Discard>();
            //await CardEffectStackControl.TriggerEffect<TriggerType.Discard>(TargetCard);
            //GlobeBattleInfo.IsCardEffectCompleted = true;
        }
Exemple #3
0
        public static async Task PlayCard()
        {
            SoundControl.Play();
            GameCommand.PlayCardLimit(true);
            Card TargetCard = GlobalBattleInfo.PlayerPlayCard;

            TargetCard.IsPrePrepareToPlay = false;
            RowsInfo.GetMyCardList(RegionTypes.Hand).Remove(TargetCard);
            RowsInfo.GetMyCardList(RegionTypes.Uesd).Add(TargetCard);
            GlobalBattleInfo.PlayerPlayCard = null;
            TargetCard.Trigger <TriggerType.Deploy>();
        }
Exemple #4
0
        public static async Task Deploy()
        {
            //Card card = RowsInfo.GetRegionCardList(RegionName_Other.My_Uesd).ThisRowCard[0];
            //RowsInfo.GetRegionCardList(RegionName_Other.My_Uesd).ThisRowCard.Remove(card);
            Card card = RowsInfo.GetMyCardList(RegionTypes.Uesd)[0];

            RowsInfo.GetMyCardList(RegionTypes.Uesd).Remove(card);
            //Card card = GlobalBattleInfo.MyUse[0];
            //GlobalBattleInfo.MyUse.Remove(card);
            GlobalBattleInfo.SelectRegion.ThisRowCard.Insert(GlobalBattleInfo.SelectLocation, card);
            GlobalBattleInfo.SelectRegion   = null;
            GlobalBattleInfo.SelectLocation = -1;
            //部署特效
            //print("duang");
            await Task.Delay(2000);
        }
Exemple #5
0
        public static void SetRegionSelectable(bool CanBeSelected)
        {
            if (CanBeSelected)
            {
                Card DeployCard    = RowsInfo.GetMyCardList(RegionTypes.Uesd)[0];
                bool IsMyTerritory = (DeployCard.CardTerritory == Territory.My);
                switch (RowsInfo.GetMyCardList(RegionTypes.Uesd)[0].CardProperty)
                {
                case Property.Water:
                {
                    SetRowShow(IsMyTerritory ? RegionName_Battle.My_Water : RegionName_Battle.Op_Water);
                    break;
                }

                case Property.Fire:
                {
                    SetRowShow(IsMyTerritory ? RegionName_Battle.My_Fire : RegionName_Battle.Op_Fire);
                    break;
                }

                case Property.Wind:
                {
                    SetRowShow(IsMyTerritory ? RegionName_Battle.My_Wind : RegionName_Battle.Op_Wind);
                    break;
                }

                case Property.Soil:
                {
                    SetRowShow(IsMyTerritory ? RegionName_Battle.My_Soil : RegionName_Battle.Op_Soil);
                    break;
                }

                case Property.None:
                    break;

                default:
                    break;
                }
            }
            else
            {
                RowsInfo.Instance.SingleBattleInfos.Values.ToList().ForEach(row => row.Control.SetSelectable(false));
            }
        }
Exemple #6
0
        public static async Task DrawCard(bool IsPlayerDraw = true, bool ActiveBlackList = false)
        {
            SoundControl.Play();
            Card TargetCard = IsPlayerDraw ? RowsInfo.GetMyCardList(RegionTypes.Deck)[0] : RowsInfo.GetOpCardList(RegionTypes.Deck)[0];

            TargetCard.IsCanSee = IsPlayerDraw;
            if (IsPlayerDraw)
            {
                RowsInfo.GetMyCardList(RegionTypes.Deck).Remove(TargetCard);
                RowsInfo.GetMyCardList(RegionTypes.Hand).Add(TargetCard);
            }
            else
            {
                RowsInfo.GetOpCardList(RegionTypes.Deck).Remove(TargetCard);
                RowsInfo.GetOpCardList(RegionTypes.Hand).Add(TargetCard);
            }
            await OrderCard();

            await Task.Delay(100);
        }