Beispiel #1
0
    public P_TangYin() : base("唐寅")
    {
        Sex   = PSex.Male;
        Age   = PAge.Industrial;
        Index = 20;
        Cost  = 25;
        Tips  = "定位:攻击\n" +
                "难度:简单\n" +
                "史实:明代画家、书法家、诗人,“明四家”和“吴中四才子”之一。以风流之名传于世,后代有“唐伯虎点秋香”等传说。\n" +
                "攻略:\n唐寅是一个上手简单的攻击型武将,并且具有一定的防御能力。【风流】作为主要输出技能,能够保持前期的经济压制和后期的装备压制,并可通过伤害类计策触发,因此【浑水摸鱼】【关门捉贼】等牌都是关键牌。【浪子】作为防御技能,能够在后期积累了一定装备的基础上避开关键区域,防止崩盘,因此唐寅对装备牌的需求也较大。唐寅可通过对队友造成伤害以获得装备;反之,【风流】的输出也会受到装备的限制,对手可以通过给唐寅没用的装备,替换唐寅原本的装备,降低【风流】的收益甚至令其变为负收益。";

        PSkill LangZi = new PSkill("浪子");

        SkillList.Add(LangZi
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.DiceStage.Start
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(LangZi.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 10,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) &&
                    Player.HasEquipInArea();
                },
                AICondition = (PGame Game) => {
                    KeyValuePair <PCard, int> CardValue = PAiCardExpectation.EquipToThrow(Game, Player);
                    KeyValuePair <int, int> SkillValue = LangZiBannedNumber(Game, Player);
                    return CardValue.Key != null && SkillValue.Key > 0 && SkillValue.Value >= 100 && SkillValue.Value + CardValue.Value >= 300;
                },
                Effect = (PGame Game) => {
                    LangZi.AnnouceUseSkill(Player);
                    PCard TargetCard = null;
                    if (Player.IsAI)
                    {
                        TargetCard = PAiCardExpectation.EquipToThrow(Game, Player).Key;
                    }
                    else
                    {
                        do
                        {
                            TargetCard = PNetworkManager.NetworkServer.ChooseManager.AskToChooseOwnCard(Player, LangZi.Name + "[选择一张装备牌]", true, true);
                        } while (!TargetCard.Type.IsEquipment());
                    }
                    if (TargetCard != null)
                    {
                        int BannedNumber = 0;
                        if (Player.IsAI)
                        {
                            BannedNumber = LangZiBannedNumber(Game, Player).Key;
                        }
                        else
                        {
                            BannedNumber = PNetworkManager.NetworkServer.ChooseManager.Ask1To6(Player, LangZi.Name + "[选择不会被掷出的数字]");
                        }
                        if (BannedNumber > 0)
                        {
                            Game.CardManager.MoveCard(TargetCard, Player.Area.HandCardArea.CardList.Contains(TargetCard) ? Player.Area.HandCardArea : Player.Area.EquipmentCardArea, Game.CardManager.ThrownCardHeap);
                            Player.Tags.CreateTag(new PNumberedTag(LangZi.Name, BannedNumber));
                        }
                    }
                }
            });
        })
                      .AddTrigger((PPlayer Player, PSkill Skill) => {
            return(new PTrigger(LangZi.Name + "[掷骰无效触发]")
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.DiceStage.During,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) && Player.Tags.ExistTag(LangZi.Name);
                },
                Effect = (PGame Game) => {
                    int BannedNumber = Player.Tags.PopTag <PNumberedTag>(LangZi.Name).Value;
                    PDiceResultTag DiceResult = Game.TagManager.FindPeekTag <PDiceResultTag>(PDiceResultTag.TagName);
                    if (BannedNumber == DiceResult.DiceResult)
                    {
                        LangZi.AnnouceUseSkill(Player);
                        int NewNumber = BannedNumber;
                        while (NewNumber == BannedNumber)
                        {
                            NewNumber = PMath.RandInt(1, 6);
                        }
                        PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder("掷骰结果更改为" + NewNumber.ToString()));
                        DiceResult.DiceResult = NewNumber;
                    }
                }
            });
        })
                      );
        PSkill    FengLiu       = new PSkill("风流");
        const int FengLiuInjure = 600;

        SkillList.Add(FengLiu
                      .AddTimeTrigger(
                          new PTime[] {
            PTime.Injure.EmitInjure
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(FengLiu.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 150,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.Injure > 0 && Player.Equals(InjureTag.FromPlayer) && InjureTag.ToPlayer != null && !Player.Equals(InjureTag.ToPlayer);
                },
                AICondition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    PPlayer ToPlayer = InjureTag.ToPlayer;
                    if (ToPlayer.TeamIndex == Player.TeamIndex)
                    {
                        if (ToPlayer.Money > FengLiuInjure + InjureTag.Injure && ToPlayer.Money > Player.Money)
                        {
                            return true;
                        }
                        else if (ToPlayer.Money <= InjureTag.Injure)
                        {
                            return true;
                        }
                        else if (ToPlayer.Area.EquipmentCardArea.CardNumber == 0)
                        {
                            return false;
                        }
                    }
                    foreach (PCardType CardType in new PCardType[] {
                        PCardType.WeaponCard, PCardType.DefensorCard, PCardType.TrafficCard
                    })
                    {
                        PCard CurrentCard = Player.GetEquipment(CardType);
                        PCard TestCard = ToPlayer.GetEquipment(CardType);
                        if (ToPlayer.TeamIndex == Player.TeamIndex)
                        {
                            if (CurrentCard == null && TestCard != null && TestCard.Model.AIInEquipExpectation(Game, Player) > TestCard.Model.AIInEquipExpectation(Game, ToPlayer))
                            {
                                return true;
                            }
                        }
                        else if (CurrentCard != null && TestCard != null && CurrentCard.Model.AIInEquipExpectation(Game, Player) >= TestCard.Model.AIInEquipExpectation(Game, Player) + TestCard.Model.AIInEquipExpectation(Game, ToPlayer))
                        {
                            return false;
                        }
                    }
                    return ToPlayer.TeamIndex != Player.TeamIndex;
                },
                Effect = (PGame Game) => {
                    FengLiu.AnnouceUseSkill(Player);
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    PPlayer ToPlayer = InjureTag.ToPlayer;
                    int Answer = 0;
                    PCard TargetCard = null;
                    if (ToPlayer.Area.EquipmentCardArea.CardNumber == 0)
                    {
                        Answer = 1;
                    }
                    else
                    {
                        if (ToPlayer.IsAI)
                        {
                            if (ToPlayer.TeamIndex == Player.TeamIndex)
                            {
                                if (ToPlayer.Money <= InjureTag.Injure)
                                {
                                    Answer = 1;
                                }
                                else if (PAiCardExpectation.FindMostValuable(Game, Player, ToPlayer, false, true, false, true).Value > 0)
                                {
                                    Answer = 1;
                                }
                            }
                            else
                            {
                                int Value = FengLiuInjure * 2;
                                if (ToPlayer.Money <= InjureTag.Injure)
                                {
                                    Value -= FengLiuInjure;
                                }
                                else if (ToPlayer.Money <= InjureTag.Injure + FengLiuInjure)
                                {
                                    Value += 30000;
                                }

                                foreach (PCard TestCard in ToPlayer.Area.EquipmentCardArea.CardList)
                                {
                                    int NowValue = TestCard.Model.AIInEquipExpectation(Game, ToPlayer);
                                    int GiveValue = TestCard.Model.AIInEquipExpectation(Game, Player);
                                    int OverrideValue = 0;
                                    if (Player.GetEquipment(TestCard.Type) != null)
                                    {
                                        OverrideValue = Player.GetEquipment(TestCard.Type).Model.AIInEquipExpectation(Game, Player);
                                    }
                                    int ExtraValue = ToPlayer.General is P_HuaMulan ? 3500 : 0;
                                    if (Value > NowValue + GiveValue - OverrideValue - ExtraValue)
                                    {
                                        Value = NowValue + GiveValue - OverrideValue - ExtraValue;
                                        TargetCard = TestCard;
                                    }
                                }
                                if (TargetCard == null)
                                {
                                    Answer = 1;
                                }
                            }
                        }
                        else
                        {
                            Answer = PNetworkManager.NetworkServer.ChooseManager.Ask(ToPlayer, FengLiu.Name, new string[] { "交给" + Player.Name + "一件装备", "受到的伤害+" + FengLiuInjure.ToString() });
                        }
                    }
                    if (Answer == 0)
                    {
                        Game.GiveCardTo(ToPlayer, Player, false, true, false, true);
                    }
                    else
                    {
                        InjureTag.Injure += FengLiuInjure;
                    }
                }
            });
        })
                      );
    }
