예제 #1
0
    public P_YangYuHuan() : base("杨玉环")
    {
        Sex   = PSex.Female;
        Age   = PAge.Renaissance;
        Index = 3;
        Tips  = "定位:控制\n" +
                "难度:简单\n" +
                "史实:唐代宫廷音乐家、舞蹈家,中国古代四大美女之一,唐玄宗宠妃。\n" +
                "攻略:\n杨玉环是新手推荐的武将,使用简单,强度稳定,并且不弱。\n杨玉环可以通过主动调整来增加【羞花】的发动频率,【羞花】的条件1和3、4往往是互斥的,而条件2又和【品荔】冲突,因此收益期望并不高。如果要主动调整,建议只进行小幅度买房、出牌决策上的调整,因为【羞花】的收益远没有到值得大幅调整战略的程度。\n因为【羞花】的发动条件是“最少”,所以如果杨玉环进入到人数较少的阶段,比如只有两个玩家存活时,【羞花】的收益就变得很高。因此,杨玉环的嘲讽也相对较高。";

        PSkill PinLi = new PSkill("品荔");

        SkillList.Add(PinLi
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.SettleStage.Start
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(PinLi.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 150,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) && Player.Equals(Player.Position.Lord) && Player.Position.BusinessType.Equals(PBusinessType.Institute) && Game.PlayerList.Exists((PPlayer _Player) => _Player.Area.CardNumber > 0 && !_Player.Equals(Player) && _Player.IsAlive);
                },
                AICondition = (PGame Game) => {
                    return P_ShunShouChiienYang.AIBaseEmitTargets(Game, Player, 0)[0] != null;
                },
                Effect = (PGame Game) => {
                    PinLi.AnnouceUseSkill(Player);
                    PCard Card = new P_ShunShouChiienYang().Instantiate();
                    Card.Point = 0;
                    PTrigger Trigger = Card.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(Player, Card).Time.Equals(PPeriod.FirstFreeTime.During))?.Invoke(Player, Card);
                    if (Trigger != null)
                    {
                        Game.Logic.StartSettle(new PSettle("品荔[顺手牵羊]", Trigger.Effect));
                    }
                }
            });
        }));
        PSkill XiuHua = new PSkill("羞花")
        {
            SoftLockOpen = true
        };

        SkillList.Add(XiuHua
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(XiuHua.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PPeriod.EndTurn.During,
                AIPriority = 120,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer);
                },
                Effect = (PGame Game) => {
                    XiuHua.AnnouceUseSkill(Player);
                    List <PPlayer> AlivePlayers = Game.AlivePlayers(Player);
                    int X = new List <bool>()
                    {
                        AlivePlayers.TrueForAll((PPlayer _Player) => _Player.Money > Player.Money),
                        AlivePlayers.TrueForAll((PPlayer _Player) => _Player.Area.HandCardArea.CardNumber > Player.Area.HandCardArea.CardNumber),
                        AlivePlayers.TrueForAll((PPlayer _Player) => _Player.LandNumber > Player.LandNumber),
                        AlivePlayers.TrueForAll((PPlayer _Player) => _Player.HouseNumber > Player.HouseNumber)
                    }.FindAll((bool x) => x).Count;
                    if (X > 0)
                    {
                        Game.GetMoney(Player, 200 * X);
                    }
                }
            });
        }));
    }
예제 #2
0
    public P_ShiQian() : base("时迁")
    {
        Sex   = PSex.Male;
        Age   = PAge.Renaissance;
        Index = 7;
        Tips  = "定位:控制\n" +
                "难度:简单\n" +
                "史实:《水浒传》中人物,地贼星,绰号“鼓上蚤”,擅长偷盗,多次利用专业技能为梁山立功。\n" +
                "攻略:\n时迁的使用方法非常简单,只要使用【顺手牵羊】即可。【顺手牵羊】的时机把握是比较重要的问题,手中存留一张【顺手牵羊】,将其用于关键的【乐不思蜀】、【草木皆兵】或者装备上,会比使用【顺手牵羊】直到没有【顺手牵羊】为止效果更好。";

        //PSkill FeiZei = new PSkill("飞贼") {
        //    Lock = true
        //};
        //SkillList.Add(FeiZei
        //    .AddTimeTrigger(
        //    new PTime[] {
        //        PTime.Card.AfterBecomeTargetTime
        //    },
        //    (PTime Time, PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(FeiZei.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = Time,
        //            AIPriority = 200,
        //            Condition = (PGame Game) => {
        //                PUseCardTag UseCardTag = Game.TagManager.FindPeekTag<PUseCardTag>(PUseCardTag.TagName);
        //                return UseCardTag.TargetList.Contains(Player) && UseCardTag.Card.Model is P_ShunShouChiienYang;
        //            },
        //            Effect = (PGame Game) => {
        //                FeiZei.AnnouceUseSkill(Player);
        //                Game.TagManager.FindPeekTag<PUseCardTag>(PUseCardTag.TagName).TargetList.Remove(Player);
        //            }
        //        };
        //    }));
        PSkill QingMin = new PSkill("轻敏")
        {
            Initiative = true
        };

        SkillList.Add(QingMin
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(QingMin.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 200,
                CanRepeat = true,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) &&
                    (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) &&
                    Game.PlayerList.Exists((PPlayer _Player) => _Player.Area.CardNumber > 0 && !_Player.Equals(Player) && _Player.IsAlive) &&
                    Player.Area.HandCardArea.CardList.Exists((PCard Card) => Card.Point == 1);
                },
                AICondition = (PGame Game) => {
                    return Player.Area.HandCardArea.CardList.Exists((PCard Card) => {
                        return Card.Point == 1 && P_ShunShouChiienYang.AIBaseEmitTargets(Game, Player, Card.Model.AIInHandExpectation(Game, Player) + 100)[0] != null;
                    });
                },
                Effect = (PGame Game) => {
                    QingMin.AnnouceUseSkill(Player);
                    PCard TargetCard = null;
                    if (Player.IsAI)
                    {
                        TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point == 1).Key;
                    }
                    else
                    {
                        List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point == 1);
                        int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, QingMin.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_ShunShouChiienYang();
                        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));
                        }
                        Game.GetCard(Player);
                    }
                }
            });
        }));
    }
