Exemple #1
0
        public override void Enter(CardAbilityData abilityData)
        {
            iWaitFrame = 0;

            base.Enter(abilityData);

            // 現在のターンを取得
            int        turn       = GameObject.Find("GameMain").GetComponent <SceneMain>().turn;
            int        joukenTurn = abilityData.c_value0;
            PowerRange range      = (PowerRange)abilityData.c_value1;

            Debug.Log("ターン条件チェックするクマ");

            // 条件チェック
            bool isOK = CheckRange(range, turn, joukenTurn);

            if (isOK)
            {
                Debug.Log("条件満たしてる");

                // 成功時の効果に移行
                abilityData.skillNumber = abilityData.c_value2;

                // Ability列車 ターン条件効果発動(条件成功時)
                ActionEffectUVInfo info = new ActionEffectUVInfo();
                info.iEffectType = (int)UV_EFFECT_TYPE.SKILL_WIN;
                info.fPosX       = abilityData.GetFieldStrikerPosition().x;
                info.fPosY       = abilityData.GetFieldStrikerPosition().y;
                info.fPosZ       = abilityData.GetFieldStrikerPosition().z;

                MessageManager.DispatchOffline(CardAbilityData.playerManager.GetPlayerID(abilityData.isMyPlayer), MessageType.ActionEffectUV, info);

                // 効果発動SE
                oulAudio.PlaySE("action_ability");
            }
            else
            {
                Debug.Log("条件満たしていない");

                // 失敗時の効果に移行
                abilityData.skillNumber = abilityData.c_value3;

                // Ability列車 ターン条件効果発動(条件満たしてない時)
            }
        }
Exemple #2
0
        void JoukenOK(CardAbilityData abilityData)
        {
            // 成功時の効果に移行
            abilityData.skillNumber = abilityData.c_value2;

            // Ability列車 パワー条件成功時

            // [1216] ゴリ 効果がモンスターかイベントか知りたい
            // Ability列車 仲間と共に発動した瞬間
            ActionEffectUVInfo UVInfo = new ActionEffectUVInfo();

            UVInfo.iEffectType = (int)UV_EFFECT_TYPE.SKILL_WIN;
            UVInfo.fPosX       = abilityData.GetFieldStrikerPosition().x;
            UVInfo.fPosY       = abilityData.GetFieldStrikerPosition().y;
            UVInfo.fPosZ       = abilityData.GetFieldStrikerPosition().z;

            MessageManager.DispatchOffline(CardAbilityData.playerManager.GetPlayerID(abilityData.isMyPlayer), MessageType.ActionEffectUV, UVInfo);

            // 効果発動SE
            oulAudio.PlaySE("action_ability");
        }
Exemple #3
0
        public override void Enter(CardAbilityData abilityData)
        {
            iWaitFrame = 0;

            base.Enter(abilityData);

            // ゴリゴリのゴリ[12/16] 発動元のカードタイプが知りたかったとさ

            Card FieldCard = abilityData.myPlayer.cardObjectManager.fieldStrikerCard;
            Card EventCard = abilityData.myPlayer.cardObjectManager.fieldEventCard;

            if (FieldCard != null && EventCard == null)
            {
                // Ability列車 勝利の雄たけびの成功時
                ActionEffectUVInfo info = new ActionEffectUVInfo();
                info.iEffectType = (int)UV_EFFECT_TYPE.SKILL_WIN;
                info.fPosX       = abilityData.GetFieldStrikerPosition().x;
                info.fPosY       = abilityData.GetFieldStrikerPosition().y;
                info.fPosZ       = abilityData.GetFieldStrikerPosition().z;

                MessageManager.DispatchOffline(CardAbilityData.playerManager.GetPlayerID(abilityData.isMyPlayer), MessageType.ActionEffectUV, info);
            }

            if (EventCard != null)
            {
                // Ability列車 勝利の雄たけびの成功時
                ActionEffectUVInfo info = new ActionEffectUVInfo();
                info.iEffectType = (int)UV_EFFECT_TYPE.SKILL_WIN;
                info.fPosX       = abilityData.GetFieldEventPosition().x;
                info.fPosY       = abilityData.GetFieldEventPosition().y;
                info.fPosZ       = abilityData.GetFieldEventPosition().z;

                MessageManager.DispatchOffline(CardAbilityData.playerManager.GetPlayerID(abilityData.isMyPlayer), MessageType.ActionEffectUV, info);
            }


            // 効果発動SE
            oulAudio.PlaySE("action_ability");
        }
