public P_HsiaoLiTsaangTao() : base(CardName)
 {
     Point = 2;
     Index = 10;
     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 = 145,
                 Condition = (PGame Game) => {
                     return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.Area.HandCardArea.CardList.Exists((PCard _Card) => _Card.Type.IsEquipment());
                 },
                 AICondition = (PGame Game) => {
                     if (Player.General is P_WuZhao && Player.RemainLimit(PSkillInfo.女权.Name))
                     {
                         return false;
                     }
                     return AIEmitTargets(Game, Player)[0] != null && P_PanYue.XianJuTest(Game, Player);
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, PTrigger.Except(Player),
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     PCard TargetCard = null;
                     if (User.IsAI)
                     {
                         if (User.TeamIndex == Target.TeamIndex)
                         {
                             TargetCard = TeammateValueCard(Game, User, Target).Key;
                         }
                         else
                         {
                             TargetCard = EnemyValueCard(Game, User, Target).Key;
                         }
                     }
                     else
                     {
                         do
                         {
                             TargetCard = PNetworkManager.NetworkServer.ChooseManager.AskToChooseOwnCard(User, CardName + "[选择一张手牌中的装备牌]", true, false);
                         } while (!TargetCard.Type.IsEquipment());
                     }
                     if (TargetCard != null)
                     {
                         Game.CardManager.MoveCard(TargetCard, User.Area.HandCardArea, Target.Area.EquipmentCardArea);
                         Game.Injure(User, Target, 500 * Target.Area.EquipmentCardArea.CardNumber, Card);
                     }
                 })
             });
         });
     }
 }
Beispiel #2
0
 public P_HunShuiMoYoo() : base(CardName)
 {
     Point = 4;
     Index = 20;
     foreach (PTime Time in new PTime[] {
         PTime.Card.EndSettleTime
     })
     {
         MoveInHandTriggerList.Add((PPlayer Player, PCard Card) => {
             return(new PTrigger(CardName)
             {
                 IsLocked = false,
                 Player = Player,
                 Time = Time,
                 AIPriority = 100,
                 Condition = (PGame Game) => {
                     PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName);
                     return UseCardTag.TargetList.Count >= 2;
                 },
                 AICondition = (PGame Game) => {
                     if (Player.General is P_WuZhao && Player.RemainLimit(PSkillInfo.女权.Name))
                     {
                         return false;
                     }
                     int Value = 0;
                     PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName);
                     UseCardTag.TargetList.ForEach((PPlayer _Player) => {
                         if (_Player.CanBeInjured && !(_Player.Defensor != null && _Player.Defensor.Model is P_YooHsi))
                         {
                             Value += PAiTargetChooser.InjureExpect(Game, Player, Player, _Player, 500, Card);
                         }
                     });
                     return Value >= 1000 && !Player.OutOfGame && P_PanYue.XianJuTest(Game, Player);
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, AIEmitTargets,
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     Game.Injure(User, Target, 500, Card);
                 })
             });
         });
     }
 }
 public P_KuanMevnChoTsev() : base(CardName)
 {
     Point = 4;
     Index = 22;
     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 = 80,
                 Condition = (PGame Game) => {
                     return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && AIEmitTargets(Game, Player).Count > 0;
                 },
                 AICondition = (PGame Game) => {
                     if (Player.General is P_WuZhao && Player.RemainLimit(PSkillInfo.女权.Name))
                     {
                         return false;
                     }
                     List <PPlayer> Targets = AIEmitTargets(Game, Player);
                     bool MultiTarget = Targets.Count > 1;
                     Targets = Targets.FindAll((PPlayer _Player) => !(_Player.HasEquipment <P_YooHsi>() && MultiTarget));
                     return PMath.Sum(Targets.ConvertAll((PPlayer Target) => (double)PAiTargetChooser.InjureExpect(Game, Player, Player, Target, 1000, Card))) >= 2000 &&
                     P_PanYue.XianJuTest(Game, Player);
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, AIEmitTargets,
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     Game.Injure(User, Target, 1000, Card);
                 })
             });
         });
     }
 }
Beispiel #4
0
 public P_ChiaTaoFaKuo() : base(CardName)
 {
     Point = 4;
     Index = 24;
     foreach (PTime Time in new PTime[] {
         PPeriod.EndTurnStage.During
     })
     {
         MoveInHandTriggerList.Add((PPlayer Player, PCard Card) => {
             return(new PTrigger(CardName)
             {
                 IsLocked = false,
                 Player = Player,
                 Time = Time,
                 AIPriority = 100,
                 Condition = (PGame Game) => {
                     PChiaTaoFaKuoTag ChiaTaoFaKuoTag = Game.TagManager.FindPeekTag <PChiaTaoFaKuoTag>(PChiaTaoFaKuoTag.TagName);
                     return Player.Equals(Game.NowPlayer) && ChiaTaoFaKuoTag.LordList.Count >= 2;
                 },
                 AICondition = (PGame Game) => {
                     return AIEmitTargets(Game, Player)[0] != null && !Player.OutOfGame && P_PanYue.XianJuTest(Game, Player);
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, (PGame _Game, PPlayer _Player) => {
                     PChiaTaoFaKuoTag ChiaTaoFaKuoTag = _Game.TagManager.FindPeekTag <PChiaTaoFaKuoTag>(PChiaTaoFaKuoTag.TagName);
                     return ChiaTaoFaKuoTag.LordList.Contains(_Player);
                 },
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     Game.Injure(User, Target, 1000, Card);
                 })
             });
         });
     }
 }
Beispiel #5
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);
                     }
                 })
             });
         });
     }
 }
Beispiel #6
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);
                 })
             });
         });
     }
 }