Ejemplo n.º 1
0
    public P_BaiQi() : base("白起")
    {
        Sex   = PSex.Male;
        Age   = PAge.Classic;
        Index = 9;
        Cost  = 25;
        Tips  = "定位:爆发\n" +
                "难度:简单\n" +
                "史实:战国时期秦国名将,“战国四大名将”之一,曾在伊阙之战、长平之战中大败三晋军队,歼敌数十万,功封武安君。\n" +
                "攻略:\n白起是一个强制命中系武将,白起的存在使得对方无法通过【李代桃僵】、【指桑骂槐】一类的牌免除伤害,或通过【八卦阵】、【龙胆】等方式减少伤害,而必须硬吃下伤害的100%(通常这个数字比伤害值高)。随之带来的损失则是收费地的地价永久性减少,很多时候这是不值的,但在必杀一击上,白起一点都不会含糊。";

        PSkill CanSha = new PSkill("残杀");

        SkillList.Add(CanSha
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(CanSha.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.Injure.EmitInjure,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Equals(InjureTag.FromPlayer) &&
                    InjureTag.InjureSource is PBlock && ((PBlock)InjureTag.InjureSource).Price >= 1000;
                },
                AICondition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    if (InjureTag.ToPlayer.TeamIndex != Player.TeamIndex)
                    {
                        int Benefit = PMath.Percent(InjureTag.Injure, 100);
                        if (Benefit + InjureTag.Injure >= InjureTag.ToPlayer.Money)
                        {
                            // 一击必杀
                            return true;
                        }
                        if (Benefit >= 2000)
                        {
                            PBlock Source = (PBlock)InjureTag.InjureSource;
                            int Cost = 1000 + PAiMapAnalyzer.HouseValue(Game, Player, Source) * Source.HouseNumber * 1000 / Source.Price;
                            if (Cost < Benefit)
                            {
                                return true;
                            }
                        }
                    }
                    return false;
                },
                Effect = (PGame Game) => {
                    CanSha.AnnouceUseSkill(Player);
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    PBlock Source = (PBlock)InjureTag.InjureSource;
                    Source.Price -= 1000;
                    PNetworkManager.NetworkServer.TellClients(new PRefreshBlockBasicOrder(Source));
                    Game.LoseMoney(InjureTag.ToPlayer, PMath.Percent(InjureTag.Injure, 100));
                }
            });
        }));
    }
Ejemplo n.º 2
0
    public P_ZhangFei() : base("张飞")
    {
        Sex   = PSex.Male;
        Age   = PAge.Medieval;
        Index = 14;
        Cost  = 10;
        Tips  = "定位:攻击\n" +
                "难度:简单\n" +
                "史实:三国时期蜀汉名将,“五虎上将”之一,曾在长坂坡负责断后,曹军无人敢逼近。\n" +
                "攻略:\n张飞是一个使用起来很简单的武将,为新手推荐。\n" +
                "张飞可以很容易制造出很高等级的房屋,如果人数较多而地图较小,高级房屋可以造成相当巨大的优势。但反之,如果人数少而地图大,滥用【咆哮】会导致张飞在前期现金数量迅速减少,而陷入发展不平衡的困境。由于张飞几乎可以完全控制地图上各片地的发展情况,所以集中力量发展还是分散建设到不同土地上,是张飞面临的首要问题。一般而言,张飞每片地应当保持至少2座房屋,以形成对【反客为主】的完全防御。";

        PSkill PaoXiao = new PSkill("咆哮")
        {
            Lock = true
        };

        SkillList.Add(PaoXiao
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(PaoXiao.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.SettleStage.Start,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer);
                },
                Effect = (PGame Game) => {
                    Game.TagManager.FindPeekTag <PPurchaseTag>(PPurchaseTag.TagName).Limit += 3;
                }
            });
        }));
    }
