当前位置: 首页>>代码示例>>C#>>正文


C# Card.GetEquipped方法代码示例

本文整理汇总了C#中Card.GetEquipped方法的典型用法代码示例。如果您正苦于以下问题:C# Card.GetEquipped方法的具体用法?C# Card.GetEquipped怎么用?C# Card.GetEquipped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Card的用法示例。


在下文中一共展示了Card.GetEquipped方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Modify

        protected override void Modify(Card card)
        {
            base.Modify(card);
            card.PotentialPhysicalAttack = () => 2;

            card.CreateAbility()
                .EquipWeapon(Attr.PhysicalAttack, 2)
                .On(Phase.Equip);

            card.AddEventHandler(
                events =>
                events.Subscribe<SelectingCards>(
                    message =>
                        {
                            if (message.TriggeringAbility != null && message.TriggeringAbility.Phase == Phase.Battle && card.IsEquipped)
                                message.Selection.Remove(card.GetEquipped().First());
                        }));
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:18,代码来源:Pike.cs

示例2: Modify

        protected override void Modify(Card card)
        {
            base.Modify(card);

            card.PotentialPhysicalAttack = () => 5;

            card.CreateAbility()
                .EquipWeapon((player, hero) =>
                                 {
                                     hero.AddModifier(new SetMod(card, Attr.PhysicalAttack, 0));
                                     hero.AddModifier(new SetMod(card, Attr.MagicalAttack, 0));
                                 }).On(Phase.Equip);

            card.AddEventHandler(events => events.Subscribe<AttackRankSelected>(e =>
                                                              {
                                                                  if (e.AttackedRank.Number >= 2 && card.IsEquipped)
                                                                      card.GetEquipped().First().AddModifier(new PlusMod(card, Attr.PhysicalAttack, 5));
                                                              }));
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:19,代码来源:FalconArbalest.cs

示例3: Create

        public Card Create(Game game)
        {
            var card = new Card(game)
                           {
                               Type = CardType.Hero,
                               Name = "Regular",
                               Gold = 0,
                               Strength = 3,
                               Cost = 0,
                               Text = "<b>Physical Attack +1</b>"
                                      + "<br/><br/>"
                                      + "<b>Dungeon:</b> If equipped with a polearm, draw a card.",
                               PhysicalAttack = 1,
                               Xp = 2,
                               Owner = CardOwner.Village
                           };
            card.SetTags("Level 0", "Basic");
            card.CreateAbility()
                .DrawCards(1)
                .Condition(player => card.IsEquipped && card.GetEquipped().First().HasTag("Polearm"))
                .On(Phase.Dungeon);

            return card;
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:24,代码来源:Regular.cs

示例4: From

 public static CardModel From(Card card)
 {
     return card == null
                ? null
                : new CardModel
                      {
                          Name = card.Name,
                          Cost = card.Cost,
                          Gold = card.Gold,
                          Health = card.Health,
                          Id = card.Id,
                          Level = card.Level,
                          Light = card.Light,
                          Darkness =  card.Darkness,
                          MagicAttack = card.MagicAttack,
                          PhysicalAttack = card.PhysicalAttack,
                          PotentialMagicAttack = card.PotentialMagicAttack == null ? null : card.PotentialMagicAttack(),
                          PotentialPhysicalAttack = card.PotentialPhysicalAttack == null ? null : card.PotentialPhysicalAttack(),
                          Rank = card.Rank == null ? (int?) null : card.Rank.Number,
                          Strength = card.Strength,
                          Tags = card.Tags,
                          Text = card.Text,
                          Type = card.Type.ToString(),
                          Vp = card.Vp,
                          Xp = card.Xp,
                          Owner = card.Owner.ToString(),
                          Equipped = card.IsEquipped ? card.GetEquipped().Select(c=>c.Name).ToArray() : null
                      };
 }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:29,代码来源:CardModel.cs


注:本文中的Card.GetEquipped方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。