コード例 #1
0
    //蝉丸を引いた
    public void Semimaru_Draw()
    {
        playerSkill = RuleManager.instance.PlayerList[deck.Count].RuleList[2].RuleEfect[0];
        MasterList.instance.list[deck.Count].Add(deck.drawcard);//手札に追加
        switch (playerSkill)
        {
        case 1:
            //次の人一回休み
            SemimaruSkill2();
            cardAnime.animeFunctionNum = 8;
            cardAnime.AnimeSkillCutIn();
            break;

        case 2:
            //他のプレイヤーの全ての手札を自分の手札に加える
            SemimaruSkill3();
            cardAnime.animeFunctionNum = 9;
            cardAnime.AnimeSkillCutIn();
            break;

        case 3:
            //他のプレイヤーは全ての手札を捨て札に置く
            SemimaruSkill4();
            cardAnime.animeFunctionNum = 10;
            cardAnime.AnimeSkillCutIn();
            break;

        case 4:
            //山札の数を半分にする
            SemimaruSkill5();
            cardAnime.animeFunctionNum = 11;
            cardAnime.AnimeSkillCutIn();
            break;

        case 5:
            //次に発動するスキルを無効化する
            SemimaruSkill6();
            cardAnime.animeFunctionNum = 12;
            cardAnime.AnimeSkillCutIn();
            break;

        default:
            Debug.LogError("蝉丸スキルの値がおかしいよ");
            break;
        }
    }
コード例 #2
0
    public void Yumimoti_Draw()
    {
        //左隣から5枚もらう
        Debug.Log("弓持ち" + deck.Count + "のばん");

        int drawNum = 5 + draw.effect1Num;

        int g = deck.Count + 1;

        for (int w = 0; w < 4; w++)
        {
            g %= 4;
            if (MasterList.instance.list[g].Count != 0)
            {
                if (MasterList.instance.list[g].Count > drawNum)
                {
                    for (int t = 0; t < drawNum; t++)
                    {
                        int y = MasterList.instance.list[g][0];      //次の人の一番上の札を格納
                        MasterList.instance.list[deck.Count].Add(y); //count番目の人がi番目の一番上のカードをもらう
                        MasterList.instance.list[g].RemoveAt(0);     //i番目の人の札の初期化
                    }
                }
                else if (MasterList.instance.list[g].Count > 0)
                {
                    int m = MasterList.instance.list[g].Count;
                    for (int t = 0; t < m; t++)
                    {
                        int y = MasterList.instance.list[g][0];      //i番目の人の一番上の札を格納
                        MasterList.instance.list[deck.Count].Add(y); //count番目の人がi番目の一番上のカードをもらう
                        MasterList.instance.list[g].RemoveAt(0);     //i番目の人の札の初期化
                    }
                }
                YumimotiNum = g;
                break;
            }
            g++;
            g %= 4;
        }

        cardAnime.animeFunctionNum = 7;
        cardAnime.AnimeSkillCutIn();
        //cardAnime.AnimeLeftToRight();
        Debug.Log("最終的にカードを渡す人は" + (YumimotiNum + 1) + "→" + (deck.Count + 1));
        Debug.Log("弓持ちのスキル発動");

        MasterList.instance.list[deck.Count].Add(deck.drawcard);//手札に追加
    }
