Exemplo n.º 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);
                 })
             });
         });
     }
 }
Exemplo n.º 2
0
 public P_TiaoHuLiShan() : base(CardName)
 {
     Point = 3;
     Index = 15;
     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 = (PGame Game) => {
                     return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime());
                 },
                 AICondition = (PGame Game) => {
                     return AIEmitTargets(Game, Player)[0] != null;
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets,
                                           PTrigger.Except(Player),
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     Target.Tags.CreateTag(PTag.OutOfGameTag);
                 })
             });
         });
     }
 }
Exemplo n.º 3
0
 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);
                     }
                 })
             });
         });
     }
 }
Exemplo n.º 4
0
    public List <PPlayer> AIEmitTargets(PGame Game, PPlayer Player)
    {
        int ExpectedMoney = 700;

        if (Player.General is P_LiuJi)
        {
            ExpectedMoney = 1200;
        }
        PPlayer Target = PAiTargetChooser.InjureTarget(Game, Player, Player, PTrigger.Except(Player), ExpectedMoney, Instantiate());

        return(new List <PPlayer>()
        {
            Target
        });
    }
Exemplo n.º 5
0
 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);
                     }
                 }
             });
         });
     }
 }
Exemplo n.º 6
0
 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++;
                 }
             });
         });
     }
 }
Exemplo n.º 7
0
 public P_YooenChiaoChinKung() : base(CardName)
 {
     Point = 4;
     Index = 23;
     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 = 75,
                 Condition = (PGame Game) => {
                     return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime());
                 },
                 AICondition = (PGame Game) => {
                     return AIEmitTargets(Game, Player)[0] != null;
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, PTrigger.Except(Player),
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     Game.GetCard(Target);
                     PPlayer Another = null;
                     if (User.IsAI)
                     {
                         if (Game.Enemies(User).Exists((PPlayer _Player) => _Player.Money <= 1000) || User.Money > 15000)
                         {
                             Another = PMath.Min(Game.Enemies(User), (PPlayer _Player) => _Player.Money).Key;
                         }
                         else
                         {
                             Another = User;
                         }
                     }
                     else
                     {
                         Another = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(User, PTrigger.Except(Target), "远交近攻[第二目标]");
                     }
                     if (Another != null)
                     {
                         if (Another.Equals(User))
                         {
                             Game.GetMoney(Another, 1000);
                         }
                         else
                         {
                             Game.LoseMoney(Another, 1000);
                             #region 成就:翻云覆雨
                             if (!Another.IsAlive)
                             {
                                 PArch.Announce(Game, User, "翻云覆雨");
                             }
                             #endregion
                         }
                     }
                 })
             });
         });
     }
 }
Exemplo n.º 8
0
    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);
                    }
                }
            });
        }));
    }
Exemplo n.º 9
0
    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);
                }
            });
        }));
    }
Exemplo n.º 10
0
 public P_ChiehShihHuanHun() : base(CardName)
 {
     Point = 3;
     Index = 14;
     foreach (PTime Time in new PTime[] {
         PPeriod.FirstFreeTime.During,
         PPeriod.SecondFreeTime.During,
         PTime.EnterDyingTime
     })
     {
         MoveInHandTriggerList.Add((PPlayer Player, PCard Card) => {
             return(new PTrigger(CardName)
             {
                 IsLocked = false,
                 Player = Player,
                 Time = Time,
                 AIPriority = Time.Equals(PTime.EnterDyingTime) ? 10 : 90,
                 Condition = (PGame Game) => {
                     return Time.Equals(PTime.EnterDyingTime) ? Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName).Player.Equals(Player) : Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime());
                 },
                 AICondition = (PGame Game) => {
                     return Time.Equals(PTime.EnterDyingTime) || AIInHandExpectation(Game, Player) > 5000;
                 },
                 Effect = MakeNormalEffect(Player, Card, AIEmitTargets, AIEmitTargets,
                                           (PGame Game, PPlayer User, PPlayer Target) => {
                     PPlayer Another = null;
                     if (Target.IsAI)
                     {
                         Another = PMath.Max(Game.PlayerList.FindAll((PPlayer _Player) => !_Player.Equals(Player)), (PPlayer _Player) => {
                             return _Player.Money;
                         }).Key;
                     }
                     else
                     {
                         Another = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Target, PTrigger.Except(Target), CardName + "[与其金钱相同]");
                     }
                     Game.CardManager.ThrowAll(Target.Area);
                     if (Another != null)
                     {
                         if (Another.Money > Target.Money)
                         {
                             Game.GetMoney(Target, Math.Min(10000, Another.Money - Target.Money));
                         }
                         else if (Another.Money < Target.Money)
                         {
                             Game.LoseMoney(Target, Target.Money - Another.Money);
                         }
                     }
                 })
             });
         });
     }
 }
