internal async Task TakeDamage(int soul) { for (int i = 0; i < soul; i++) { var tmp = Library.Draw(); ResolutionZone.Enqueue(tmp); await CheckInterrupts(); if (tmp is IWSClimaxCard) { while (ResolutionZone.Count > 0) { WaitingRoom.Put(ResolutionZone.Dequeue()); } return; } } while (ResolutionZone.Count > 0) { Clock.Put(ResolutionZone.Dequeue()); await CheckInterrupts(); } await RefreshPoint(); }
private async Task Level() { var promise = new TaskCompletionSource <WSLevelChoice>(); Task.Factory.StartNew(() => promise.SetResult(ChooseLevelUp())); var result = await promise.Task; MustLevel = false; LevelZone.Put(Clock.TakeAt((int)result)); foreach (var card in Clock.Clear()) { WaitingRoom.Put(card); } //await CheckInterrupts(); }