コード例 #3
0
    //天皇カードを引いた
    public void Tennou_Draw()
    {
        playerSkill = RuleManager.instance.PlayerList[deck.Count].RuleList[0].RuleEfect[0];

        Debug.Log(deck.Count + "のばん");
        switch (playerSkill)
        {
        //スキル無し
        case 0:
            Debug.Log("天皇のスキルは無し");
            break;

        case 1:
            draw.drawAgain = true;
            //山札1から引く場合
            if (draw.drowYama1 == true)
            {
                //山札から2枚引く
                for (int i = 0; i < 1; i++)
                {
                    //deck.drawcard = deck.cards1[0];//いらないかも
                    MasterList.instance.list[deck.Count].Add(deck.drawcard);    //手札に追加
                    deck.cards1.RemoveAt(0);
                }
            }
            else
            {
                //山札から2枚引く
                for (int i = 0; i < 1; i++)
                {
                    //deck.drawcard = deck.cards2[0];//いらないかも
                    MasterList.instance.list[deck.Count].Add(deck.drawcard);    //手札に追加;
                    deck.cards2.RemoveAt(0);
                }
            }
            cardAnime.animeFunctionNum = 1;
            cardAnime.AnimeSkillCutIn();
            Debug.Log("天皇のスキル1発動");
            break;

        case 2:
            //全員の札と場の札をすべてもらう
            for (int i = 0; i < 4; i++)
            {
                //全員の札をもらう
                if (i != deck.Count)
                {
                    Debug.Log(i + 1 + "番の人が" + (deck.Count + 1) + "番目の人に全部渡す");
                    Debug.Log(i + 1 + "番目の人は" + MasterList.instance.list[i].Count + "枚");
                    int q = MasterList.instance.list[i].Count;
                    for (int t = 0; t < q; t++)
                    {
                        Debug.Log(i + 1 + "番目の人は" + t + "回目");
                        int y = MasterList.instance.list[i][0];      //i番目の人の一番上の札を格納
                        MasterList.instance.list[deck.Count].Add(y); //count番目の人がi番目の一番上のカードをもらう
                        MasterList.instance.list[i].RemoveAt(0);     //i番目の人の札の初期化
                    }
                    //hand.handCount[deck.Count] += hand.handCount[i];
                    //hand.handCount[i] = 0;
                }
            }
            //場の札をもらう
            if (deck.DiscardCount.Count > 0)
            {
                //for (int t = 0; t < deck.DiscardCount.Count; t++)
                //{
                //    int y = deck.DiscardCount[0];//捨て札を格納
                //    MasterList.instance.list[deck.Count].Add(y);//捨て札を回収
                //    deck.DiscardCount.RemoveAt(0);//捨て札を初期化
                //}
                int r = deck.DiscardCount.Count;
                for (int t = 0; t < r; t++)
                {
                    int y = deck.DiscardCount[0];                //捨て札を格納
                    MasterList.instance.list[deck.Count].Add(y); //捨て札を回収
                    deck.DiscardCount.RemoveAt(0);               //捨て札を初期化
                }
                //hand.handCount[deck.Count] += deck.DiscardCount;//捨て札を回収
                //deck.DiscardCount = 0;//捨て札を初期化
                //draw.ImageChangeHime();
            }
            else
            {
                //draw.ImageChangeHime();
            }
            //cardAnime.AnimeAllGet();
            cardAnime.animeFunctionNum = 2;
            cardAnime.AnimeSkillCutIn();

            Debug.Log("天皇のスキル2発動");
            break;

        default:
            Debug.LogError("天皇スキルの値がおかしいよ");
            break;
        }

        MasterList.instance.list[deck.Count].Add(deck.drawcard);//手札に追加
        //draw.ImageChangeTono();
    }