Beispiel #2
0
    public P_YuJi() : base("虞姬")
    {
        Sex   = PSex.Female;
        Age   = PAge.Classic;
        Index = 13;
        Cost  = 15;
        Tips  = "定位:攻击\n" +
                "难度:简单\n" +
                "史实:楚汉相争时期,西楚霸王项羽的美人,项羽曾为其作《垓下歌》。\n" +
                "攻略:\n虞姬是一个依赖于手牌的武将,所以研究所是她和她的队友的优先选择。对于虞姬而言,如何较为准确地衡量手牌的价值是一个比较困难的问题。对于两张点数不同的牌,两张牌自身的价值有高有低,两张牌用来【剑舞】的价值也有高有低,使用什么牌来【剑舞】,是虞姬玩家水平分别的体现。\n" +
                "通常,虞姬玩家可以弃掉自己不需要的装备、伏兵和难以发挥积极作用的【擒贼擒王】、【假痴不癫】、【空城计】等牌发动【剑舞】。虞姬玩家也可以在手上存留很多牌,当与敌人近身接触时,把所有牌都用来【剑舞】,造成巨大的输出,以求直接杀死对手。";

        PSkill JianWu = new PSkill("剑舞")
        {
            Initiative = true
        };

        KeyValuePair <PCard, int> JianWuTest(PGame Game, PPlayer Player)
        {
            KeyValuePair <PCard, int> Answer = new KeyValuePair <PCard, int>(null, 0);

            for (int i = 1; i <= 6; ++i)
            {
                int Expect = (int)PMath.Sum(Game.AlivePlayers().FindAll((PPlayer _Player) => {
                    return(!_Player.Equals(Player) && _Player.Distance(Player) <= i);
                }).ConvertAll((PPlayer _Player) => {
                    return((double)PAiTargetChooser.InjureExpect(Game, Player, Player, _Player, 800, JianWu));
                }));
                KeyValuePair <PCard, int> Test = PMath.Max(Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point == i), (PCard Card) => {
                    return(Expect - Card.Model.AIInHandExpectation(Game, Player));
                }, true);
                if (Test.Value > Answer.Value)
                {
                    Answer = Test;
                }
            }
            return(Answer);
        }

        SkillList.Add(JianWu
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(JianWu.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 190,
                CanRepeat = true,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Player.Area.HandCardArea.CardNumber > 0;
                },
                AICondition = (PGame Game) => {
                    return JianWuTest(Game, Player).Key != null;
                },
                Effect = (PGame Game) => {
                    JianWu.AnnouceUseSkill(Player);
                    PCard TargetCard = null;
                    if (Player.IsAI)
                    {
                        TargetCard = JianWuTest(Game, Player).Key;
                        PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(Player.Name + "弃置了" + Player.Name + "的" + TargetCard.Name));
                        Game.CardManager.MoveCard(TargetCard, Player.Area.HandCardArea, Game.CardManager.ThrownCardHeap);
                    }
                    else
                    {
                        TargetCard = Game.ThrowCard(Player, Player, true, false);
                    }
                    if (TargetCard != null)
                    {
                        Game.Traverse((PPlayer _Player) => {
                            if (!_Player.Equals(Player) && _Player.Distance(Player) <= TargetCard.Point)
                            {
                                Game.Injure(Player, _Player, 800, JianWu);
                            }
                        }, Player);
                    }
                }
            });
        }));
    }
