protected override void ExecuteQuery() { var activationParameters = new ActivationParameters { PayManaCost = D._p.PayManaCost }; var spellPrerequisites = SelectSpell(); if (spellPrerequisites == null) { return; } UiHelpers.SelectX(spellPrerequisites, activationParameters, canCancel: false); UiHelpers.SelectTargets(spellPrerequisites, activationParameters, canCancel: false); var playable = new PlayableSpell { Card = D._p.Card, ActivationParameters = activationParameters, Index = spellPrerequisites.Index }; Result = new ChosenPlayable { Playable = playable }; }
private void Activate() { if (!IsPlayable) { return; } var activationParameters = new ActivationParameters(); var playableActivator = SelectAbility(); if (playableActivator == null) { return; } var wasCanceled = UiHelpers.SelectX( playableActivator.Prerequisites, activationParameters, canCancel: true) && UiHelpers.SelectTargets( playableActivator.Prerequisites, activationParameters, canCancel: true); if (!wasCanceled) { return; } var ability = playableActivator.GetPlayable(activationParameters); Publisher.Publish(new PlayableSelected { Playable = ability }); }