コード例 #4
0
    //武官のカードを引いた
    public void Bukan_Draw()
    {
        playerSkill = RuleManager.instance.PlayerList[deck.Count].RuleList[1].RuleEfect[0];

        Debug.Log(deck.Count + "のばん");
        switch (playerSkill)
        {
        //スキル無し
        case 0:
            Debug.Log("武官のスキルはなし");
            break;

        //全員から4枚もらえる
        case 1:

            int drawNum = 5 + draw.effect1Num;

            for (int i = deck.Count; i < 4 + deck.Count + 1; i++)
            {
                int k = i % 4;
                if (k != deck.Count)
                {
                    //N枚以上もってたら
                    if (MasterList.instance.list[k].Count > drawNum)
                    {
                        Debug.Log(i + "は" + MasterList.instance.list[k].Count);
                        for (int t = 0; t < 4; t++)
                        {
                            int y = MasterList.instance.list[k][0];      //k番目の人の一番上の札を格納
                            MasterList.instance.list[deck.Count].Add(y); //count番目の人がk番目の一番上のカードをもらう
                            MasterList.instance.list[k].RemoveAt(0);     //k番目の人の札の初期化
                            Debug.Log(i % 4 + "は" + t + "回");
                        }
                        Debug.Log(k + 1 + "番の人が" + (deck.Count + 1) + "番目の人に" + drawNum + "枚渡す");
                    }
                    //N枚以下なら
                    else
                    {
                        int w = MasterList.instance.list[k].Count;
                        for (int t = 0; t < w; t++)
                        {
                            int y = MasterList.instance.list[k][0];      //k番目の人の一番上の札を格納
                            MasterList.instance.list[deck.Count].Add(y); //count番目の人がk番目の一番上のカードをもらう
                            MasterList.instance.list[k].RemoveAt(0);     //k番目の人の札の初期化
                        }
                        Debug.Log(k + 1 + "番の人が" + (deck.Count + 1) + "番目の人に" + drawNum + "枚渡せないから全部渡す");
                    }
                }
            }
            cardAnime.animeFunctionNum = 5;
            cardAnime.AnimeSkillCutIn();
            //cardAnime.AnimeCardNMove();
            Debug.Log("武官のスキル1発動");
            break;

        //逆回転
        case 2:
            clockWise = !clockWise;
            cardAnime.animeFunctionNum = 6;
            cardAnime.AnimeSkillCutIn();
            Debug.Log("武官のスキル2発動");
            break;

        default:
            Debug.LogError("武官スキルの値がおかしいよ");
            break;
        }

        MasterList.instance.list[deck.Count].Add(deck.drawcard);//手札に追加
    }
コード例 #5
0
    private void TrueEffect()
    {
        //天皇を引く
        if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetSecondJob() == Card.SecondJob.Tennou &&
            (RuleManager.instance.PlayerList[deck.Count].RuleList[0].RuleEfect[0] == 1 ||
             RuleManager.instance.PlayerList[deck.Count].RuleList[0].RuleEfect[0] == 2))
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }
        //段付きを引く
        else if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetThirdJob() == Card.ThirdJob.Dantuki &&
                 (RuleManager.instance.PlayerList[deck.Count].RuleList[0].RuleEfect[0] == 3 ||
                  RuleManager.instance.PlayerList[deck.Count].RuleList[0].RuleEfect[0] == 4))
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }
        //武官を引くかつ武官スキルあり
        else if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetSecondJob() == Card.SecondJob.Bukan &&
                 (RuleManager.instance.PlayerList[deck.Count].RuleList[1].RuleEfect[0] == 1 ||
                  RuleManager.instance.PlayerList[deck.Count].RuleList[1].RuleEfect[0] == 2))
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //弓持ちを引く
        else if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetThirdJob() == Card.ThirdJob.Yumimoti &&
                 RuleManager.instance.PlayerList[deck.Count].RuleList[1].RuleEfect[0] == 3)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //蝉丸を引く
        else if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetSecondJob() == Card.SecondJob.Semimaru &&
                 RuleManager.instance.PlayerList[deck.Count].RuleList[2].RuleEfect[0] >= 1)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //自作ルール(天皇)
        else if (RuleCreate.instance.myRule[deck.Count] == true && RuleCreate.instance.cardType[deck.Count] == 1 &&
                 cardDataBase.YamahudaLists()[deck.drawcard - 1].GetSecondJob() == Card.SecondJob.Tennou)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //自作ルール(段付き)
        else if (RuleCreate.instance.myRule[deck.Count] == true && RuleCreate.instance.cardType[deck.Count] == 2 &&
                 cardDataBase.YamahudaLists()[deck.drawcard - 1].GetThirdJob() == Card.ThirdJob.Dantuki)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //自作ルール(武官)
        else if (RuleCreate.instance.myRule[deck.Count] == true && RuleCreate.instance.cardType[deck.Count] == 3 &&
                 cardDataBase.YamahudaLists()[deck.drawcard - 1].GetSecondJob() == Card.SecondJob.Bukan)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //自作ルール(弓持ち)
        else if (RuleCreate.instance.myRule[deck.Count] == true && RuleCreate.instance.cardType[deck.Count] == 4 &&
                 cardDataBase.YamahudaLists()[deck.drawcard - 1].GetThirdJob() == Card.ThirdJob.Yumimoti)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //自作ルール(偉い姫)
        else if (RuleCreate.instance.myRule[deck.Count] == true && RuleCreate.instance.cardType[deck.Count] == 5 &&
                 cardDataBase.YamahudaLists()[deck.drawcard - 1].GetOtherJob() == Card.OtherJob.GreatHime)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }

        //坊主を引く
        else if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetFirstJob() == Card.FirstJob.Bouzu)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }
        //姫を引く
        else if (cardDataBase.YamahudaLists()[deck.drawcard - 1].GetFirstJob() == Card.FirstJob.Hime)
        {
            ruleBreak = false;
            NoneEffect();
            cardAnime.animeFunctionNum = 19;
            cardAnime.AnimeSkillCutIn();
        }
        else
        {
            NormalDraw.instance.Tono_Draw();
        }
    }