Ejemplo n.º 3
0
    public P_Temujin() : base("铁木真")
    {
        Sex   = PSex.Male;
        Age   = PAge.Renaissance;
        Index = 11;
        Cost  = 20;
        Tips  = "定位:控制\n" +
                "难度:简单\n" +
                "史实:大蒙古国可汗,杰出的军事家、政治家,统一了蒙古诸部,开疆拓土,远至东欧,被尊为“成吉思汗”。\n" +
                "攻略:\n铁木真是一个新手推荐武将,基本上使用没有任何难度。";

        PSkill QiangLve = new PSkill("抢掠")
        {
            SoftLockOpen = true
        };

        SkillList.Add(QiangLve
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(QiangLve.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.Injure.EmitInjure,
                AIPriority = 15,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Equals(InjureTag.FromPlayer) &&
                    InjureTag.InjureSource is PBlock && !Player.Equals(InjureTag.ToPlayer) && InjureTag.ToPlayer.Area.HandCardArea.CardNumber + InjureTag.ToPlayer.Area.EquipmentCardArea.CardNumber > 0;
                },
                AICondition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.ToPlayer.TeamIndex != Player.TeamIndex;
                },
                Effect = (PGame Game) => {
                    QiangLve.AnnouceUseSkill(Player);
                    int Result = Game.Judge(Player, 6);
                    if (Result % 2 == 0)
                    {
                        PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                        PCard Card = new P_CheevnHuoTaChieh().Instantiate();
                        Card.Point = 0;
                        PTrigger Trigger = Card.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(Player, Card).Time.Equals(PTime.Injure.AcceptInjure))?.Invoke(Player, Card);
                        if (Trigger != null)
                        {
                            Game.Logic.StartSettle(new PSettle("抢掠[趁火打劫]", Trigger.Effect));
                        }
                    }
                }
            });
        }));
    }
Ejemplo n.º 4
0
    public P_Newton() : base("牛顿")
    {
        Sex   = PSex.Male;
        Age   = PAge.Renaissance;
        Index = 19;
        Cost  = 40;
        Tips  = "定位:防御\n" +
                "难度:中等\n" +
                "史实:英国物理学家、数学家。主要贡献包括但不限于发现万有引力定律、牛顿运动定律、光的色散原理,提出微积分、牛顿迭代法、二项式定理,发明反射式望远镜等。代表作《自然哲学的数学原理》。\n" +
                "攻略:\n牛顿是一个趣味性十足的武将,技能应用十分灵活,【惯性】的存在使其拥有极强的移动能力,能够灵活规避各种危险,同时在前期迅速攫取土地,中后期能够更快经过奖励处,从而拥有一定的续航能力。牛顿可以配合队友的上屋抽梯或逃避敌人的【剑舞】或【霸王】,需要较强的预判力。";

        PSkill Grx_ = new PSkill("惯性");

        SkillList.Add(Grx_
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(Grx_.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PPeriod.WalkingStage.Start,
                AIPriority = 10,
                Condition = (PGame Game) => {
                    return Game.NowPlayer.Equals(Player) && Player.Position.HouseNumber == 0 &&
                    Player.Money > 500;
                },
                AICondition = (PGame Game) => {
                    PStepCountTag StepCountTag = Game.TagManager.FindPeekTag <PStepCountTag>(PStepCountTag.TagName);
                    int Current = PAiMapAnalyzer.Expect(Game, Player, Game.Map.NextStepBlock(Player.Position, StepCountTag.StepCount));
                    PBlock NewtonTarget = Grx_Next(Game, Player.Position).Key;
                    int Possible = PAiMapAnalyzer.Expect(Game, Player, Game.Map.NextStepBlock(NewtonTarget, StepCountTag.StepCount));
                    return Possible - Current > 500;
                },
                Effect = (PGame Game) => {
                    Grx_.AnnouceUseSkill(Player);
                    Game.LoseMoney(Player, 500);
                    Game.MovePosition(Player, Player.Position, Grx_Next(Game, Player.Position).Key);
                }
            });
        }));
    }
Ejemplo n.º 5
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);
                }
            });
        }));
    }
Ejemplo n.º 6
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;
                }
            });
        }));
    }
Ejemplo n.º 7
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);
                        }
                    }
                }
            });
        }));
    }
