/// <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; } }
public CallResult MgcPitBackSet(MgcPit_Card mgc) { if (place.Contains(mgcPit_null)) { int index = place.IndexOf(mgcPit_null); place[index] = mgc; place[index].firstBackSet = true; place[index].State = Card.CardState.State_BackSet; return(CallResult.Success); } else { return(CallResult.Full); } }
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(); }
/// <summary> /// 当怪物被从魔法陷阱卡区域选择后 /// </summary> /// <param name="mgc"></param> public void FromMgcPitPlaceSelect(MgcPit_Card mgc) { selectFromMgcPitPlace_Mpc = mgc; HideAllButton(); if (mgc is MgcPit_null)//若是空区域 { selectFromMgcPitPlace_Mpc = mgc; this.NameLabel1.Text = selectFromMgcPitPlace_Mpc.GiveCardState() + selectFromMgcPitPlace_Mpc.Name; this.LevelLabel.Text = ""; this.DescriptionTextBox.Text = selectFromMgcPitPlace_Mpc.Description; this.AttLabel.Text = ""; this.DefLabel.Text = ""; this.MonPicBox.Image = selectFromMgcPitPlace_Mpc.cardImage; } else//不是空则 { if (selectFromMgcPitPlace_Mpc.Player == this.Player) { this.NameLabel1.Text = selectFromMgcPitPlace_Mpc.GiveCardState() + selectFromMgcPitPlace_Mpc.Name; this.LevelLabel.Text = ""; this.DescriptionTextBox.Text = selectFromMgcPitPlace_Mpc.Description; this.AttLabel.Text = ""; this.DefLabel.Text = ""; this.MonPicBox.Image = selectFromMgcPitPlace_Mpc.cardImage; } else { this.NameLabel1.Text = "埋伏卡"; this.LevelLabel.Text = ""; this.DescriptionTextBox.Text = ""; this.AttLabel.Text = ""; this.DefLabel.Text = ""; this.MonPicBox.Image = selectFromMgcPitPlace_Mpc.backSetImage; } Button6ShowWithRequest_SelectInMgcPitPlace(); } }
//------------------------------------------------------------------------------------------------- /// <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(); } }