本文整理汇总了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());
}));
}
示例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));
}));
}
示例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;
}
示例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
};
}