Beispiel #3
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);
                    }
                }
            });
        }));
    }
Beispiel #4
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);
                }
            });
        }));
    }
Beispiel #5
0
    public P_PanYue() : base("潘岳")
    {
        Sex   = PSex.Male;
        Age   = PAge.Medieval;
        Index = 2;
        Tips  = "定位:辅助\n" +
                "难度:简单\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 XianJu = new PSkill("闲居");

        SkillList.Add(XianJu
                      // 用每回合限一次这个模板控制条件
                      .AnnounceTurnOnce()
                      // 回合结束时触发技能
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(XianJu.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PPeriod.EndTurn.During,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) && Player.Position.Lord != null && !Player.Equals(Player.Position.Lord) && Player.RemainLimit(XianJu.Name);
                },
                AICondition = (PGame Game) => {
                    return Player.Position.Lord.TeamIndex == Player.TeamIndex;
                },
                Effect = (PGame Game) => {
                    XianJu.AnnouceUseSkill(Player);
                    Game.GetHouse(Player.Position, 1);
                }
            });
        })

                      // 伤害结算结束时,如果造成或受到伤害,将每回合限一次的模板打上标记
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(XianJu.Name + "[条件记录]")
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.EndSettle,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return Player.Equals(Game.NowPlayer) && (Player.Equals(InjureTag.ToPlayer) || Player.Equals(InjureTag.FromPlayer)) && InjureTag.Injure > 0;
                },
                Effect = (PGame Game) => {
                    Player.Tags.FindPeekTag <PUsedTag>(PUsedTag.TagNamePrefix + XianJu.Name).Count++;
                }
            });
        }));
    }
