예제 #1
0
    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);
                    }
                }
            });
        }));
    }
예제 #2
0
    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);
                }
            });
        }));
    }
예제 #3
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);
                    }
                }
            });
        }));
    }
예제 #4
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);
                }
            });
        }));
    }
예제 #5
0
    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);
                }
            });
        }));
    }
예제 #6
0
    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);
                }
            });
        }));
    }
예제 #7
0
    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);
                }
            });
        }));
    }
예제 #8
0
    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);
                }
            });
        }));
    }
예제 #9
0
    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);
                    }
                }
            });
        }));
    }
예제 #10
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);
                    }
                }
            });
        }));
    }
예제 #11
0
    public P_Gabriel() : base("破军歌姬")
    {
        Sex         = PSex.Female;
        Age         = PAge.Future;
        Index       = 2001;
        Cost        = 1;
        Tips        = string.Empty;
        CanBeChoose = false;

        PSkill ElfMiku = new PSkill("精灵加护·美九")
        {
            Lock = true
        };

        SkillList.Add(ElfMiku
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ElfMiku.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.EnterDyingTime,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    return Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName).Player.Equals(Player) && Game.AlivePlayersExist <P_IzayoiMiku>();
                },
                Effect = (PGame Game) => {
                    ElfMiku.AnnouceUseSkill(Player);
                    int TargetMoney = 10000;
                    int Bonus = TargetMoney - Player.Money;
                    if (Bonus > 0)
                    {
                        Game.GetMoney(Player, Bonus);
                    }
                    Player.Tags.CreateTag(new PElfPowerTag());
                }
            });
        }));

        PSkill AngelAwakeMiku = new PSkill("音之天使·觉醒")
        {
            Lock = true
        };

        SkillList.Add(AngelAwakeMiku
                      .AnnounceGameOnce()
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(AngelAwakeMiku.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.StartTurn.During,
                AIPriority = 200,
                Condition = (PGame Game) => {
                    PElfPowerTag ElfPowerTag = Player.Tags.FindPeekTag <PElfPowerTag>(PElfPowerTag.TagName);
                    return Game.NowPlayer.Equals(Player) && Player.RemainLimit(AngelAwakeMiku.Name) && ElfPowerTag != null && ElfPowerTag.Value >= 3 && Game.AlivePlayers().Exists((PPlayer _Player) => _Player.General is P_IzayoiMiku);
                },
                Effect = (PGame Game) => {
                    AngelAwakeMiku.AnnouceUseSkill(Player);
                    PPlayer Miku = Game.AlivePlayers().Find((PPlayer _Player) => _Player.General is P_IzayoiMiku);
                    Game.Map.BlockList.ForEach((PBlock Block) => {
                        if (Block.IsBusinessLand)
                        {
                            Block.Lord = Miku;
                            Block.BusinessType = PBusinessType.Club;
                            PNetworkManager.NetworkServer.TellClients(new PRefreshBlockBasicOrder(Block));
                        }
                    });
                    AngelAwakeMiku.DeclareUse(Player);
                }
            });
        }));

        PSkill Requiem = new PSkill("镇魂曲")
        {
            Lock = true
        };

        SkillList.Add(Requiem
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(Requiem.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.AcceptInjure,
                AIPriority = 255,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && InjureTag.ToPlayer.General is P_IzayoiMiku;
                },
                Effect = (PGame Game) => {
                    Requiem.AnnouceUseSkill(Player);
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    InjureTag.Injure -= PMath.Percent(InjureTag.Injure, 20);
                }
            });
        }));

        PSkill March = new PSkill("进行曲")
        {
            Lock = true
        };

        SkillList.Add(March
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(March.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.EndTurn.During,
                AIPriority = 255,
                Condition = (PGame Game) => {
                    return Game.NowPlayer.General is P_IzayoiMiku && Game.NowPlayer.Equals(Game.NowPlayer.Position.Lord);
                },
                Effect = (PGame Game) => {
                    March.AnnouceUseSkill(Player);
                    PElfPowerTag ElfPowerTag = Player.Tags.FindPeekTag <PElfPowerTag>(PElfPowerTag.TagName);
                    int BonusHouse = 0;
                    if (ElfPowerTag != null)
                    {
                        BonusHouse = ElfPowerTag.Value;
                    }
                    Game.GetHouse(Game.NowPlayer.Position, 1 + BonusHouse);
                    Game.GetCard(Game.NowPlayer, 1);
                }
            });
        }));
    }
