예제 #1
0
 public void GetOneCard(Card inputCard)
 {
     if (inputCard is Mon_Card)
     {
         mc = (Mon_Card)inputCard;
     }
 }
예제 #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Mon_Card attackAim = (Mon_Card)listBox1.SelectedItem;

            attackFromMc.Trigger_WhenMonWarAnnounce(attackAim);
            this.Close();
        }
예제 #3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Mon_Card attackAim = (Mon_Card)listBox1.SelectedItem;

            attackFromMc.Attack(attackAim);
            this.Close();
        }
예제 #4
0
 //---------------------------------------------------------------------------------------
 public void FromMonPlaceSelect(Mon_Card mc)
 {
     button1.Hide();
     if (mc is Mon_null)
     {
         this.NameLabel1.Text         = mc.Name + mc.Stateof();
         this.LevelLabel.Text         = Levelstar(mc.Level);
         this.DescriptionTextBox.Text = mc.Description;
         this.AttLabel.Text           = "ATT: " + mc.Att.ToString();
         this.DefLabel.Text           = "DEF: " + mc.Att.ToString();
         this.MonPicBox.Image         = mc.cardImage;
         button2.Text = mc.Name + " 攻击";
     }
     else
     {
         this.NameLabel1.Text         = mc.Name;
         this.LevelLabel.Text         = Levelstar(mc.Level);
         this.DescriptionTextBox.Text = mc.Description;
         this.AttLabel.Text           = "ATT: " + mc.Att.ToString();
         this.DefLabel.Text           = "DEF: " + mc.Att.ToString();
         this.MonPicBox.Image         = mc.cardImage;
         button2.Text = mc.Name + " 攻击";
         if (mc.State == CardState.State_Att)
         {
             button2.Show();//攻击指令
             button3.Show();
         }
         else
         {
             button2.Hide();
             button3.Show();
         }
     }
 }
예제 #5
0
        /// <summary>
        /// 当怪物被从【怪物场地】选择后:
        /// </summary>
        /// 此方法通常被MainFightPlace调用,用于给出从怪物场上获得的信息
        /// 此方法主要判断选择的怪物可否进行相应的操作(包括按钮显示的时机)
        /// 首先判断是否是空怪物
        /// 若不是则调用其他按钮显示条件函数,用于按钮显示的限制
        /// <param name="mc"></param>
        public void FromMonPlaceSelect(Mon_Card mc)
        {
            /*this.fromHandCardMc = new Mon_null();
             * infofromMainMc = new Mon_null();
             * selcetFromMonPlace_Mc = new Mon_null();
             * fromGaveCard = new Mon_null();*/

            selectFromMonPlace_Mc = mc;
            HideAllButton();
            if (mc is Mon_null)//若是空怪物
            {
                selectFromMonPlace_Mc        = mc;
                this.NameLabel1.Text         = selectFromMonPlace_Mc.GiveCardState() + selectFromMonPlace_Mc.Name;
                this.LevelLabel.Text         = Levelstar(selectFromMonPlace_Mc.Level);
                this.DescriptionTextBox.Text = selectFromMonPlace_Mc.Description;
                this.AttLabel.Text           = "ATT: " + selectFromMonPlace_Mc.Att.ToString();
                this.DefLabel.Text           = "DEF: " + selectFromMonPlace_Mc.Def.ToString();
                this.MonPicBox.Image         = selectFromMonPlace_Mc.cardImage;
                button2.Text = selectFromMonPlace_Mc.Name + " 攻击";
            }
            else//不是空则
            {
                this.NameLabel1.Text         = selectFromMonPlace_Mc.GiveCardState() + selectFromMonPlace_Mc.Name;
                this.LevelLabel.Text         = Levelstar(selectFromMonPlace_Mc.Level);
                this.DescriptionTextBox.Text = selectFromMonPlace_Mc.Description;
                this.AttLabel.Text           = "ATT: " + selectFromMonPlace_Mc.Att.ToString();
                this.DefLabel.Text           = "DEF: " + selectFromMonPlace_Mc.Def.ToString();
                this.MonPicBox.Image         = selectFromMonPlace_Mc.cardImage;
                button2.Text = selectFromMonPlace_Mc.Name + " 攻击";
                Button2ShowWithRequest();
                Button3ShowWithRequest();
                Button7ShowWithRequest();
            }
        }