Ejemplo n.º 8
0
    public P_JeanneDarc() : base("贞德")
    {
        Sex   = PSex.Female;
        Age   = PAge.Medieval;
        Index = 30;
        Cost  = 40;
        Tips  = "定位:辅助\n" +
                "难度:简单\n" +
                "史实:法国民族英雄,天主教圣人,被称为“奥尔良的圣女”。在英法百年战争中,她带领法国军队对抗英军的入侵,屡战屡胜,扭转了战争的局势。\n" +
                "攻略:\n-";

        PSkill ShengNv = new PSkill("圣女");

        SkillList.Add(ShengNv
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ShengNv.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.EnterDyingTime,
                AIPriority = 5,
                Condition = (PGame Game) => {
                    PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName);
                    return Player.Area.OwnerCardNumber > 0 && DyingTag.Source != null && DyingTag.Source is PBlock;
                },
                AICondition = (PGame Game) => {
                    PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName);
                    if (DyingTag.Killer.General is P_LvZhi)
                    {
                        return false;
                    }
                    if (DyingTag.Player.TeamIndex == Player.TeamIndex)
                    {
                        if (Player.Equals(DyingTag.Player))
                        {
                            return true;
                        }
                        else
                        {
                            if (DyingTag.Player.Money <= -10000)
                            {
                                return false;
                            }
                            if (Player.Money > 5000)
                            {
                                return true;
                            }
                            else
                            {
                                return Player.Area.OwnerCardNumber <= 3;
                            }
                        }
                    }
                    else
                    {
                        return false;
                    }
                },
                Effect = (PGame Game) => {
                    ShengNv.AnnouceUseSkill(Player);
                    PDyingTag DyingTag = Game.TagManager.FindPeekTag <PDyingTag>(PDyingTag.TagName);
                    Game.CardManager.ThrowAll(Player.Area);
                    PCard Card = new P_ChiehTaoShaJevn().Instantiate();
                    Card.Point = 0;
                    PTrigger Trigger = Card.Model.MoveInHandTriggerList.Find((Func <PPlayer, PCard, PTrigger> TriggerGenerator) => TriggerGenerator(DyingTag.Player, Card).Time.Equals(PTime.EnterDyingTime))?.Invoke(DyingTag.Player, Card);
                    if (Trigger != null)
                    {
                        Game.Logic.StartSettle(new PSettle("圣女[借尸还魂]", Trigger.Effect));
                        Game.LoseMoney(Player, 5000);
                        if (!Player.Equals(DyingTag.Player))
                        {
                            Game.GetCard(DyingTag.Player);
                        }
                    }
                }
            });
        }));
    }
Ejemplo n.º 9
0
    public P_ZhangSanFeng() : base("张三丰")
    {
        Sex   = PSex.Male;
        Age   = PAge.Industrial;
        Index = 8;
        Tips  = "定位:攻防兼备\n" +
                "难度:中等\n" +
                "史实:宋末元初武术家,道家内丹祖师,武当派、太极拳的开创者,被封为“通微显化天尊”。\n" +
                "攻略:\n张三丰的技能需要预判下一回合的走向,玩家如果能对场上的局势有一定的预判能力,就能最大化地发挥张三丰两个状态的加成。\n因为张三丰的技能没有消耗,所以也可以走纯阳或者纯阴,做一个简单的防御(或攻击)将使用。";

        PSkill TaiJi = new PSkill("太极")
        {
            Lock = true
        };

        SkillList.Add(TaiJi
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(TaiJi.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.StartTurn.During,
                AIPriority = 200,
                Condition = (PGame Game) => {
                    return Game.NowPlayer.Equals(Player);
                },
                Effect = (PGame Game) => {
                    TaiJi.AnnouceUseSkill(Player);
                    Player.Tags.PopTag <PTag>(PYinTag.Name);
                    Player.Tags.PopTag <PTag>(PYangTag.Name);
                    int ChooseResult = 0;
                    if (Player.IsAI)
                    {
                        int Yin = -PAiMapAnalyzer.OutOfGameExpect(Game, Player, false);
                        int Yang = PAiMapAnalyzer.OutOfGameExpect(Game, Player, true, true);
                        ChooseResult = (Yin >= Yang ? 0 : 1);
                    }
                    else
                    {
                        ChooseResult = PNetworkManager.NetworkServer.ChooseManager.Ask(Player, TaiJi.Name, new string[] { "阴", "阳" },
                                                                                       new string[] { "造成的伤害+20%", "受到的伤害-20%" });
                    }
                    if (ChooseResult == 0)
                    {
                        Player.Tags.CreateTag(PYinTag);
                    }
                    else
                    {
                        Player.Tags.CreateTag(PYangTag);
                    }
                }
            });
        })
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(TaiJi.Name + "[阴]")
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.EmitInjure,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return Player.Tags.ExistTag(PYinTag.Name) && InjureTag.Injure > 0 && InjureTag.ToPlayer != null && Player.Equals(InjureTag.FromPlayer);
                },
                Effect = (PGame Game) => {
                    TaiJi.AnnouceUseSkill(Player);
                    Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure += PMath.Percent(Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure, 20);
                }
            });
        })
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(TaiJi.Name + "[阳]")
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.AcceptInjure,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return Player.Tags.ExistTag(PYangTag.Name) && InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer);
                },
                Effect = (PGame Game) => {
                    TaiJi.AnnouceUseSkill(Player);
                    Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure -= PMath.Percent(Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName).Injure, 20);
                }
            });
        }));
    }
