Пример #1
0
    public override void Attack(BattleCaracter caracter)
    {
        Defenced = false;
        BattlePlayer player = (BattlePlayer)caracter;

        switch (BattleOnly.GetRandomIndex(5, 3, 2, 1))
        {
        case 0:
            if (mp > 10)
            {
                actionlog = name + "はめらぞーまをとなえた\n" + player.Damege(power * 3);
                mp       -= 10;
            }
            else
            {
                actionlog = name + "はめらぞーまをとなえた\nしかしMPが足りない!";
            }
            break;

        case 1:
            actionlog = name + "は杖でたたいてきた!\n" + player.Damege(power);
            break;

        case 2:
            Defence();
            actionlog = name + "は防御を固めた!" + actionlog;
            break;

        case 3:
            actionlog = name + "はイオナズンをとなえた!\nしかしMPがたりない!";
            break;
        }
        currentturn++;
    }
Пример #2
0
    public override void Attack(BattleCaracter caracter)
    {
        Defenced = false;
        BattlePlayer player = (BattlePlayer)caracter;

        switch (BattleOnly.GetRandomIndex(3, 2, 2, 2))
        {
        case 0:
            actionlog = name + "は杖でたたいてきた!\n" + player.Damege(power);
            break;

        case 1:
            Defence();
            actionlog = name + "は防御を固めた!" + actionlog;
            break;

        case 2:
            if (mp > 10)
            {
                actionlog = name + "は天地魔闘の構えをとった\n" + player.Foolish();
                mp       -= 10;
            }
            else
            {
                actionlog = name + "は天地魔闘の構えをとった\nしかし何も起こらなかった!";
            }
            break;

        case 3:
            Enemy enemy = enemylist[(int)UnityEngine.Random.Range(0, enemylist.Count - 1)];
            if (mp > 10)
            {
                actionlog = name + "は" + enemy.GetName() + "の問題を強化した\n" + enemy.PowerUp(power);
                mp       -= 10;
            }
            else
            {
                actionlog = name + "は" + enemy.GetName() + "を強化させようとした!\nしかしMPが足りない!";
            }

            break;
        }
    }
Пример #3
0
    public override void Attack(BattleCaracter caracter)
    {
        Defenced = false;
        BattlePlayer player = (BattlePlayer)caracter;

        switch (BattleOnly.GetRandomIndex(8, 1))
        {
        case 0:
            actionlog = name + "のこうげき\n" + player.Damege(power);
            break;

        case 1:
            Defence();
            actionlog = name + "は防御を固めた!\n" + actionlog;
            break;
        }

        currentturn++;
    }
    private void BattleStart(BattlePlayer player)
    {
        Battlecount++;
        this.player   = player;
        this.OnBattle = true;/*foreach (string str in enemylistname)
                              * {
                              * enemylist.Add(new Enemy(
                              * (int)UnityEngine.Random.Range(player.HpGetter()*0.2f, player.HpGetter() * 0.6f),
                              * (int)UnityEngine.Random.Range(player.IntGetter() * 0.4f, player.IntGetter() * 0.8f),
                              * str
                              * ));
                              * }*/
        if (Battlecount > 6)
        {
            enemylist.Add(new Boss(10000, 200, "Type Boss", enemylist));
        }
        else
        {
            int enemynumber = BattleOnly.GetRandomIndex(0, 1, 2, 4, 4, 2);
            for (int i = 0; i < enemynumber; i++)
            {
                enemylist.Add(BattleOnly.MakeEnemy(enemylist, player));
            }
        }
        hptext.GetComponent <Text>().text  = player.HpGetter().ToString();
        inttext.GetComponent <Text>().text = player.IntGetter().ToString();
        string enemys = "";

        for (int j = 0; j < enemylist.Count; j++)
        {
            if (j > 0)
            {
                enemys += ",";
            }
            enemys += enemylist[j].GetName();;
        }
        enemys += "が現れた。";
        Display(enemys);
    }