コード例 #6
0
    //段付きカードを引いた
    public void Dantuki_Draw()
    {
        playerSkill = RuleManager.instance.PlayerList[deck.Count].RuleList[0].RuleEfect[0];

        Debug.Log(deck.Count + "のばん");
        switch (playerSkill)
        {
        //スキル無し
        case 0:
            //draw.ImageChangeTono();
            Debug.Log("段付きのスキルは無し");
            break;

        case 3:
            //全員から5枚もらえる

            int drawNum = 5 + draw.effect1Num;

            for (int i = 0; i < 4; i++)
            {
                if (i != deck.Count)
                {
                    //5枚以上持っていたら
                    if (MasterList.instance.list[i].Count > drawNum)
                    {
                        Debug.Log(i + 1 + "番の人が" + (deck.Count + 1) + "番目の人に" + drawNum + "枚渡す");
                        for (int t = 0; t < 5; t++)
                        {
                            int y = MasterList.instance.list[i][0];      //i番目の人の一番上の札を格納
                            MasterList.instance.list[deck.Count].Add(y); //count番目の人がi番目の一番上のカードをもらう
                            MasterList.instance.list[i].RemoveAt(0);     //i番目の人の札の初期化
                        }
                        //hand.handCount[deck.Count] += 5;
                        //hand.handCount[i] -= 5;
                    }
                    else
                    {
                        Debug.Log(i + 1 + "番の人が" + (deck.Count + 1) + "番目の人に持っている枚数渡す");
                        int p = MasterList.instance.list[i].Count;
                        for (int t = 0; t < p; t++)
                        {
                            int y = MasterList.instance.list[i][0];      //i番目の人の一番上の札を格納
                            MasterList.instance.list[deck.Count].Add(y); //count番目の人がi番目の一番上のカードをもらう
                            MasterList.instance.list[i].RemoveAt(0);     //i番目の人の札の初期化
                        }
                        //hand.handCount[deck.Count] += hand.handCount[i];
                        //hand.handCount[i] = 0;
                    }
                }
            }
            cardAnime.animeFunctionNum = 3;
            cardAnime.AnimeSkillCutIn();
            //cardAnime.AnimeCardNMove();
            break;

        case 4:
            //他のプレイヤーすべての手札を自分の手札に加える
            for (int i = 0; i < 4; i++)
            {
                //全員の札をもらう
                if (i != deck.Count)
                {
                    Debug.Log(i + 1 + "番の人が" + (deck.Count + 1) + "番目の人に全部渡す");
                    int l = MasterList.instance.list[i].Count;
                    for (int t = 0; t < l; t++)
                    {
                        int y = MasterList.instance.list[i][0];      //i番目の人の一番上の札を格納
                        MasterList.instance.list[deck.Count].Add(y); //count番目の人がi番目の一番上のカードをもらう
                        MasterList.instance.list[i].RemoveAt(0);     //i番目の人の札の初期化
                    }
                    //hand.handCount[deck.Count] += hand.handCount[i];
                    //hand.handCount[i] = 0;
                }
            }
            cardAnime.animeFunctionNum = 4;
            cardAnime.AnimeSkillCutIn();
            //cardAnime.AnimeHandCardGet();
            Debug.Log("段付きのスキル2発動");
            break;

        default:
            Debug.LogError("段付きスキルの値がおかしいよ");
            break;
        }

        MasterList.instance.list[deck.Count].Add(deck.drawcard);//手札に追加
    }