예제 #6
0
 /// <summary>
 /// 从【墓地】获取卡片信息
 /// </summary>
 /// 判断是什么类型的卡,再调用按钮显示函数(带条件的)
 /// <param name="card"></param>
 public void FromGraveSelect(Card card)
 {
     fromHandCardMc        = new Mon_null();
     infofromMainMc        = new Mon_null();
     selectFromMonPlace_Mc = new Mon_null();
     fromGaveCard          = new Mon_null();
     fromGaveCard          = card;
     button1.Hide();
     button2.Hide();
     button3.Hide();
     if (card is Mon_Card)//如果是怪物卡
     {
         Mon_Card mc = (Mon_Card)fromGaveCard;
         this.NameLabel1.Text         = mc.GiveCardState() + mc.Name;
         this.LevelLabel.Text         = Levelstar(mc.Level);
         this.DescriptionTextBox.Text = mc.Description;
         this.AttLabel.Text           = "ATT: " + mc.Att.ToString();
         this.DefLabel.Text           = "DEF: " + mc.Def.ToString();
         this.MonPicBox.Image         = mc.cardImage;
         button2.Text = mc.Name + " 攻击";
         Button2ShowWithRequest();
         Button3ShowWithRequest();
     }
     else if (card is MgcPit_Card)
     {
         MgcPit_Card mpc = (MgcPit_Card)fromGaveCard;
         this.NameLabel1.Text         = mpc.GiveCardState() + mpc.Name;
         this.DescriptionTextBox.Text = mpc.Description;
         this.MonPicBox.Image         = mpc.cardImage;
     }
 }
예제 #7
0
        //双击列表进行攻击
        private void ListBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Mon_Card attackAim = (Mon_Card)listBox1.SelectedItem;

            attackFromMc.Attack(attackAim);
            this.Close();
        }
예제 #8
0
 public void Block_WhenMonChangeState(Mon_Card mc)
 {
     if (Catch_WhenMonChangeState.Count > 0)
     {
         for (int i = 0; i < Catch_WhenMonChangeState.Count; i++)
         {
             Catch_WhenMonChangeState[i](mc);
         }
     }
 }
예제 #9
0
 public void Block_WhenMonWarAnnouceBlocked(Mon_Card mc)
 {
     if (Catch_WhenMonWarAnnouceBlocked.Count > 0)
     {
         for (int i = 0; i < Catch_WhenMonWarAnnouceBlocked.Count; i++)
         {
             Catch_WhenMonWarAnnouceBlocked[i](mc);
         }
     }
 }
예제 #10
0
 public CallResult MonCall(Mon_Card mc)
 {
     if (place.Contains(mon_null))
     {
         int index = place.IndexOf(mon_null);
         place[index] = mc;
         mc.State     = Card.CardState.State_Att;
         return(CallResult.Success);
     }
     else
     {
         return(CallResult.Full);
     }
 }
예제 #11
0
        public InfoForm(Player player)
        {
            this.Player     = player;
            fromHandCardMc  = mon_null;
            fromHandCardMPc = mpc_null;

            //infofromMainMc = mon_null;

            selectFromMonPlace_Mc     = mon_null;
            selectFromMgcPitPlace_Mpc = mpc_null;

            fromGaveCard = card_null;


            InitializeComponent();
        }
예제 #12
0
 public void GetInfoFromCardFromMainPlace(Card card)
 {
     button1.Hide();
     button2.Hide();
     button3.Hide();
     if (card is Mon_Card)
     {
         fromMainMc                   = (Mon_Card)card;
         this.NameLabel1.Text         = fromMainMc.Name + fromMainMc.Stateof();
         this.LevelLabel.Text         = Levelstar(fromMainMc.Level);
         this.DescriptionTextBox.Text = fromMainMc.Description;
         this.AttLabel.Text           = "ATT: " + fromMainMc.Att.ToString();
         this.DefLabel.Text           = "DEF: " + fromMainMc.Att.ToString();
         this.MonPicBox.Image         = fromMainMc.cardImage;
     }
 }
