public P_ChiiHsingPaao() : base(CardName, PCardType.DefensorCard) { Point = 4; Index = 52; foreach (PTime Time in new PTime[] { PTime.Card.AfterBecomeTargetTime }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, Condition = (PGame Game) => { PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName); return UseCardTag.TargetList.Contains(Player) && UseCardTag.Card.Type.Equals(PCardType.AmbushCard); }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName); UseCardTag.TargetList.Remove(Player); } }); }); } }
public P_LoFevngKung() : base(CardName, PCardType.WeaponCard) { Point = 5; Index = 47; foreach (PTime Time in new PTime[] { PTime.Injure.EmitInjure }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, 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.EquipmentCardArea.CardNumber > 0; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.ToPlayer.TeamIndex != Player.TeamIndex; }, Effect = (PGame Game) => { AnnouceUseEquipmentSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); Game.ThrowCard(Player, InjureTag.ToPlayer, false); } }); }); } }
public P_HsiYooYangToow() : base(CardName, PCardType.TrafficCard) { Point = 4; Index = 58; foreach (PTime Time in new PTime[] { PTime.Card.LeaveAreaTime }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, AIPriority = 50, Condition = (PGame Game) => { PMoveCardTag MoveCardTag = Game.TagManager.FindPeekTag <PMoveCardTag>(PMoveCardTag.TagName); PPlayer SourceOwner = MoveCardTag.Source.Owner; PPlayer DestinationOwner = MoveCardTag.Destination.Owner; return Player.Equals(SourceOwner) && !MoveCardTag.Source.IsAmbushArea() && DestinationOwner != null && MoveCardTag.Destination.IsHandCardArea() && !Player.Age.Equals(DestinationOwner.Age); }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); PMoveCardTag MoveCardTag = Game.TagManager.FindPeekTag <PMoveCardTag>(PMoveCardTag.TagName); MoveCardTag.Destination = Game.CardManager.ThrownCardHeap; } }); }); } }
public P_KuTingTao() : base(CardName, PCardType.WeaponCard) { Point = 2; Index = 44; foreach (PTime Time in new PTime[] { PTime.Injure.EmitInjure }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, 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.HandCardArea.CardNumber == 0 && InjureTag.InjureSource is PBlock; }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure *= 2; } }); }); } }
public P_TaaiPiingYaoShu() : base(CardName, PCardType.DefensorCard) { Point = 5; Index = 53; foreach (PTime Time in new PTime[] { PPeriod.StartTurn.During }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, AIPriority = 100, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); Game.GetMoney(Player, 200); } }); }); } }
public P_NanManHsiang() : base(CardName, PCardType.TrafficCard) { Point = 5; Index = 59; foreach (PTime Time in new PTime[] { PTime.Injure.StartSettle }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, AIPriority = 100, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(InjureTag.ToPlayer) && InjureTag.Injure > 0 && InjureTag.Injure <= 1000; }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); InjureTag.Injure = 0; } }); }); } }
// 赤兔的生效在上屋抽梯之后 public P_ChiihTuu() : base(CardName, PCardType.TrafficCard) { Point = 1; Index = 55; foreach (PTime Time in new PTime[] { PPeriod.WalkingStage.Start }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, AIPriority = 100, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); Game.TagManager.FindPeekTag <PStepCountTag>(PStepCountTag.TagName).StepCount++; } }); }); } }
public P_PaiHuaChooon() : base(CardName, PCardType.DefensorCard) { Point = 2; Index = 50; foreach (PTime Time in new PTime[] { PTime.Injure.AcceptInjure }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, AIPriority = 150, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(InjureTag.ToPlayer) && InjureTag.Injure > 0 && InjureTag.FromPlayer != null && !InjureTag.FromPlayer.Sex.Equals(Player.Sex); }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return InjureTag.Injure > 500; }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); InjureTag.Injure = PMath.Percent(InjureTag.Injure, 50); } }); }); } }
public P_ToouShihChi() : base(CardName, PCardType.WeaponCard) { Point = 6; Index = 48; AnnouceOnce(CardName); foreach (PTime Time in new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, CanRepeat = true, Condition = (PGame Game) => { PUsedTag UsedTag = Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + CardName); if (UsedTag == null) { Player.Tags.CreateTag(UsedTag = new PUsedTag(CardName, 1)); } return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && UsedTag != null && UsedTag.Count < UsedTag.Limit && Player.Money > 3000 && Game.Map.BlockList.Exists((PBlock Block ) => Block.HouseNumber > 0); }, AICondition = (PGame Game) => { return Game.Map.BlockList.Exists((PBlock Block) => Block.Lord != null && Block.Lord.TeamIndex != Player.TeamIndex && Block.HouseNumber > 1 && Block.BusinessType.Equals(PBusinessType.Castle)) && Player.Money >= 6000; }, Effect = (PGame Game) => { AnnouceUseEquipmentSkill(Player); PBlock TargetBlock = null; if (Player.IsAI) { TargetBlock = PMath.Max(Game.Map.BlockList.FindAll((PBlock Block) => Block.Lord != null && Block.Lord.TeamIndex != Player.TeamIndex && Block.BusinessType.Equals(PBusinessType.Castle)), (PBlock Block) => Block.HouseNumber).Key; } else { TargetBlock = PNetworkManager.NetworkServer.ChooseManager.AskToChooseBlock(Player, CardName + "之目标", (PBlock Block) => Block.HouseNumber > 0); } if (TargetBlock != null) { Game.LoseMoney(Player, 3000); Game.LoseHouse(TargetBlock, 1); if (TargetBlock.BusinessType.Equals(PBusinessType.Castle)) { Game.LoseHouse(TargetBlock, Game.Judge(Player, 6)); } Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + CardName).Count++; } } }); }); } }
public P_ChevnHunChiin() : base(CardName, PCardType.WeaponCard) { Point = 4; Index = 46; foreach (PTime Time in new PTime[] { PPeriod.StartTurn.During }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, AIPriority = 50, Condition = (PGame Game) => { return Game.NowPlayer.Equals(Player) && Player.Money <= 10000; }, AICondition = (PGame Game) => { return AiChooseResult(Game, Player) >= 0; }, Effect = (PGame Game) => { AnnouceUseEquipmentSkill(Player); int Result = 0; string[] Options = new string[] { "全体弃500", "全体摸500" }; if (Player.IsAI) { Result = AiChooseResult(Game, Player); } else { Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, CardName, Options); } PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(Player.Name + "选择了" + Options[Result])); if (Result == 0) { Game.Traverse((PPlayer _Player) => { Game.LoseMoney(_Player, 500); }, Player); } else if (Result == 1) { Game.Traverse((PPlayer _Player) => { Game.GetMoney(_Player, 500); }, Player); } } }); }); } }
public P_ChanYing() : base(CardName, PCardType.TrafficCard) { Point = 2; Index = 56; AnnouceOnce(CardName); foreach (PTime Time in new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, AIPriority = 0, CanRepeat = true, Condition = (PGame Game) => { PUsedTag UsedTag = Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + CardName); if (UsedTag == null) { Player.Tags.CreateTag(UsedTag = new PUsedTag(CardName, 1)); } return Player.Equals(Game.NowPlayer) && Player.IsUser && Game.Logic.WaitingForEndFreeTime() && UsedTag != null && UsedTag.Count < UsedTag.Limit; }, AICondition = (PGame Game) => { return false; // 永远不会发动 }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); if (Player.IsUser) { PPlayer Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), CardName); if (Target != null) { PNetworkManager.NetworkServer.ChooseManager.Ask(Player, Target.Name + "的手牌", Target.Area.HandCardArea.CardList.ConvertAll((PCard _Card) => _Card.Name).Concat(new List <string> { "确认" }).ToArray()); } } Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + CardName).Count++; } }); }); } }
protected void AnnouceOnce(string CardName) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = null, Time = PPeriod.StartTurn.Start, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game) => { Player.Tags.CreateTag(new PUsedTag(CardName, 1)); } }); }); }
public P_MuNiuLiuMa() : base(CardName, PCardType.TrafficCard) { Point = 6; Index = 60; AnnouceOnce(CardName); foreach (PTime Time in new PTime[] { PPeriod.FirstFreeTime.During, PPeriod.SecondFreeTime.During }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, AIPriority = 180, CanRepeat = true, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.RemainLimit(CardName) && Player.Money > 2000; }, AICondition = (PGame Game) => { return Game.Teammates(Player, false).Count > 0 && (Player.Money >= 20000 || (Player.Money >= 10000 && PMath.RandTest(0.5))); }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); Game.LoseMoney(Player, 2000); PPlayer Target = null; if (Player.IsAI) { Target = PMath.Max(Game.Teammates(Player, false), (PPlayer _Player) => _Player.AiCardExpectation).Key; } else { Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), CardName); } if (Target != null) { Game.GetCard(Target, 1); } Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + CardName).Count++; } }); }); } }
public P_PaKuaChevn() : base(CardName, PCardType.DefensorCard) { Point = 1; Index = 49; foreach (PTime Time in new PTime[] { PTime.Injure.AcceptInjure }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, AIPriority = 150, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); return Player.Equals(InjureTag.ToPlayer) && InjureTag.Injure > 0; }, AICondition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); if (InjureTag.FromPlayer != null && InjureTag.FromPlayer.General is P_IzayoiMiku && Player.General is P_Gabriel) { return false; } return InjureTag.Injure > 500 || Player.General is P_LiuJi; }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); int Result = Game.Judge(Player, InjureTag.Injure > 500 ? 5 : 6); if (Result % 2 == 1) { PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(CardName + ":成功")); InjureTag.Injure = PMath.Percent(InjureTag.Injure, 50); } else { PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(CardName + ":失败")); } } }); }); } }
public P_YinYooehChiiang() : base(CardName, PCardType.WeaponCard) { Point = 3; Index = 45; foreach (PTime Time in new PTime[] { PTime.Card.EndSettleTime }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, Condition = (PGame Game) => { PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName); return !Game.NowPlayer.Equals(Player) && UseCardTag.User.Equals(Player); }, Effect = (PGame Game) => { AnnouceUseEquipmentSkill(Player); PPlayer TargetPlayer = null; if (Player.IsAI) { TargetPlayer = PAiTargetChooser.InjureTarget(Game, Player, Player, PTrigger.Except(Player), 1000, Card); } else { TargetPlayer = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Player), CardName); } if (TargetPlayer != null) { Game.Injure(Player, TargetPlayer, 1000, Card); } } }); }); } }
public P_TsaangLang() : base(CardName, PCardType.TrafficCard) { Point = 3; Index = 57; foreach (PTime Time in new PTime[] { PTime.Injure.EmitInjure }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = false, Player = Player, Time = Time, AIPriority = 50, Condition = (PGame Game) => { PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); bool CardSource = InjureTag.InjureSource != null && InjureTag.InjureSource is PCard && ((PCard)InjureTag.InjureSource).Model is PSchemeCardModel; if (CardSource) { PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName); if (UseCardTag != null && UseCardTag.TargetList.Count == 1 && UseCardTag.Card.Type.Equals(PCardType.SchemeCard)) { return Player.Equals(InjureTag.FromPlayer) && InjureTag.Injure > 0 && InjureTag.ToPlayer != null && InjureTag.ToPlayer.Area.OwnerCardNumber > 0; } } return false; }, Effect = (PGame Game ) => { AnnouceUseEquipmentSkill(Player); PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName); Game.GetCardFrom(Player, InjureTag.ToPlayer); } }); }); } }
public P_ChuKevLienNu() : base(CardName, PCardType.WeaponCard) { Point = 1; Index = 43; foreach (PTime Time in new PTime[] { PPeriod.SettleStage.Start }) { MoveInEquipTriggerList.Add((PPlayer Player, PCard Card) => { return(new PTrigger(CardName) { IsLocked = true, Player = Player, Time = Time, Condition = (PGame Game) => { return Player.Equals(Game.NowPlayer); }, Effect = (PGame Game ) => { Game.TagManager.FindPeekTag <PPurchaseTag>(PPurchaseTag.TagName).Limit += 3; } }); }); } }