Exemplo n.º 11
0
    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);
                        }
                    }
                }
            });
        }));
    }
Exemplo n.º 12
0
 public P_ShevngTungChiHsi() : base(CardName)
 {
     Point = 1;
     Index = 6;
     foreach (PTime Time in new PTime[] {
         PTime.Card.AfterEmitTargetTime
     })
     {
         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 == 1 && UseCardTag.Card.Type.Equals(PCardType.SchemeCard) && !UseCardTag.Card.Name.Equals(P_ChinChaanToowChiiao.CardName);
                 },
                 AICondition = (PGame Game) => {
                     PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName);
                     if (UseCardTag.Card.Model.Name.Equals(P_ManTiienKuoHai.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_WeiWeiChiuChao.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_CheevnHuoTaChieh.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_LiTaiTaaoChiang.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_ShunShouChiienYang.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_TaTsaaoChingShev.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_KuanMevnChoTsev.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_ChihSangMaHuai.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_FanChienChi.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_ChiehTaoShaJevn.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_PaaoChuanYinYoo.CardName) ||
                         UseCardTag.Card.Model.Name.Equals(P_ChiaTaoFaKuo.CardName))
                     {
                         return UseCardTag.TargetList[0].TeamIndex == Player.TeamIndex && UseCardTag.User.TeamIndex != Player.TeamIndex;
                     }
                     else if (UseCardTag.Card.Name.Equals(P_WuChungShevngYou.CardName) ||
                              UseCardTag.Card.Model.Name.Equals(P_AnTuCheevnTsaang.CardName) ||
                              UseCardTag.Card.Model.Name.Equals(P_ChiehShihHuanHun.CardName) ||
                              UseCardTag.Card.Model.Name.Equals(P_YooenChiaoChinKung.CardName) ||
                              UseCardTag.Card.Model.Name.Equals(P_TsouWeiShangChi.CardName))
                     {
                         return UseCardTag.TargetList[0].TeamIndex != Player.TeamIndex;
                     }
                     else if (UseCardTag.Card.Model.Name.Equals(P_YooChiinKuTsung.CardName))
                     {
                         return UseCardTag.TargetList[0].TeamIndex == Player.TeamIndex && Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure <= 3000;
                     }
                     else if (UseCardTag.Card.Model.Name.Equals(P_ChiinTsevChiinWang.CardName))
                     {
                         return UseCardTag.User.TeamIndex != Player.TeamIndex && PMath.Max(Game.PlayerList, (PPlayer _Player) => {
                             if (Player.TeamIndex == _Player.TeamIndex)
                             {
                                 return PAiMapAnalyzer.ChangeFaceExpect(Game, _Player);
                             }
                             else
                             {
                                 return -PAiMapAnalyzer.ChangeFaceExpect(Game, _Player);
                             }
                         }).Value - PAiMapAnalyzer.ChangeFaceExpect(Game, UseCardTag.TargetList[0]) * (UseCardTag.TargetList[0].TeamIndex == Player.TeamIndex ? 1 : -1) >= 3000;
                     }
                     else if (UseCardTag.Card.Model.Name.Equals(P_ShangWuChoouTii.CardName))
                     {
                         int NowValue = PAiMapAnalyzer.Expect(Game, UseCardTag.TargetList[0], UseCardTag.TargetList[0].Position) * (UseCardTag.TargetList[0].TeamIndex == Player.TeamIndex ? 1 : -1);
                         int MaxValue = PMath.Max(Game.PlayerList, (PPlayer _Player) => {
                             if (_Player.TeamIndex == Player.TeamIndex)
                             {
                                 return PAiMapAnalyzer.Expect(Game, _Player, _Player.Position);
                             }
                             else
                             {
                                 return -PAiMapAnalyzer.Expect(Game, _Player, _Player.Position);
                             }
                         }, true).Value;
                         return MaxValue - NowValue >= 3000;
                     }
                     else if (UseCardTag.Card.Model.Name.Equals(P_KuungCheevngChi.CardName))
                     {
                         KeyValuePair <PPlayer, int> Target = PMath.Max(Game.Enemies(Player), (PPlayer _Player) => _Player.Area.HandCardArea.CardNumber);
                         return Target.Value >= 3 && !UseCardTag.TargetList[0].Equals(Target.Key);
                     }
                     else if (UseCardTag.Card.Model.Name.Equals(P_HsiaoLiTsaangTao.CardName))
                     {
                         return UseCardTag.User.TeamIndex != Player.TeamIndex && (UseCardTag.TargetList[0].TeamIndex != Player.TeamIndex || UseCardTag.TargetList[0].Area.EquipmentCardArea.CardNumber > 0 || UseCardTag.TargetList[0].Money <= 500);
                     }
                     return false;
                 },
                 Effect = (PGame Game) => {
                     List <PPlayer> Targets = new List <PPlayer>();
                     Game.Monitor.CallTime(PTime.Card.AfterEmitTargetTime, new PUseCardTag(Card, Player, Targets));
                     Game.CardManager.MoveCard(Card, Player.Area.HandCardArea, Game.CardManager.SettlingArea);
                     Game.Monitor.CallTime(PTime.Card.AfterBecomeTargetTime, new PUseCardTag(Card, Player, Targets));
                     PUseCardTag UseCardTag = Game.TagManager.FindPeekTag <PUseCardTag>(PUseCardTag.TagName);
                     PPlayer Target = null;
                     if (Player.IsUser)
                     {
                         List <PPlayer> TargetList = new List <PPlayer>()
                         {
                             null
                         };
                         TargetList.AddRange(Game.PlayerList.FindAll((PPlayer _Player) => !_Player.Equals(UseCardTag.TargetList[0]) && _Player.IsAlive));
                         List <string> TargetNameList = TargetList.ConvertAll((PPlayer _Player) => {
                             if (_Player == null)
                             {
                                 return "令该计策牌无效";
                             }
                             else
                             {
                                 return "转移给:" + _Player.Name;
                             }
                         });
                         Target = TargetList[PNetworkManager.NetworkServer.ChooseManager.Ask(Player, "选择一项", TargetNameList.ToArray())];
                     }
                     else
                     {
                         if (UseCardTag.Card.Model.Name.Equals(P_ManTiienKuoHai.CardName))
                         {
                             Target = PAiTargetChooser.InjureTarget(Game, UseCardTag.User, Player, PTrigger.Except(UseCardTag.TargetList[0]), 700, UseCardTag.Card, true);
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_KuanMevnChoTsev.CardName) ||
                                  UseCardTag.Card.Model.Name.Equals(P_ChiaTaoFaKuo.CardName))
                         {
                             Target = PAiTargetChooser.InjureTarget(Game, UseCardTag.User, Player, PTrigger.Except(UseCardTag.TargetList[0]), 1000, UseCardTag.Card, true);
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_ChihSangMaHuai.CardName))
                         {
                             Target = PAiTargetChooser.InjureTarget(Game, Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).FromPlayer, Player, null, Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure, Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).InjureSource, true);
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_ChiinTsevChiinWang.CardName))
                         {
                             Target = PMath.Max(Game.PlayerList, (PPlayer _Player) => {
                                 if (Player.TeamIndex == _Player.TeamIndex)
                                 {
                                     return PAiMapAnalyzer.ChangeFaceExpect(Game, _Player);
                                 }
                                 else
                                 {
                                     return -PAiMapAnalyzer.ChangeFaceExpect(Game, _Player);
                                 }
                             }).Key;
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_TaTsaaoChingShev.CardName))
                         {
                             List <PPlayer> PossibleEnemies = Game.Enemies(Player).FindAll((PPlayer _Player) => Player.HasHouse);
                             if (PossibleEnemies.Count > 0)
                             {
                                 Target = PossibleEnemies[PMath.RandInt(0, PossibleEnemies.Count - 1)];
                             }
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_ChiehShihHuanHun.CardName))
                         {
                             int MaxMoney = PMath.Max(Game.PlayerList, (PPlayer _Player) => {
                                 return _Player.Money;
                             }).Value;
                             Target = PMath.Max(Game.PlayerList, (PPlayer _Player) => {
                                 int Delta = Math.Min(10000, MaxMoney - _Player.Money) - 2000 * _Player.Area.HandCardArea.CardNumber - (int)PMath.Sum(_Player.Area.EquipmentCardArea.CardList.ConvertAll((PCard _Card) => (double)_Card.Model.AIInEquipExpectation(Game, _Player)));
                                 if (_Player.TeamIndex == Player.TeamIndex)
                                 {
                                     return Delta;
                                 }
                                 else
                                 {
                                     return -Delta;
                                 }
                             }).Key;
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_WuChungShevngYou.CardName) ||
                                  UseCardTag.Card.Name.Equals(P_AnTuCheevnTsaang.CardName))
                         {
                             Target = PAiCardExpectation.MostValuableCardUser(Game, Game.Teammates(Player));
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_ShangWuChoouTii.CardName))
                         {
                             Target = PMath.Max(Game.AlivePlayers(), (PPlayer _Player) => {
                                 if (_Player.TeamIndex == Player.TeamIndex)
                                 {
                                     return PAiMapAnalyzer.Expect(Game, _Player, _Player.Position);
                                 }
                                 else
                                 {
                                     return -PAiMapAnalyzer.Expect(Game, _Player, _Player.Position);
                                 }
                             }, true).Key;
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_KuungCheevngChi.CardName))
                         {
                             Target = PMath.Max(Game.Enemies(Player), (PPlayer _Player) => _Player.Area.HandCardArea.CardNumber).Key;
                         }
                         else if (UseCardTag.Card.Model.Name.Equals(P_TsouWeiShangChi.CardName))
                         {
                             Target = PMath.Max(Game.Teammates(Player), (PPlayer _Player) => PAiMapAnalyzer.OutOfGameExpect(Game, Player)).Key;
                         }
                     }
                     if (Target == null || Target == UseCardTag.TargetList[0])
                     {
                         PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder("声东击西:无效"));
                         #region 成就:地府的公正
                         if (UseCardTag.Card.Model is P_ChiehShihHuanHun)
                         {
                             PArch.Announce(Game, Player, "地府的公正");
                         }
                         #endregion
                         UseCardTag.TargetList.Clear();
                     }
                     else
                     {
                         PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder("声东击西:转移给" + Target.Name));
                         UseCardTag.TargetList[0] = Target;
                     }
                     Game.CardManager.MoveCard(Card, Game.CardManager.SettlingArea, Game.CardManager.ThrownCardHeap);
                     Game.Monitor.CallTime(PTime.Card.EndSettleTime, new PUseCardTag(Card, Player, Targets));
                 }
             });
         });
     }
 }
