protected override void ExecuteQuery() { ChosenCards chosenCards = null; while (true) { chosenCards = new ChosenCards(); var validatorParameters = new TargetValidatorParameters { IsValidTarget = p => D._p.Validator.IsValidCard(p.Target.Card()), IsValidZone = p => p.Zone == D._p.Zone && p.ZoneOwner == D.Controller, MinCount = D._p.MinCount, MaxCount = D._p.MaxCount == null ? null : (Value)D._p.MaxCount.Value, Message = D._p.Text, }; var validator = new TargetValidator(validatorParameters); validator.Initialize(Game, D.Controller, D._p.OwningCard); var selectTargetParameters = new SelectTargetParameters { Validator = validator, Instructions = D._p.Instructions }; var dialog = Ui.Dialogs.SelectTarget.Create(selectTargetParameters); Ui.Shell.ShowModalDialog(dialog, DialogType.Small, InteractionState.SelectTarget); foreach (Card card in dialog.Selection) { chosenCards.Add(card); if (card.Is().Aura&& D._p.AurasNeedTarget) { var auraTarget = SelectAuraTarget(card); if (auraTarget == null) { continue; } chosenCards.Add(auraTarget); } } break; } Result = chosenCards; }
public MachineHandler() { Result = new ChosenCards(); }
public MachineHandler() { Result = new ChosenCards(); _executor = new MachinePlanExecutor(this); }
public ScenarioHandler() { Result = new ChosenCards(); }