예제 #3
0
    public static int Expect(PGame Game, PPlayer Player, PBlock Block, bool InPortal = false)
    {
        int DeltaMoney = 0;
        int Disaster   = Block.GetMoneyStopSolid;

        if (Disaster < 0 && -Disaster <= 1000 && Player.Traffic != null && Player.Traffic.Model is P_NanManHsiang)
        {
            Disaster = 0;
        }
        else if (Disaster < 0 && Player.Defensor != null && Player.Defensor.Model is P_YinYangChing)
        {
            Disaster = 0;
        }
        DeltaMoney += Disaster;
        Disaster    = PMath.Percent(Player.Money, Block.GetMoneyStopPercent);
        if (Disaster < 0 && -Disaster <= 1000 && Player.Traffic != null && Player.Traffic.Model is P_NanManHsiang)
        {
            Disaster = 0;
        }
        else if (Disaster < 0 && Player.Defensor != null && Player.Defensor.Model is P_YinYangChing)
        {
            Disaster = 0;
        }
        DeltaMoney += Disaster;
        if (Block.Lord != null && Block.Lord.TeamIndex != Player.TeamIndex)
        {
            int Toll = Block.Toll;
            if (Block.BusinessType.Equals(PBusinessType.ShoppingCenter))
            {
                Toll *= 2;
            }
            if (Block.BusinessType.Equals(PBusinessType.Club))
            {
                Toll += PMath.Percent(Toll, 100);
            }
            if (Block.Lord.Weapon != null && Block.Lord.Weapon.Model is P_KuTingTao && Player.Area.HandCardArea.CardNumber == 0)
            {
                Toll *= 2;
            }
            if (Toll <= 1000 && Player.Traffic != null && Player.Traffic.Model is P_NanManHsiang)
            {
                Toll = 0;
            }
            DeltaMoney -= Toll;
        }
        if (Player.Money + DeltaMoney <= 0)
        {
            return(-30000 + DeltaMoney * 2);
        }
        else if (Player.Money <= 3000)
        {
            DeltaMoney *= 2;
        }
        DeltaMoney += 2000 * Block.GetCardStop;
        int LandValue = 0;

        if (Block.Lord == null && Block.Price < Player.Money)
        {
            LandValue = PMath.Percent(Block.Price, 10) * Game.Enemies(Player).Count;
            if (Block.IsBusinessLand)
            {
                LandValue += PMath.Max(PAiBusinessChooser.DirectionExpectations(Game, Player, Block));
            }
        }
        else if (Player.Equals(Block.Lord))
        {
            int PurchaseLimit = Player.PurchaseLimit;
            LandValue += PMath.Percent(Block.Price, 20) * Game.Enemies(Player).Count *PurchaseLimit;
            if (Block.BusinessType.Equals(PBusinessType.Park))
            {
                LandValue += PMath.Percent(Block.Price, 60) * PurchaseLimit;
            }
            else if (Block.BusinessType.Equals(PBusinessType.ShoppingCenter) || Block.BusinessType.Equals(PBusinessType.Club))
            {
                LandValue += PMath.Percent(Block.Price, 20) * Game.Enemies(Player).Count *PurchaseLimit;
            }
            if (Player.General is P_YangYuHuan)
            {
                LandValue += P_ShunShouChiienYang.AIExpect(Game, Player, 0).Value;
            }
        }
        if (Block.Lord != null && Block.Lord.TeamIndex == Player.TeamIndex)
        {
            if (Block.BusinessType.Equals(PBusinessType.Institute))
            {
                LandValue += 2 * 2000;
            }
            else if (Block.BusinessType.Equals(PBusinessType.Pawnshop))
            {
                LandValue += 2000;
            }
            if (Player.General is P_PanYue && (Block.PortalBlockList.Count == 0 || InPortal))
            {
                if (!Player.Equals(Game.NowPlayer) || Player.RemainLimit("闲居"))
                {
                    LandValue += PMath.Percent(Block.Price, 20 * Game.Enemies(Player).Count + 50);
                }
            }
        }

        int PortalValue = 0;

        if (!InPortal && Block.PortalBlockList.Count > 0)
        {
            PortalValue = PMath.Max(Block.PortalBlockList, (PBlock _Block) => Expect(Game, Player, _Block, true)).Value;
        }
        return(DeltaMoney + LandValue * 20 / GetRingLength(Game, Block) + PortalValue);
    }