Ejemplo n.º 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);
                    }
                }
            });
        }));
    }
Ejemplo n.º 11
0
    public P_BaiHu() : base("白虎")
    {
        Sex         = PSex.Male;
        Age         = PAge.Ancient;
        Index       = 1002;
        Cost        = 1;
        Tips        = string.Empty;
        CanBeChoose = false;

        //PSkill ShenShou = new PSkill("神兽") {
        //    Lock = true
        //};
        //SkillList.Add(ShenShou
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PTime.StartGameTime,
        //            AIPriority = 100,
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 30000);
        //            }
        //        };
        //    })
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PPeriod.StartTurn.During,
        //            AIPriority = 100,
        //            Condition = (PGame Game) => {
        //                return Player.Equals(Game.NowPlayer);
        //            },
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 500);
        //            }
        //        };
        //    }));

        PSkill BaiHu = new PSkill("白虎")
        {
            Lock = true
        };

        SkillList.Add(BaiHu
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(BaiHu.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.EndTurn.During,
                AIPriority = 250,
                Condition = (PGame Game) => {
                    PChiaTaoFaKuoTag ChiaTaoFaKuoTag = Game.TagManager.FindPeekTag <PChiaTaoFaKuoTag>(PChiaTaoFaKuoTag.TagName);
                    return Player.Equals(Game.NowPlayer) && ChiaTaoFaKuoTag.LordList.Count >= 1;
                },
                Effect = (PGame Game) => {
                    BaiHu.AnnouceUseSkill(Player);
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    PChiaTaoFaKuoTag ChiaTaoFaKuoTag = Game.TagManager.FindPeekTag <PChiaTaoFaKuoTag>(PChiaTaoFaKuoTag.TagName);
                    ChiaTaoFaKuoTag.LordList.ForEach((PPlayer _Player) => {
                        if (!_Player.Tags.ExistTag(PTag.LockedTag.Name))
                        {
                            _Player.Tags.CreateTag(PTag.LockedTag);
                        }
                    });
                }
            });
        }));
    }
Ejemplo n.º 12
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);
                    }
                }
            });
        }));
    }
Ejemplo n.º 13
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);
                }
            });
        }));
    }