Exemple #4
0
        public override void Enter(CardAbilityData abilityData)
        {
            iWaitFrame = 0;

            base.Enter(abilityData);

            var range      = (DifferenceRangeType)abilityData.c_value0; // 条件タイプ
            var difference = abilityData.c_value1;                      // 条件の差

            var  myPower  = abilityData.myPlayer.jissainoPower;
            var  youPower = abilityData.youPlayer.jissainoPower;
            bool ok       = (myPower < youPower); // 負けてたらtrue

            if (!ok)
            {
                abilityData.isJoukenOK = false;
                return;
            }

            switch (range)
            {
            case DifferenceRangeType.NoneLimit:
                abilityData.isJoukenOK = true;
                break;

            case DifferenceRangeType.In:
                abilityData.isJoukenOK = (youPower - myPower <= difference);
                break;

            case DifferenceRangeType.Out:
                abilityData.isJoukenOK = (youPower - myPower >= difference);
                break;

            default:
                Debug.LogError("爪痕のswitch文でエラークマ");
                abilityData.isJoukenOK = false;
                break;
            }


            // 条件満たしていないなら終了
            if (!abilityData.isJoukenOK)
            {
                endFlag = true;
                return;
            }

            // Ability列車 爪痕の成功時
            ActionEffectUVInfo info = new ActionEffectUVInfo();

            info.iEffectType = (int)UV_EFFECT_TYPE.SKILL_LOSE;
            info.fPosX       = abilityData.GetFieldStrikerPosition().x;
            info.fPosY       = abilityData.GetFieldStrikerPosition().y;
            info.fPosZ       = abilityData.GetFieldStrikerPosition().z;

            MessageManager.DispatchOffline(CardAbilityData.playerManager.GetPlayerID(abilityData.isMyPlayer), MessageType.ActionEffectUV, info);

            // 効果発動SE
            oulAudio.PlaySE("action_ability");

            int a = 0;

            a++;
        }
Exemple #5
0
        public override void Enter(CardAbilityData abilityData)
        {
            iWaitFrame = 0; // 初期化

            base.Enter(abilityData);

            var range      = (DifferenceRangeType)abilityData.c_value0; // 条件タイプ
            var difference = abilityData.c_value1;                      // 条件の差

            var myPower  = abilityData.myPlayer.jissainoPower;
            var youPower = abilityData.youPlayer.jissainoPower;

            // ジョーカーvs10チェック(負けてるのに勝った扱いになるから)
            var myCard = abilityData.myPlayer.GetFieldStrikerCard();

            // 自分自身のパワーが10なら
            if (myCard.cardData.power == 10)
            {
                // 相手がジョーカーだったら効果は発動しない
                var youCard = abilityData.youPlayer.GetFieldStrikerCard();
                if (youCard)
                {
                    if (youCard.cardData.cardType == CardType.Joker)
                    {
                        abilityData.isJoukenOK = false;
                        return;
                    }
                }
            }

            bool ok = (myPower > youPower || youPower == Player.noSetStrikerPower);    // 勝ってたらtrue

            if (!ok)
            {
                abilityData.isJoukenOK = false;
                return;
            }

            switch (range)
            {
            case DifferenceRangeType.NoneLimit:
                abilityData.isJoukenOK = true;
                break;

            case DifferenceRangeType.In:
                abilityData.isJoukenOK = (myPower - youPower <= difference);
                break;

            case DifferenceRangeType.Out:
                abilityData.isJoukenOK = (myPower - youPower >= difference);
                break;

            default:
                Debug.LogError("勝利の雄たけびのswitch文でエラークマ");
                abilityData.isJoukenOK = false;
                break;
            }

            // 条件満たしていないなら終了
            if (!abilityData.isJoukenOK)
            {
                endFlag = true;
                return;
            }

            // Ability列車 勝利の雄たけびの成功時
            ActionEffectUVInfo info = new ActionEffectUVInfo();

            info.iEffectType = (int)UV_EFFECT_TYPE.SKILL_WIN;
            info.fPosX       = abilityData.GetFieldStrikerPosition().x;
            info.fPosY       = abilityData.GetFieldStrikerPosition().y;
            info.fPosZ       = abilityData.GetFieldStrikerPosition().z;

            MessageManager.DispatchOffline(CardAbilityData.playerManager.GetPlayerID(abilityData.isMyPlayer), MessageType.ActionEffectUV, info);

            // 効果発動SE
            oulAudio.PlaySE("action_ability");

            int a = 0;

            a++;
        }