private void 升级转职ToolStripMenuItem_Click(object sender, EventArgs e) { Card thisCard = ((CardPic)CardPicClicked).thisCard; int CardNoWithSameName = -1; thisCard.FrontShown = true; thisCard.IsHorizontal = false; Card specard = SpecialLevelUp(thisCard); if (specard != null) { CardNoWithSameName = specard.NumberInDeck; } else { if (Player.SearchCardsOnField(thisCard.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(thisCard.UnitName)); if (DialogResult.OK == selecttargetcard.ShowDialog()) { CardNoWithSameName = selecttargetcard.Target.NumberInDeck; } } else if (Player.SearchCardsOnField(thisCard.UnitName).Count == 1) { CardNoWithSameName = Player.SearchCardsOnField(thisCard.UnitName)[0].NumberInDeck; } else { CardNoWithSameName = -1; } } if (CardNoWithSameName != -1) { Card OverlayedCard = Player.SearchCard(CardNoWithSameName); if (Language == Language.Chinese) { msgProcessor.Send("Overlay", "#从[" + GetRegionNameInString(thisCard.BelongedRegion()) + "]将[" + GetRegionNameInString(OverlayedCard.BelongedRegion()) + "][" + OverlayedCard.CardName + "]升级/转职为[" + thisCard.CardName + "](Lv" + (OverlayedCard.OverlayCardNo.Count + 2).ToString() + ")。"); } else { msgProcessor.Send("Overlay", "#From [" + GetRegionNameInString(thisCard.BelongedRegion()) + "] Level Up / Class Change[" + GetRegionNameInString(OverlayedCard.BelongedRegion()) + "][" + OverlayedCard.CardName + "] to [" + thisCard.CardName + "](Lv" + (OverlayedCard.OverlayCardNo.Count + 2).ToString() + ")."); } Player.OverlayCard(thisCard, CardNoWithSameName); msgProcessor.Send("Update", ""); Renew(); } else { if (Language == Language.Chinese) { MessageBox.Show("战场上没有同角色名的单位。", "升级/转职"); } else { MessageBox.Show("There is no unit with a same name on the field.", "Lv Up/CC"); } } }
private void 置于退避区仅顶牌ToolStripMenuItem_Click(object sender, EventArgs e) { Card thisCard = ((CardPic)CardPicClicked).thisCard; if (thisCard.OverlayCardNo.Count == 0) { msgProcessor.Send("ToGrave", GetTextOfMovingToRegion(thisCard, "Grave", false)); Player.MoveCard(thisCard, Player.Grave); thisCard.FrontShown = true; thisCard.IsHorizontal = false; thisCard.Comments = ""; msgProcessor.Send("Update", ""); Renew(); } else { Card NewTop; if(thisCard.OverlayCardNo.Count>1) { if (Language == Language.Chinese) { MessageBox.Show("该单位下存在多张叠放卡,请选择放置到顶端的卡。", "存在多张叠放卡", MessageBoxButtons.OK); } else { MessageBox.Show("There are several overlaying cards under this unit, please choose one to place on the top.", "Overlaying cards", MessageBoxButtons.OK); } SelectTargetCard selecttargetcard = new SelectTargetCard(Player, this, thisCard.OverlayCardNo); if (DialogResult.OK == selecttargetcard.ShowDialog()) { NewTop = selecttargetcard.Target; } else { NewTop = Player.SearchCard(thisCard.OverlayCardNo[0]); } } else { NewTop = Player.SearchCard(thisCard.OverlayCardNo[0]); } if (Language.Chinese == Language) { msgProcessor.Send("ToGraveOnlyTop", "#将[" + GetRegionNameInString(thisCard.BelongedRegion()) + "][" + thisCard.CardName + "]置于退避区,并将[" + NewTop.CardName + "]作为新的顶牌。"); } else { msgProcessor.Send("ToGraveOnlyTop", "#Place [" + GetRegionNameInString(thisCard.BelongedRegion()) + "][" + thisCard.CardName + "] in Retreat, and set [" + NewTop.CardName + "] as the top card of this unit."); } Player.DeOverlayCardToGrave(thisCard, NewTop); msgProcessor.Send("Update", ""); Renew(); } }
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(); }