예제 #12
0
    public P_Washington() : base("华盛顿")
    {
        Sex   = PSex.Male;
        Age   = PAge.Renaissance;
        Index = 27;
        Cost  = 30;
        Tips  = "定位:攻击\n" +
                "难度:困难\n" +
                "史实:美国政治家、军事家、革命家,首任总统,美国开国元勋之一,在美国独立战争中任大陆军的总司令。华盛顿主持起草了《独立宣言》,制定美国宪法,领导创立并完善了共和政体。\n" +
                "攻略:\n华盛顿每局游戏可以发动两次无损技能,所以技能发动时机是关键。由于每名其他角色可以选择两个选项,所以华盛顿对对方只有两种可能性,一种是通过对方没有手牌来迫使对方承受高伤害,一种是通过对方有高伤害风险迫使对方承受所有手牌的损失。其中前者比较常见。虽然华盛顿的技能是全体范围,但发动的条件苛刻且转瞬即逝,通常如果能对其中一个敌人有巨大收益已经实属不易,所以第一次发动应该果断一些,不强求同时威胁多个敌人,第二次可以作为威慑适当保留。";
        NewGeneral = true;
        PSkill MinZhu = new PSkill("民主")
        {
            Initiative = true
        };
        const int MinZhuCof = 800;

        SkillList.Add(MinZhu
                      .AnnounceGameTimes(2)
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(MinZhu.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(MinZhu.Name) && !Player.Tags.ExistTag(PElectronTag.TagName);
                },
                AICondition = (PGame Game) => {
                    int Sum = 0;
                    Game.AlivePlayers(Player).ForEach((PPlayer _Player) => {
                        int Cof = _Player.TeamIndex == Player.TeamIndex ? 1 : -1;
                        int Expect1 = 2000 * Cof + PAiTargetChooser.InjureExpect(Game, Player, Player, _Player, MinZhuCof * _Player.Position.HouseNumber, MinZhu);
                        int Expect2 = -2000 * _Player.Area.HandCardArea.CardNumber * Cof;
                        if (_Player.Area.HandCardArea.CardNumber >= 1 && (Expect2 < Expect1 ^ Cof == 1))
                        {
                            Sum += Expect2;
                        }
                        else
                        {
                            Sum += Expect1;
                        }
                    });
                    return Sum >= 1300 * (Game.AlivePlayerNumber - 1);
                },
                Effect = (PGame Game) => {
                    MinZhu.AnnouceUseSkill(Player);
                    Game.Traverse((PPlayer _Player) => {
                        if (!_Player.Equals(Player))
                        {
                            int ChosenResult = 0;
                            if (_Player.Area.HandCardArea.CardNumber >= 1)
                            {
                                if (_Player.IsAI)
                                {
                                    int Expect1 = 2000 + PAiTargetChooser.InjureExpect(Game, _Player, Player, _Player, MinZhuCof * _Player.Position.HouseNumber, MinZhu);
                                    int Expect2 = 0;
                                    _Player.Area.HandCardArea.CardList.ForEach((PCard Card) => {
                                        Expect2 -= Card.Model.AIInHandExpectation(Game, _Player);
                                    });
                                    if (Expect2 >= Expect1)
                                    {
                                        ChosenResult = 1;
                                    }
                                }
                                else
                                {
                                    ChosenResult = PNetworkManager.NetworkServer.ChooseManager.Ask(_Player, MinZhu.Name + "-选择一项", new string[] {
                                        "令" + Player.Name + "对你造成" + (MinZhuCof * _Player.Position.HouseNumber).ToString() + "点伤害,摸一张牌",
                                        "弃置所有手牌"
                                    });
                                }
                            }
                            if (ChosenResult == 0)
                            {
                                Game.Injure(Player, _Player, MinZhuCof * _Player.Position.HouseNumber, MinZhu);
                                if (_Player.IsAlive)
                                {
                                    Game.GetCard(_Player);
                                }
                            }
                            else
                            {
                                for (int i = _Player.Area.HandCardArea.CardNumber - 1; i >= 0; --i)
                                {
                                    Game.CardManager.MoveCard(_Player.Area.HandCardArea.CardList[i], _Player.Area.HandCardArea, Game.CardManager.ThrownCardHeap);
                                }
                            }
                        }
                    }, Player);
                    MinZhu.DeclareUse(Player);
                    if (Player.RemainLimit(MinZhu.Name))
                    {
                        Player.Tags.CreateTag(new PElectronTag());
                    }
                }
            });
        })
                      .AddTrigger((PPlayer Player, PSkill Skill) => {
            return(new PTrigger(MinZhu.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.EndTurn.During,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) && Player.Tags.ExistTag(PElectronTag.TagName);
                },
                Effect = (PGame Game) => {
                    if (--Player.Tags.FindPeekTag <PElectronTag>(PElectronTag.TagName).Value <= 0)
                    {
                        Player.Tags.PopTag <PElectronTag>(PElectronTag.TagName);
                    }
                    PNetworkManager.NetworkServer.TellClients(new PRefreshMarkStringOrder(Player));
                }
            });
        }));
    }