Пример #1
0
    private void ApplyCardModifiers(GameObject card, Player_Behavior player, Player_Behavior opponent)
    {
        Modifiers.EnviroModifier enviroModifier = SelectedBoard.GetComponent <Board>().GetModifier();
        if (enviroModifier == Modifiers.EnviroModifier.NoCapital && card.GetComponent <CQBCard>().GetUnitType() == CQBCard.UnitType.CAPITAL)
        {
            card.transform.SetParent(player.GetDiscard().transform);
        }
        else
        {
            if (card.GetComponent <CardModifier>().HasAbility() && !card.GetComponent <CQBCard>().Suppressed())
            {
                Modifiers.CardModifiers ability = card.GetComponent <CardModifier>().GetModifier();
                switch (ability)
                {
                case Modifiers.CardModifiers.BattleBuddiesAssault:
                    ModifierCharacteristics.BattleBuddiesAssault(card, player);
                    break;

                case Modifiers.CardModifiers.BattleBuddiesIon:
                    ModifierCharacteristics.BattleBuddiesIon(card, player);
                    break;

                case Modifiers.CardModifiers.HunterPack:
                    ModifierCharacteristics.HunterPack(card, player);
                    break;

                case Modifiers.CardModifiers.Anti_Fighter:
                    ModifierCharacteristics.Anti_Fighter(opponent);
                    break;

                case Modifiers.CardModifiers.Anti_Frigate:
                    ModifierCharacteristics.Anti_Frigate(opponent);
                    break;

                case Modifiers.CardModifiers.Anti_Capital:
                    ModifierCharacteristics.Anti_Capital(opponent);
                    break;

                case Modifiers.CardModifiers.Quick_Deploy:
                    ModifierCharacteristics.Quick_Deploy(player);
                    break;

                case Modifiers.CardModifiers.CAP:
                    ModifierCharacteristics.CAP(card, player);
                    break;

                case Modifiers.CardModifiers.DECOY:
                    ModifierCharacteristics.Decoy(card, player);
                    break;

                case Modifiers.CardModifiers.SPY:
                    card.transform.SetParent(opponent.GetPlayField().transform);
                    player.GetDeck().DealCards(2, player.GetHand().gameObject);
                    ApplyModifiers(player);
                    break;
                }
            }
        }
    }
Пример #2
0
    private void ApplyCardModifiers(GameObject card, Player_Behavior player, Player_Behavior opponent)
    {
        Modifiers.EnviroModifier enviroModifier = SelectedBoard.GetComponent <Board>().GetModifier();
        if (enviroModifier == Modifiers.EnviroModifier.NoCapital && card.GetComponent <CQBCard>().GetUnitType() == CQBCard.UnitType.CAPITAL)
        {
            card.transform.SetParent(player.GetDiscard().transform);
        }
        else
        {
            if (card.GetComponent <CQBCard>().HasAbility() && !card.GetComponent <CQBCard>().Suppressed())
            {
                Modifiers.CardModifiers ability = card.GetComponent <CQBCard>().GetAbility();
                switch (ability)
                {
                case Modifiers.CardModifiers.BattleBuddiesAssault:
                    ModifierCharacteristics.BattleBuddiesAssault(card, player);
                    break;

                case Modifiers.CardModifiers.BattleBuddiesIon:
                    ModifierCharacteristics.BattleBuddiesIon(card, player);
                    break;

                case Modifiers.CardModifiers.HunterPack:
                    break;

                case Modifiers.CardModifiers.Anti_Strike:
                    break;

                case Modifiers.CardModifiers.Bomber:
                    break;

                case Modifiers.CardModifiers.Quick_Deploy:
                    break;
                }
            }
        }
    }