Beispiel #6
0
    public P_ChenSheng() : base("陈胜")
    {
        Sex   = PSex.Male;
        Age   = PAge.Classic;
        Index = 21;
        Cost  = 20;
        Tips  = "定位:防御\n" +
                "难度:中等\n" +
                "史实:秦朝末年农民起义的领袖,建立了张楚政权。其名言“王侯将相宁有种乎”、“燕雀安知鸿鹄之志”等广为人知。\n" +
                "攻略:\n陈胜是一名拥有不俗控制能力和防御能力的武将。【起义】作为控制技能,能够在前期翻面敌人,从而迅速拉开己方团队与敌方团队的土地数量差距,同时能够在后期翻面自己或队友,从而减少敌人的伤害。在前期,使用【起义】控制敌人,可以帮助己方抢占地盘,同时使被翻面无法购买土地的敌人保持最高现金,制造连续控制的机会。【鸿鹄】大多数情况下配合【起义】使用,也可通过【金蝉脱壳】、【反间计】等卡牌发动。【鸿鹄】可以回避伤害的特性进一步增强了陈胜的防御,在后期,优势情况下的陈胜如果成为现金最多者,就可以连续【起义】自己形成滚雪球优势。陈胜的技能需要大量卡牌发动,因此可以通过大量建造研究所为陈胜创造条件。";

        PSkill QiYi = new PSkill("起义")
        {
            Initiative = true
        };

        SkillList.Add(QiYi
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(QiYi.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 % 2 == 1);
                },
                AICondition = (PGame Game) => {
                    int LeastValue = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point % 2 == 1).Value;
                    return P_ChiinTsevChiinWang.AIEmitTargets(Game, Player, LeastValue)[0] != null;
                },
                Effect = (PGame Game) => {
                    QiYi.AnnouceUseSkill(Player);
                    PCard TargetCard = null;
                    if (Player.IsAI)
                    {
                        TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, false, false, true, (PCard Card) => Card.Point % 2 == 1).Key;
                    }
                    else
                    {
                        List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point % 2 == 1);
                        int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, QiYi.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_ChiinTsevChiinWang();
                        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 HongHu = new PSkill("鸿鹄")
        {
            SoftLockOpen = true
        };

        SkillList.Add(HongHu
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(HongHu.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.ChangeFaceTime,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    PChangeFaceTag ChangeFaceTag = Game.TagManager.FindPeekTag <PChangeFaceTag>(PChangeFaceTag.TagName);
                    return Player.Equals(ChangeFaceTag.Player);
                },
                Effect = (PGame Game) => {
                    HongHu.AnnouceUseSkill(Player);
                    Game.GetMoney(Player, 2000);
                    int Step = 1;
                    if (Player.IsAI)
                    {
                        Step = PMath.Max(new List <int> {
                            1, 2, 3, 4, 5, 6
                        }, (int StepNumber) => PAiMapAnalyzer.StartFromExpect(Game, Player, Game.Map.NextStepBlock(Player.Position, StepNumber), 0, false)).Key;
                    }
                    else
                    {
                        Step = PNetworkManager.NetworkServer.ChooseManager.Ask1To6(Player, QiYi.Name);
                    }
                    PNetworkManager.NetworkServer.TellClients(new PShowInformationOrder(Player.Name + "选择向前移动" + Step + "步"));
                    Game.MoveForward(Player, Step);
                }
            });
        }));
    }
Beispiel #7
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);
                    }
                }
            });
        }));
    }
Beispiel #8
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);
                }
            });
        }));
    }
Beispiel #9
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);
                        }
                    }
                }
            });
        }));
    }
Beispiel #10
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);
                    }
                }
            });
        }));
    }
