private void DealEffect(Effect effect) //启动特效触发流程
 {
     if (EffectRequirementCheck.CheckRequirments(PlayerHeroGrid, EnemyHeroGrid, PlayerMinionPanel, EnemyMinionPanel, mainBattlefield, effect))
     {
         doneEffect = effect;
         EffectAim aim = effect.EffectAim;
         if (!(aim.enemyHero || aim.enemyMinion || aim.playerHero || aim.playerMinion))
         {
             EffectAim_Tapped(new Grid(), new TappedRoutedEventArgs());
             return;
         }
         if (effect.Category != EffectCategory.Spell)
         {
             FocusAim(effect.EffectAim);
         }
         else
         {
             FocusAimForSpell(effect.EffectAim);
         }
     }
     else
     {
         return;
     }
 }
 private void HandCardGridView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     draggedCard = (e.Items.FirstOrDefault() as Grid).DataContext as Card;
     if (draggedCard.CardType == CardTypes.MinionCard)
     {
         draggedMinionCard = draggedCard.CardData as MinionCard;
         if (PlayerMinionPanel.Items.Count >= 7)
         {
             e.Cancel = true;
             return;
         }
         if (mainBattlefield.CurrentCost < draggedMinionCard.Cost)
         {
             e.Cancel = true;
             return;
         }
         draggingType = "MinionCard";
     }
     else
     {
         draggingType     = "SpellCard";
         draggedSpellCard = draggedCard.CardData as SpellCard;
         if (mainBattlefield.CurrentCost < draggedSpellCard.Cost)
         {
             e.Cancel = true;
             return;
         }
         doneEffect = draggedSpellCard.SpellEffect;
         if (EffectRequirementCheck.CheckRequirments(PlayerHeroGrid, EnemyHeroGrid, PlayerMinionPanel, EnemyMinionPanel, mainBattlefield, doneEffect.Requirements, doneEffect.RequirementValues))
         {
             EffectAim aim = doneEffect.EffectAim;
             if (!(aim.enemyHero || aim.enemyMinion || aim.playerHero || aim.playerMinion))
             {
                 MainGrid.DragOver += CastSpell_DragOver;
                 MainGrid.Drop     += CastSpell_Drop;
                 return;
             }
             FocusAimForSpell(doneEffect.EffectAim);
             return;
         }
         else
         {
             e.Cancel = true;
         }
     }
 }//拖拽卡牌