Ejemplo n.º 14
0
    public P_HeShen() : base("和珅")
    {
        Sex   = PSex.Male;
        Age   = PAge.Industrial;
        Index = 24;
        Cost  = 30;
        Tips  = "定位:防御\n" +
                "难度:简单\n" +
                "史实:清朝中期权臣,中国历史上有名的巨贪,聚敛了约十亿两白银的巨大财富。\n" +
                "攻略:\n和珅是一名拥有不错防御力的武将。【贪污】使和珅的起始资金变相增加,而【受贿】可用于关键击杀,但一般都用于辅助队友。和珅的技能使用基本没有任何难度,因此十分适合新手使用。";

        PSkill TanWu = new PSkill("贪污")
        {
            Lock = true
        };

        SkillList.Add(TanWu
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(TanWu.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.PurchaseLandTime,
                Condition = (PGame Game) => {
                    PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName);
                    return Player.Equals(PurchaseLandTag.Player);
                },
                Effect = (PGame Game) => {
                    TanWu.AnnouceUseSkill(Player);
                    PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName);
                    PurchaseLandTag.LandPrice = PMath.Percent(PurchaseLandTag.LandPrice, 50);
                }
            });
        })
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(TanWu.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.PurchaseHouseTime,
                Condition = (PGame Game) => {
                    PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName);
                    return Player.Equals(PurchaseHouseTag.Player);
                },
                Effect = (PGame Game) => {
                    TanWu.AnnouceUseSkill(Player);
                    PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName);
                    PurchaseHouseTag.HousePrice = PMath.Percent(PurchaseHouseTag.HousePrice, 50);
                }
            });
        }));
        PSkill ShouHui = new PSkill("受贿")
        {
            Initiative = true
        };

        int ShouHuiExpect(PGame Game, PPlayer Player)
        {
            int Sum = 0;
            int Cnt = 0;

            foreach (PBlock Block in PAiMapAnalyzer.NextBlocks(Game, Player))
            {
                if (Block.CanPurchase && Block.Lord == null)
                {
                    Sum += Block.Price;
                    Cnt++;
                }
                else if (Player.Equals(Block.Lord))
                {
                    Sum += Block.HousePrice;
                    Cnt++;
                }
            }
            if (Cnt == 0)
            {
                return(-1);
            }
            else
            {
                return(Sum / Cnt);
            }
        }

        PPlayer ShouHuiTarget(PGame Game, PPlayer Player)
        {
            foreach (PPlayer Target in Game.Teammates(Player))
            {
                if (ShouHuiExpect(Game, Target) >= 1500 && Target.Money >= 2000 && Player.RemainLimit(ShouHui.Name, Target))
                {
                    return(Target);
                }
            }
            foreach (PPlayer Target in Game.Enemies(Player))
            {
                if (Player.RemainLimit(ShouHui.Name, Target))
                {
                    int Expect = ShouHuiExpect(Game, Target);
                    if (Expect < 0)
                    {
                        Expect = 3000; // 无法判断下次购买土地或房屋的收益
                    }
                    Expect -= PAiTargetChooser.InjureExpect(Game, Player, Player, Target, 1000, ShouHui);
                    if (Expect <= -1000)
                    {
                        return(Target);
                    }
                }
            }
            return(null);
        }

        SkillList.Add(ShouHui
                      .AnnounceEachPlayerOnce()
                      .AddTimeTrigger(
                          new PTime[] {
            PPeriod.FirstFreeTime.During,
            PPeriod.SecondFreeTime.During
        },
                          (PTime Time, PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ShouHui.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = Time,
                AIPriority = 10,
                CanRepeat = true,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer) && (Player.IsAI || Game.Logic.WaitingForEndFreeTime()) && Game.AlivePlayers().Exists((PPlayer _Player) => Player.RemainLimit(ShouHui.Name, _Player));
                },
                AICondition = (PGame Game) => {
                    return ShouHuiTarget(Game, Player) != null;
                },
                Effect = (PGame Game) => {
                    ShouHui.AnnouceUseSkill(Player);
                    PPlayer Target = null;
                    if (Player.IsAI)
                    {
                        Target = ShouHuiTarget(Game, Player);
                    }
                    else
                    {
                        Target = PNetworkManager.NetworkServer.ChooseManager.AskForTargetPlayer(Player, (PGame _Game, PPlayer _Player) => Player.RemainLimit(ShouHui.Name, _Player), ShouHui.Name, true);
                    }
                    if (Target != null)
                    {
                        Game.Injure(Player, Target, 1000, ShouHui);
                        Target.Tags.CreateTag(new PShouHuiTag());
                        ShouHui.DeclareUseFor(Player, Target);
                    }
                }
            });
        })
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ShouHui.Name)
            {
                IsLocked = true,
                Player = null,
                Time = PTime.PurchaseLandTime,
                Condition = (PGame Game) => {
                    PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName);
                    return PurchaseLandTag.Player.Tags.ExistTag(PShouHuiTag.TagName);
                },
                Effect = (PGame Game) => {
                    PPurchaseLandTag PurchaseLandTag = Game.TagManager.FindPeekTag <PPurchaseLandTag>(PPurchaseLandTag.TagName);
                    PurchaseLandTag.LandPrice = 0;
                    ShouHui.AnnouceUseSkill(PurchaseLandTag.Player);
                    PurchaseLandTag.Player.Tags.PopTag <PShouHuiTag>(PShouHuiTag.TagName);
                }
            });
        })
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ShouHui.Name)
            {
                IsLocked = true,
                Player = null,
                Time = PTime.PurchaseHouseTime,
                Condition = (PGame Game) => {
                    PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName);
                    return PurchaseHouseTag.Player.Tags.ExistTag(PShouHuiTag.TagName);
                },
                Effect = (PGame Game) => {
                    PPurchaseHouseTag PurchaseHouseTag = Game.TagManager.FindPeekTag <PPurchaseHouseTag>(PPurchaseHouseTag.TagName);
                    PurchaseHouseTag.HousePrice = 0;
                    ShouHui.AnnouceUseSkill(PurchaseHouseTag.Player);
                    PurchaseHouseTag.Player.Tags.PopTag <PShouHuiTag>(PShouHuiTag.TagName);
                }
            });
        }));
    }