コード例 #7
0
    private void CardEffectCheck()
    {
        MasterList.instance.list[deck.Count].Add(deck.drawcard);//手札に追加
        switch (RuleCreate.instance.cardEffect[count])
        {
        case 1:
            //カードをもらう
            moveNCards = RuleCreate.instance.cardNum[count];
            somePlayer = RuleCreate.instance.playerNum[count];
            SomeoneToMe();
            cardAnime.animeFunctionNum = 13;
            cardAnime.AnimeSkillCutIn();
            break;

        case 2:
            //カードを引く
            moveNCards = RuleCreate.instance.cardNum[count];
            somePlayer = RuleCreate.instance.playerNum[count];
            DrawnNCards();
            cardAnime.animeFunctionNum = 14;
            cardAnime.AnimeSkillCutIn();
            break;

        case 3:
            //場に置く
            moveNCards = RuleCreate.instance.cardNum[count];
            somePlayer = RuleCreate.instance.playerNum[count];
            DisNCard();
            cardAnime.animeFunctionNum = 15;
            cardAnime.AnimeSkillCutIn();
            break;

        case 4:
            //一回休み
            if (RuleCreate.instance.playerNum[count] == 1)
            {
                if (BukanDraw.instance.clockWise == true)
                {
                    int i = count + 1;
                    i %= 4;
                    draw.playerBreak[i]       = true;
                    draw.playerSkip[i].sprite = Resources.Load <Sprite>("Images/Skip");
                }
                else
                {
                    int i = count - 1;
                    if (i < 0)
                    {
                        i = 3;
                    }
                    draw.playerBreak[i]       = true;
                    draw.playerSkip[i].sprite = Resources.Load <Sprite>("Images/Skip");
                }
            }
            else
            {
                if (BukanDraw.instance.clockWise == true)
                {
                    int i = count + 1;
                    i %= 4;
                    draw.playerBreak[i]       = true;
                    draw.playerSkip[i].sprite = Resources.Load <Sprite>("Images/Skip");
                    i++;
                    i %= 4;
                    draw.playerBreak[i]       = true;
                    draw.playerSkip[i].sprite = Resources.Load <Sprite>("Images/Skip");
                }
                else
                {
                    int i = count - 1;
                    if (i < 0)
                    {
                        i = 3;
                    }
                    draw.playerBreak[i]       = true;
                    draw.playerSkip[i].sprite = Resources.Load <Sprite>("Images/Skip");
                    i--;
                    if (i < 0)
                    {
                        i = 3;
                    }
                    draw.playerBreak[i]       = true;
                    draw.playerSkip[i].sprite = Resources.Load <Sprite>("Images/Skip");
                }
            }

            cardAnime.animeFunctionNum = 16;
            cardAnime.AnimeSkillCutIn();
            break;

        case 5:
            //逆回り
            BukanDraw.instance.clockWise = !BukanDraw.instance.clockWise;
            cardAnime.animeFunctionNum   = 17;
            cardAnime.AnimeSkillCutIn();
            break;

        case 6:
            //効果無効
            draw.ruleBreak             = true;
            cardAnime.animeFunctionNum = 18;
            cardAnime.AnimeSkillCutIn();
            break;
        }
    }