Beispiel #11
0
    public P_Gryu() : base("关羽")
    {
        Sex   = PSex.Male;
        Age   = PAge.Medieval;
        Index = 18;
        Cost  = 20;
        Tips  = "定位:攻辅一体\n" +
                "难度:简单\n" +
                "史实:三国时期蜀汉名将,“五虎上将”之一。曾有在万军之中斩杀上将颜良,水淹七军威震华夏等壮举。被尊为“武圣”。\n" +
                "攻略:\n关羽是一个较为稳定的武将,操作较为简单,【武圣】提供了一种类似诸葛连弩的输出方式,偶数牌的数量保证了技能的发动频率,因而购物中心和研究所是关羽优先选择的方向。即使没有高地价土地,关羽也可以利用废牌增加输出能力。\n" +
                "【怒斩】是一个稳定的输出技能,在破坏装备卡牌缺乏的环境中容易建立起持久的优势,并可在一定程度上威慑华雄【叫阵】及其他消耗装备牌技能的发动,同时给关羽一个较强的续航能力。";

        PSkill WuSheng = new PSkill("武圣")
        {
            Initiative = true
        };

        SkillList.Add(WuSheng
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(WuSheng.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 190,
                CanRepeat = true,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) &&
                    (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) &&
                    (Player.Area.HandCardArea.CardList.Exists((PCard Card) => Card.Point % 2 == 0) ||
                     Player.Area.EquipmentCardArea.CardList.Exists((PCard Card) => Card.Point % 2 == 0));
                },
                AICondition = (PGame Game) => {
                    int MaxHouseValue = PMath.Max(Game.Teammates(Player), (PPlayer _Player) => {
                        return PAiMapAnalyzer.MaxValueHouse(Game, _Player, true).Value;
                    }).Value;
                    return PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, true, false, true, (PCard Card) => Card.Point % 2 == 0).Value < MaxHouseValue - 500 && P_ShuShangKaaiHua.AIEmitTarget(Game, Player) != null;
                },
                Effect = (PGame Game) => {
                    WuSheng.AnnouceUseSkill(Player);
                    PCard TargetCard = null;
                    if (Player.IsAI)
                    {
                        TargetCard = PAiCardExpectation.FindLeastValuable(Game, Player, Player, true, true, false, true, (PCard Card) => Card.Point % 2 == 0).Key;
                    }
                    else
                    {
                        List <PCard> Waiting = Player.Area.HandCardArea.CardList.FindAll((PCard Card) => Card.Point % 2 == 0);
                        List <PCard> WaitingEquipments = Player.Area.EquipmentCardArea.CardList.FindAll((PCard Card) => Card.Point % 2 == 0);
                        int Result = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, WuSheng.Name, Waiting.ConvertAll((PCard Card) => Card.Name).Concat(WaitingEquipments.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_ShuShangKaaiHua();
                        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 Nuvj = new PSkill("怒斩")
        {
            Lock = true
        };

        SkillList.Add(Nuvj
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(Nuvj.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.EmitInjure,
                AIPriority = 200,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.Injure > 0 && InjureTag.ToPlayer != null &&
                    Player.Equals(InjureTag.FromPlayer) &&
                    Player.Area.EquipmentCardArea.CardNumber >
                    InjureTag.ToPlayer.Area.EquipmentCardArea.CardNumber && InjureTag.InjureSource is PBlock;
                },
                Effect = (PGame Game) => {
                    Nuvj.AnnouceUseSkill(Player);
                    Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure += 600;
                }
            });
        }));
    }
Beispiel #12
0
    public P_Faraday() : base("法拉第")
    {
        Sex   = PSex.Male;
        Age   = PAge.Industrial;
        Index = 16;
        Cost  = 20;
        Tips  = "定位:控制\n" +
                "难度:中等\n" +
                "史实:英国物理学家、化学家,曾提出电磁感应学说,发现了电场和磁场的联系,并发明了发电机,被称为“交流电之父”。\n" +
                "攻略:\n法拉第和时迁都是控制系武将。相对于时迁,法拉第利用的牌中包含【借尸还魂】、【抛砖引玉】、【走为上计】等价值极高的牌,在决定是否要发动【电击】的时候,会更为困难,并且也不具备时迁那样可以对对方的1点装备发动【轻敏】从而连续【顺手牵羊】的可能。\n" +
                "在1.2.3及以前的版本,法拉第只能使用3点牌发动技能,于1.2.4中得到了加强。";

        PSkill DianJi = new PSkill("电击")
        {
            Initiative = true
        };

        SkillList.Add(DianJi
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(DianJi.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.Equals(Player) && _Player.Distance(Player) <= 3) &&
                    Player.Area.HandCardArea.CardList.Exists((PCard Card) => Card.Point % 3 == 0);
                },
                AICondition = (PGame Game) => {
                    int ShangWctExpect = P_ShangWuChoouTii.Target(Game, Player).Value;
                    return Player.Area.HandCardArea.CardList.Exists((PCard Card) => {
                        return Card.Point % 3 == 0 && Card.Model.AIInHandExpectation(Game, Player) < ShangWctExpect;
                    });
                },
                Effect = (PGame Game) => {
                    DianJi.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, DianJi.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_ShangWuChoouTii();
                        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));
                        }
                    }
                }
            });
        }));
    }