Ejemplo n.º 15
0
    public P_XuanWu() : base("玄武")
    {
        Sex         = PSex.Male;
        Age         = PAge.Ancient;
        Index       = 1004;
        Cost        = 1;
        Tips        = string.Empty;
        CanBeChoose = false;

        //PSkill ShenShou = new PSkill("神兽") {
        //    Lock = true
        //};
        //SkillList.Add(ShenShou
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PTime.StartGameTime,
        //            AIPriority = 100,
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 30000);
        //            }
        //        };
        //    })
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PPeriod.StartTurn.During,
        //            AIPriority = 100,
        //            Condition = (PGame Game) => {
        //                return Player.Equals(Game.NowPlayer);
        //            },
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 500);
        //            }
        //        };
        //    }));

        PSkill XuanWu = new PSkill("玄武")
        {
            Lock = true
        };

        SkillList.Add(XuanWu
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(XuanWu.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.AcceptInjure,
                AIPriority = 250,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer) && InjureTag.InjureSource is PBlock && Player.LandNumber > 0;
                },
                Effect = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    XuanWu.AnnouceUseSkill(Player);
                    int MinHouse = PMath.Min(Game.Map.FindBlock(Player), (PBlock Block) => Block.HouseNumber).Value;
                    PBlock Target = PMath.Max(Game.Map.FindBlock(Player).FindAll((PBlock Block) => Block.HouseNumber == MinHouse), (PBlock Block) => PAiMapAnalyzer.HouseValue(Game, Player, Block)).Key;
                    Game.GetHouse(Target, 1);
                }
            });
        }));
    }
Ejemplo n.º 16
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);
                    }
                }
            });
        }));
    }
Ejemplo n.º 17
0
    public P_QuYuan() : base("屈原")
    {
        Sex   = PSex.Male;
        Age   = PAge.Classic;
        Index = 25;
        Cost  = 25;
        Tips  = "定位:全能\n" +
                "难度:简单\n" +
                "史实:战国时期楚国诗人、政治家。中国浪漫主义文学的奠基人,“楚辞”的代表作家。代表作《离骚》。\n" +
                "攻略:\n屈原是一名集攻击、防御、爆发于一体的武将。【离骚】的存在能够在天灾中获得一定收益,一般相当于一张免费的【苦肉计】。屈原使用起来基本没有任何难度,因此十分推荐新手使用。";

        PSkill LiSao = new PSkill("离骚")
        {
            SoftLockOpen = true
        };

        SkillList.Add(LiSao
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(LiSao.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.Injure.AfterAcceptInjure,
                AIPriority = 280,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return Player.Equals(InjureTag.ToPlayer) && InjureTag.Injure > 0;
                },
                AICondition = (PGame Game) => {
                    if (Player.Money <= 900)
                    {
                        return false;
                    }
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    if (InjureTag.Injure >= Player.Money)
                    {
                        return true;
                    }
                    else if (InjureTag.Injure + 1800 >= Player.Money)
                    {
                        return false;
                    }
                    return true;
                },
                Effect = (PGame Game) => {
                    LiSao.AnnouceUseSkill(Player);
                    int SaoNumber = 0;
                    int Line = 0;
                    int Count = 0;
                    int Last = 0;
                    int LLast = 0;
                    while (true)
                    {
                        int Test = Game.Judge(Player, 6);
                        Count++;
                        if ((Test - Last) * Line < 0)
                        {
                            Player.Tags.PopTag <PSaoTag>(PSaoTag.TagName);
                            break;
                        }
                        else
                        {
                            if (Test != Last && Last != 0)
                            {
                                Line = Test - Last;
                            }
                            LLast = Last;
                            Last = Test;
                        }
                        int Delta = SaoNumber * 9 + Test;
                        Player.Tags.CreateTag(new PSaoTag(Delta));
                        SaoNumber += Delta;
                    }
                    Game.LoseMoney(Player, 300 * Count);
                    Game.GetCard(Player);
                }
            });
        }));
    }
