public P_BaiQi() : base("白起") { Sex = PSex.Male; Age = PAge.Classic; Index = 9; Cost = 25; Tips = "定位:爆发\n" + "难度:简单\n" + "史实:战国时期秦国名将,“战国四大名将”之一,曾在伊阙之战、长平之战中大败三晋军队,歼敌数十万,功封武安君。\n" + "攻略:\n白起是一个强制命中系武将,白起的存在使得对方无法通过【李代桃僵】、【指桑骂槐】一类的牌免除伤害,或通过【八卦阵】、【龙胆】等方式减少伤害,而必须硬吃下伤害的100%(通常这个数字比伤害值高)。随之带来的损失则是收费地的地价永久性减少,很多时候这是不值的,但在必杀一击上,白起一点都不会含糊。"; PSkill CanSha = new PSkill("残杀"); SkillList.Add(CanSha .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(CanSha.Name) { IsLocked = false, Player = Player, Time = PTime.Injure.EmitInjure, AIPriority = 100, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Equals(InjureTag.FromPlayer) && InjureTag.InjureSource is PBlock && ((PBlock)InjureTag.InjureSource).Price >= 1000; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); if (InjureTag.ToPlayer.TeamIndex != Player.TeamIndex) { int Benefit = PMath.Percent(InjureTag.Injure, 100); if (Benefit + InjureTag.Injure >= InjureTag.ToPlayer.Money) { // 一击必杀 return true; } if (Benefit >= 2000) { PBlock Source = (PBlock)InjureTag.InjureSource; int Cost = 1000 + PAiMapAnalyzer.HouseValue(Game, Player, Source) * Source.HouseNumber * 1000 / Source.Price; if (Cost < Benefit) { return true; } } } return false; }, Effect = (PGame Game) => { CanSha.AnnouceUseSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PBlock Source = (PBlock)InjureTag.InjureSource; Source.Price -= 1000; PNetworkManager.NetworkServer.TellClients(new PRefreshBlockBasicOrder(Source)); Game.LoseMoney(InjureTag.ToPlayer, PMath.Percent(InjureTag.Injure, 100)); } }); })); }
public P_Temujin() : base("铁木真") { Sex = PSex.Male; Age = PAge.Renaissance; Index = 11; Cost = 20; Tips = "定位:控制\n" + "难度:简单\n" + "史实:大蒙古国可汗,杰出的军事家、政治家,统一了蒙古诸部,开疆拓土,远至东欧,被尊为“成吉思汗”。\n" + "攻略:\n铁木真是一个新手推荐武将,基本上使用没有任何难度。"; PSkill QiangLve = new PSkill("抢掠") { SoftLockOpen = true }; SkillList.Add(QiangLve .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(QiangLve.Name) { IsLocked = false, Player = Player, Time = PTime.Injure.EmitInjure, AIPriority = 15, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Equals(InjureTag.FromPlayer) && InjureTag.InjureSource is PBlock && !Player.Equals(InjureTag.ToPlayer) && InjureTag.ToPlayer.Area.HandCardArea.CardNumber + InjureTag.ToPlayer.Area.EquipmentCardArea.CardNumber > 0; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.ToPlayer.TeamIndex != Player.TeamIndex; }, Effect = (PGame Game) => { QiangLve.AnnouceUseSkill(Player); int Result = Game.Judge(Player, 6); if (Result % 2 == 0) { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PCard Card = new P_CheevnHuoTaChieh().Instantiate(); Card.Point = 0; PTrigger Trigger = Card.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(Player, Card).Time.Equals(PTime.Injure.AcceptInjure))?.Invoke(Player, Card); if (Trigger != null) { Game.Logic.StartSettle(new PSettle("抢掠[趁火打劫]", Trigger.Effect)); } } } }); })); }
public P_Newton() : base("牛顿") { Sex = PSex.Male; Age = PAge.Renaissance; Index = 19; Cost = 40; Tips = "定位:防御\n" + "难度:中等\n" + "史实:英国物理学家、数学家。主要贡献包括但不限于发现万有引力定律、牛顿运动定律、光的色散原理,提出微积分、牛顿迭代法、二项式定理,发明反射式望远镜等。代表作《自然哲学的数学原理》。\n" + "攻略:\n牛顿是一个趣味性十足的武将,技能应用十分灵活,【惯性】的存在使其拥有极强的移动能力,能够灵活规避各种危险,同时在前期迅速攫取土地,中后期能够更快经过奖励处,从而拥有一定的续航能力。牛顿可以配合队友的上屋抽梯或逃避敌人的【剑舞】或【霸王】,需要较强的预判力。"; PSkill Grx_ = new PSkill("惯性"); SkillList.Add(Grx_ .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(Grx_.Name) { IsLocked = false, Player = Player, Time = PPeriod.WalkingStage.Start, AIPriority = 10, Condition = (PGame Game) => { return Game.NowPlayer.Equals(Player) && Player.Position.HouseNumber == 0 && Player.Money > 500; }, AICondition = (PGame Game) => { PStepCountTag StepCountTag = Game.TagManager.FindPeekTag <PStepCountTag>(PStepCountTag.TagName); int Current = PAiMapAnalyzer.Expect(Game, Player, Game.Map.NextStepBlock(Player.Position, StepCountTag.StepCount)); PBlock NewtonTarget = Grx_Next(Game, Player.Position).Key; int Possible = PAiMapAnalyzer.Expect(Game, Player, Game.Map.NextStepBlock(NewtonTarget, StepCountTag.StepCount)); return Possible - Current > 500; }, Effect = (PGame Game) => { Grx_.AnnouceUseSkill(Player); Game.LoseMoney(Player, 500); Game.MovePosition(Player, Player.Position, Grx_Next(Game, Player.Position).Key); } }); })); }
public P_LiuJi() : base("刘基") { Sex = PSex.Male; Age = PAge.Industrial; Index = 12; Cost = 10; Tips = "定位:防御\n" + "难度:简单\n" + "史实:明代政治家、文学家,“明初诗文三大家”之一,在平定张士诚、陈友谅和北伐中作为参谋,以神机妙算著称。\n" + "攻略:\n刘基作为军事大师,两个技能均和判定有关,可以称作是使用伏兵的专家。刘基可以从【闪电】、【瘟疫】、【陷阱】这类会轮转的牌中获益,而对于【乐不思蜀】、【兵粮寸断】有天然的免疫能力。\n【八卦阵】可以说是刘基的神器,当刘基持有【八卦阵】时,每次受到伤害不但减半,而且反而可以摸1000,配合陈圆圆,队友之间互相伤害可以形成共赢的效果。"; PSkill MiaoSuan = new PSkill("妙算") { SoftLockOpen = true }; SkillList.Add(MiaoSuan .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(MiaoSuan.Name) { IsLocked = false, Player = Player, Time = PTime.Judge.JudgeTime, AIPriority = 100, Condition = (PGame Game) => { PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName); return JudgeTag.Player.Equals(Player); }, Effect = (PGame Game) => { PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName); MiaoSuan.AnnouceUseSkill(Player); int ChosenResult = 1; if (Player.IsAI) { ChosenResult = JudgeTag.AdvisedResult; } else { ChosenResult = PNetworkManager.NetworkServer.ChooseManager.Ask1To6(Player, MiaoSuan.Name); } JudgeTag.Result = ChosenResult; } }); })); PSkill TianDu = new PSkill("天妒") { SoftLockOpen = true }; SkillList.Add(TianDu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(TianDu.Name) { IsLocked = false, Player = Player, Time = PTime.Judge.AfterJudgeTime, AIPriority = 100, Condition = (PGame Game) => { PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName); return JudgeTag.Player.Equals(Player); }, Effect = (PGame Game) => { PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName); TianDu.AnnouceUseSkill(Player); Game.GetMoney(Player, 200 * JudgeTag.Result); } }); })); }
public P_HuaMulan() : base("花木兰") { Sex = PSex.Female; Age = PAge.Renaissance; Index = 23; Cost = 20; Tips = "定位:爆发\n" + "难度:简单\n" + "史实:出自经典诗歌《木兰辞》。中国古代替父从军的女英雄。\n" + "攻略:\n花木兰是一名拥有不俗爆发能力的武将。【枭姬】的存在使得花木兰极度依赖装备牌,因此能够与唐寅、时迁等武将配合,同时也能够对这些武将形成强大的威慑力。【枭姬】往往能够提供绝地反杀的能力,或能使花木兰东山再起,因此在针对花木兰时必须注意其队伍的研究所或给牌武将,同时慎用【落凤弓】、【借刀杀人】等牌,从一定程度上来说提供了花木兰一定的防御力。【易装】是一个强大的爆发技能,不仅能与队友交换装备达成爆发,还能抢夺敌方的大量装备,形成局势逆转,因此可在一定程度上克制关羽。【易装】还可用来转换性别,从而使敌方的【百花裙】等装备失效。针对花木兰必须阻止其装备成形,因此吕蒙是一个不错的选择。"; PSkill XiaoJi = new PSkill("枭姬") { SoftLockOpen = true }; SkillList.Add(XiaoJi .AddTrigger((PPlayer Player, PSkill Skill) => { return(new PTrigger(XiaoJi.Name) { IsLocked = false, Player = Player, Time = PTime.Card.LeaveAreaTime, AIPriority = 200, Condition = (PGame Game) => { PMoveCardTag MoveCardTag = Game.TagManager.FindPeekTag <PMoveCardTag>(PMoveCardTag.TagName); return Player.Area.EquipmentCardArea.Equals(MoveCardTag.Source) && !Player.Equals(MoveCardTag.Destination.Owner); }, Effect = (PGame Game) => { XiaoJi.AnnouceUseSkill(Player); Game.GetCard(Player); Game.GetMoney(Player, 1500); } }); })); PPlayer YiZhuangTarget(PGame Game, PPlayer Player) { return(PMath.Max(Game.AlivePlayers(Player), (PPlayer TargetPlayer) => { int Profit = 0; PSex OriginalSex = Player.Sex; Player.Sex = PSex.Male; foreach (PCardType CardType in new PCardType[] { PCardType.WeaponCard, PCardType.DefensorCard, PCardType.TrafficCard }) { PCard Card = Player.GetEquipment(CardType); PCard TargetCard = TargetPlayer.GetEquipment(CardType); if (Card != null) { Profit += 2000; Profit -= Card.Model.AIInEquipExpectation(Game, Player); Profit += Card.Model.AIInEquipExpectation(Game, TargetPlayer) * (Player.TeamIndex == TargetPlayer.TeamIndex ? 1 : -1); } if (TargetCard != null) { Profit += TargetCard.Model.AIInEquipExpectation(Game, Player); Profit -= TargetCard.Model.AIInEquipExpectation(Game, TargetPlayer) * (Player.TeamIndex == TargetPlayer.TeamIndex ? 1 : -1); } } Player.Sex = OriginalSex; return Profit - 7500; }, true).Key); } PSkill YiZhuang = new PSkill("易装") { Initiative = true }; SkillList.Add(YiZhuang .AnnounceGameOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(YiZhuang.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 280, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(YiZhuang.Name); }, AICondition = (PGame Game) => { if (Game.Teammates(Player).Exists((PPlayer _Player) => _Player.General is P_WuZhao)) { PPlayer _Player = Game.PlayerList.Find((PPlayer __Player) => __Player.General is P_WuZhao); if (_Player.RemainLimit("女权")) { return false; } else if (Player.Tags.ExistTag(P_WuZhao.NvQuanTag.Name)) { return false; } } return YiZhuangTarget(Game, Player) != null; }, Effect = (PGame Game) => { YiZhuang.AnnouceUseSkill(Player); PPlayer Target = null; if (Player.IsAI) { Target = YiZhuangTarget(Game, Player); } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), YiZhuang.Name); } if (Target != null) { List <PCard> MulanEquipments = new List <PCard>(); foreach (PCard Card in Player.Area.EquipmentCardArea.CardList) { MulanEquipments.Add(Card); } List <PCard> TargetEquipements = new List <PCard>(); foreach (PCard Card in Target.Area.EquipmentCardArea.CardList) { TargetEquipements.Add(Card); } foreach (PCard Card in MulanEquipments) { Game.CardManager.MoveCard(Card, Player.Area.EquipmentCardArea, Game.CardManager.SettlingArea); } foreach (PCard Card in TargetEquipements) { Game.CardManager.MoveCard(Card, Target.Area.EquipmentCardArea, Game.CardManager.SettlingArea); } foreach (PCard Card in MulanEquipments) { Game.CardManager.MoveCard(Card, Game.CardManager.SettlingArea, Target.Area.EquipmentCardArea); } foreach (PCard Card in TargetEquipements) { Game.CardManager.MoveCard(Card, Game.CardManager.SettlingArea, Player.Area.EquipmentCardArea); } Player.Sex = PSex.Male; Player.Tags.CreateTag(new PTag(YiZhuang.Name)); YiZhuang.DeclareUse(Player); } } }); })); }
public P_ZhuQue() : base("朱雀") { Sex = PSex.Male; Age = PAge.Ancient; Index = 1003; Cost = 1; Tips = string.Empty; CanBeChoose = false; //PSkill ShenShou = new PSkill("神兽") { // Lock = true //}; //SkillList.Add(ShenShou // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PTime.StartGameTime, // AIPriority = 100, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 30000); // } // }; // }) // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PPeriod.StartTurn.During, // AIPriority = 100, // Condition = (PGame Game) => { // return Player.Equals(Game.NowPlayer); // }, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 500); // } // }; // })); PSkill ZhuQue = new PSkill("朱雀") { Lock = true }; SkillList.Add(ZhuQue .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(ZhuQue.Name) { IsLocked = true, Player = Player, Time = PPeriod.StartTurn.During, AIPriority = 250, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game) => { ZhuQue.AnnouceUseSkill(Player); Game.Traverse((PPlayer _Player) => { if (!_Player.Equals(Player)) { Game.LoseMoney(_Player, 300); } }, Player); } }); })); }
public P_BaiHu() : base("白虎") { Sex = PSex.Male; Age = PAge.Ancient; Index = 1002; Cost = 1; Tips = string.Empty; CanBeChoose = false; //PSkill ShenShou = new PSkill("神兽") { // Lock = true //}; //SkillList.Add(ShenShou // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PTime.StartGameTime, // AIPriority = 100, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 30000); // } // }; // }) // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PPeriod.StartTurn.During, // AIPriority = 100, // Condition = (PGame Game) => { // return Player.Equals(Game.NowPlayer); // }, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 500); // } // }; // })); PSkill BaiHu = new PSkill("白虎") { Lock = true }; SkillList.Add(BaiHu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(BaiHu.Name) { IsLocked = true, Player = Player, Time = PPeriod.EndTurn.During, AIPriority = 250, Condition = (PGame Game) => { PChiaTaoFaKuoTag ChiaTaoFaKuoTag = Game.TagManager.FindPeekTag <PChiaTaoFaKuoTag>(PChiaTaoFaKuoTag.TagName); return Player.Equals(Game.NowPlayer) && ChiaTaoFaKuoTag.LordList.Count >= 1; }, Effect = (PGame Game) => { BaiHu.AnnouceUseSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PChiaTaoFaKuoTag ChiaTaoFaKuoTag = Game.TagManager.FindPeekTag <PChiaTaoFaKuoTag>(PChiaTaoFaKuoTag.TagName); ChiaTaoFaKuoTag.LordList.ForEach((PPlayer _Player) => { if (!_Player.Tags.ExistTag(PTag.LockedTag.Name)) { _Player.Tags.CreateTag(PTag.LockedTag); } }); } }); })); }
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_ShiQian() : base("时迁") { Sex = PSex.Male; Age = PAge.Renaissance; Index = 7; Tips = "定位:控制\n" + "难度:简单\n" + "史实:《水浒传》中人物,地贼星,绰号“鼓上蚤”,擅长偷盗,多次利用专业技能为梁山立功。\n" + "攻略:\n时迁的使用方法非常简单,只要使用【顺手牵羊】即可。【顺手牵羊】的时机把握是比较重要的问题,手中存留一张【顺手牵羊】,将其用于关键的【乐不思蜀】、【草木皆兵】或者装备上,会比使用【顺手牵羊】直到没有【顺手牵羊】为止效果更好。"; //PSkill FeiZei = new PSkill("飞贼") { // Lock = true //}; //SkillList.Add(FeiZei // .AddTimeTrigger( // new PTime[] { // PTime.Card.AfterBecomeTargetTime // }, // (PTime Time, PPlayer Player, PSkill Skill) => { // return new PTrigger(FeiZei.Name) { // IsLocked = true, // Player = Player, // Time = Time, // AIPriority = 200, // Condition = (PGame Game) => { // PUseCardTag UseCardTag = Game.TagManager.FindPeekTag<PUseCardTag>(PUseCardTag.TagName); // return UseCardTag.TargetList.Contains(Player) && UseCardTag.Card.Model is P_ShunShouChiienYang; // }, // Effect = (PGame Game) => { // FeiZei.AnnouceUseSkill(Player); // Game.TagManager.FindPeekTag<PUseCardTag>(PUseCardTag.TagName).TargetList.Remove(Player); // } // }; // })); PSkill QingMin = new PSkill("轻敏") { Initiative = true }; SkillList.Add(QingMin .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(QingMin.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 200, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Game.PlayerList.Exists((PPlayer _Player) => _Player.Area.CardNumber > 0 && !_Player.Equals(Player) && _Player.IsAlive) && Player.Area.HandCardArea.CardList.Exists((PCard Card) => Card.Point == 1); }, AICondition = (PGame Game) => { return Player.Area.HandCardArea.CardList.Exists((PCard Card) => { return Card.Point == 1 && P_ShunShouChiienYang.AIBaseEmitTargets(Game, Player, Card.Model.AIInHandExpectation(Game, Player) + 100)[0] != null; }); }, Effect = (PGame Game) => { QingMin.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point == 1).Key; } else { List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point == 1); int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, QingMin.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_ShunShouChiienYang(); 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)); } Game.GetCard(Player); } } }); })); }
public P_QingLong() : base("青龙") { Sex = PSex.Male; Age = PAge.Ancient; Index = 1001; Cost = 1; Tips = string.Empty; CanBeChoose = false; //PSkill ShenShou = new PSkill("神兽") { // Lock = true //}; //SkillList.Add(ShenShou // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PTime.StartGameTime, // AIPriority = 100, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 30000); // } // }; // }) // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PPeriod.StartTurn.During, // AIPriority = 100, // Condition = (PGame Game) => { // return Player.Equals(Game.NowPlayer); // }, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 500); // } // }; // })); PSkill QingLong = new PSkill("青龙") { Lock = true }; SkillList.Add(QingLong .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(QingLong.Name) { IsLocked = true, Player = Player, Time = PTime.Injure.AcceptInjure, AIPriority = 250, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayer FromPlayer = InjureTag.FromPlayer; return InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer) && FromPlayer != null && FromPlayer.Area.OwnerCardNumber > 0; }, Effect = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayer FromPlayer = InjureTag.FromPlayer; QingLong.AnnouceUseSkill(Player); Game.GetCardFrom(Player, FromPlayer); } }); })); }
public P_Gryu() : base("关羽") { Sex = PSex.Male; Age = PAge.Medieval; Index = 18; Cost = 20; Tips = "定位:攻辅一体\n" + "难度:简单\n" + "史实:三国时期蜀汉名将,“五虎上将”之一。曾有在万军之中斩杀上将颜良,水淹七军威震华夏等壮举。被尊为“武圣”。\n" + "攻略:\n关羽是一个较为稳定的武将,操作较为简单,【武圣】提供了一种类似诸葛连弩的输出方式,偶数牌的数量保证了技能的发动频率,因而购物中心和研究所是关羽优先选择的方向。即使没有高地价土地,关羽也可以利用废牌增加输出能力。\n" + "【怒斩】是一个稳定的输出技能,在破坏装备卡牌缺乏的环境中容易建立起持久的优势,并可在一定程度上威慑华雄【叫阵】及其他消耗装备牌技能的发动,同时给关羽一个较强的续航能力。"; PSkill WuSheng = new PSkill("武圣") { Initiative = true }; SkillList.Add(WuSheng .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(WuSheng.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 190, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && (Player.Area.HandCardArea.CardList.Exists((PCard Card) => Card.Point % 2 == 0) || Player.Area.EquipmentCardArea.CardList.Exists((PCard Card) => Card.Point % 2 == 0)); }, AICondition = (PGame Game) => { int MaxHouseValue = PMath.Max(Game.Teammates(Player), (PPlayer _Player) => { return PAiMapAnalyzer.MaxValueHouse(Game, _Player, true).Value; }).Value; return PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, true, false, true, (PCard Card) => Card.Point % 2 == 0).Value < MaxHouseValue - 500 && P_ShuShangKaaiHua.AIEmitTarget(Game, Player) != null; }, Effect = (PGame Game) => { WuSheng.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, true, false, true, (PCard Card) => Card.Point % 2 == 0).Key; } else { List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point % 2 == 0); List <PCard> WaitingEquipments = Player.Area.EquipmentCardArea.CardList.FindAll((PCard Card) => Card.Point % 2 == 0); int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, WuSheng.Name, Waiting.ConvertAll((PCard Card) => Card.Name).Concat(WaitingEquipments.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_ShuShangKaaiHua(); 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 Nuvj = new PSkill("怒斩") { Lock = true }; SkillList.Add(Nuvj .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(Nuvj.Name) { IsLocked = true, Player = Player, Time = PTime.Injure.EmitInjure, AIPriority = 200, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Equals(InjureTag.FromPlayer) && Player.Area.EquipmentCardArea.CardNumber > InjureTag.ToPlayer.Area.EquipmentCardArea.CardNumber && InjureTag.InjureSource is PBlock; }, Effect = (PGame Game) => { Nuvj.AnnouceUseSkill(Player); Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure += 600; } }); })); }
public P_HeShen() : base("和珅") { Sex = PSex.Male; Age = PAge.Industrial; Index = 24; Cost = 30; Tips = "定位:防御\n" + "难度:简单\n" + "史实:清朝中期权臣,中国历史上有名的巨贪,聚敛了约十亿两白银的巨大财富。\n" + "攻略:\n和珅是一名拥有不错防御力的武将。【贪污】使和珅的起始资金变相增加,而【受贿】可用于关键击杀,但一般都用于辅助队友。和珅的技能使用基本没有任何难度,因此十分适合新手使用。"; PSkill TanWu = new PSkill("贪污") { Lock = true }; SkillList.Add(TanWu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(TanWu.Name) { IsLocked = true, Player = Player, Time = PTime.PurchaseLandTime, Condition = (PGame Game) => { PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName); return Player.Equals(PurchaseLandTag.Player); }, Effect = (PGame Game) => { TanWu.AnnouceUseSkill(Player); PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName); PurchaseLandTag.LandPrice = PMath.Percent(PurchaseLandTag.LandPrice, 50); } }); }) .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(TanWu.Name) { IsLocked = true, Player = Player, Time = PTime.PurchaseHouseTime, Condition = (PGame Game) => { PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName); return Player.Equals(PurchaseHouseTag.Player); }, Effect = (PGame Game) => { TanWu.AnnouceUseSkill(Player); PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName); PurchaseHouseTag.HousePrice = PMath.Percent(PurchaseHouseTag.HousePrice, 50); } }); })); PSkill ShouHui = new PSkill("受贿") { Initiative = true }; int ShouHuiExpect(PGame Game, PPlayer Player) { int Sum = 0; int Cnt = 0; foreach (PBlock Block in PAiMapAnalyzer.NextBlocks(Game, Player)) { if (Block.CanPurchase && Block.Lord == null) { Sum += Block.Price; Cnt++; } else if (Player.Equals(Block.Lord)) { Sum += Block.HousePrice; Cnt++; } } if (Cnt == 0) { return(-1); } else { return(Sum / Cnt); } } PPlayer ShouHuiTarget(PGame Game, PPlayer Player) { foreach (PPlayer Target in Game.Teammates(Player)) { if (ShouHuiExpect(Game, Target) >= 1500 && Target.Money >= 2000 && Player.RemainLimit(ShouHui.Name, Target)) { return(Target); } } foreach (PPlayer Target in Game.Enemies(Player)) { if (Player.RemainLimit(ShouHui.Name, Target)) { int Expect = ShouHuiExpect(Game, Target); if (Expect < 0) { Expect = 3000; // 无法判断下次购买土地或房屋的收益 } Expect -= PAiTargetChooser.InjureExpect(Game, Player, Player, Target, 1000, ShouHui); if (Expect <= -1000) { return(Target); } } } return(null); } SkillList.Add(ShouHui .AnnounceEachPlayerOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(ShouHui.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 10, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Game.AlivePlayers().Exists((PPlayer _Player) => Player.RemainLimit(ShouHui.Name, _Player)); }, AICondition = (PGame Game) => { return ShouHuiTarget(Game, Player) != null; }, Effect = (PGame Game) => { ShouHui.AnnouceUseSkill(Player); PPlayer Target = null; if (Player.IsAI) { Target = ShouHuiTarget(Game, Player); } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, (PGame _Game, PPlayer _Player) => Player.RemainLimit(ShouHui.Name, _Player), ShouHui.Name, true); } if (Target != null) { Game.Injure(Player, Target, 1000, ShouHui); Target.Tags.CreateTag(new PShouHuiTag()); ShouHui.DeclareUseFor(Player, Target); } } }); }) .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(ShouHui.Name) { IsLocked = true, Player = null, Time = PTime.PurchaseLandTime, Condition = (PGame Game) => { PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName); return PurchaseLandTag.Player.Tags.ExistTag(PShouHuiTag.TagName); }, Effect = (PGame Game) => { PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName); PurchaseLandTag.LandPrice = 0; ShouHui.AnnouceUseSkill(PurchaseLandTag.Player); PurchaseLandTag.Player.Tags.PopTag <PShouHuiTag>(PShouHuiTag.TagName); } }); }) .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(ShouHui.Name) { IsLocked = true, Player = null, Time = PTime.PurchaseHouseTime, Condition = (PGame Game) => { PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName); return PurchaseHouseTag.Player.Tags.ExistTag(PShouHuiTag.TagName); }, Effect = (PGame Game) => { PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName); PurchaseHouseTag.HousePrice = 0; ShouHui.AnnouceUseSkill(PurchaseHouseTag.Player); PurchaseHouseTag.Player.Tags.PopTag <PShouHuiTag>(PShouHuiTag.TagName); } }); })); }
public P_XuanWu() : base("玄武") { Sex = PSex.Male; Age = PAge.Ancient; Index = 1004; Cost = 1; Tips = string.Empty; CanBeChoose = false; //PSkill ShenShou = new PSkill("神兽") { // Lock = true //}; //SkillList.Add(ShenShou // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PTime.StartGameTime, // AIPriority = 100, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 30000); // } // }; // }) // .AddTrigger( // (PPlayer Player, PSkill Skill) => { // return new PTrigger(ShenShou.Name) { // IsLocked = true, // Player = Player, // Time = PPeriod.StartTurn.During, // AIPriority = 100, // Condition = (PGame Game) => { // return Player.Equals(Game.NowPlayer); // }, // Effect = (PGame Game) => { // ShenShou.AnnouceUseSkill(Player); // Game.GetMoney(Player, 500); // } // }; // })); PSkill XuanWu = new PSkill("玄武") { Lock = true }; SkillList.Add(XuanWu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(XuanWu.Name) { IsLocked = true, Player = Player, Time = PTime.Injure.AcceptInjure, AIPriority = 250, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer) && InjureTag.InjureSource is PBlock && Player.LandNumber > 0; }, Effect = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); XuanWu.AnnouceUseSkill(Player); int MinHouse = PMath.Min(Game.Map.FindBlock(Player), (PBlock Block) => Block.HouseNumber).Value; PBlock Target = PMath.Max(Game.Map.FindBlock(Player).FindAll((PBlock Block) => Block.HouseNumber == MinHouse), (PBlock Block) => PAiMapAnalyzer.HouseValue(Game, Player, Block)).Key; Game.GetHouse(Target, 1); } }); })); }
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_QuYuan() : base("屈原") { Sex = PSex.Male; Age = PAge.Classic; Index = 25; Cost = 25; Tips = "定位:全能\n" + "难度:简单\n" + "史实:战国时期楚国诗人、政治家。中国浪漫主义文学的奠基人,“楚辞”的代表作家。代表作《离骚》。\n" + "攻略:\n屈原是一名集攻击、防御、爆发于一体的武将。【离骚】的存在能够在天灾中获得一定收益,一般相当于一张免费的【苦肉计】。屈原使用起来基本没有任何难度,因此十分推荐新手使用。"; PSkill LiSao = new PSkill("离骚") { SoftLockOpen = true }; SkillList.Add(LiSao .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(LiSao.Name) { IsLocked = false, Player = Player, Time = PTime.Injure.AfterAcceptInjure, AIPriority = 280, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(InjureTag.ToPlayer) && InjureTag.Injure > 0; }, AICondition = (PGame Game) => { if (Player.Money <= 900) { return false; } PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); if (InjureTag.Injure >= Player.Money) { return true; } else if (InjureTag.Injure + 1800 >= Player.Money) { return false; } return true; }, Effect = (PGame Game) => { LiSao.AnnouceUseSkill(Player); int SaoNumber = 0; int Line = 0; int Count = 0; int Last = 0; int LLast = 0; while (true) { int Test = Game.Judge(Player, 6); Count++; if ((Test - Last) * Line < 0) { Player.Tags.PopTag <PSaoTag>(PSaoTag.TagName); break; } else { if (Test != Last && Last != 0) { Line = Test - Last; } LLast = Last; Last = Test; } int Delta = SaoNumber * 9 + Test; Player.Tags.CreateTag(new PSaoTag(Delta)); SaoNumber += Delta; } Game.LoseMoney(Player, 300 * Count); Game.GetCard(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_IzayoiMiku() : base("诱宵美九") { Sex = PSex.Female; Age = PAge.Industrial; Index = 28; Cost = 50; Tips = "定位:攻击\n" + "难度:简单\n" + "史实:轻小说《约会大作战》中女主角。龙胆寺女子学院学生,歌手,偶像。\n" + "攻略:\n【独奏】可以压制住全部的防御牌,既不能被闪避也不能被减伤,还无法通过【借尸还魂】、【走为上计】自救,一定程度上使得项羽、廉颇、屈原一类的自伤角色不敢铤而走险。贞德的【圣女】能够对【独奏】形成一定程度的克制。如果美九有【古锭刀】,则每一次过路费都触发【古锭刀】技能的效果,从而成为很强的火力点。新版美九的【独奏】无法触发花木兰的【枭姬】,但花木兰仍可以通过【易装】给她【古锭刀】来形成配合。\n美九的团队通常需要建一座城堡来发动【轮舞曲】。如果在未来大概率拿不到新的商业用地的情况下,即使是3级城堡,在【轮舞曲】之后也相当于免费升了2级的购物中心。"; NewGeneral = true; PSkill Solo = new PSkill("独奏"); SkillList.Add(Solo .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(Solo.Name) { IsLocked = false, Player = Player, Time = PTime.Injure.BeforeEmitInjure, AIPriority = 200, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(InjureTag.FromPlayer) && InjureTag.Injure > 0 && InjureTag.ToPlayer != null && InjureTag.ToPlayer.Area.OwnerCardNumber > 0; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayer ToPlayer = InjureTag.ToPlayer; return ToPlayer.TeamIndex != Player.TeamIndex || (ToPlayer.General is P_Gabriel); }, Effect = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayerCardArea ToPlayerArea = InjureTag.ToPlayer.Area; Solo.AnnouceUseSkill(Player); Game.CardManager.MoveAll(ToPlayerArea.HandCardArea, ToPlayerArea.OutOfGameArea); // Game.CardManager.MoveAll(ToPlayerArea.EquipmentCardArea, ToPlayerArea.OutOfGameArea); Player.Tags.CreateTag(new PSoloTag()); } }); }) .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(Solo.Name) { IsLocked = true, Player = Player, Time = PTime.Injure.EndSettle, AIPriority = 200, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(InjureTag.FromPlayer) && InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Tags.ExistTag(PSoloTag.TagName); }, Effect = (PGame Game) => { Solo.AnnouceUseSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayer ToPlayer = InjureTag.ToPlayer; Player.Tags.PopTag <PSoloTag>(PSoloTag.TagName); if (ToPlayer.IsAlive) { Game.CardManager.MoveAll(ToPlayer.Area.OutOfGameArea, ToPlayer.Area.HandCardArea); } else { Game.CardManager.MoveAll(ToPlayer.Area.OutOfGameArea, Player.Area.HandCardArea); PPlayer ExtraTarget = null; int ExtraInjure = PMath.Percent(InjureTag.Injure, 50); if (Player.IsAI) { ExtraTarget = PAiTargetChooser.InjureTarget(Game, Player, Player, PTrigger.Except(Player), ExtraInjure, Solo); } else { ExtraTarget = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), Solo.Name + "[造成" + ExtraInjure.ToString() + "点伤害]", true); } if (ExtraTarget != null) { Game.Injure(Player, ExtraTarget, ExtraInjure, Solo); } } } }); })); PSkill Rando = new PSkill("轮舞曲") { Initiative = true }; SkillList.Add(Rando .AnnounceGameOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(Rando.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 280, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(Rando.Name) && Game.Map.BlockList.Exists((PBlock Block) => Block.Lord != null && Block.IsBusinessLand); }, AICondition = (PGame Game) => { PBlock MaxHouseBlock = PMath.Max(Game.Map.BlockList.FindAll((PBlock Block) => Block.Lord != null && Block.IsBusinessLand && Block.Lord.TeamIndex == Player.TeamIndex && !Block.BusinessType.Equals(PBusinessType.ShoppingCenter)), (PBlock Block) => Block.HouseNumber, true).Key; if (MaxHouseBlock == null) { return false; } int ClubBonus = PMath.Percent(MaxHouseBlock.Price, 40) * Game.Enemies(Player).Count *MaxHouseBlock.HouseNumber; if (MaxHouseBlock.BusinessType.Equals(PBusinessType.Institute)) { ClubBonus -= 4000 * Game.Teammates(Player).Count; } int TeammateCardBonus = -2000 * PMath.Sum(Game.Teammates(Player, false).ConvertAll((PPlayer _Player) => Math.Min(2, _Player.Area.HandCardArea.CardNumber))); int EnemyCardBonus = 2000 * PMath.Sum(Game.Enemies(Player).ConvertAll((PPlayer _Player) => Math.Min(2, _Player.Area.HandCardArea.CardNumber))); int SumBonus = ClubBonus + TeammateCardBonus + EnemyCardBonus; return SumBonus >= 8000 * (1 + Game.Map.BlockList.FindAll((PBlock _Block) => _Block.IsBusinessLand && _Block.Lord == null).Count); }, Effect = (PGame Game) => { Rando.AnnouceUseSkill(Player); Game.Traverse((PPlayer _Player) => { if (_Player != Player) { for (int i = 0; i < 2; ++i) { if (_Player.Area.HandCardArea.CardNumber > 0) { Game.ThrowCard(_Player, _Player, true, false, false); } } } }, Player); PBlock Target = null; if (Player.IsAI) { PBlock MaxHouseBlock = PMath.Max(Game.Map.BlockList.FindAll((PBlock Block) => Block.Lord != null && Block.IsBusinessLand && Block.Lord.TeamIndex == Player.TeamIndex && !Block.BusinessType.Equals(PBusinessType.ShoppingCenter)), (PBlock Block) => Block.HouseNumber, true).Key; Target = MaxHouseBlock; } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskToChooseBlock(Player, Rando.Name + "-选择一处商业用地", (PBlock Block) => Block.IsBusinessLand && Block.Lord != null); } Target.BusinessType = PBusinessType.Club; PNetworkManager.NetworkServer.TellClients(new PRefreshBlockBasicOrder(Target)); Rando.DeclareUse(Player); } }); })); }
public P_YangYuHuan() : base("杨玉环") { Sex = PSex.Female; Age = PAge.Renaissance; Index = 3; Tips = "定位:控制\n" + "难度:简单\n" + "史实:唐代宫廷音乐家、舞蹈家,中国古代四大美女之一,唐玄宗宠妃。\n" + "攻略:\n杨玉环是新手推荐的武将,使用简单,强度稳定,并且不弱。\n杨玉环可以通过主动调整来增加【羞花】的发动频率,【羞花】的条件1和3、4往往是互斥的,而条件2又和【品荔】冲突,因此收益期望并不高。如果要主动调整,建议只进行小幅度买房、出牌决策上的调整,因为【羞花】的收益远没有到值得大幅调整战略的程度。\n因为【羞花】的发动条件是“最少”,所以如果杨玉环进入到人数较少的阶段,比如只有两个玩家存活时,【羞花】的收益就变得很高。因此,杨玉环的嘲讽也相对较高。"; PSkill PinLi = new PSkill("品荔"); SkillList.Add(PinLi .AddTimeTrigger( new PTime[] { PPeriod.SettleStage.Start }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(PinLi.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 150, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && Player.Equals(Player.Position.Lord) && Player.Position.BusinessType.Equals(PBusinessType.Institute) && Game.PlayerList.Exists((PPlayer _Player) => _Player.Area.CardNumber > 0 && !_Player.Equals(Player) && _Player.IsAlive); }, AICondition = (PGame Game) => { return P_ShunShouChiienYang.AIBaseEmitTargets(Game, Player, 0)[0] != null; }, Effect = (PGame Game) => { PinLi.AnnouceUseSkill(Player); PCard Card = new P_ShunShouChiienYang().Instantiate(); Card.Point = 0; PTrigger Trigger = Card.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(Player, Card).Time.Equals(PPeriod.FirstFreeTime.During))?.Invoke(Player, Card); if (Trigger != null) { Game.Logic.StartSettle(new PSettle("品荔[顺手牵羊]", Trigger.Effect)); } } }); })); PSkill XiuHua = new PSkill("羞花") { SoftLockOpen = true }; SkillList.Add(XiuHua .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(XiuHua.Name) { IsLocked = false, Player = Player, Time = PPeriod.EndTurn.During, AIPriority = 120, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game) => { XiuHua.AnnouceUseSkill(Player); List <PPlayer> AlivePlayers = Game.AlivePlayers(Player); int X = new List <bool>() { AlivePlayers.TrueForAll((PPlayer _Player) => _Player.Money > Player.Money), AlivePlayers.TrueForAll((PPlayer _Player) => _Player.Area.HandCardArea.CardNumber > Player.Area.HandCardArea.CardNumber), AlivePlayers.TrueForAll((PPlayer _Player) => _Player.LandNumber > Player.LandNumber), AlivePlayers.TrueForAll((PPlayer _Player) => _Player.HouseNumber > Player.HouseNumber) }.FindAll((bool x) => x).Count; if (X > 0) { Game.GetMoney(Player, 200 * X); } } }); })); }
public P_ChenYuanYuan() : base("陈圆圆") { Sex = PSex.Female; Age = PAge.Industrial; Index = 4; Tips = "定位:防御\n" + "难度:简单\n" + "史实:明末清初戏曲演艺家,作为吴三桂向农民军的宣战理由而闻名于世。\n" + "攻略:\n陈圆圆是新手推荐的武将,使用简单,且具有一定的强度,过牌量较高,可以用来练习对牌的使用能力。\n【风云】的收益取决于在场上的存在感,而【楚楚】平均6回合摸一张牌,因此在人数少、回合频繁的1v1模式中,陈圆圆的强度非常高。但陈圆圆和队友的配合能力相对较差,在人数多、回合被稀释的4v4模式下,表现就不是很好了。"; PSkill FengYun = new PSkill("风云") { SoftLockOpen = true }; SkillList.Add(FengYun .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(FengYun.Name) { IsLocked = false, Player = Player, Time = PTime.Injure.EndSettle, AIPriority = 120, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return (Player.Equals(InjureTag.ToPlayer) || Player.Equals(InjureTag.FromPlayer)) && InjureTag.Injure > 0; }, Effect = (PGame Game) => { FengYun.AnnouceUseSkill(Player); Game.GetMoney(Player, 200); } }); })); PSkill ChuChu = new PSkill("楚楚") { SoftLockOpen = true }; SkillList.Add(ChuChu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(ChuChu.Name) { IsLocked = false, Player = Player, Time = PPeriod.EndTurnStage.During, AIPriority = 50, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game) => { ChuChu.AnnouceUseSkill(Player); int X = Game.Judge(Player, 4); if (X == 4) { Game.GetCard(Player, 1); } } }); })); }
public P_HuaXiong() : base("华雄") { Sex = PSex.Male; Age = PAge.Medieval; Index = 10; Cost = 20; Tips = "定位:辅助\n" + "难度:中等\n" + "史实:汉末董卓帐下都督,在《三国演义》中,华雄是一员猛将,曾击败孙坚,斩杀祖茂、俞涉、潘凤。\n" + "攻略:\n" + "1.华雄的资本是初始比其他人多出的15000资金,这让华雄成为了前期被擒贼擒王围堵的对象,降低了华雄的预期土地水平。因此耀武的实际收益小于15000。\n" + "2.耀武的收益是一次性的。和持续性收益的武将相比,节奏越快的战斗,华雄的优势越大。加快游戏节奏的诸葛连弩、草木皆兵,甚至闪电,都可以帮助扩大华雄的相对收益。\n" + "3.叫阵是一个期望收益为负的技能,除非有希望斩杀或者有不需要的装备,不应该随意发动叫阵。\n" + "4.叫阵是一个直击技能。如果存储一些装备牌,就可以在敌人现金较少的时候连续叫阵实现斩杀。因此,手牌数多的华雄可以限制敌人将现金转化成房屋等其他战斗资源的决策。\n" + "5.在团队里华雄主要充当一个奶妈角色,用其天然的高现金数,让队友收取过路费。同时华雄凭借叫阵也能承担一个直击斩杀手的功能。\n" + "6.到游戏后期,因为耀武的均回合收益已经下降到很低,华雄能为团队做出的贡献很少。"; PSkill YaoWu = new PSkill("耀武") { Lock = true }; SkillList.Add(YaoWu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(YaoWu.Name) { IsLocked = true, Player = Player, Time = PTime.StartGameTime, AIPriority = 100, Effect = (PGame Game) => { YaoWu.AnnouceUseSkill(Player); Player.Money = PMath.Percent(Player.Money, 150); PNetworkManager.NetworkServer.TellClients(new PRefreshMoneyOrder(Player)); } }); })); PSkill JiaoZhen = new PSkill("叫阵") { Initiative = true }; SkillList.Add(JiaoZhen .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(JiaoZhen.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.EquipmentCardArea.CardNumber > 0; }, AICondition = (PGame Game) => { if (PAiTargetChooser.InjureTarget(Game, Player, Player, (PGame _Game, PPlayer _Player) => { return _Player.IsAlive && !_Player.Equals(Player) && !(_Player.General is P_LiuJi); }, 1000, JiaoZhen) == null || Player.Money <= 2000) { return false; } if (Game.Enemies(Player).Exists((PPlayer _Player) => _Player.Money <= 2000)) { return true; } foreach (PCardType CardType in new PCardType[] { PCardType.WeaponCard, PCardType.DefensorCard, PCardType.TrafficCard }) { KeyValuePair <PCard, int> MaxCard = PMath.Max( Player.Area.HandCardArea.CardList.FindAll((PCard _Card) => _Card.Type.Equals(CardType)), (PCard _Card) => _Card.Model.AIInEquipExpectation(Game, Player)); PCard CurrentCard = Player.GetEquipment(CardType); if (CurrentCard != null) { int Expect = CurrentCard.Model.AIInEquipExpectation(Game, Player); if (MaxCard.Value > Expect) { return true; } if (Expect <= 1000) { return true; } } } return false; }, Effect = (PGame Game) => { JiaoZhen.AnnouceUseSkill(Player); PPlayer Target = null; if (Player.IsAI) { Target = PAiTargetChooser.InjureTarget(Game, Player, Player, (PGame _Game, PPlayer _Player) => { return _Player.IsAlive && !_Player.Equals(Player) && !(_Player.General is P_LiuJi); }, 1000, JiaoZhen); } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), JiaoZhen.Name, true); } if (Target != null) { if (Game.PkPoint(Player, Target) > 0) { Game.Injure(Player, Target, 1000, JiaoZhen); } else { Game.ThrowCard(Player, Player, false); Game.LoseMoney(Player, 1000); } } } }); })); }
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_WuZhao() : base("武瞾") { Sex = PSex.Female; Age = PAge.Renaissance; Index = 15; Cost = 30; Tips = "定位:攻击\n" + "难度:困难\n" + "史实:武周皇帝,中国历史上唯一统一王朝女皇帝。在位期间以酷吏政治闻名,晚年骄奢淫逸,致使唐朝中衰。\n" + "攻略:\n武瞾有且仅有两个限定技,对两个限定技的使用能力决定了她的存在感和强度。武瞾玩家对于局势的观察能力非常重要,因为发动时机的选择直接影响到武瞾的强度。\n如果选择的发动时机得当,武瞾的强度是很高的。【女权】在储存了大量伤害类计策的情况下,可以带来惊人的爆发伤害,因此在【女权】发动之前,【瞒天过海】、【关门捉贼】等牌并不建议使用。使用【以逸待劳】加【浑水摸鱼】的组合精准打击敌人也是优秀的策略。\n【迁都】的发动时机更依靠于玩家把握力,原则上越晚【迁都】可以赠送的房屋越多,但如果【迁都】过晚,则可能建造的城堡不够发挥输出。【迁都】和【上屋抽梯】也是很好的组合。"; PSkill NvQuan = new PSkill("女权") { Initiative = true }; SkillList.Add(NvQuan .AnnounceGameOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(NvQuan.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 250, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(NvQuan.Name); }, AICondition = (PGame Game) => { /* * 女权的发动条件: * 【只会在第一个空闲时间点发动】 * 观察场上所有女性直到你的下回合开始的过程 * 即,对场上所有人的下一回合行动,如果领主为女性,记录相应的伤害收益 * 然后,对 * 注:在没发动女权的情况下,武瞾将不会使用以下牌: * 瞒天过海、关门捉贼、笑里藏刀、反间计、打草惊蛇、抛砖引玉、以逸待劳、浑水摸鱼 * * 当有女权状态且有浑水摸鱼的情况下,女性角色的以逸待劳将指定所有敌方角色为目标 */ if (!Game.NowPeriod.Equals(PPeriod.FirstFreeTime)) { return false; } int ExpectSum = 0; Game.AlivePlayers().FindAll((PPlayer _Player) => !_Player.Equals(Player)).ForEach((PPlayer _Player) => { List <PBlock> NextBlocks = PAiMapAnalyzer.NextBlocks(Game, _Player); int TempSum = 0; NextBlocks.ForEach((PBlock Block) => { if (Block.Lord != null && Block.Lord.TeamIndex != _Player.TeamIndex && Block.Lord.Sex.Equals(PSex.Female)) { TempSum += 4000 * (Block.Lord.TeamIndex == Player.TeamIndex ? 1 : -1); } }); TempSum /= Math.Max(1, NextBlocks.Count); ExpectSum += TempSum; }); ExpectSum += 4000 * Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Model is P_ManTiienKuoHai).Count; ExpectSum += Game.Enemies(Player).FindAll((PPlayer _Player) => _Player.Position.HouseNumber == 0).Count * 4000 * Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Model is P_KuanMevnChoTsev).Count; ExpectSum += 4000 * Math.Min(Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Type.IsEquipment()).Count, Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Model is P_HsiaoLiTsaangTao).Count); if (Player.Area.HandCardArea.CardList.Exists((PCard Card) => { return Card.Model is P_FanChienChi || Card.Model is P_TaTsaaoChingShev || Card.Model is P_PaaoChuanYinYoo || Card.Model is P_IITaiLao; })) { ExpectSum += 4000 * Game.Enemies(Player).Count * Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Model is P_HunShuiMoYoo).Count; } return ExpectSum > 6000; }, Effect = (PGame Game) => { NvQuan.AnnouceUseSkill(Player); Game.AlivePlayers().ForEach((PPlayer _Player) => { if (_Player.Sex.Equals(PSex.Female)) { _Player.Tags.CreateTag(NvQuanTag); } }); NvQuan.DeclareUse(Player); } }); }) .AddTrigger((PPlayer Player, PSkill Skill) => { return(new PTrigger(NvQuan.Name + "[增加伤害]") { IsLocked = true, Player = null, Time = PTime.Injure.EmitInjure, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return (InjureTag.FromPlayer != null && InjureTag.FromPlayer.Tags.ExistTag(NvQuanTag.Name)) && (InjureTag.InjureSource is PCard || InjureTag.InjureSource is PBlock); }, Effect = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); NvQuan.AnnouceUseSkill(InjureTag.FromPlayer); InjureTag.Injure += 2000; } }); }).AddTrigger((PPlayer Player, PSkill Skill) => { return(new PTrigger(NvQuan.Name + "[效果结束]") { IsLocked = true, Player = null, Time = PPeriod.StartTurn.Start, Condition = (PGame Game) => { return Game.NowPlayer.Equals(Player); }, Effect = (PGame Game) => { Game.AlivePlayers().ForEach((PPlayer _Player) => { _Player.Tags.PopTag <PTag>(NvQuanTag.Name); }); } }); })); KeyValuePair <PBlock, int> QianDuTarget(PGame Game, PPlayer Player) { int BusinessLandCount = Game.Map.BlockList.FindAll((PBlock Block) => Player.Equals(Block.Lord) && Block.IsBusinessLand).Count; return(PMath.Max(Game.Map.BlockList.FindAll((PBlock Block) => Player.Equals(Block.Lord) && !Block.IsBusinessLand), (PBlock Block) => { int HouseNumber = Game.GetBonusHouseNumberOfCastle(Player, Block); HouseNumber += BusinessLandCount; return HouseNumber * PAiMapAnalyzer.HouseValue(Game, Player, Block); })); } PSkill QianDu = new PSkill("迁都") { Initiative = true }; SkillList.Add(QianDu .AnnounceGameOnce() .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(QianDu.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 280, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(QianDu.Name) && Game.Map.BlockList.Exists((PBlock Block) => Player.Equals(Block.Lord) && !Block.IsBusinessLand); }, AICondition = (PGame Game) => { if (!Game.NowPeriod.Equals(PPeriod.FirstFreeTime)) { return false; } return QianDuTarget(Game, Player).Value > 12000; }, Effect = (PGame Game) => { QianDu.AnnouceUseSkill(Player); PBlock TargetBlock = null; if (Player.IsAI) { TargetBlock = QianDuTarget(Game, Player).Key; } else { TargetBlock = PNetworkManager.NetworkServer.ChooseManager.AskToChooseBlock(Player, QianDu.Name, (PBlock Block) => { return Player.Equals(Block.Lord) && !Block.IsBusinessLand; }); } if (TargetBlock != null) { int BusinessLandCount = Game.Map.BlockList.FindAll((PBlock Block) => Player.Equals(Block.Lord) && Block.IsBusinessLand).Count; int HouseNumber = Game.GetBonusHouseNumberOfCastle(Player, TargetBlock) + BusinessLandCount; Game.MovePosition(Player, Player.Position, TargetBlock); PNetworkManager.NetworkServer.TellClients(new PHighlightBlockOrder(TargetBlock.Index.ToString())); TargetBlock.BusinessType = PBusinessType.Castle; Game.GetHouse(TargetBlock, HouseNumber); } QianDu.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_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_YuJi() : base("虞姬") { Sex = PSex.Female; Age = PAge.Classic; Index = 13; Cost = 15; Tips = "定位:攻击\n" + "难度:简单\n" + "史实:楚汉相争时期,西楚霸王项羽的美人,项羽曾为其作《垓下歌》。\n" + "攻略:\n虞姬是一个依赖于手牌的武将,所以研究所是她和她的队友的优先选择。对于虞姬而言,如何较为准确地衡量手牌的价值是一个比较困难的问题。对于两张点数不同的牌,两张牌自身的价值有高有低,两张牌用来【剑舞】的价值也有高有低,使用什么牌来【剑舞】,是虞姬玩家水平分别的体现。\n" + "通常,虞姬玩家可以弃掉自己不需要的装备、伏兵和难以发挥积极作用的【擒贼擒王】、【假痴不癫】、【空城计】等牌发动【剑舞】。虞姬玩家也可以在手上存留很多牌,当与敌人近身接触时,把所有牌都用来【剑舞】,造成巨大的输出,以求直接杀死对手。"; PSkill JianWu = new PSkill("剑舞") { Initiative = true }; KeyValuePair <PCard, int> JianWuTest(PGame Game, PPlayer Player) { KeyValuePair <PCard, int> Answer = new KeyValuePair <PCard, int>(null, 0); for (int i = 1; i <= 6; ++i) { int Expect = (int)PMath.Sum(Game.AlivePlayers().FindAll((PPlayer _Player) => { return(!_Player.Equals(Player) && _Player.Distance(Player) <= i); }).ConvertAll((PPlayer _Player) => { return((double)PAiTargetChooser.InjureExpect(Game, Player, Player, _Player, 800, JianWu)); })); KeyValuePair <PCard, int> Test = PMath.Max(Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point == i), (PCard Card) => { return(Expect - Card.Model.AIInHandExpectation(Game, Player)); }, true); if (Test.Value > Answer.Value) { Answer = Test; } } return(Answer); } SkillList.Add(JianWu .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(JianWu.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 190, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.Area.HandCardArea.CardNumber > 0; }, AICondition = (PGame Game) => { return JianWuTest(Game, Player).Key != null; }, Effect = (PGame Game) => { JianWu.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = JianWuTest(Game, Player).Key; PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(Player.Name + "弃置了" + Player.Name + "的" + TargetCard.Name)); Game.CardManager.MoveCard(TargetCard, Player.Area.HandCardArea, Game.CardManager.ThrownCardHeap); } else { TargetCard = Game.ThrowCard(Player, Player, true, false); } if (TargetCard != null) { Game.Traverse((PPlayer _Player) => { if (!_Player.Equals(Player) && _Player.Distance(Player) <= TargetCard.Point) { Game.Injure(Player, _Player, 800, JianWu); } }, Player); } } }); })); }
public P_JeanneDarc() : base("贞德") { Sex = PSex.Female; Age = PAge.Medieval; Index = 30; Cost = 40; Tips = "定位:辅助\n" + "难度:简单\n" + "史实:法国民族英雄,天主教圣人,被称为“奥尔良的圣女”。在英法百年战争中,她带领法国军队对抗英军的入侵,屡战屡胜,扭转了战争的局势。\n" + "攻略:\n-"; PSkill ShengNv = new PSkill("圣女"); SkillList.Add(ShengNv .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(ShengNv.Name) { IsLocked = true, Player = Player, Time = PTime.EnterDyingTime, AIPriority = 5, Condition = (PGame Game) => { PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName); return Player.Area.OwnerCardNumber > 0 && DyingTag.Source != null && DyingTag.Source is PBlock; }, AICondition = (PGame Game) => { PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName); if (DyingTag.Killer.General is P_LvZhi) { return false; } if (DyingTag.Player.TeamIndex == Player.TeamIndex) { if (Player.Equals(DyingTag.Player)) { return true; } else { if (DyingTag.Player.Money <= -10000) { return false; } if (Player.Money > 5000) { return true; } else { return Player.Area.OwnerCardNumber <= 3; } } } else { return false; } }, Effect = (PGame Game) => { ShengNv.AnnouceUseSkill(Player); PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName); Game.CardManager.ThrowAll(Player.Area); PCard Card = new P_ChiehTaoShaJevn().Instantiate(); Card.Point = 0; PTrigger Trigger = Card.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(DyingTag.Player, Card).Time.Equals(PTime.EnterDyingTime))?.Invoke(DyingTag.Player, Card); if (Trigger != null) { Game.Logic.StartSettle(new PSettle("圣女[借尸还魂]", Trigger.Effect)); Game.LoseMoney(Player, 5000); if (!Player.Equals(DyingTag.Player)) { Game.GetCard(DyingTag.Player); } } } }); })); }
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_ChenSheng() : base("陈胜") { Sex = PSex.Male; Age = PAge.Classic; Index = 21; Cost = 20; Tips = "定位:防御\n" + "难度:中等\n" + "史实:秦朝末年农民起义的领袖,建立了张楚政权。其名言“王侯将相宁有种乎”、“燕雀安知鸿鹄之志”等广为人知。\n" + "攻略:\n陈胜是一名拥有不俗控制能力和防御能力的武将。【起义】作为控制技能,能够在前期翻面敌人,从而迅速拉开己方团队与敌方团队的土地数量差距,同时能够在后期翻面自己或队友,从而减少敌人的伤害。在前期,使用【起义】控制敌人,可以帮助己方抢占地盘,同时使被翻面无法购买土地的敌人保持最高现金,制造连续控制的机会。【鸿鹄】大多数情况下配合【起义】使用,也可通过【金蝉脱壳】、【反间计】等卡牌发动。【鸿鹄】可以回避伤害的特性进一步增强了陈胜的防御,在后期,优势情况下的陈胜如果成为现金最多者,就可以连续【起义】自己形成滚雪球优势。陈胜的技能需要大量卡牌发动,因此可以通过大量建造研究所为陈胜创造条件。"; PSkill QiYi = new PSkill("起义") { Initiative = true }; SkillList.Add(QiYi .AddTimeTrigger( new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(QiYi.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 % 2 == 1); }, AICondition = (PGame Game) => { int LeastValue = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point % 2 == 1).Value; return P_ChiinTsevChiinWang.AIEmitTargets(Game, Player, LeastValue)[0] != null; }, Effect = (PGame Game) => { QiYi.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point % 2 == 1).Key; } else { List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point % 2 == 1); int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, QiYi.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_ChiinTsevChiinWang(); 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 HongHu = new PSkill("鸿鹄") { SoftLockOpen = true }; SkillList.Add(HongHu .AddTrigger( (PPlayer Player, PSkill Skill) => { return(new PTrigger(HongHu.Name) { IsLocked = false, Player = Player, Time = PTime.ChangeFaceTime, AIPriority = 100, Condition = (PGame Game) => { PChangeFaceTag ChangeFaceTag = Game.TagManager.FindPeekTag <PChangeFaceTag>(PChangeFaceTag.TagName); return Player.Equals(ChangeFaceTag.Player); }, Effect = (PGame Game) => { HongHu.AnnouceUseSkill(Player); Game.GetMoney(Player, 2000); int Step = 1; if (Player.IsAI) { Step = PMath.Max(new List <int> { 1, 2, 3, 4, 5, 6 }, (int StepNumber) => PAiMapAnalyzer.StartFromExpect(Game, Player, Game.Map.NextStepBlock(Player.Position, StepNumber), 0, false)).Key; } else { Step = PNetworkManager.NetworkServer.ChooseManager.Ask1To6(Player, QiYi.Name); } PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(Player.Name + "选择向前移动" + Step + "步")); Game.MoveForward(Player, Step); } }); })); }
public P_TangYin() : base("唐寅") { Sex = PSex.Male; Age = PAge.Industrial; Index = 20; Cost = 25; Tips = "定位:攻击\n" + "难度:简单\n" + "史实:明代画家、书法家、诗人,“明四家”和“吴中四才子”之一。以风流之名传于世,后代有“唐伯虎点秋香”等传说。\n" + "攻略:\n唐寅是一个上手简单的攻击型武将,并且具有一定的防御能力。【风流】作为主要输出技能,能够保持前期的经济压制和后期的装备压制,并可通过伤害类计策触发,因此【浑水摸鱼】【关门捉贼】等牌都是关键牌。【浪子】作为防御技能,能够在后期积累了一定装备的基础上避开关键区域,防止崩盘,因此唐寅对装备牌的需求也较大。唐寅可通过对队友造成伤害以获得装备;反之,【风流】的输出也会受到装备的限制,对手可以通过给唐寅没用的装备,替换唐寅原本的装备,降低【风流】的收益甚至令其变为负收益。"; PSkill LangZi = new PSkill("浪子"); SkillList.Add(LangZi .AddTimeTrigger( new PTime[] { PPeriod.DiceStage.Start }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(LangZi.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 10, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && Player.HasEquipInArea(); }, AICondition = (PGame Game) => { KeyValuePair <PCard, int> CardValue = PAiCardExpectation.EquipToThrow(Game, Player); KeyValuePair <int, int> SkillValue = LangZiBannedNumber(Game, Player); return CardValue.Key != null && SkillValue.Key > 0 && SkillValue.Value >= 100 && SkillValue.Value + CardValue.Value >= 300; }, Effect = (PGame Game) => { LangZi.AnnouceUseSkill(Player); PCard TargetCard = null; if (Player.IsAI) { TargetCard = PAiCardExpectation.EquipToThrow(Game, Player).Key; } else { do { TargetCard = PNetworkManager.NetworkServer.ChooseManager.AskToChooseOwnCard(Player, LangZi.Name + "[选择一张装备牌]", true, true); } while (!TargetCard.Type.IsEquipment()); } if (TargetCard != null) { int BannedNumber = 0; if (Player.IsAI) { BannedNumber = LangZiBannedNumber(Game, Player).Key; } else { BannedNumber = PNetworkManager.NetworkServer.ChooseManager.Ask1To6(Player, LangZi.Name + "[选择不会被掷出的数字]"); } if (BannedNumber > 0) { Game.CardManager.MoveCard(TargetCard, Player.Area.HandCardArea.CardList.Contains(TargetCard) ? Player.Area.HandCardArea : Player.Area.EquipmentCardArea, Game.CardManager.ThrownCardHeap); Player.Tags.CreateTag(new PNumberedTag(LangZi.Name, BannedNumber)); } } } }); }) .AddTrigger((PPlayer Player, PSkill Skill) => { return(new PTrigger(LangZi.Name + "[掷骰无效触发]") { IsLocked = true, Player = Player, Time = PPeriod.DiceStage.During, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && Player.Tags.ExistTag(LangZi.Name); }, Effect = (PGame Game) => { int BannedNumber = Player.Tags.PopTag <PNumberedTag>(LangZi.Name).Value; PDiceResultTag DiceResult = Game.TagManager.FindPeekTag <PDiceResultTag>(PDiceResultTag.TagName); if (BannedNumber == DiceResult.DiceResult) { LangZi.AnnouceUseSkill(Player); int NewNumber = BannedNumber; while (NewNumber == BannedNumber) { NewNumber = PMath.RandInt(1, 6); } PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder("掷骰结果更改为" + NewNumber.ToString())); DiceResult.DiceResult = NewNumber; } } }); }) ); PSkill FengLiu = new PSkill("风流"); const int FengLiuInjure = 600; SkillList.Add(FengLiu .AddTimeTrigger( new PTime[] { PTime.Injure.EmitInjure }, (PTime Time, PPlayer Player, PSkill Skill) => { return(new PTrigger(FengLiu.Name) { IsLocked = false, Player = Player, Time = Time, AIPriority = 150, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 0 && Player.Equals(InjureTag.FromPlayer) && InjureTag.ToPlayer != null && !Player.Equals(InjureTag.ToPlayer); }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayer ToPlayer = InjureTag.ToPlayer; if (ToPlayer.TeamIndex == Player.TeamIndex) { if (ToPlayer.Money > FengLiuInjure + InjureTag.Injure && ToPlayer.Money > Player.Money) { return true; } else if (ToPlayer.Money <= InjureTag.Injure) { return true; } else if (ToPlayer.Area.EquipmentCardArea.CardNumber == 0) { return false; } } foreach (PCardType CardType in new PCardType[] { PCardType.WeaponCard, PCardType.DefensorCard, PCardType.TrafficCard }) { PCard CurrentCard = Player.GetEquipment(CardType); PCard TestCard = ToPlayer.GetEquipment(CardType); if (ToPlayer.TeamIndex == Player.TeamIndex) { if (CurrentCard == null && TestCard != null && TestCard.Model.AIInEquipExpectation(Game, Player) > TestCard.Model.AIInEquipExpectation(Game, ToPlayer)) { return true; } } else if (CurrentCard != null && TestCard != null && CurrentCard.Model.AIInEquipExpectation(Game, Player) >= TestCard.Model.AIInEquipExpectation(Game, Player) + TestCard.Model.AIInEquipExpectation(Game, ToPlayer)) { return false; } } return ToPlayer.TeamIndex != Player.TeamIndex; }, Effect = (PGame Game) => { FengLiu.AnnouceUseSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); PPlayer ToPlayer = InjureTag.ToPlayer; int Answer = 0; PCard TargetCard = null; if (ToPlayer.Area.EquipmentCardArea.CardNumber == 0) { Answer = 1; } else { if (ToPlayer.IsAI) { if (ToPlayer.TeamIndex == Player.TeamIndex) { if (ToPlayer.Money <= InjureTag.Injure) { Answer = 1; } else if (PAiCardExpectation.FindMostValuable(Game, Player, ToPlayer, false, true, false, true).Value > 0) { Answer = 1; } } else { int Value = FengLiuInjure * 2; if (ToPlayer.Money <= InjureTag.Injure) { Value -= FengLiuInjure; } else if (ToPlayer.Money <= InjureTag.Injure + FengLiuInjure) { Value += 30000; } foreach (PCard TestCard in ToPlayer.Area.EquipmentCardArea.CardList) { int NowValue = TestCard.Model.AIInEquipExpectation(Game, ToPlayer); int GiveValue = TestCard.Model.AIInEquipExpectation(Game, Player); int OverrideValue = 0; if (Player.GetEquipment(TestCard.Type) != null) { OverrideValue = Player.GetEquipment(TestCard.Type).Model.AIInEquipExpectation(Game, Player); } int ExtraValue = ToPlayer.General is P_HuaMulan ? 3500 : 0; if (Value > NowValue + GiveValue - OverrideValue - ExtraValue) { Value = NowValue + GiveValue - OverrideValue - ExtraValue; TargetCard = TestCard; } } if (TargetCard == null) { Answer = 1; } } } else { Answer = PNetworkManager.NetworkServer.ChooseManager.Ask(ToPlayer, FengLiu.Name, new string[] { "交给" + Player.Name + "一件装备", "受到的伤害+" + FengLiuInjure.ToString() }); } } if (Answer == 0) { Game.GiveCardTo(ToPlayer, Player, false, true, false, true); } else { InjureTag.Injure += FengLiuInjure; } } }); }) ); }
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); } } }); })); }