private void PlayerTwoBattlefield_CardSelected(CardSelectionArgs e) { if (gameState.RequiresTarget) { gameState.SubmitTarget(e.SelectedCard); } }
private void PlayerOneHand_CardSelected(CardSelectionArgs e) { //Normal action if (e.Button == MouseButton.Left) { attemptCastCard(e.SelectedCard); } }
private void PlayerOneHand_CardContextSelected(CardSelectionArgs e) { Menu.SetDisplay(e.MousePosition, true); ContextInfo cast = new ContextInfo("Cast", ContextInfoTypes.Cast, e.SelectedCard); ContextInfo devoteUp = new ContextInfo("Devote - Face Up", ContextInfoTypes.DevoteUp, e.SelectedCard); ContextInfo devoteDown = new ContextInfo("Devote - Face Down", ContextInfoTypes.DevoteDown, e.SelectedCard); Menu.SetMenuOptions(cast, devoteUp, devoteDown); }
private void PlayerOneElysium_CardContextSelected(CardSelectionArgs e) { Menu.SetDisplay(e.MousePosition, true); List <ContextInfo> contextOptions = new List <ContextInfo>(); if (e.SelectedCard.IsFaceDown) { contextOptions.Add(new ContextInfo("Turn Face Up", ContextInfoTypes.ElysiumTurnFaceUp, e.SelectedCard)); } Menu.SetMenuOptions(contextOptions.ToArray()); }
private void PlayerOneElysium_CardSelected(CardSelectionArgs e) { //Can't get mana out of Mana Drained Elysium cards if (!e.SelectedCard.IsManaDrained) { //You may untap cards if they're not drained e.SelectedCard.IsTapped = !e.SelectedCard.IsTapped; int mod = (e.SelectedCard.IsTapped) ? 1 : -1; //If the player is casting a spell, add the mana directly to the cost paid, otherwise add it to their mana pool if (castingController.CastingState != CastingState.None) { castingController.PayMana(e.SelectedCard.ManaValue * mod); promptBox.Text = string.Format("Pay ({0}).", castingController.RemainingManaCost); } else { gameState.PlayerOne.Mana += e.SelectedCard.ManaValue * mod; } } }
private void PlayerOneBattlefield_CardContextSelected(CardSelectionArgs e) { }