Ejemplo n.º 18
0
    public P_ChenYuanYuan() : base("陈圆圆")
    {
        Sex   = PSex.Female;
        Age   = PAge.Industrial;
        Index = 4;
        Tips  = "定位:防御\n" +
                "难度:简单\n" +
                "史实:明末清初戏曲演艺家,作为吴三桂向农民军的宣战理由而闻名于世。\n" +
                "攻略:\n陈圆圆是新手推荐的武将,使用简单,且具有一定的强度,过牌量较高,可以用来练习对牌的使用能力。\n【风云】的收益取决于在场上的存在感,而【楚楚】平均6回合摸一张牌,因此在人数少、回合频繁的1v1模式中,陈圆圆的强度非常高。但陈圆圆和队友的配合能力相对较差,在人数多、回合被稀释的4v4模式下,表现就不是很好了。";

        PSkill FengYun = new PSkill("风云")
        {
            SoftLockOpen = true
        };

        SkillList.Add(FengYun
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(FengYun.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.Injure.EndSettle,
                AIPriority = 120,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    return (Player.Equals(InjureTag.ToPlayer) || Player.Equals(InjureTag.FromPlayer)) && InjureTag.Injure > 0;
                },
                Effect = (PGame Game) => {
                    FengYun.AnnouceUseSkill(Player);
                    Game.GetMoney(Player, 200);
                }
            });
        }));
        PSkill ChuChu = new PSkill("楚楚")
        {
            SoftLockOpen = true
        };

        SkillList.Add(ChuChu
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ChuChu.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PPeriod.EndTurnStage.During,
                AIPriority = 50,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer);
                },
                Effect = (PGame Game) => {
                    ChuChu.AnnouceUseSkill(Player);
                    int X = Game.Judge(Player, 4);
                    if (X == 4)
                    {
                        Game.GetCard(Player, 1);
                    }
                }
            });
        }));
    }
Ejemplo n.º 19
0
    public P_QingLong() : base("青龙")
    {
        Sex         = PSex.Male;
        Age         = PAge.Ancient;
        Index       = 1001;
        Cost        = 1;
        Tips        = string.Empty;
        CanBeChoose = false;

        //PSkill ShenShou = new PSkill("神兽") {
        //    Lock = true
        //};
        //SkillList.Add(ShenShou
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PTime.StartGameTime,
        //            AIPriority = 100,
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 30000);
        //            }
        //        };
        //    })
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PPeriod.StartTurn.During,
        //            AIPriority = 100,
        //            Condition = (PGame Game) => {
        //                return Player.Equals(Game.NowPlayer);
        //            },
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 500);
        //            }
        //        };
        //    }));

        PSkill QingLong = new PSkill("青龙")
        {
            Lock = true
        };

        SkillList.Add(QingLong
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(QingLong.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PTime.Injure.AcceptInjure,
                AIPriority = 250,
                Condition = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    PPlayer FromPlayer = InjureTag.FromPlayer;
                    return InjureTag.Injure > 0 && Player.Equals(InjureTag.ToPlayer) && FromPlayer != null && FromPlayer.Area.OwnerCardNumber > 0;
                },
                Effect = (PGame Game) => {
                    PInjureTag InjureTag = Game.TagManager.FindPeekTag <PInjureTag>(PInjureTag.TagName);
                    PPlayer FromPlayer = InjureTag.FromPlayer;
                    QingLong.AnnouceUseSkill(Player);
                    Game.GetCardFrom(Player, FromPlayer);
                }
            });
        }));
    }