Пример #5
0
    public override void Attack(BattleCaracter caracter)
    {
        Defenced = false;
        BattlePlayer player = (BattlePlayer)caracter;

        switch (BattleOnly.GetRandomIndex(5, 2, 1, 4, 2, 2, 1))
        {
        case 0:
            actionlog = name + "の強烈な一撃!\n" + player.Damege((int)UnityEngine.Random.Range(power * 0.8f, power * 1.2f));
            break;

        case 1:
            Defence();
            actionlog = name + "は防御を固めた!" + actionlog;
            break;

        case 2:
            actionlog = name + "は天地魔闘の構えをとった\n" + player.Foolish();
            break;

        case 3:
            actionlog = name + "はめらぞーまをとなえた\n" + player.Damege(power * 3);
            break;

        case 4:
            actionlog = name + "は自分自身を強化した\n" + this.PowerUp(power);
            break;

        case 5:
            actionlog = name + "は自分を回復させた\n" + this.Recovery(power * 4);
            break;

        case 6:
            actionlog = name + "は仲間を呼んだ\n" + CreateEnemy(player);
            break;
        }
    }
Пример #6
0
    public override void Attack(BattleCaracter caracter)
    {
        Defenced = false;
        BattlePlayer player = (BattlePlayer)caracter;

        switch (BattleOnly.GetRandomIndex(4, 4, 2, 1))
        {
        case 0:
            Enemy enemy = enemylist[(int)UnityEngine.Random.Range(0, enemylist.Count - 1)];
            if (mp > 10)
            {
                actionlog = name + "は" + enemy.GetName() + "の問題を追加した\n" + enemy.Recovery(power * 4);
                mp       -= 10;
            }
            else
            {
                actionlog = name + "は" + enemy.GetName() + "を回復させようとした!\nしかしMPが足りない!";
            }

            break;

        case 1:
            actionlog = name + "は杖でたたいてきた!\n" + player.Damege(power);
            break;

        case 2:
            Defence();
            actionlog = name + "は防御を固めた!" + actionlog;
            break;

        case 3:
            actionlog = name + "はザオリクをとなえた!\nしかしMPがたりない!";
            break;
        }
        currentturn++;
    }
Пример #7
0
    public static Enemy MakeEnemy(List <Enemy> enemylist, BattlePlayer player)
    {
        int   EnemyType = BattleOnly.GetRandomIndex(8, 1, 1, 1);
        Enemy enemy     = null;

        switch (EnemyType)
        {
        case 0:
            enemy = new Enemy(
                (int)UnityEngine.Random.Range(player.IntGetter() * 4.0f, player.IntGetter() * 6.0f),
                (int)UnityEngine.Random.Range(player.IntGetter() * 0.4f, player.IntGetter() * 0.8f),
                "UNKNOWN TYPE M"
                );
            break;

        case 1:
            enemy = new Professor(
                (int)UnityEngine.Random.Range(player.IntGetter() * 4.0f, player.IntGetter() * 7.0f),
                (int)UnityEngine.Random.Range(player.IntGetter() * 0.2f, player.IntGetter() * 0.5f),
                "UNKNOWN TYPE P",
                (int)UnityEngine.Random.Range(player.IntGetter() * 4.0f, player.IntGetter() * 6.0f),
                enemylist
                );
            break;

        case 2:
            enemy = new Wizard(
                (int)UnityEngine.Random.Range(player.IntGetter() * 4.0f, player.IntGetter() * 7.0f),
                (int)UnityEngine.Random.Range(player.IntGetter() * 0.2f, player.IntGetter() * 0.5f),
                "UNKNOWN TYPE W",
                (int)UnityEngine.Random.Range(player.IntGetter() * 5.0f, player.IntGetter() * 7.0f)
                );
            break;

        case 3:
            enemy = new Supporter(
                (int)UnityEngine.Random.Range(player.IntGetter() * 3.0f, player.IntGetter() * 5.0f),
                (int)UnityEngine.Random.Range(player.IntGetter() * 0.2f, player.IntGetter() * 0.5f),
                "UNKNOWN TYPE S",
                (int)UnityEngine.Random.Range(player.IntGetter() * 4.0f, player.IntGetter() * 6.0f),
                enemylist
                );
            break;
        }
        string name = enemy.GetName();
        int    i    = 0;
        int    j    = 2;

        foreach (Enemy previousEnemy in enemylist)
        {
            if (previousEnemy.GetName().StartsWith(name))
            {
                if (previousEnemy.GetName().Equals(name))
                {
                    enemylist[i].SetName(name + "その1");
                    enemy.SetName(name + "その2");
                }
                else
                {
                    enemy.SetName(name + "その" + j);
                    j++;
                }
            }
            i++;
        }
        return(enemy);
    }