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()); })); }
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)); })); }
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; }
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 }; }