Exemple #1
0
        public async override Task GoOnField()
        {
            await base.GoOnField();

            XiKun  xiKun  = null;
            ZongLi zongLi = null;

            foreach (Minion minion in Player.MinionsOnField)
            {
                if (minion is XiKun)
                {
                    xiKun = minion as XiKun;
                }
                if (minion is ZongLi)
                {
                    zongLi = minion as ZongLi;
                }
            }
            if (xiKun != null && zongLi != null)
            {
                YingWen yingWen = new YingWen()
                {
                    Player = this.Player
                };
                Player.MinionsOnField.Remove(this);
                RemoveFromField();
                Player.MinionsOnField.Remove(xiKun);
                xiKun.RemoveFromField();
                Player.MinionsOnField.Remove(zongLi);
                zongLi.RemoveFromField();
                Player.MinionsOnField.Add(yingWen);
                await yingWen.GoOnField();
            }
        }
Exemple #2
0
        public async override Task GoOnField()
        {
            await base.GoOnField();

            ZhengChang zhengChang = null;
            XiKun      xiKun      = null;

            foreach (Minion minion in Player.MinionsOnField)
            {
                if (minion is ZhengChang)
                {
                    zhengChang = minion as ZhengChang;
                }
                if (minion is XiKun)
                {
                    xiKun = minion as XiKun;
                }
            }
            if (zhengChang != null && xiKun != null)
            {
                YingWen yingWen = new YingWen()
                {
                    Player = this.Player
                };
                Player.MinionsOnField.Remove(zhengChang);
                zhengChang.RemoveFromField();
                Player.MinionsOnField.Remove(xiKun);
                xiKun.RemoveFromField();
                Player.MinionsOnField.Remove(this);
                RemoveFromField();
                Player.MinionsOnField.Add(yingWen);
                await yingWen.GoOnField();
            }
        }