Ejemplo n.º 20
0
    public P_ZhuQue() : base("朱雀")
    {
        Sex         = PSex.Male;
        Age         = PAge.Ancient;
        Index       = 1003;
        Cost        = 1;
        Tips        = string.Empty;
        CanBeChoose = false;

        //PSkill ShenShou = new PSkill("神兽") {
        //    Lock = true
        //};
        //SkillList.Add(ShenShou
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PTime.StartGameTime,
        //            AIPriority = 100,
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 30000);
        //            }
        //        };
        //    })
        //    .AddTrigger(
        //    (PPlayer Player, PSkill Skill) => {
        //        return new PTrigger(ShenShou.Name) {
        //            IsLocked = true,
        //            Player = Player,
        //            Time = PPeriod.StartTurn.During,
        //            AIPriority = 100,
        //            Condition = (PGame Game) => {
        //                return Player.Equals(Game.NowPlayer);
        //            },
        //            Effect = (PGame Game) => {
        //                ShenShou.AnnouceUseSkill(Player);
        //                Game.GetMoney(Player, 500);
        //            }
        //        };
        //    }));

        PSkill ZhuQue = new PSkill("朱雀")
        {
            Lock = true
        };

        SkillList.Add(ZhuQue
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(ZhuQue.Name)
            {
                IsLocked = true,
                Player = Player,
                Time = PPeriod.StartTurn.During,
                AIPriority = 250,
                Condition = (PGame Game) => {
                    return Player.Equals(Game.NowPlayer);
                },
                Effect = (PGame Game) => {
                    ZhuQue.AnnouceUseSkill(Player);
                    Game.Traverse((PPlayer _Player) => {
                        if (!_Player.Equals(Player))
                        {
                            Game.LoseMoney(_Player, 300);
                        }
                    }, Player);
                }
            });
        }));
    }
Ejemplo n.º 21
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);
                }
            });
        }));
    }
Ejemplo n.º 22
0
    public P_LiuJi() : base("刘基")
    {
        Sex   = PSex.Male;
        Age   = PAge.Industrial;
        Index = 12;
        Cost  = 10;
        Tips  = "定位:防御\n" +
                "难度:简单\n" +
                "史实:明代政治家、文学家,“明初诗文三大家”之一,在平定张士诚、陈友谅和北伐中作为参谋,以神机妙算著称。\n" +
                "攻略:\n刘基作为军事大师,两个技能均和判定有关,可以称作是使用伏兵的专家。刘基可以从【闪电】、【瘟疫】、【陷阱】这类会轮转的牌中获益,而对于【乐不思蜀】、【兵粮寸断】有天然的免疫能力。\n【八卦阵】可以说是刘基的神器,当刘基持有【八卦阵】时,每次受到伤害不但减半,而且反而可以摸1000,配合陈圆圆,队友之间互相伤害可以形成共赢的效果。";

        PSkill MiaoSuan = new PSkill("妙算")
        {
            SoftLockOpen = true
        };

        SkillList.Add(MiaoSuan
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(MiaoSuan.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.Judge.JudgeTime,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName);
                    return JudgeTag.Player.Equals(Player);
                },
                Effect = (PGame Game) => {
                    PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName);
                    MiaoSuan.AnnouceUseSkill(Player);
                    int ChosenResult = 1;
                    if (Player.IsAI)
                    {
                        ChosenResult = JudgeTag.AdvisedResult;
                    }
                    else
                    {
                        ChosenResult = PNetworkManager.NetworkServer.ChooseManager.Ask1To6(Player, MiaoSuan.Name);
                    }
                    JudgeTag.Result = ChosenResult;
                }
            });
        }));

        PSkill TianDu = new PSkill("天妒")
        {
            SoftLockOpen = true
        };

        SkillList.Add(TianDu
                      .AddTrigger(
                          (PPlayer Player, PSkill Skill) => {
            return(new PTrigger(TianDu.Name)
            {
                IsLocked = false,
                Player = Player,
                Time = PTime.Judge.AfterJudgeTime,
                AIPriority = 100,
                Condition = (PGame Game) => {
                    PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName);
                    return JudgeTag.Player.Equals(Player);
                },
                Effect = (PGame Game) => {
                    PJudgeTag JudgeTag = Game.TagManager.FindPeekTag <PJudgeTag>(PJudgeTag.TagName);
                    TianDu.AnnouceUseSkill(Player);
                    Game.GetMoney(Player, 200 * JudgeTag.Result);
                }
            });
        }));
    }
Ejemplo n.º 23
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);
                }
            });
        }));
    }