public override void Action(object info = null)
 {
     base.Action(info);
     if (SetType == Enumerators.SetType.NONE || SetType != Enumerators.SetType.NONE && PlayerCallerOfAbility
         .BoardCards.FindAll(x => x.Card.LibraryCard.CardSetType == SetType && x != AbilityUnitOwner).Count > 0)
     {
         if (AbilityTargetTypes.Count > 0)
         {
             if (AbilityTargetTypes[0] == Enumerators.AbilityTargetType.PLAYER)
             {
                 CardsController.AddCardToHandFromOtherPlayerDeck(PlayerCallerOfAbility, PlayerCallerOfAbility);
             }
             else if (AbilityTargetTypes[0] == Enumerators.AbilityTargetType.OPPONENT)
             {
                 CardsController.AddCardToHandFromOtherPlayerDeck(PlayerCallerOfAbility,
                                                                  PlayerCallerOfAbility.Equals(GameplayManager.CurrentPlayer) ?
                                                                  GameplayManager.OpponentPlayer :
                                                                  GameplayManager.CurrentPlayer);
             }
         }
         else
         {
             CardsController.AddCardToHand(PlayerCallerOfAbility);
         }
     }
 }
        public override void Action(object info = null)
        {
            base.Action(info);

            Player opponent = PlayerCallerOfAbility.Equals(GameplayManager.CurrentPlayer) ?
                              GameplayManager.OpponentPlayer :
                              GameplayManager.CurrentPlayer;

            foreach (Enumerators.AbilityTargetType target in AbilityTargetTypes)
            {
                switch (target)
                {
                case Enumerators.AbilityTargetType.OPPONENT_ALL_CARDS:

                    foreach (BoardUnit unit in opponent.BoardCards)
                    {
                        BattleController.AttackUnitByAbility(GetCaller(), AbilityData, unit);
                    }

                    foreach (BoardUnit unit in opponent.BoardCards)
                    {
                        unit.Stun(Enumerators.StunType.FREEZE, Value);
                    }

                    break;

                case Enumerators.AbilityTargetType.OPPONENT:
                    BattleController.AttackPlayerByAbility(GetCaller(), AbilityData, opponent);
                    opponent.Stun(Enumerators.StunType.FREEZE, Value);
                    break;
                }
            }
        }
Exemple #3
0
        public override void Action(object info = null)
        {
            base.Action(info);

            Player opponent = PlayerCallerOfAbility.Equals(GameplayManager.CurrentPlayer) ?
                              GameplayManager.OpponentPlayer :
                              GameplayManager.CurrentPlayer;

            foreach (BoardUnit unit in opponent.BoardCards)
            {
                unit.Stun(Enumerators.StunType.FREEZE, Value);
                CreateVfx(unit.Transform.position, true, 5f);
            }
        }