public CardTemplate Pump(IManaAmount cost, string text, int powerIncrease, int toughnessIncrease) { return(ActivatedAbility(p => { p.Text = text; p.Cost = new PayMana(cost, ManaUsage.Abilities, supportsRepetitions: true); p.Effect = () => { var effect = new ApplyModifiersToSelf(() => new AddPowerAndToughness( powerIncrease, toughnessIncrease) { UntilEot = true }); if (toughnessIncrease > 0) { effect.SetTags(EffectTag.IncreaseToughness); } if (powerIncrease > 0) { effect.SetTags(EffectTag.IncreasePower); } return effect; }; p.TimingRule(new PumpOwningCardTimingRule(powerIncrease, toughnessIncrease)); p.RepetitionRule(new RepeatMaxTimes()); }) .CombatRule(() => new PumpCombatRule(powerIncrease, toughnessIncrease, cost))); }
public CardTemplate Pump(IManaAmount cost, string text, int powerIncrease, int toughnessIncrease) { return ActivatedAbility(p => { p.Text = text; p.Cost = new PayMana(cost, ManaUsage.Abilities, supportsRepetitions: true); p.Effect = () => { var effect = new ApplyModifiersToSelf(() => new AddPowerAndToughness( powerIncrease, toughnessIncrease) {UntilEot = true}); if (toughnessIncrease > 0) effect.SetTags(EffectTag.IncreaseToughness); if (powerIncrease > 0) effect.SetTags(EffectTag.IncreasePower); return effect; }; p.TimingRule(new PumpOwningCardTimingRule(powerIncrease, toughnessIncrease)); p.RepetitionRule(new RepeatMaxTimes()); }) .CombatRule(() => new PumpCombatRule(powerIncrease, toughnessIncrease, cost)); }