public void SetResult(int index) { Result = new ChosenPlayable { Playable = _playables[index] }; LogFile.Debug("Move is {0}", _playables[index]); }
public MachineHandler() { Result = new ChosenPlayable { Playable = new Pass() }; _executor = new MachinePlanExecutor(this); }
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 }; }
protected override void ExecuteQuery() { if (Ui.Configuration.ShouldAutoPass( step: Game.Turn.Step, isActiveTurn: D.Controller.IsActive, anyPlayerPlayedSomething: Game.Turn.Events.HasAnythingBeenPlayedOrActivatedDuringThisStep)) { Result = new ChosenPlayable { Playable = new Pass() }; return; } var dialog = Ui.Dialogs.Priority.Create(); Ui.Shell.ShowModalDialog(dialog, DialogType.Small, InteractionState.PlaySpellsOrAbilities); Result = new ChosenPlayable { Playable = dialog.Playable ?? new Pass() }; }
public ScenarioStep Cast(Action <ScenarioActivation> init) { var activation = new ScenarioActivation(); init(activation); var result = new ChosenPlayable { Playable = new ScenarioPlayableSpell { Card = activation.Card, ActivationParameters = new ActivationParameters { Targets = activation.GetTargets(), X = activation.X }, Index = activation.Index } }; _results.Add(new DecisionResult(result, activation.Card.Controller, activation.StackShouldBeEmpty)); return(this); }