public P_WangXu() : base("王诩") { Sex = PSex.Male; Age = PAge.Classic; Index = 5; Tips = "定位:全能\n" + "难度:困难\n" + "史实:战国时期思想家、纵横家,号“鬼谷子”。\n" + "攻略:\n王诩具有两个技能,在免费武将里是一个较为难用的武将,建议对游戏有一定了解之后使用。\n【纵横】可以将牌转化成【远交近攻】,但3和6两个点数里有不少高价值的牌,如【借尸还魂】、【欲擒故纵】、【抛砖引玉】、【走为上计】等,是否将这些牌转化成显性1000收益、隐性收益视队友状况而定的【远交近攻】,需要结合场上形势进行把握。\n【隐居】提高了王诩的生存能力,但【隐居】本身是负收益技能,移出游戏的王诩失去了收取过路费的能力,还会亏一座房屋,如果每回合都使用,必定只能苟延残喘片刻。所以,【隐居】的目的地需要给自己留出几个回合较为安全的空间,让自己在【隐居】的间隙可以造成输出。\n对于新手而言,也可以选择无脑【纵横】给大神队友补牌,后期保持【隐居】牵制敌人的打法。"; PSkill ZongHeng = new PSkill("纵横") { Initiative = true }; SkillList.Add(ZongHeng .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(ZongHeng.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 200, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.Area.HandCardArea.CardList.Exists((PCard Card) => Card.Point % 3 == 0); }, AICondition = (PGame Game) => { return Player.Area.HandCardArea.CardList.Exists((PCard Card) => { return Card.Point % 3 == 0 && Card.Model.AIInHandExpectation(Game, Player) < 3000; }) && P_YooenChiaoChinKung.AIEmitTargets(Game, Player)[0] != null; }, Effect = (PGame Game) => { ZongHeng.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point % 3 == 0).Key; } else { List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point % 3 == 0); int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, ZongHeng.Name, Waiting.ConvertAll((PCard Card) => Card.Name).Concat(new List <string> { "取消" }).ToArray()); if (Result >= 0 && Result < Waiting.Count) { TargetCard = Waiting[Result]; } } if (TargetCard != null) { TargetCard.Model = new P_YooenChiaoChinKung(); PTrigger Trigger = TargetCard.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(Player, TargetCard).Time.Equals(PPeriod.FirstFreeTime.During))?.Invoke(Player, TargetCard); if (Trigger != null) { Game.Logic.StartSettle(new PSettle("纵横[远交近攻]", Trigger.Effect)); } } } }); })); PSkill YinJu = new PSkill("隐居") { Initiative = true }; SkillList.Add(YinJu .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(YinJu.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 10, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(YinJu.Name) && Player.HasHouse; }, AICondition = (PGame Game) => { if (!Player.CanBeInjured) { return false; } if (Game.NowPeriod.Equals(PPeriod.FirstFreeTime)) { bool CanGo = false; PAiMapAnalyzer.NextBlocks(Game, Player).ForEach((PBlock Block) => { if (Block.Lord != null && Block.Lord.TeamIndex != Player.TeamIndex && Block.Toll >= Player.Money) { CanGo = true; } if (Block.GetMoneyStopSolid < 0 && -Block.GetMoneyStopSolid >= Player.Money) { CanGo = true; } if (Block.GetMoneyStopPercent < 0 && PMath.Percent(Player.Money, -Block.GetMoneyStopPercent) >= Player.Money) { CanGo = true; } }); return CanGo || PAiMapAnalyzer.OutOfGameExpect(Game, Player, true) - PAiMapAnalyzer.MinValueHouse(Game, Player).Value > 0; } else { return false; } }, Effect = (PGame Game) => { YinJu.AnnouceUseSkill(Player); PBlock Block = null; if (Player.IsAI) { Block = PAiMapAnalyzer.MinValueHouse(Game, Player).Key; } else { Block = PNetworkManager.NetworkServer.ChooseManager.AskToChooseBlock(Player, YinJu.Name, (PBlock _Block) => { return Player.Equals(_Block.Lord) && _Block.HouseNumber > 0; }); } if (Block != null) { Game.MovePosition(Player, Player.Position, Block); PNetworkManager.NetworkServer.TellClients(new PHighlightBlockOrder(Block.Index.ToString())); Game.LoseHouse(Block, 1); Player.Tags.CreateTag(PTag.OutOfGameTag); YinJu.DeclareUse(Player); } } }); })); }
public P_ZhouYu() : base("周瑜") { Sex = PSex.Male; Age = PAge.Medieval; Index = 22; Cost = 25; Tips = "定位:全能\n" + "难度:困难\n" + "史实:东汉末期东吴名将,“东吴四都督”之一。在赤壁之战中以少胜多,大破曹军,奠定了“三分天下”的基础。\n" + "攻略:\n周瑜是一名集续航、辅助、控制于一体的武将。【英姿】作为强大的续航技能,能够大大提高自己的生存能力。【纵火】是使用周瑜的难点所在,需要较强的局势判断能力。前期【纵火】的使用往往倾向于敌方,能够显著降低其输出能力,而后期经过一定房屋的积累或【诸葛连弩】等卡牌的使用,使得对己方使用【纵火】成为了一个选择,而这时也可以对【纵火】过的敌方土地做第二次无损的【纵火】。作为团队的重要辅助位置,周瑜的技能依赖房屋而非卡牌,团队商业用地选择城堡、购物中心或公园,能获取更高的【纵火】收益。"; PSkill YingZi = new PSkill("英姿") { SoftLockOpen = true }; SkillList.Add(YingZi .AddTimeTrigger( new PTime[] { PPeriod.StartTurn.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(YingZi.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 100, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game) => { YingZi.AnnouceUseSkill(Player); Game.GetMoney(Player, 200); } }); })); PSkill ZongHuo = new PSkill("纵火") { Initiative = true }; SkillList.Add(ZongHuo .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(ZongHuo.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 180, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(ZongHuo.Name) && Player.Position.HouseNumber > 0 && Player.Position.Lord != null; }, AICondition = (PGame Game) => { int CurrentToll = Player.Position.Toll; int NewToll = PMath.Percent(Player.Position.Price + PMath.Percent(Player.Position.Price, 10), 20 + 40 * (Player.Position.HouseNumber - 1)) * (Player.Position.BusinessType.Equals(PBusinessType.ShoppingCenter) ? 2 : 1) * (Player.Position.BusinessType.Equals(PBusinessType.Club) ? 2 : 1); int Value = NewToll - CurrentToll; return Value * (Player.TeamIndex == Player.Position.Lord.TeamIndex ? 1 : -1) > 0; }, Effect = (PGame Game) => { ZongHuo.AnnouceUseSkill(Player); Game.LoseHouse(Player.Position, 1); Player.Position.Price += PMath.Percent(Player.Position.Price, 10); PNetworkManager.NetworkServer.TellClients(new PRefreshBlockBasicOrder(Player.Position)); ZongHuo.DeclareUse(Player); } }); })); }
public P_PanYue() : base("潘岳") { Sex = PSex.Male; Age = PAge.Medieval; Index = 2; Tips = "定位:辅助\n" + "难度:简单\n" + "史实:西晋文学家、政治家,著名美男子,“金谷二十四友”之一,代表作是《闲居赋》。\n" + "攻略:\n潘岳是十分适合新手的一个武将,两个技能都非常简单。即使是新手使用,也可以在竞技模式中发挥出出色的实力。\n对于潘岳玩家而言,伤害类计策建议放到第二个空闲时间点使用,这样根据所在土地是否为队友的土地及是否受到伤害,可以判断是放出伤害计策,还是发动【闲居】。"; PSkill YingZi = new PSkill("英姿") { SoftLockOpen = true }; SkillList.Add(YingZi .AddTimeTrigger( new PTime[] { PPeriod.StartTurn.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(YingZi.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 100, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game) => { YingZi.AnnouceUseSkill(Player); Game.GetMoney(Player, 200); } }); })); PSkill XianJu = new PSkill("闲居"); SkillList.Add(XianJu // 用每回合限一次这个模板控制条件 .AnnounceTurnOnce() // 回合结束时触发技能 .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(XianJu.Name) { IsLocked = false, Player = Player, Time = PPeriod.EndTurn.During, AIPriority = 100, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && Player.Position.Lord != null && !Player.Equals(Player.Position.Lord) && Player.RemainLimit(XianJu.Name); }, AICondition = (PGame Game) => { return Player.Position.Lord.TeamIndex == Player.TeamIndex; }, Effect = (PGame Game) => { XianJu.AnnouceUseSkill(Player); Game.GetHouse(Player.Position, 1); } }); }) // 伤害结算结束时,如果造成或受到伤害,将每回合限一次的模板打上标记 .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(XianJu.Name + "[条件记录]") { IsLocked = true, Player = Player, Time = PTime.Injure.EndSettle, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(Game.NowPlayer) && (Player.Equals(InjureTag.ToPlayer) || Player.Equals(InjureTag.FromPlayer)) && InjureTag.Injure > 0; }, Effect = (PGame Game) => { Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + XianJu.Name).Count++; } }); })); }
public P_ZhaoYun() : base("赵云") { Sex = PSex.Male; Age = PAge.Medieval; Index = 6; Tips = "定位:攻防兼备\n" + "难度:中等\n" + "史实:三国时期蜀汉名将,初从公孙瓒,后随刘备四处征战,曾多次救护后主刘禅,被誉为“一身都是胆”。\n" + "攻略:\n赵云和张三丰相似,都拥有控制伤害的技能。\n赵云的技能是需要消耗房屋的,一般来说,赵云可以把低价值土地上的房屋全部转换成【胆】,而留下几个城堡、购物中心之类的高伤害地点。【胆】的进攻收益和伤害基数有直接关系,留下高伤害地点可以让【胆】的效果有最大的发挥。当然,赵云也要留存一些【胆】来防御敌人的高额伤害。"; PSkill LongDan = new PSkill("龙胆") { Initiative = true }; SkillList.Add(LongDan .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(LongDan.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 20, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(LongDan.Name) && Player.HasHouse; }, AICondition = (PGame Game) => { PBlock Block = PAiMapAnalyzer.MinValueHouse(Game, Player, false, true).Key; if (Block == null) { return false; } else if (!Player.Tags.ExistTag(PDanTag.TagName)) { return Block.Price <= 2000; } return Block.Price <= 1000; }, Effect = (PGame Game) => { LongDan.AnnouceUseSkill(Player); Game.ThrowHouse(Player, Player, LongDan.Name); Player.Tags.CreateTag(new PDanTag()); LongDan.DeclareUse(Player); } }); }) .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(LongDan.Name + "I") { IsLocked = false, Player = Player, Time = PTime.Injure.EmitInjure, AIPriority = 100, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Tags.ExistTag(PDanTag.TagName) && InjureTag.Injure > 0 && Player.Equals(InjureTag.FromPlayer) && InjureTag.ToPlayer != null; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return LongDanICondition(Game, Player, InjureTag.ToPlayer, InjureTag.Injure); }, Effect = (PGame Game) => { LongDan.AnnouceUseSkill(Player); Player.Tags.MinusTag(PDanTag.TagName, 1); Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure = PMath.Percent(Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure, 150); } }); }) .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(LongDan.Name + "II") { IsLocked = false, Player = Player, Time = PTime.Injure.AcceptInjure, AIPriority = 100, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Tags.ExistTag(PDanTag.TagName) && InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer); }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return LongDanIICondition(Game, Player, InjureTag.FromPlayer, InjureTag.Injure); }, Effect = (PGame Game) => { LongDan.AnnouceUseSkill(Player); Player.Tags.MinusTag(PDanTag.TagName, 1); Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure = PMath.Percent(Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure, 50); } }); })); }
public P_Xdyu() : base("项羽") { Sex = PSex.Male; Age = PAge.Classic; Index = 17; Cost = 30; Tips = "定位:攻击\n" + "难度:中等\n" + "史实:秦末西楚霸王。曾在巨鹿之战中破釜沉舟,大破秦军。\n" + "攻略:\n项羽是一个十分考验玩家判断力的武将,【霸王】在小图的发挥显著强于大图,能够配合虞姬的【剑舞】,也可以增加天灾对敌人的伤害,还可以在一定程度上辅助队友的输出,范围为1限制了项羽的跨队列输出,但敌人越多就越强,颇有乌江快战之风范。\n" + "【沉舟】是一个爆发力极强的技能,相应地也要付出较大的代价。要想达到正收益,技能发动往往是在中后期,而购物中心往往是项羽的不二选择,当现金小于18000时【沉舟】已经是正收益,而对于领地来说只需花费小于正常花费即可一试。当然,在现金较低的情况下,项羽甚至可以连续【沉舟】,在高风险的同时可能获得极高的回报,或可重振西楚霸业。\n"; PSkill Bawh = new PSkill("霸王"); SkillList.Add(Bawh .AddTimeTrigger( new PTime[] { PTime.Injure.AcceptInjure }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(Bawh.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 200, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && !Player.Equals(InjureTag.ToPlayer) && InjureTag.ToPlayer.Distance(Player) <= 1; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.ToPlayer.TeamIndex != Player.TeamIndex; }, Effect = (PGame Game) => { Bawh.AnnouceUseSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); InjureTag.Injure += 800; } }); })); PSkill Ifvb = new PSkill("沉舟") { Initiative = true }; SkillList.Add(Ifvb .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(Ifvb.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 200, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(Ifvb.Name) && Player.Position.Lord != null; }, AICondition = (PGame Game) => { if (Player.Money <= 1000) { return false; } return PMath.Percent(Player.Money, 50) + 1500 < 3 * PAiMapAnalyzer.HouseValue(Game, Player, Player.Position); }, Effect = (PGame Game) => { Ifvb.AnnouceUseSkill(Player); Game.LoseMoney(Player, PMath.Percent(Player.Money, 50)); Game.GetHouse(Player.Position, 3); Ifvb.DeclareUse(Player); } }); })); }
public P_LvZhi() : base("吕雉") { Sex = PSex.Female; Age = PAge.Classic; Index = 29; Cost = 30; NewGeneral = true; Tips = "定位:攻击\n" + "难度:简单\n" + "史实:汉高祖刘邦的皇后,惠帝、二少帝时的皇太后。统治时期实行与民休息的政策,为文景之治奠定了基础。\n" + "攻略:\n-"; PSkill ZhenSha = new PSkill("鸩杀") { Initiative = true }; PPlayer ZhenShaTarget(PGame Game, PPlayer Player) { List <PPlayer> PossibleTargets = Game.AlivePlayers(Player).FindAll((PPlayer _Player) => _Player.Distance(Player) <= 1); PPlayer Target = PMath.Max(PossibleTargets, (PPlayer _Player) => { int InjureValue = PAiTargetChooser.InjureExpect(Game, Player, Player, _Player, ZhenShaInjure, ZhenSha); if (_Player.TeamIndex == Player.TeamIndex) { KeyValuePair <PCard, int> MaxValueCard = PAiCardExpectation.FindMostValuable(Game, _Player, Player, true, false, false, true); int MaxValue = MaxValueCard.Value - MaxValueCard.Key.AIInHandExpectation(Game, Player); return(MaxValue + InjureValue); } else { KeyValuePair <PCard, int> MinValueCard = PAiCardExpectation.FindLeastValuable(Game, _Player, Player, true, false, false, true); int MinValue = MinValueCard.Value + MinValueCard.Key.AIInHandExpectation(Game, Player); return(-MinValue + InjureValue); } }, true).Key; return(Target); } SkillList.Add(ZhenSha .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(ZhenSha.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 40, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(ZhenSha.Name) && Player.Area.HandCardArea.CardNumber > 0 && Game.AlivePlayers(Player).Exists((PPlayer _Player) => _Player.Distance(Player) <= 1); }, AICondition = (PGame Game) => { return ZhenShaTarget(Game, Player) != null; }, Effect = (PGame Game) => { ZhenSha.AnnouceUseSkill(Player); PPlayer Target = null; if (Player.IsAI) { Target = ZhenShaTarget(Game, Player); } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, (PGame _Game, PPlayer _Player) => _Player.Distance(Player) <= 1 && !_Player.Equals(Player), ZhenSha.Name, true); } if (Target != null) { Game.GiveCardTo(Player, Target, true, false); Game.Injure(Player, Target, 1500, ZhenSha); ZhenSha.DeclareUse(Player); } } }); })); PSkill XuMou = new PSkill("蓄谋") { Lock = true }; SkillList.Add(XuMou .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(XuMou.Name) { IsLocked = true, Player = Player, Time = PTime.LeaveDyingTime, AIPriority = 100, Condition = (PGame Game) => { PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName); return Player.Equals(DyingTag.Killer) && !Player.Equals(DyingTag.Player); }, Effect = (PGame Game) => { XuMou.AnnouceUseSkill(Player); PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName); DyingTag.Player.Money = 0; Game.Die(DyingTag.Player, DyingTag.Killer); } }); })); }
public P_LvMeng() : base("吕蒙") { Sex = PSex.Male; Age = PAge.Medieval; Index = 26; Cost = 25; Tips = "定位:控制\n" + "难度:困难\n" + "史实:东汉末期东吴名将,“东吴四都督”之一。早年武勇过人,后勤奋读书,渐有国士之风,留有“士别三日当刮目相待”的佳话。\n" + "攻略:\n吕蒙是一名拥有强大控制和防御能力的武将。【勤学】能够极大加速牌堆的流动,同时检索出足量的装备,因此吕蒙对【诸葛连弩】的需求较高,而经过一定次数的【勤学】后又有极大概率找到【诸葛连弩】,因此吕蒙往往能够手握大量的装备牌。但吕蒙对房屋的需求很高,若无法获得【诸葛连弩】或建造公园,【勤学】的价值便下降很多。【勤学】对花木兰、关羽等需要装备牌的武将可以呈现明显克制,同时能够快速洗出新的【声东击西】、【借尸还魂】等关键牌,还可防止敌方拿到牌堆剩下的关键牌,因此对发动时机要求非常高。【白衣】能够与【勤学】形成高效的联动,因此吕蒙对赵云、关羽等通过过路费输出的武将拥有较高的防御力。吕蒙的防御力和加快牌堆流动的能力往往能将战局引导向对吕蒙有利的方向,但需要一定记忆牌堆的能力才能充分发挥其优势。"; PSkill QinXue = new PSkill("勤学") { Initiative = true }; const int QinXueParameter = 4; SkillList.Add(QinXue .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(QinXue.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 185, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.HasHouse && Player.RemainLimit(QinXue.Name); }, AICondition = (PGame Game) => { KeyValuePair <PBlock, int> MinBlock = PAiMapAnalyzer.MinValueHouse(Game, Player, false, true); if (MinBlock.Key == null) { return false; } int PossibleEquipmentCount = Game.CardManager.CardHeap.CardList.FindAll((PCard _Card) => _Card.Type.IsEquipment()).Count; int AllCardCount = Game.CardManager.CardHeap.CardNumber; int CardCountExpectation = 0; if (AllCardCount >= QinXueParameter) { CardCountExpectation = PossibleEquipmentCount * QinXueParameter / AllCardCount; } if (Player.Area.EquipmentCardArea.CardNumber < 3) { return CardCountExpectation * 2000 > MinBlock.Value; } else { return CardCountExpectation * 1500 > MinBlock.Value; } }, Effect = (PGame Game) => { QinXue.AnnouceUseSkill(Player); Game.ThrowHouse(Player, Player, QinXue.Name); List <PCard> QinXueCardList = Game.GetCard(Player, QinXueParameter, true); foreach (PCard Card in QinXueCardList) { if (Card.Type.IsEquipment()) { Game.CardManager.MoveCard(Card, Game.CardManager.SettlingArea, Player.Area.HandCardArea); } else { Game.CardManager.MoveCard(Card, Game.CardManager.SettlingArea, Game.CardManager.ThrownCardHeap); } } QinXue.DeclareUse(Player); } }); })); bool BaiYiCondition(PGame Game, PPlayer Player, PPlayer Source, int BaseInjure) { if (BaseInjure >= Player.Money && PMath.Percent(BaseInjure, 50) < Player.Money) { return(true); } else { int Profit = (BaseInjure - PMath.Percent(BaseInjure, 50)) * (Source == null ? 1 : (Source.TeamIndex == Player.TeamIndex ? 0 : 2)); int Value = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, true, false, true, (PCard Card) => Card.Type.IsEquipment()).Value; return(Profit > Value + 1000); } } PSkill BaiYi = new PSkill("白衣"); SkillList.Add(BaiYi .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(BaiYi.Name) { IsLocked = false, Player = Player, Time = PTime.Injure.AcceptInjure, AIPriority = 50, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer) && InjureTag.InjureSource is PBlock && Player.HasEquipInArea(); }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return BaiYiCondition(Game, Player, InjureTag.FromPlayer, InjureTag.Injure); }, Effect = (PGame Game) => { BaiYi.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, true, false, true, (PCard Card) => Card.Type.IsEquipment()).Key; } else { do { TargetCard = PNetworkManager.NetworkServer.ChooseManager.AskToChooseOwnCard(Player, BaiYi.Name + "[选择一张装备牌]", true, true); } while (!TargetCard.Type.IsEquipment()); } if (TargetCard != null) { Game.CardManager.MoveCard(TargetCard, Player.Area.HandCardArea.CardList.Contains(TargetCard) ? Player.Area.HandCardArea : Player.Area.EquipmentCardArea, Game.CardManager.ThrownCardHeap); PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(Player.Name + "弃置了" + TargetCard.Name)); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); InjureTag.Injure = PMath.Percent(InjureTag.Injure, 50); } } }); })); }
public P_LianPo() : base("廉颇") { Sex = PSex.Male; Age = PAge.Classic; Index = 1; Tips = "定位:辅助\n" + "难度:中等\n" + "史实:战国时期赵国名将,被誉为“战国四大名将”之一,曾击退燕国入侵,斩杀栗腹。\n" + "攻略:\n廉颇可以把自己的现金转移给队友,同时让队友摸牌。和王诩、虞姬等技能依赖于手牌的武将组队时,廉颇是一个不错的选择,提高队友的技能发动频率。\n" + "新人推荐使用廉颇,给大神队友更多的牌,让队友有更大的发挥空间。\n" + "因为廉颇的现金可以给队友提供每回合2000(一张牌)的收益,廉颇很容易成为敌人的集火对象,在这种情况下,可以减少房屋的建造(除购物中心外,建房收益均不及负荆收益),让自己的现金发挥更大的价值。"; PSkill FuJing = new PSkill("负荆") { Initiative = true }; SkillList.Add(FuJing .AnnounceTurnOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(FuJing.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 180, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(FuJing.Name); }, AICondition = (PGame Game) => { if (Game.Teammates(Player, false).Count == 0 || Player.Money < 6000) { return false; } if (Player.Money >= 15000 || !Player.CanBeInjured) { return true; } else { bool CanGo = true; PAiMapAnalyzer.NextBlocks(Game, Player).ForEach((PBlock Block) => { if (Block.Lord == null && Block.CanPurchase && Block.Price >= Player.Money - 8000) { CanGo = false; } if (Block.Lord != null && Block.Lord.TeamIndex != Player.TeamIndex && Block.Toll >= Player.Money - 8000) { CanGo = false; } }); return CanGo; } }, Effect = (PGame Game) => { FuJing.AnnouceUseSkill(Player); PPlayer Target = null; if (Player.IsAI) { Target = PMath.Max(Game.Teammates(Player, false), (PPlayer _Player) => _Player.AiCardExpectation + PMath.RandInt(0, 5) + ((Player.Defensor != null && Player.Defensor.Model is P_PaiHuaChooon && !Player.Sex.Equals(_Player.Sex)) ? 1500 : 0)).Key; } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), FuJing.Name, true); } if (Target != null) { Game.Injure(Target, Player, 3000, FuJing); Game.GetCard(Target, 1); FuJing.DeclareUse(Player); } } }); })); }