Exemplo n.º 13
0
 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++;
                 }
             });
         });
     }
 }
Exemplo n.º 14
0
    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);
                    }
                }
            });
        }));
    }
Exemplo n.º 15
0
 public P_MeiJevnChi() : base(CardName)
 {
     Point = 6;
     Index = 31;
     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 = 150,
                 Condition = (PGame Game) => {
                     return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime());
                 },
                 AICondition = (PGame Game) => {
                     return AIEmitTargets(Game, Player)[0] != null && AIEmitTargets(Game, Player)[1] != null;
                 },
                 Effect = (PGame Game) => {
                     List <PPlayer> Targets = new List <PPlayer>();
                     if (Player.IsAI)
                     {
                         Targets = AIEmitTargets(Game, Player);
                     }
                     else
                     {
                         Targets.Add(PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.NoCondition, "美人计[第一个目标]"));
                         Targets.Add(PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, PTrigger.Except(Targets[0]), "美人计[第二个目标]"));
                     }
                     Targets.RemoveAll((PPlayer _Player) => _Player == null);
                     if (Targets.Count == 0)
                     {
                         return;
                     }
                     Game.Monitor.CallTime(PTime.Card.AfterEmitTargetTime, new PUseCardTag(Card, Player, Targets));
                     Game.CardManager.MoveCard(Card, Player.Area.HandCardArea, Game.CardManager.SettlingArea);
                     Game.Monitor.CallTime(PTime.Card.AfterBecomeTargetTime, new PUseCardTag(Card, Player, Targets));
                     if (Targets.Count >= 2)
                     {
                         int Result = Game.PkPoint(Targets[0], Targets[1]);
                         if (Result > 0)
                         {
                             if (Targets[0].Area.OwnerCardNumber > 0)
                             {
                                 Game.ThrowCard(Targets[0], Targets[0]);
                             }
                         }
                         else
                         {
                             Game.LoseMoney(Targets[0], 1000);
                         }
                         if (Result < 0)
                         {
                             if (Targets[1].Area.OwnerCardNumber > 0)
                             {
                                 Game.ThrowCard(Targets[1], Targets[1]);
                             }
                         }
                         else
                         {
                             Game.LoseMoney(Targets[1], 1000);
                         }
                         #region 成就:请尊重女性
                         if (!Targets[0].IsAlive && !Targets[1].IsAlive)
                         {
                             PArch.Announce(Game, Player, "请尊重女性");
                         }
                         #endregion
                     }
                     Game.CardManager.MoveCard(Card, Game.CardManager.SettlingArea, Game.CardManager.ThrownCardHeap);
                     Game.Monitor.CallTime(PTime.Card.EndSettleTime, new PUseCardTag(Card, Player, Targets));
                 }
             });
         });
     }
 }