예제 #13
0
//---------------------------------------------------------------------------
        public bool Catch(Mon_Card mon)
        {
            WhenMonWarAnnounce_ToBlock = false;
            this.MonToStop             = mon;
            if (mon.Player != this.Player)
            {
                BlockDialog blockDialog = new BlockDialog(mon, this, MainPlaceInfo.TriggerType.Trigger_WhenMonWarAnnounce);
                blockDialog.ShowDialog();
                if (WhenMonWarAnnounce_ToBlock)
                {
                    this.Player.MainPlaceInfo.Catch_WhenMonWarAnnounce.Remove(this.Catch);
                    Trigger_WhenEffectOn(effect1);
                }
            }

            return(WhenMonWarAnnounce_ToBlock);
        }
예제 #14
0
 public void GetInfoFromCardFromHandCard(Card card)
 {
     button1.Hide();
     button2.Hide();
     button3.Hide();
     if (card is Mon_Card)
     {
         mc = (Mon_Card)card;
         this.NameLabel1.Text         = mc.Name;
         this.LevelLabel.Text         = Levelstar(mc.Level);
         this.DescriptionTextBox.Text = mc.Description;
         this.AttLabel.Text           = "ATT: " + mc.Att.ToString();
         this.DefLabel.Text           = "DEF: " + mc.Att.ToString();
         this.MonPicBox.Image         = mc.cardImage;
         CardType     = CardType.Mon_Card;
         button1.Text = "召唤" + mc.Name;
         button1.Show();
     }
 }
예제 #15
0
        //-------------------------------------------------------------------------------------------------



        /// <summary>
        /// 从【手牌】获取信息
        /// </summary>
        /// 判断为何种卡
        /// <param name="card"></param>
        public void FromHandCardSelect(Card card)
        {
            HideAllButton();
            if (card is Mon_Card)
            {
                fromHandCardMc               = (Mon_Card)card;
                this.NameLabel1.Text         = fromHandCardMc.GiveCardState() + fromHandCardMc.Name;
                this.LevelLabel.Text         = Levelstar(fromHandCardMc.Level);
                this.DescriptionTextBox.Text = fromHandCardMc.Description;
                this.AttLabel.Text           = "ATT: " + fromHandCardMc.Att.ToString();
                this.DefLabel.Text           = "DEF: " + fromHandCardMc.Def.ToString();
                this.MonPicBox.Image         = fromHandCardMc.cardImage;
                button1.Text = "召唤" + fromHandCardMc.Name;
                CardType     = CardType.Mon_Card;
                Button1ShowWithRequest();
            }
            else if (card is MgcPit_Card)
            {
                fromHandCardMPc              = (MgcPit_Card)card;
                this.NameLabel1.Text         = fromHandCardMPc.GiveCardState() + fromHandCardMPc.Name;
                this.LevelLabel.Text         = "";
                this.DescriptionTextBox.Text = fromHandCardMPc.Description;
                this.AttLabel.Text           = "";
                this.DefLabel.Text           = "";
                if (card is Mgc_Card)
                {
                    CardType = CardType.Mgc_Card;
                }
                else if (card is MgcPit_Card)
                {
                    CardType = CardType.Pit_Card;
                }
                this.MonPicBox.Image = fromHandCardMPc.cardImage;
                Button4ShowWithRequest();
                Button5ShowWithRequest_SelectInHandCard();
            }
        }
예제 #16
0
 public InfoForm()
 {
     mc         = new Mon_null();
     fromMainMc = new Mon_null();
     InitializeComponent();
 }
예제 #17
0
 public AttackChoose(Mon_Card attackFromMc)
 {
     this.player       = attackFromMc.Player;
     this.attackFromMc = attackFromMc;
     InitializeComponent();
 }