Beispiel #1
0
 public P_ManTiienKuoHai() : base(CardName)
 {
     Point = 1;
     Index = 1;
     foreach (PTime Time in new PTime[] {
         PPeriod.FirstFreeTime.During,
         PPeriod.SecondFreeTime.During
     })
     {
         MoveInHandTriggerList.Add((PPlayer Player, PCard Card) => {
             return(new PTrigger(CardName)
             {
                 IsLocked = false,
                 Player = Player,
                 Time = Time,
                 AIPriority = 170,
                 Condition = PTrigger.Initiative(Player),
                 AICondition = (PGame Game) => {
                     if (Player.General is P_WuZhao && Player.RemainLimit(PSkillInfo.女权.Name))
                     {
                         return false;
                     }
                     return AIEmitTargets(Game, Player)[0] != null && !Player.OutOfGame && P_PanYue.XianJuTest(Game, Player);
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets,
                                           PTrigger.Except(Player),
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     Game.Injure(User, Target, Game.Judge(User, 6) * 200, Card);
                 })
             });
         });
     }
 }
Beispiel #2
0
 public P_FanChienChi() : base(CardName)
 {
     Point = 6;
     Index = 33;
     foreach (PTime Time in new PTime[] {
         PPeriod.FirstFreeTime.During,
         PPeriod.SecondFreeTime.During
     })
     {
         MoveInHandTriggerList.Add((PPlayer Player, PCard Card) => {
             return(new PTrigger(CardName)
             {
                 IsLocked = false,
                 Player = Player,
                 Time = Time,
                 AIPriority = 65,
                 Condition = PTrigger.Initiative(Player),
                 AICondition = (PGame Game) => {
                     if (Player.General is P_WuZhao && Player.RemainLimit(PSkillInfo.女权.Name))
                     {
                         return false;
                     }
                     return AIInHandExpectation(Game, Player) > 1000 && P_PanYue.XianJuTest(Game, Player);
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, AIEmitTargets,
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     int ChosenNumber = 1;
                     if (Target.IsAI)
                     {
                         if (Target.General is P_LiuJi)
                         {
                             ChosenNumber = 6;
                         }
                         else
                         {
                             ChosenNumber = PMath.RandInt(1, 6);
                         }
                     }
                     else
                     {
                         ChosenNumber = PNetworkManager.NetworkServer.ChooseManager
                                        .Ask1To6(Target, "反间计[选择1个数字]");
                     }
                     PNetworkManager.NetworkServer.TellClients(new
                                                               PShowInformationOrder(Target.Name + "选择了" + ChosenNumber));
                     int JudgeResult = Game.Judge(Target, 6);
                     if (JudgeResult != ChosenNumber)
                     {
                         // 故弄玄虚失效
                         User.Tags.PopTag <PTag>(Gunxx);
                         int Test = 0;
                         if (Target.IsAI)
                         {
                             int Choose1 = PAiMapAnalyzer.ChangeFaceExpect(Game, Target);
                             int Choose2 = Target.Money <= 1000 ? -30000 : -1000;
                             Test = (Choose1 > Choose2 ? 0 : 1);
                         }
                         else
                         {
                             Test = PNetworkManager.NetworkServer.ChooseManager
                                    .Ask(Target, "反间计[选择一项]", new string[] {
                                 "翻面", "弃1000"
                             });
                         }
                         if (Test == 0)
                         {
                             PNetworkManager.NetworkServer.TellClients(new
                                                                       PShowInformationOrder(Target.Name + "选择了翻面"));
                             Game.ChangeFace(Target);
                         }
                         else
                         {
                             PNetworkManager.NetworkServer.TellClients(new
                                                                       PShowInformationOrder(Target.Name + "选择了弃1000"));
                             Game.LoseMoney(Target, 1000);
                         }
                     }
                 }, (PGame Game, PPlayer User, List <PPlayer> Targets) => {
                     // 为了故弄玄虚成就做的初始化
                     if (Targets.Count > 0)
                     {
                         User.Tags.CreateTag(new PTag(Gunxx)
                         {
                             Visible = false
                         });
                     }
                 }, (PGame Game, PPlayer User, List <PPlayer> Targets) => {
                     // 判定故弄玄虚
                     if (User.Tags.PopTag <PTag>(Gunxx) != null)
                     {
                         PArch.Announce(Game, User, Gunxx);
                     }
                 })
             });
         });
     }
 }