public CardPic(Card card, string type, FECipherVit Owner) { this.Owner = Owner; NumberInDeck = card.NumberInDeck; SerialNo = card.SerialNo; SizeMode = PictureBoxSizeMode.StretchImage; ratio = Owner.ratio; WIDTH = (int)(80 * Owner.ratio); HEIGHT = (int)(112 * Owner.ratio); Width = WIDTH; Height = HEIGHT; if (File.Exists(@"img/thumbnails/" + ratio.ToString()+"/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg")) { Image = Image.FromFile(@"img/thumbnails/" + ratio.ToString()+"/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg"); } else if (File.Exists(@"img/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg")) { Image = Image.FromFile(@"img/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg"); } else { Image = ErrorImage; } thisCard = card; Type = type; FrontShown = card.FrontShown; IsHorizontal = card.IsHorizontal; Visible = card.Visible; }
public void CardInfoRenew(Card thisCard) { try { pictureBoxCardInfo.Image = Image.FromFile(@"img/" + thisCard.SerialNo.ToString() + ".jpg"); } catch { pictureBoxCardInfo.Image = pictureBoxCardInfo.ErrorImage; } string[] CardDataInfo = Owner.CardData[thisCard.SerialNo]; string str = ""; str += "日文卡名:" + CardDataInfo[3] + Environment.NewLine; str += "中文卡名:" + CardDataInfo[4] + Environment.NewLine; str += "阶级/兵种:" + CardDataInfo[7] + "/" + CardDataInfo[8] + Environment.NewLine; str += "战斗力/支援力/射程:" + CardDataInfo[13] + "/" + CardDataInfo[14] + "/" + CardDataInfo[15] + Environment.NewLine; str += "出击/转职费用:" + CardDataInfo[5] + "/" + CardDataInfo[6] + Environment.NewLine; str += "势力:" + CardDataInfo[9] + Environment.NewLine; str += "性别/武器/属性:" + CardDataInfo[10] + "/" + CardDataInfo[11] + "/"; if (CardDataInfo[12] == "") { str += "-" + Environment.NewLine; } else { str += CardDataInfo[12] + Environment.NewLine; } str += Environment.NewLine; str += "能力:" + Environment.NewLine; str += CardDataInfo[16].Replace("$$", Environment.NewLine) + Environment.NewLine; if (CardDataInfo[17] != "" && CardDataInfo[17] != "-") { str += "支援能力:" + Environment.NewLine; str += CardDataInfo[17] + Environment.NewLine; } if (thisCard.OverlayCardNo.Count != 0) { str += Environment.NewLine; foreach (int CardNo in thisCard.OverlayCardNo) { Card OverlayedCard = Player.Overlay.SearchCard(CardNo); if (OverlayedCard != null) { str += "叠放:" + OverlayedCard.UnitTitle + " " + OverlayedCard.UnitName + Environment.NewLine; } } } if (thisCard.Comments != "") { str += Environment.NewLine; str += "实际战斗力:" + (thisCard.Power + thisCard.Comments).ToString() + Environment.NewLine; } textBoxCardInfo.Text = str; }
public CardPic(Card card, string type) { NumberInDeck = card.NumberInDeck; SerialNo = card.SerialNo; SizeMode = PictureBoxSizeMode.StretchImage; Width = 80; Height = 112; try { Image = Image.FromFile(@"img/" + SerialNo.ToString() + ".jpg"); } catch { Image = this.ErrorImage; } thisCard = card; Type = type; FrontShown = card.FrontShown; IsHorizontal = card.IsHorizontal; Visible = card.Visible; }
private void button_Confirm_Click(object sender, EventArgs e) { Target = Cardset[CardListBox.SelectedIndex]; DialogResult = DialogResult.OK; Close(); }
public void ReceiveAllCards(List<string> contents) { Owner.Rival.Deck.CardNum = Convert.ToInt32(contents[contents.IndexOf("[Deck]") + 1]); Owner.Rival.Deck.CardList.Clear(); if (contents[contents.IndexOf("[Deck]") + 2] != "-1") { int serialno = Convert.ToInt32(contents[contents.IndexOf("[Deck]") + 2]); Owner.Rival.Deck.CardList.Add(new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival)); Owner.Rival.Deck.CardList[0].Visible = true; } else { Owner.Rival.Deck.CardList.Add(new Card(-1, -1, "", -1, -1, Owner.Rival)); ; } Owner.Rival.Hand.CardNum = Convert.ToInt32(contents[contents.IndexOf("[Hand]") + 1]); Owner.Rival.Grave.CardList.Clear(); for (int i = 0; i < Convert.ToInt32(contents[contents.IndexOf("[Grave]") + 1]); i++) { int serialno = Convert.ToInt32(contents[contents.IndexOf("[Grave]") + 2 + i]); Owner.Rival.Grave.CardList.Add(new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival)); } Owner.Rival.Support.CardList.Clear(); if (contents[contents.IndexOf("[Support]") + 1] != "-1") { int serialno = Convert.ToInt32(contents[contents.IndexOf("[Support]") + 1]); Owner.Rival.Support.CardList.Add(new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival)); } Owner.Rival.Kizuna.CardList.Clear(); for (int i = 0; i < Convert.ToInt32(contents[contents.IndexOf("[Kizuna]") + 1]); i++) { bool Reversed = false; int serialno; if (contents[contents.IndexOf("[Kizuna]") + 2 + i].Substring(0, 1) == "!") { Reversed = true; serialno = Convert.ToInt32(contents[contents.IndexOf("[Kizuna]") + 2 + i].Substring(1)); } else { serialno = Convert.ToInt32(contents[contents.IndexOf("[Kizuna]") + 2 + i]); } Card temp = new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival); if (!Reversed) { temp.FrontShown = true; } temp.IsHorizontal = true; Owner.Rival.Kizuna.CardList.Add(temp); } Owner.Rival.KizunaUsed.CardList.Clear(); for (int i = 0; i < Convert.ToInt32(contents[contents.IndexOf("[KizunaUsed]") + 1]); i++) { bool Reversed = false; int serialno; if (contents[contents.IndexOf("[KizunaUsed]") + 2 + i].Substring(0, 1) == "!") { Reversed = true; serialno = Convert.ToInt32(contents[contents.IndexOf("[KizunaUsed]") + 2 + i].Substring(1)); } else { serialno = Convert.ToInt32(contents[contents.IndexOf("[KizunaUsed]") + 2 + i]); } Card temp = new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival); if (!Reversed) { temp.FrontShown = true; } temp.IsHorizontal = true; Owner.Rival.KizunaUsed.CardList.Add(temp); } Owner.Rival.Orb.CardNum = Convert.ToInt32(contents[contents.IndexOf("[Orb]") + 1]); Owner.Rival.FrontField.CardList.Clear(); for (int i = 0; i < Convert.ToInt32(contents[contents.IndexOf("[FrontField]") + 1]); i++) { bool Reversed = false; bool IsHorizontal = false; int serialno; string serialnotemp = contents[contents.IndexOf("[FrontField]") + 2 + i]; if (serialnotemp.Substring(0, 1) == "!") { Reversed = true; serialnotemp = serialnotemp.Substring(1); } if (serialnotemp.Substring(0, 1) == "@") { IsHorizontal = true; serialnotemp = serialnotemp.Substring(1); } serialno = Convert.ToInt32(serialnotemp); Card temp = new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival); if (Reversed) { temp.FrontShown = false; } if (IsHorizontal) { temp.IsHorizontal = true; } Owner.Rival.FrontField.CardList.Add(temp); } Owner.Rival.BackField.CardList.Clear(); for (int i = 0; i < Convert.ToInt32(contents[contents.IndexOf("[BackField]") + 1]); i++) { bool Reversed = false; bool IsHorizontal = false; int serialno; string serialnotemp = contents[contents.IndexOf("[BackField]") + 2 + i]; if (serialnotemp.Substring(0, 1) == "!") { Reversed = true; serialnotemp = serialnotemp.Substring(1); } if (serialnotemp.Substring(0, 1) == "@") { IsHorizontal = true; serialnotemp = serialnotemp.Substring(1); } serialno = Convert.ToInt32(serialnotemp); Card temp = new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival); if (Reversed) { temp.FrontShown = false; } if (IsHorizontal) { temp.IsHorizontal = true; } Owner.Rival.BackField.CardList.Add(temp); } Owner.Rival.Overlay.CardList.Clear(); for (int i = 0; i < Convert.ToInt32(contents[contents.IndexOf("[Overlay]") + 1]); i++) { int serialno = Convert.ToInt32(contents[contents.IndexOf("[Overlay]") + 2 + i]); Owner.Rival.Overlay.CardList.Add(new Card(-1, serialno, Owner.CardData[serialno][4], Convert.ToInt32(Owner.CardData[serialno][13]), Convert.ToInt32(Owner.CardData[serialno][14]), Owner.Rival)); } }
public void OverlayCard(Card card, int DesCardNo) { Card DesCard = SearchCard(DesCardNo); Region DesRegion = DesCard.BelongedRegion(); int pos = DesCard.BelongedRegion().CardList.IndexOf(DesCard); MoveCard(DesCard, Overlay); MoveCard(card, DesRegion, pos); if (DesCard.OverlayCardNo.Count != 0) { card.OverlayCardNo.AddRange(DesCard.OverlayCardNo); DesCard.OverlayCardNo = new List<int>(); } card.OverlayCardNo.Add(DesCard.NumberInDeck); }
public void MoveCard(Card card, Region toWhere, int NumberDes) { if (toWhere.Equals(this.Deck) || toWhere.Equals(this.Orb)) { card.FrontShown = false; card.Visible = false; } else { if (!((toWhere.Equals(this.Kizuna) || toWhere.Equals(this.KizunaUsed)) && (card.BelongedRegion().Equals(this.Kizuna) || card.BelongedRegion().Equals(this.KizunaUsed)))) { card.FrontShown = true; card.Visible = true; } } Region fromWhere = card.BelongedRegion(); fromWhere.CardList.Remove(card); toWhere.CardList.Insert(NumberDes, card); }
public string GetTextOfMovingToRegion(Card card, string toWhere, bool IsCheckingRegion) { string text; if ((new List<string> { "Orb", "DeckShuffle", "DeckTop", "DeckBottom", "Hand" }).Contains(toWhere)) { if (card.BelongedRegion().Equals(Player.Deck)) { if (!IsCheckingRegion) { text = "#将卡组顶牌"; } else { text = "#将[" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.UnitTitle + " " + card.UnitName + "]"; } } else if (card.BelongedRegion().Equals(Player.Orb)) { text = "#将[宝玉区(" + (Player.Orb.CardList.IndexOf(card) + 1).ToString() + ")]"; } else if (card.BelongedRegion().Equals(Player.Hand)) { text = "#将[手卡(" + (Player.Hand.CardList.IndexOf(card) + 1).ToString() + ")]"; } else { text = "#将[" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.UnitTitle + " " + card.UnitName + "]"; } } else { text = "#将[" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.UnitTitle + " " + card.UnitName + "]"; } switch (toWhere) { case "Orb": text += "置于宝玉区"; break; case "DeckShuffle": text += "加入卡组并切洗"; break; case "DeckTop": text += "置于卡组顶端"; break; case "DeckBottom": text += "置于卡组底端"; break; case "Hand": text += "加入手牌"; break; case "Support": text += "置于支援区"; break; case "Kizuna": text += "置于羁绊区"; break; case "Grave": text += "置于退避区"; break; } if (card.OverlayCardNo.Count > 0) { text += "(叠放卡送入退避区)。"; } else { text += "。"; } return text; }
public void GrowCard(Card card, int DesCardNo) { Card DesCard = SearchCard(DesCardNo); MoveCard(card, Overlay); DesCard.OverlayCardNo.Add(card.NumberInDeck); }
public void MoveCard(Card card, Region toWhere, int NumberDes) { Region fromWhere = card.BelongedRegion(); if (fromWhere.Equals(Overlay)) { List<Card> temp = new List<Card>(); temp.AddRange(FrontField.CardList); temp.AddRange(BackField.CardList); foreach (Card parentCard in temp) { if (parentCard.OverlayCardNo.Contains(card.NumberInDeck)) { parentCard.OverlayCardNo.Remove(card.NumberInDeck); break; } } } if (toWhere.Equals(Deck) || toWhere.Equals(Orb)) { card.FrontShown = false; card.Visible = false; } else { if (!((toWhere.Equals(Kizuna) || toWhere.Equals(KizunaUsed)) && (card.BelongedRegion().Equals(Kizuna) || card.BelongedRegion().Equals(KizunaUsed)))) { card.FrontShown = true; card.Visible = true; } } if (!((toWhere.Equals(FrontField) || toWhere.Equals(BackField)) && (card.BelongedRegion().Equals(FrontField) || card.BelongedRegion().Equals(BackField)))) { card.SolCounter = 0; card.LunaCounter = 0; } fromWhere.CardList.Remove(card); toWhere.CardList.Insert(NumberDes, card); }
public void DeOverlayCardToGrave(Card card, Card newtop) { bool isHorizontal = card.IsHorizontal; int pos = card.BelongedRegion().CardList.IndexOf(card); Region DesRegion = card.BelongedRegion(); MoveCard(card, Grave); MoveCard(newtop, DesRegion, pos); foreach(int overlaycardnum in card.OverlayCardNo) { if(overlaycardnum != newtop.NumberInDeck) { newtop.OverlayCardNo.Add(overlaycardnum); } } card.OverlayCardNo.Clear(); newtop.IsHorizontal = isHorizontal; }
public string GetTextOfMovingToRegion(Card card, string toWhere, bool IsCheckingRegion) { string text; if (Language == Language.Chinese) { if ((new List<string> { "Orb", "DeckShuffle", "DeckTop", "DeckBottom", "Hand" }).Contains(toWhere)) { if (card.BelongedRegion().Equals(Player.Deck)) { if (!IsCheckingRegion) { text = "#将卡组顶牌"; } else { text = "#将[卡组(" + (Player.Deck.CardList.IndexOf(card) + 1).ToString() + ")][" + card.CardName + "]"; } } else if (card.BelongedRegion().Equals(Player.Orb)) { text = "#将[宝玉区(" + (Player.Orb.CardList.IndexOf(card) + 1).ToString() + ")]"; } else if (card.BelongedRegion().Equals(Player.Hand)) { text = "#将[手牌(" + (Player.Hand.CardList.IndexOf(card) + 1).ToString() + ")]"; } else if (card.BelongedRegion().Equals(Player.FrontField) || card.BelongedRegion().Equals(Player.BackField) || card.BelongedRegion().Equals(Player.Grave) || card.BelongedRegion().Equals(Player.Kizuna) || card.BelongedRegion().Equals(Player.KizunaUsed) || card.BelongedRegion().Equals(Player.Support) || card.BelongedRegion().Equals(Player.Overlay)) { text = "#将[" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.CardName + "]"; } else { text = "#将一张卡"; } } else if (card.BelongedRegion().Equals(Player.Deck) || card.BelongedRegion().Equals(Player.Orb) || card.BelongedRegion().Equals(Player.Hand) || card.BelongedRegion().Equals(Player.FrontField) || card.BelongedRegion().Equals(Player.BackField) || card.BelongedRegion().Equals(Player.Grave) || card.BelongedRegion().Equals(Player.Kizuna) || card.BelongedRegion().Equals(Player.KizunaUsed) || card.BelongedRegion().Equals(Player.Support) || card.BelongedRegion().Equals(Player.Overlay)) { text = "#将[" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.CardName + "]"; } else { text = "#将[" + card.CardName + "]"; } switch (toWhere) { case "Orb": text += "置于宝玉区"; break; case "DeckShuffle": text += "加入卡组并切洗"; break; case "DeckTop": text += "置于卡组顶端"; break; case "DeckBottom": text += "置于卡组底端"; break; case "Hand": text += "加入手牌"; break; case "Support": text += "置于支援区"; break; case "Kizuna": text += "置于羁绊区"; break; case "Grave": text += "置于退避区"; break; } if (card.OverlayCardNo.Count > 0) { text += "(叠放卡送入退避区)。"; } else { text += "。"; } } else { if ((new List<string> { "Orb", "DeckShuffle", "DeckTop", "DeckBottom", "Hand" }).Contains(toWhere)) { if (card.BelongedRegion().Equals(Player.Deck)) { if (!IsCheckingRegion) { text = "#Place the top card of Deck"; } else { text = "#Place [Deck(" + (Player.Deck.CardList.IndexOf(card) + 1).ToString() + ")][" + card.CardName + "]"; } } else if (card.BelongedRegion().Equals(Player.Orb)) { text = "#Place [Orb(" + (Player.Orb.CardList.IndexOf(card) + 1).ToString() + ")]"; } else if (card.BelongedRegion().Equals(Player.Hand)) { text = "#Place [Hand(" + (Player.Hand.CardList.IndexOf(card) + 1).ToString() + ")]"; } else if (card.BelongedRegion().Equals(Player.FrontField) || card.BelongedRegion().Equals(Player.BackField) || card.BelongedRegion().Equals(Player.Grave) || card.BelongedRegion().Equals(Player.Kizuna) || card.BelongedRegion().Equals(Player.KizunaUsed) || card.BelongedRegion().Equals(Player.Support) || card.BelongedRegion().Equals(Player.Overlay)) { text = "#Place [" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.CardName + "]"; } else { text = "#Place a card"; } } else if (card.BelongedRegion().Equals(Player.Deck) || card.BelongedRegion().Equals(Player.Orb) || card.BelongedRegion().Equals(Player.Hand) || card.BelongedRegion().Equals(Player.FrontField) || card.BelongedRegion().Equals(Player.BackField) || card.BelongedRegion().Equals(Player.Grave) || card.BelongedRegion().Equals(Player.Kizuna) || card.BelongedRegion().Equals(Player.KizunaUsed) || card.BelongedRegion().Equals(Player.Support) || card.BelongedRegion().Equals(Player.Overlay)) { text = "#Place [" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.CardName + "]"; } else { text = "#Place [" + card.CardName + "]"; } switch (toWhere) { case "Orb": text += " in Orb"; break; case "DeckShuffle": text += " to Deck and shuffle"; break; case "DeckTop": text += " on the Top of Deck"; break; case "DeckBottom": text += " at the Bottom of Deck"; break; case "Hand": text = text.Replace("Place", "Add"); text += " to Hand"; break; case "Support": text += " in Support"; break; case "Kizuna": text += " in Bond"; break; case "Grave": text += " in Retreat"; break; } if (card.OverlayCardNo.Count > 0) { text += "(the other cards in the stack will be sent to Retreat)."; } else { text += "."; } } return text; }
public void CardInfoRenew(Card thisCard) { try { pictureBoxCardInfo.Image = Image.FromFile(@"img/(" + CardData[thisCard.SerialNo][1] + ")" + CardData[thisCard.SerialNo][2] + ".jpg"); } catch { try { pictureBoxCardInfo.Image = Image.FromFile(@"img/back.jpg"); } catch { } } string[] CardDataInfo = CardData[thisCard.SerialNo]; string str = ""; if (Language == Language.Chinese) { if (AppConfig.GetValue("CardInfoBrief") == "False") { str += "日文卡名:" + CardDataInfo[3] + Environment.NewLine; str += "中文卡名:" + CardDataInfo[4] + Environment.NewLine; str += "阶级/兵种:" + CardDataInfo[7] + "/" + CardDataInfo[8] + Environment.NewLine; str += "战斗力/支援力/射程:" + CardDataInfo[13] + "/" + CardDataInfo[14] + "/" + CardDataInfo[15] + Environment.NewLine; if (CardDataInfo[6] != "" && CardDataInfo[6] != "-") { str += "出击/转职费用:" + CardDataInfo[5] + "/" + CardDataInfo[6] + Environment.NewLine; } else { str += "出击/转职费用:" + CardDataInfo[5] + "/-" + Environment.NewLine; } str += "势力:" + CardDataInfo[9] + Environment.NewLine; str += "性别/武器/属性:" + CardDataInfo[10] + "/" + CardDataInfo[11] + "/"; if (CardDataInfo[12] == "") { str += "-" + Environment.NewLine; } else { str += CardDataInfo[12] + Environment.NewLine; } str += Environment.NewLine; str += "能力:" + Environment.NewLine; } str += CardDataInfo[16].Replace("$$", Environment.NewLine) + Environment.NewLine; if (CardDataInfo[17] != "" && CardDataInfo[17] != "-") { if (AppConfig.GetValue("CardInfoBrief") == "False") { str += "支援能力:" + Environment.NewLine; } str += CardDataInfo[17].Replace("$$", Environment.NewLine) + Environment.NewLine; } if (thisCard.OverlayCardNo.Count != 0) { str += Environment.NewLine; foreach (int CardNo in thisCard.OverlayCardNo) { Card OverlayedCard = thisCard.BelongedRegion().Controller.Overlay.SearchCard(CardNo); if (OverlayedCard != null) { str += "叠放:" + OverlayedCard.CardName + Environment.NewLine; } } } } else { if (AppConfig.GetValue("CardInfoBrief") == "False") { str += "Japanese cardname: " + CardDataInfo[3] + Environment.NewLine; str += "English cardname: " + CardDataInfo[4] + Environment.NewLine; str += "Class: " + CardDataInfo[7] + "/" + CardDataInfo[8] + Environment.NewLine; str += "Attack/Support/Range: " + CardDataInfo[13] + "/" + CardDataInfo[14] + "/" + CardDataInfo[15] + Environment.NewLine; if (CardDataInfo[6] != "" && CardDataInfo[6] != "-") { str += "Deploy/Promote Cost: " + CardDataInfo[5] + "/" + CardDataInfo[6] + Environment.NewLine; } else { str += "Deploy/Promote Cost: " + CardDataInfo[5] + "/-" + Environment.NewLine; } str += "Symbol: " + CardDataInfo[9] + Environment.NewLine; str += "Gender/Weapon/Type: " + CardDataInfo[10] + "/" + CardDataInfo[11] + "/"; if (CardDataInfo[12] == "") { str += "-" + Environment.NewLine; } else { str += CardDataInfo[12] + Environment.NewLine; } str += Environment.NewLine; str += "Skill: " + Environment.NewLine; } str += CardDataInfo[16].Replace("$$", Environment.NewLine) + Environment.NewLine; if (CardDataInfo[17] != "" && CardDataInfo[17] != "-") { if (AppConfig.GetValue("CardInfoBrief") == "False") { str += "Support Skill: " + Environment.NewLine; } str += CardDataInfo[17].Replace("$$", Environment.NewLine) + Environment.NewLine; } if (thisCard.OverlayCardNo.Count != 0) { str += Environment.NewLine; foreach (int CardNo in thisCard.OverlayCardNo) { Card OverlayedCard = thisCard.BelongedRegion().Controller.Overlay.SearchCard(CardNo); if (OverlayedCard != null) { str += "Stack: " + OverlayedCard.CardName + Environment.NewLine; } } } } //if (thisCard.Comments != "") //{ // str += Environment.NewLine; // str += "实际战斗力:" + (thisCard.Power + thisCard.Comments).ToString() + Environment.NewLine; //} textBoxCardInfo.Text = str; }
public Card SpecialLevelUp(Card card) { Card des = null; switch (card.UnitTitle) { case "自称马尔斯的剑士": if (Player.SearchCardsOnField("马尔斯").Count > 0) { des = Player.SearchCardsOnField("马尔斯")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("是否在“马尔斯”上升级/转职?", "升级/转职", MessageBoxButtons.YesNo)) { return des; } } return null; case "来自未来的剑士": if (Player.SearchCardsOnField("马尔斯").Count > 0) { des = Player.SearchCardsOnField("马尔斯")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("是否在“马尔斯”上升级/转职?", "升级/转职", MessageBoxButtons.YesNo)) { return des; } } return null; case "自称那巴尔的剑士": if (Player.SearchCardsOnField("那巴尔").Count > 0) { des = Player.SearchCardsOnField("那巴尔")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("是否在“那巴尔”上升级/转职?", "升级/转职", MessageBoxButtons.YesNo)) { return des; } } return null; case "必杀剑之剑手": if (card.UnitName == "萨姆托") { if (Player.SearchCardsOnField("那巴尔").Count > 0) { des = Player.SearchCardsOnField("那巴尔")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("是否在“那巴尔”上升级/转职?", "升级/转职", MessageBoxButtons.YesNo)) { return des; } } } return null; case "透魔龙": if (Player.SearchCardsOnField("加隆").Count > 0) { des = Player.SearchCardsOnField("加隆")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("是否在“加隆”上升级/转职?", "升级/转职", MessageBoxButtons.YesNo)) { return des; } } if (Player.SearchCardsOnField("君特").Count > 0) { des = Player.SearchCardsOnField("君特")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("是否在“君特”上升级/转职?", "升级/转职", MessageBoxButtons.YesNo)) { return des; } } return null; case "Swordsman Known as Marth": if (Player.SearchCardsOnField("Marth").Count > 0) { des = Player.SearchCardsOnField("Marth")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("Do you want to Lv Up/CC on \"Marth\"?", "Lv Up/CC", MessageBoxButtons.YesNo)) { return des; } } return null; case "Warrior From a Grim Future": if (Player.SearchCardsOnField("Marth").Count > 0) { des = Player.SearchCardsOnField("Marth")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("Do you want to Lv Up/CC on \"Marth\"?", "Lv Up/CC", MessageBoxButtons.YesNo)) { return des; } } return null; case "Navarre Impersonator": if (Player.SearchCardsOnField("Navarre").Count > 0) { des = Player.SearchCardsOnField("Navarre")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("Do you want to Lv Up/CC on \"Navarre\"?", "Lv Up/CC", MessageBoxButtons.YesNo)) { return des; } } return null; case "User of the Killing Edge": if (card.UnitName == "Samto") { if (Player.SearchCardsOnField("Navarre").Count > 0) { des = Player.SearchCardsOnField("Navarre")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("Do you want to Lv Up/CC on \"Navarre\"?", "Lv Up/CC", MessageBoxButtons.YesNo)) { return des; } } } return null; case "Silent Dragon": if (Player.SearchCardsOnField("Garon").Count > 0) { des = Player.SearchCardsOnField("Garon")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("Do you want to Lv Up/CC on \"Garon\"?", "Lv Up/CC", MessageBoxButtons.YesNo)) { return des; } } if (Player.SearchCardsOnField("Gunter").Count > 0) { des = Player.SearchCardsOnField("Gunter")[0]; } if (des != null) { if (DialogResult.Yes == MessageBox.Show("Do you want to Lv Up/CC on \"Gunter\"?", "Lv Up/CC", MessageBoxButtons.YesNo)) { return des; } } return null; } return null; }
public void SetCardToField(Card card, Region region) { int CardNoWithSameName = -1; card.FrontShown = true; card.IsHorizontal = false; Card specard = SpecialLevelUp(card); if (specard != null) { CardNoWithSameName = specard.NumberInDeck; } else { if (Player.SearchCardsOnField(card.UnitName).Count > 1) { if (Language == Language.Chinese) { MessageBox.Show("战场上存在多张同名卡,请选择需要升级/转职的对象。", "存在同名卡", MessageBoxButtons.OK); } else { MessageBox.Show("There are several cards with same unitnames on field, please choose one to Lv Up/CC on.", "Same-name cards", MessageBoxButtons.OK); } SelectTargetCard selecttargetcard = new SelectTargetCard(Player, this, Player.SearchCardsOnField(card.UnitName)); if(DialogResult.OK==selecttargetcard.ShowDialog()) { CardNoWithSameName = selecttargetcard.Target.NumberInDeck; } } else if (Player.SearchCardsOnField(card.UnitName).Count == 1) { CardNoWithSameName = Player.SearchCardsOnField(card.UnitName)[0].NumberInDeck; } else { CardNoWithSameName = -1; } } if (Language == Language.Chinese) { if (CardNoWithSameName != -1) { OverlayQues overlayques = new OverlayQues(this); DialogResult Overlay = overlayques.ShowDialog(); if (Overlay == DialogResult.Yes) { Card OverlayedCard = Player.SearchCard(CardNoWithSameName); msgProcessor.Send("Overlay", "#从[" + GetRegionNameInString(card.BelongedRegion()) + "]将[" + GetRegionNameInString(OverlayedCard.BelongedRegion()) + "][" + OverlayedCard.CardName + "]升级/转职为[" + card.CardName + "](Lv" + (OverlayedCard.OverlayCardNo.Count + 2).ToString() + ")。"); Player.OverlayCard(card, CardNoWithSameName); } else if (Overlay == DialogResult.No) { Card GrownCard = Player.SearchCard(CardNoWithSameName); msgProcessor.Send("Grow", "#用[" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.CardName + "]使[" + GetRegionNameInString(GrownCard.BelongedRegion()) + "][" + GrownCard.CardName + "]成长为Lv" + (GrownCard.OverlayCardNo.Count + 2).ToString() + "。"); Player.GrowCard(card, CardNoWithSameName); } else { msgProcessor.Send("Summon", "#从[" + GetRegionNameInString(card.BelongedRegion()) + "]将[" + card.CardName + "]出击到" + GetRegionNameInString(region) + "(已存在同角色名的单位)。"); Player.MoveCard(card, region); } } else { msgProcessor.Send("Summon", "#从[" + GetRegionNameInString(card.BelongedRegion()) + "]将[" + card.CardName + "]出击到" + GetRegionNameInString(region) + "。"); Player.MoveCard(card, region); } } else { if (CardNoWithSameName != -1) { OverlayQues overlayques = new OverlayQues(this); DialogResult Overlay = overlayques.ShowDialog(); if (Overlay == DialogResult.Yes) { Card OverlayedCard = Player.SearchCard(CardNoWithSameName); msgProcessor.Send("Overlay", "#From [" + GetRegionNameInString(card.BelongedRegion()) + "] Level up / Class Change [" + GetRegionNameInString(OverlayedCard.BelongedRegion()) + "][" + OverlayedCard.CardName + "] to [" + card.CardName + "](Lv" + (OverlayedCard.OverlayCardNo.Count + 2).ToString() + ")."); Player.OverlayCard(card, CardNoWithSameName); } else if (Overlay == DialogResult.No) { Card GrownCard = Player.SearchCard(CardNoWithSameName); msgProcessor.Send("Grow", "#Using [" + GetRegionNameInString(card.BelongedRegion()) + "][" + card.CardName + "] grow [" + GetRegionNameInString(GrownCard.BelongedRegion()) + "][" + GrownCard.CardName + "] to Lv" + (GrownCard.OverlayCardNo.Count + 2).ToString() + "."); Player.GrowCard(card, CardNoWithSameName); } else { msgProcessor.Send("Summon", "#From [" + GetRegionNameInString(card.BelongedRegion()) + "] deploy [" + card.CardName + "] to " + GetRegionNameInString(region) + "(unit with same name exists)."); Player.MoveCard(card, region); } } else { msgProcessor.Send("Summon", "#From [" + GetRegionNameInString(card.BelongedRegion()) + "] deploy [" + card.CardName + "] to " + GetRegionNameInString(region) + "."); Player.MoveCard(card, region); } } msgProcessor.Send("Update", ""); Renew(); }