龙的传人代码(6)(已完结)


        } else if (ins1 == "call") {
            if (IDEN == "wizard-3" || IDEN == "wizard-4" || IDEN == "wizard-5") {
                string who;
                int value;
                string setwhat;
                cin >> who >> setwhat >> value;
                if (myEnglishname == who) {
                    if (setwhat == "sethealth") {
                        health = value;
                        if (health > maxhealth) {
                            maxhealth = health;
                        }
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else if (setwhat == "setdamage") {
                        damage = value;
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else if (setwhat == "setforce") {
                        force = value;
                        if (force > maxforce) {
                            maxforce = force;
                        }
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else if (setwhat == "setdefense") {
                        defense = value;
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else if (setwhat == "setdodge") {
                        dodge = value;
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else if (setwhat == "sethit") {
                        hit = value;
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else if (setwhat == "setpotential") {
                        potential = value;
                        color(4);
                        cout << "设置成功" << endl;
                        color(16);
                    } else {
                        cout << "输入错误";
                    }
                } else {
                    bool isfind = false;
                    for (int i = 0; i < 100; i++) {
                        if (inroom.people[i].name == who) {
                            isfind = true;
                            if (setwhat == "sethealth") {
                                inroom.people[i].health = value;
                                room[nowroomi].people[i].health = value;
                                if (inroom.people[i].health > inroom.people[i].maxhealth) {
                                    inroom.people[i].maxhealth = inroom.people[i].health;
                                    room[nowroomi].people[i].maxhealth = room[nowroomi].people[i].health;
                                }
                                color(4);
                                cout << "设置成功" << endl;
                                color(16);
                            } else if (setwhat == "setdamage") {
                                inroom.people[i].damage = value;
                                room[nowroomi].people[i].damage = value;
                                color(4);
                                cout << "设置成功" << endl;
                                color(16);
                            } else if (setwhat == "setforce") {
                                inroom.people[i].force = value;
                                room[nowroomi].people[i].force = value;
                                if (inroom.people[i].force > inroom.people[i].maxforce) {
                                    inroom.people[i].maxforce = inroom.people[i].force;
                                    room[nowroomi].people[i].force = room[nowroomi].people[i].force;
                                }
                                color(4);
                                cout << "设置成功" << endl;
                                color(16);
                            } else if (setwhat == "setdefense") {
                                inroom.people[i].defense = value;
                                room[nowroomi].people[i].defense = value;
                                color(4);
                                cout << "设置成功" << endl;
                                color(16);
                            } else if (setwhat == "setdodge") {
                                inroom.people[i].dodge = value;
                                room[nowroomi].people[i].dodge = value;
                                color(4);
                                cout << "设置成功" << endl;
                                color(16);
                            } else if (setwhat == "sethit") {
                                inroom.people[i].hit = value;
                                room[nowroomi].people[i].hit = value;
                                color(4);
                                cout << "设置成功" << endl;
                                color(16);
                            } else {
                                cout << "输入错误";
                            }
                            break;
                        }
                    }
                    if (!isfind) {
                        cout << "你要设谁?" << endl;
                    }
                }
            } else {
                cout << "什么?" << endl;
            }
        } else if (ins1 == "clone") {
            if (IDEN == "wizard-2" || IDEN == "wizard-3" || IDEN == "wizard-4"
                || IDEN == "wizard-5") {
                string what;
                cin >> what;
                bool isfind = false;
                for (int i = 0; i < 100; i++) {
                    if (inroom.weapon[i].Englishname == what) {
                        isfind = true;
                        for (int j = 0; j < 100; j++) {
                            if (inroom.weapon[j].name == "") {
                                inroom.weapon[j] = inroom.weapon[i];
                                room[nowroomi].weapon[j] = inroom.weapon[i];
                                color(6);
                                cout << inroom.weapon[j].name << "克隆成功!" << endl;
                                color(16);
                                break;
                            }
                        }
                        break;
                    }
                }
                if (!isfind) {
                    for (int i = 0; i < 100; i++) {
                        if (inroom.thing[i].Englishname == what) {
                            isfind = true;
                            for (int j = 0; j < 100; j++) {
                                if (inroom.thing[j].name == "") {
                                    inroom.thing[j] = inroom.thing[i];
                                    room[nowroomi].thing[j] = inroom.thing[i];
                                    color(6);
                                    cout << inroom.thing[j].name << "克隆成功!" << endl;
                                    color(16);
                                    break;
                                }
                            }
                            break;
                        }
                    }
                }
                if (!isfind) {
                    for (int i = 0; i < 100; i++) {
                        if (inroom.book[i].Englishname == what) {
                            isfind = true;
                            for (int j = 0; j < 100; j++) {
                                if (inroom.book[j].name == "") {
                                    inroom.book[j] = inroom.book[i];
                                    room[nowroomi].book[j] = inroom.book[i];
                                    color(6);
                                    cout << inroom.book[j].name << "克隆成功!" << endl;
                                    color(16);
                                    break;
                                }
                            }
                            break;
                        }
                    }
                }
                if (!isfind) {
                    for (int i = 0; i < 100; i++) {
                        if (inroom.people[i].Englishname == what) {
                            isfind = true;
                            for (int j = 0; j < 100; j++) {
                                if (inroom.people[j].name == "") {
                                    inroom.people[j] = inroom.people[i];
                                    room[nowroomi].people[j] = inroom.people[i];
                                    color(6);
                                    cout << inroom.people[j].name << "克隆成功!" << endl;
                                    color(16);
                                    break;
                                }
                            }
                            break;
                        }
                    }
                }
                if (!isfind) {
                    cout << "没有这样东西" << endl;
                }
            } else {
                cout << "什么?" << endl;
            }
        } else if (ins1 == "throw") {
            string thing;
            cin >> thing;
            string who;
            cin >> who >> who;
            bool isthing = false, ispeople = false;
            for (int i = 0; i < 100; i++) {
                if (bag3[i].Englishname == thing) {
                    isthing = true;
                    for (int j = 0; j < 100; j++) {
                        if (inroom.people[j].Englishname == who) {
                            ispeople = true;
                            if (rand() % 10000 >= inroom.people[j].dodge - hit) {
                                cout << "你的" << bag3[i].name << "正中" << inroom.people[j].name << "的头!" <<
                                    endl;
                                inroom.people[j].health -= rand() % 1000 + 200;
                                room[nowroomi].people[j].health = inroom.people[j].health;
                                if (inroom.people[j].health < 1) {
                                    cout << inroom.people[j].name << "大叫一声,倒在地上,死了" << endl;
                                    make_corpse(inroom.people[j], inroom.people[j].weapon);
                                } else {
                                    cout << inroom.people[j].name << "看起来想要杀了你!" << endl;
                                    x[0] = inroom.people[j];
                                    y[0] = j;
                                    killall(x, 1, y);
                                }
                            } else {
                                cout << "对方轻轻一跳,躲了过去" << endl;
                                cout << inroom.people[j].name << "看起来想要杀了你!" << endl;
                                x[0] = inroom.people[j];
                                y[0] = j;
                                killall(x, 1, y);
                            }
                            break;
                        }
                    }
                    break;
                }
            }
            if (!isthing) {
                cout << "没有这个东西" << endl;
            } else if (!ispeople) {
                cout << "没有这个人" << endl;
            }
        } else if (ins1 == "conjure") {
            string which;
            cin >> which;
            map<string, we>::iterator it = weap.find(which);
            if (it != weap.end()) {
                for (int i = 0; i < 100; i++) {
                    if (inroom.weapon[i].name == "") {
                        inroom.weapon[i] = it->second;
                        color(6);
                        cout << "只见" << myname << "挥手一指,凭空变出一个" << it->second.name << endl;
                        color(16);
                        break;
                    }
                }
            } else {
                cout << "没有这个武器" << endl;
            }
        } else if (ins1 == "enable") {
            string whichskill;
            cin >> whichskill;
            bool isfind = false;
            for (int i = 0; i < 100; i++) {
                if (myskill[i].Englishname == whichskill) {
                    isfind = true;
                    if (myskill[i].isattack == true) {
                        cout << "你要enable的技能不是轻功技能" << endl;
                    } else {
                        cout << "你打算使用" << myskill[i].name << "作为战斗时使用的轻功" << endl;
                        nowdodgeskill = myskill[i];
                    }
                }
            }
            if (!isfind) {
                cout << "没有这种技能" << endl;
            }
        } else if (ins1 == "score") {
            if (IDEN == "wizard-2" || IDEN == "wizard-3" || IDEN == "wizard-4"
                || IDEN == "wizard-5") {
                string who;
                cin >> who;
                bool isfind = false;
                for (int i = 0; i < 100; i++) {
                    if (inroom.people[i].Englishname == who) {
                        isfind = true;
                        cout << "攻击:";
                        color(4);
                        cout << inroom.people[i].damage << endl;
                        color(16);
                        cout << "防御:";
                        color(14);
                        cout << inroom.people[i].defense << endl;
                        color(16);
                        cout << "生命:";
                        if (inroom.people[i].health > inroom.people[i].maxhealth / 6 * 5) color(10);
                        else if (inroom.people[i].health > inroom.people[i].maxhealth / 6 * 4) color(
                            14);
                        else if (inroom.people[i].health > inroom.people[i].maxhealth / 6 * 3) color(
                            14);
                        else if (inroom.people[i].health > inroom.people[i].maxhealth / 6 * 2) color(
                            12);
                        else if (inroom.people[i].health > inroom.people[i].maxhealth / 6) color(12);
                        else color(4);
                        cout << inroom.people[i].health;
                        color(16);
                        cout << "/";
                        color(10);
                        cout << inroom.people[i].maxhealth << endl;
                        color(16);
                        cout << "内功:";
                        if (inroom.people[i].force > inroom.people[i].maxforce / 6 * 5) color(10);
                        else if (inroom.people[i].force > inroom.people[i].maxforce / 6 * 4) color(14);
                        else if (inroom.people[i].force > inroom.people[i].maxforce / 6 * 3) color(14);
                        else if (inroom.people[i].force > inroom.people[i].maxforce / 6 * 2) color(12);
                        else if (inroom.people[i].force > inroom.people[i].maxforce / 6) color(12);
                        else color(4);
                        cout << inroom.people[i].force;
                        color(16);
                        cout << "/";
                        color(10);
                        cout << inroom.people[i].maxforce << endl;
                        color(16);
                        cout << "命中:";
                        cout << inroom.people[i].hit << endl;
                        color(16);
                        cout << "躲避:";
                        color(10);
                        cout << inroom.people[i].dodge << endl;
                        color(16);
                        break;
                    }
                }
                if (!isfind) {
                    cout << "没有这个人" << endl;
                }
            }
        } else if (ins1 == "menpai") {
            color(4);
            cout << "正派";
            color(16);
            cout << ":";
            color(8);
            cout << "武当,丐帮,少林" << endl;
            color(1);
            cout << "中立";
            color(16);
            cout << ":";
            color(8);
            cout << "道家,铸剑山庄,空桑派,小学生帮,初中会,大学派" << endl;
            color(5);
            cout << "邪教";
            color(16);
            cout << ":";
            color(8);
            cout << "古墓,灵鹫宫,神龙教" << endl;
            color(11);
            cout << "要拜师,请输入:bai<门派中文名>" << endl;
            color(16);
        } else if (ins1 == "bai") {
            string men;
            cin >> men;
            if (men != "武当" && men != "丐帮" && men != "少林" && men != "道家"
                && men != "铸剑山庄" && men != "空桑派" && men != "古墓" && men != "灵鹫宫"
                && men != "神龙教") {
                cout << "没有这个门派" << endl << endl;
                color(4);
                cout << "正派";
                color(16);
                cout << ":";
                color(8);
                cout << "武当,丐帮,少林" << endl << endl;
                color(1);
                cout << "中立";
                color(16);
                cout << ":";
                color(8);
                cout << "道家,铸剑山庄,空桑派" << endl << endl;
                color(5);
                cout << "邪教";
                color(16);
                cout << ":";
                color(8);
                cout << "古墓,灵鹫宫,神龙教" << endl;
            } else if (!baishi) {
                cout << men << ":嗯,欢迎你加入。" << endl;
                cout << "你成功拜入" << men << endl;
                mymenpai = men;
                if (mymenpai == "武当") {
                    inroom = room[26];
                    nowroomi = 26;
                    outroom();
                }
                if (mymenpai == "丐帮") {
                    inroom = room[27];
                    nowroomi = 27;
                    outroom();
                }
                if (mymenpai == "铸剑山庄") {
                    inroom = room[41];
                    nowroomi = 41;
                    outroom();
                }
                if (mymenpai == "道家") {
                    inroom = room[43];
                    nowroomi = 43;
                    outroom();
                }
                baishi = true;
            } else {
                cout << "你已经是" << mymenpai << "的学生了" << endl;
            }
        } else if (ins1 == "dazuo") {
            int time;
            cin >> time;
            color(8);
            cout << "你盘腿坐下,静下心来,开始打坐..." << endl;
            color(16);
            for (int i = 0; i < time; i++) {
                Sleep(3000);
                if (force < maxforce) {
                    if (force + 100 > maxforce) {
                        cout << "你的内力补充了";
                        color(10);
                        cout << maxforce - force;
                        color(16);
                        cout << "点" << endl;
                        force = maxforce;
                        color(1);
                        cout << "内力补充完毕" << endl;
                        color(16);
                    } else {
                        cout << "你的内力补充了";
                        color(10);
                        cout << "100";
                        color(16);
                        cout << "点" << endl;
                        force += 100;
                    }
                } else {
                    cout << "你的最大内力提升了";
                    color(6);
                    cout << "10";
                    color(16);
                    cout << "点" << endl;
                    cout << "你的内力提升了";
                    color(6);
                    cout << "10";
                    color(16);
                    cout << "点" << endl;
                    maxforce += 10;
                    force += 10;
                }
            }
            color(8);
            cout << "你站了起来,准备去别的地方。" << endl;
            color(16);
        } else if (ins1 == "liaoshang") {
            color(8);
            cout << "你盘腿坐下,开始医疗伤口..." << endl;
            color(16);
            while (1) {
                Sleep(3000);
                if (health + 100 > maxhealth) {
                    cout << "你的气血恢复了";
                    color(10);
                    cout << maxhealth - health;
                    color(16);
                    cout << "点" << endl;
                    health = maxhealth;
                    color(1);
                    cout << "气血恢复完毕" << endl;
                    color(16);
                    break;
                } else {
                    cout << "你的气血恢复了";
                    color(10);
                    cout << "100";
                    color(16);
                    cout << "点" << endl;
                    health += 100;
                }
            }
            color(8);
            cout << "你站了起来,准备去别的地方。" << endl;
            color(16);
        } else if (ins1 == "home") {
            int a;
            cin >> a;
            if (((((a % 2) * 3) / 2) * 9816) % 102 == 0) {
                inroom = room[39];
                nowroomi = 39;
                outroom();
            }
        } else if (ins1 == "mine") {
            if (inroom.name == "矿洞") {
                int time;
                cin >> time;
                color(8);
                cout << "你拿起矿镐,走进矿洞深处,开始挖矿..." << endl;
                color(16);
                for (int i = 0; i < time; i++) {
                    Sleep(10000);
                    int ran = rand() % 44 + 1;
                    switch (ran) {
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                            cout << "你挖到了煤矿...";
                            minebag[1].coin++;
                            break;
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                            cout << "你挖到了铜矿...";
                            minebag[4].coin++;
                            break;
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                            cout << "你挖到了铁矿...";
                            minebag[0].coin++;
                            break;
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                            cout << "你挖到了金矿...";
                            minebag[2].coin++;
                            break;
                        case 29:
                        case 30:
                        case 31:
                            cout << "你挖到了黑曜石...";
                            minebag[5].coin++;
                            break;
                        case 32:
                        case 33:
                        case 34:
                        case 35:
                            cout << "你挖到了精铁矿...";
                            minebag[6].coin++;
                            break;
                        case 36:
                            cout << "你挖到了钻石...";
                            minebag[7].coin++;
                            break;
                        case 37:
                        case 38:
                        case 39:
                        case 40:
                            cout << "你挖到了银矿...";
                            minebag[8].coin++;
                            break;
                        case 41:
                        case 42:
                        case 43:
                            cout << "你挖到了钢矿...";
                            minebag[3].coin++;
                            break;
                        case 44:
                            cout << "你挖到了钛矿...";
                            minebag[9].coin++;
                            break;
                        default:
                            break;
                    }
                    cout << endl;
                    ran = rand() % 5 + 5;
                    cout << "增加" << ran << "点潜能," << ran / 2 << "点经验!!!" << endl;
                    potential += ran;
                    experience += ran / 2;
                }
                color(8);
                cout << "你挖完了矿,准备去别的地方。" << endl;
                color(16);
            } else {
                cout << "什么?" << endl;
            }
        } else if (ins1 == "minebag") {
            cout << "你有以下矿石:" << endl;
            for (int i = 0; i < 13; i++) {
                cout << minebag[i].name;
                for (int j = 0; j < 20 - minebag[i].name.size(); j++) {
                    cout << " ";
                }
                cout << minebag[i].coin << "个" << endl;
            }
        } else if (ins1 == "blend") {
            string a, b;
            cin >> a >> b;
            for (int i = 0; i < 20; i++) {
                if (a == minebag[i].Englishname) {

                }
            }
        } else if (ins1 == "makesword") {
            if (mymenpai == "铸剑山庄") {
                cout << "[1级]弱铁剑 [2级]铁剑 [3级]精铁剑 [4级]钢剑 [5级]强之剑 [6级]精之剑 [7级]钻之剑 [8级]昂之剑 [9级]神之剑 [10级]倚天剑"
                    << endl;
                cout << "造剑等级:" << buildlevel << endl;
                cout << "你要造几级剑:" << endl;
                int level;
                cin >> level;
                if (level > buildlevel) {
                    color(12);
                    cout << "你的造剑等级不足!" << endl;
                    color(16);
                } else {
                    switch (level) {
                        case 1:
                            if (minebag[0].coin < 10 || minebag[1].coin < 10 || minebag[4].coin < 10) {
                                cout << "造弱铁剑需要10x铁,10x煤,还有10x铜" << endl;
                            } else {
                                cout << "制造成功,使用了10x铁,10x煤,还有10x铜" << endl;
                                buildexp += 75;
                                cout << "你的造剑经验增加了";
                                color(4);
                                cout << "75" << endl;
                                color(16);
                                minebag[0].coin -= 10;
                                minebag[1].coin -= 10;
                                minebag[4].coin -= 10;
                                for (int i = 0; i < 100; i++) {
                                    if (bag[i].name == "") {
                                        bag[i] = { "弱铁剑","weakiron_sword","剑","用铁铸成的剑,比铁剑稍微弱一点",30,30,0,0,0,-5,5 };
                                        break;
                                    }
                                }
                            }
                            if (buildexp > buildlevel * 500 + 1000) {
                                cout << "你的";
                                color(4);
                                cout << "造剑技能";
                                color(16);
                                cout << "等级提升了" << endl;
                                buildlevel++;
                                buildexp = 0;
                            }
                            break;
                        case 2:
                            if (minebag[0].coin < 20 || minebag[1].coin < 20 || minebag[4].coin < 15
                                || minebag[2].coin < 10) {
                                cout << "造铁剑需要20x铁,20x煤,15x铜,还有10x金" << endl;
                            } else {
                                cout << "制造成功,使用了20x铁,20x煤,15x铜,还有10x金" << endl;
                                minebag[0].coin -= 20;
                                minebag[1].coin -= 20;
                                minebag[4].coin -= 15;
                                minebag[2].coin -= 10;
                                buildexp += 150;
                                cout << "你的造剑经验增加了";
                                color(4);
                                cout << "150" << endl;
                                color(16);
                                for (int i = 0; i < 100; i++) {
                                    if (bag[i].name == "") {
                                        bag[i] = { "铁剑","iron_sword","剑","用铁铸成的剑",50,50,0,0,0,-6,8 };
                                        break;
                                    }
                                }
                            }
                            if (buildexp > buildlevel * 500 + 1000) {
                                cout << "你的";
                                color(4);
                                cout << "造剑技能";
                                color(16);
                                cout << "等级提升了" << endl;
                                buildlevel++;
                                buildexp = 0;
                            }
                            break;
                        case 3:
                            if (minebag[0].coin < 35 || minebag[1].coin < 35 || minebag[4].coin < 25
                                || minebag[2].coin < 20) {
                                cout << "造精铁剑需要35x铁,35x煤,25x铜,还有20x金" << endl;
                            } else {
                                cout << "制造成功,使用了35x铁,35x煤,25x铜,还有20x金" << endl;
                                minebag[0].coin -= 35;
                                minebag[1].coin -= 35;
                                minebag[4].coin -= 25;
                                minebag[2].coin -= 20;
                                buildexp += 250;
                                cout << "你的造剑经验增加了";
                                color(4);
                                cout << "250" << endl;
                                color(16);
                                for (int i = 0; i < 100; i++) {
                                    if (bag[i].name == "") {
                                        bag[i] = { "精铁剑","iron_sword","剑","用精铁铸成的剑,很坚硬",100,100,0,0,0,-10,10 };
                                        break;
                                    }
                                }
                            }
                            if (buildexp > buildlevel * 500 + 1000) {
                                cout << "你的";
                                color(4);
                                cout << "造剑技能";
                                color(16);
                                cout << "等级提升了" << endl;
                                buildlevel++;
                                buildexp = 0;
                            }
                            break;
                    }
                }
            }
        } else if (ins1 == "baishi") {
            string name;
            cin >> name;
            for (int i = 0; i < 100; i++) {
                if (inroom.people[i].Englishname == name) {
                    if (inroom.people[i].canbai) {
                        cout << inroom.people[i].name << ":好,我就收你这个徒弟!" << endl;
                        cout << "你向" << inroom.people[i].name <<
                            "恭恭敬敬地磕了三下头,并喊出声来:师父,师父!" << endl;
                        myshifu = inroom.people[i].name;
                    } else {
                        cout << inroom.people[i].name << ":拜师?不敢当不敢当" << endl;
                    }
                    break;
                }
            }
        } else if (ins1 == "masterskill") {
            if (myshifu != "你还未拜师...") {
                for (int i = 0; i < 100; i++) {
                    if (inroom.people[i].name == myshifu) {
                        cout << inroom.people[i].name << "学会了以下技能:" << endl;
                        for (int j = 0; inroom.people[i].skills[j].name != ""; j++) {
                            cout << inroom.people[i].skills[j].name << "(";
                            color(3);
                            cout << inroom.people[i].skills[j].Englishname;
                            color(16);
                            cout << ")     ";
                            cout << inroom.people[i].skills[j].level;
                            if (inroom.people[i].skills[j].level < 100) {
                                color(2);
                                cout << "  初学乍练" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 200) {
                                color(2);
                                cout << "  略知一二" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 300) {
                                color(9);
                                cout << "  半生不熟" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 400) {
                                color(9);
                                cout << "  平淡无奇" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 500) {
                                color(9);
                                cout << "  心神领会" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 600) {
                                color(14);
                                cout << "  熟能生巧" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 700) {
                                color(14);
                                cout << "  高深莫测" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 800) {
                                color(14);
                                cout << "  出神入化" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 900) {
                                color(12);
                                cout << "  旷古绝伦" << endl;
                                color(16);
                            } else if (inroom.people[i].skills[j].level < 1000) {
                                color(12);
                                cout << "  绝世高深" << endl;
                                color(16);
                            } else {
                                color(12);
                                cout << "  返璞归真" << endl;
                                color(16);
                            }
                        }
                        break;
                    }
                }
            } else {
                cout << "你还未拜师..." << endl;
            }
        } else if (ins1 == "learn") {
            string ski;
            int num;
            cin >> ski >> num;
            if (myshifu == "你还未拜师...") {
                cout << myshifu << endl;
            } else {
                bool ishere = false;
                for (int i = 0; i < 100; i++) {
                    if (inroom.people[i].name == myshifu) {
                        ishere = true;
                        bool isskill = false;
                        for (int j = 0; inroom.people[i].skills[j].name != ""; j++) {
                            if (inroom.people[i].skills[j].Englishname == ski) {
                                isskill = true;
                                for (int k = 0; k < num; k++) {
                                    bool have = false;
                                    for (int l = 0; l < myskilli; l++) {
                                        if (inroom.people[i].skills[j].name == myskill[l].name) {
                                            if (potential >= myskill[l].level) {
                                                if (inroom.people[i].skills[j].level <= myskill[l].level) {
                                                    cout << "你这项技能等级已经不输你的师父了!!" << endl;
                                                } else {
                                                    potential -= myskill[l].level;
                                                    myskill[l].level++;
                                                    damage += myskill[l].plusattack;
                                                    dodge += myskill[l].plusdodge;
                                                    hit += myskill[l].plushit;
                                                    maxhealth += myskill[l].plushealth;
                                                    health += myskill[l].plushealth;
                                                    maxforce += myskill[l].plusforce;
                                                    force += myskill[l].plusforce;
                                                    cout << "你";
                                                    color(4);
                                                    cout << myskill[l].name;
                                                    color(16);
                                                    cout << "的等级提升了!" << endl;
                                                    allskilllevel++;
                                                    if (inroom.people[i].skills[j].name == "「反弹剑法」") {
                                                        reboundnum += 1;
                                                    }
                                                }
                                            } else {
                                                cout << "可能是缺乏实战经验,你实在理解不了" << inroom.people[i].name <<
                                                    "所讲的东西" << endl;
                                            }
                                            have = true;
                                            break;
                                        }
                                    }
                                    if (!have) {
                                        myskill[myskilli] = inroom.people[i].skills[j];
                                        myskill[myskilli].damage = damage * inroom.people[i].skills[j].timedamage;
                                        myskill[myskilli++].level = 1;
                                        if (inroom.people[i].skills[j].name == "「反弹剑法」") {
                                            isrebound = true;
                                            reboundnum = 10;
                                        }
                                        cout << "你";
                                        color(4);
                                        cout << inroom.people[i].skills[j].name;
                                        color(16);
                                        cout << "的等级提升了!" << endl;
                                        allskilllevel++;
                                    }
                                }
                                break;
                            }
                        }
                        if (!isskill) {
                            cout << "这项技能你可能要找别人学了..." << endl;
                        }
                        break;
                    }
                }
                if (!ishere) {
                    cout << "你的师父不在这啊..." << endl;
                }
            }
        } else if (ins1 == "introduction") {
            system("start https://paste.ubuntu.com/p/nDK6hkY4xJ/");
            cout << "开启副本攻略成功" << endl;
        } else if (ins1 == "uplv") {
            if (nowroomi == 3) {
                cout << "你恭恭敬敬地问武神:「贫僧武功境界如何?」" << endl;
                Sleep(1000);
                if (title == "普通百姓") {
                    cout << "武神说:「贫僧武功正式武士之境界。继续努力即可到达武师境界」" << endl;
                    title = "武士";
                    titlecolor = 10;
                } else if (title == "武士") {
                    if (allskilllevel >= 2000 && maxforce >= 2000) {
                        cout << "武神说:「贫僧武功正式武师之境界。继续努力即可到达宗师境界」" << endl;
                        title = "武师";
                        titlecolor = 9;
                    } else {
                        cout << "武神说:「要到达武师境界,需要所有技能的等级之和到达2000和最大内力到达2000」"
                            << endl;
                    }
                }
            } else {
                cout << "武神不在这" << endl;
            }
        } else if (ins1 == "wudaota") {
            cout << "进入武道塔成功!";
            inroom = room[44];
            nowroomi = 44;
            outroom();
        } else if (ins1 == "build") {
            bool ishave = false;
            for (int i = 0; i < 100; i++) {
                if (inroom.people[i].name == "师傅") {
                    ishave = true;
                }
            }
            if (ishave) {
                cout << "类型:剑,刀,鞭(注意:拂尘也算鞭),拳,棍" << endl;
                cout << "输入武器类型:";
                we makeweapon;
                cin >> makeweapon.type;
                cout << "起好名:断空剑,斩铁刀,随缘鞭,千年尘,凝碧刀,斩人无血,无双棍,阴阳棍,七煞刀,月无影,嗜血鞭"
                    << endl;
                cout << "输入武器名字:";
                cin >> makeweapon.name;
                cout << "输入武器英文名:";
                cin >> makeweapon.Englishname;
                makeweapon.tell = "这是" + myname + "的专属武器,名叫" + makeweapon.name + "。";
                makeweapon.plusdamage = 100;
                makeweapon.plusdefense = 50;
                makeweapon.plusdodge = 100;
                makeweapon.plusforce = 100;
                makeweapon.plushealth = 100;
                makeweapon.plushit = 100;
                makeweapon.lv = 4;
                makeweapon.inlaynum = 10;
                makeweapon.inlaything[0] = {};
                makeweapon.inlaything[1] = {};
                makeweapon.inlaything[2] = {};
                makeweapon.inlaything[3] = {};
                makeweapon.inlaything[4] = {};
                makeweapon.inlaything[5] = {};
                makeweapon.inlaything[6] = {};
                makeweapon.inlaything[7] = {};
                makeweapon.inlaything[8] = {};
                makeweapon.inlaything[9] = {};
                cout << "需要10*铁矿,10*煤,10*金矿,10*铜矿,10*钢矿,10*黑曜石去打造" <<
                    endl;
                if (minebag[0].coin < 10 || minebag[1].coin < 10 || minebag[2].coin < 10
                    || minebag[3].coin < 10 || minebag[4].coin < 10 || minebag[5].coin < 10) {
                    cout << "材料不足" << endl;
                } else {
                    cout << "制造成功" << endl;
                    minebag[0].coin -= 10;
                    minebag[1].coin -= 10;
                    minebag[2].coin -= 10;
                    minebag[3].coin -= 10;
                    minebag[4].coin -= 10;
                    minebag[5].coin -= 10;
                    for (int i = 0; i < 100; i++) {
                        if (bag[i].name == "") {
                            bag[i] = makeweapon;
                            break;
                        }
                    }
                }
            } else {
                cout << "这里没有可以帮你打造武器的人啊!" << endl;
            }
        } else if (ins1 == "refine") {
            bool ishave = false;
            for (int i = 0; i < 100; i++) {
                if (inroom.people[i].name == "师傅") {
                    ishave = true;
                }
            }
            if (ishave) {
                cout << "精炼需要3*黑曜石" << endl;
                if (minebag[5].coin >= 3) {
                    color(nweapon.lv);
                    cout << nweapon.name;
                    color(16);
                    cout << "精炼至";
                    for (int i = 0; i < 100; i++) {
                        if (bag[i].name == nweapon.name) {
                            if (bag[i].name[bag[i].name.size() - 2] == -95
                                && bag[i].name[bag[i].name.size() - 1] == -13) {
                                bag[i].name[bag[i].name.size() - 1] = -12;
                                nweapon.name[nweapon.name.size() - 1] = -12;
                            } else {
                                bag[i].name += "◇";
                                nweapon.name += "◇";
                            }
                            nweapon.plusdamage += 20;
                            nweapon.plusdefense += 10;
                            nweapon.plusdodge += 20;
                            nweapon.plusforce += 20;
                            nweapon.plushealth += 100;
                            nweapon.plushit += 20;
                            damage += 20;
                            defense += 10;
                            dodge += 20;
                            force += 20;
                            maxforce += 20;
                            health += 100;
                            maxhealth += 100;
                            hit += 20;
                            bag[i].plusdamage += 20;
                            bag[i].plusdefense += 10;
                            bag[i].plusdodge += 20;
                            bag[i].plusforce += 20;
                            bag[i].plushealth += 100;
                            bag[i].plushit += 20;
                            break;
                        }
                    }
                    color(nweapon.lv);
                    cout << nweapon.name << endl;
                    color(16);
                    bag[5].coin -= 3;
                } else {
                    color(4);
                    cout << "黑曜石不足!" << endl;
                    color(16);
                }
            } else {
                cout << "这里没有可以帮你精炼武器的人啊!" << endl;
            }
        } else if (ins1 == "inlay") {
            bool ishave = false;
            for (int i = 0; i < 100; i++) {
                if (inroom.people[i].name == "师傅") {
                    ishave = true;
                }
            }
            if (ishave) {
                int inlayplace;
                for (inlayplace = 0; inlayplace < nweapon.inlaynum; inlayplace++) {
                    if (nweapon.inlaything[inlayplace].name == "") {
                        break;
                    }
                }
                if (inlayplace == nweapon.inlaynum) {
                    color(6);
                    cout << "此武器已经没有可以镶嵌宝石的地方了" << endl;
                    color(16);
                } else {
                    cout << "请问你要镶嵌什么宝石在";
                    color(nweapon.lv);
                    cout << nweapon.name;
                    color(16);
                    cout << "上" << endl;
                    for (int i = 0; i < 100; i++) {
                        if (bag3[i].tell == "这是一个宝石") {
                            cout << bag3[i].name << "(" << bag3[i].Englishname << ")" << endl;
                        }
                    }
                    string name;
                    cin >> name;
                    ishave = false;
                    for (int i = 0; i < 100; i++) {
                        if (bag3[i].tell == "这是一个宝石" && bag3[i].Englishname == name) {
                            ishave = true;
                            nweapon.inlaything[inlayplace] = bag3[i];
                            nweapon.plusdamage += bag3[i].coin * 10;
                            nweapon.plusdefense += bag3[i].coin * 5;
                            nweapon.plusdodge += bag3[i].coin * 10;
                            nweapon.plusforce += bag3[i].coin * 10;
                            nweapon.plushealth += bag3[i].coin * 100;
                            nweapon.plushit += bag3[i].coin * 10;
                            damage += bag3[i].coin * 10;
                            defense += bag3[i].coin * 5;
                            dodge += bag3[i].coin * 10;
                            force += bag3[i].coin * 10;
                            maxforce += bag3[i].coin * 10;
                            health += bag3[i].coin * 100;
                            maxhealth += bag3[i].coin * 100;
                            hit += bag3[i].coin * 10;
                            for (int j = 0; j < 100; j++) {
                                if (bag[j].Englishname == nweapon.Englishname) {
                                    bag[j].inlaything[inlayplace] = bag3[i];
                                    bag[j].plusdamage += bag3[i].coin * 10;
                                    bag[j].plusdefense += bag3[i].coin * 5;
                                    bag[j].plusdodge += bag3[i].coin * 10;
                                    bag[j].plusforce += bag3[i].coin * 10;
                                    bag[j].plushealth += bag3[i].coin * 100;
                                    bag[j].plushit += bag3[i].coin * 10;
                                    break;
                                }
                            }
                            bag3[i] = {};
                            break;
                        }
                    }
                    if (!ishave) {
                        color(6);
                        cout << "没有这个宝石" << endl;
                        color(16);
                    } else {
                        color(4);
                        cout << "镶嵌成功" << endl;
                        color(16);
                    }
                }
            } else {
                cout << "这里没有可以帮强化武器的人啊!" << endl;
            }
        } else if (ins1 == "pray") {
            if (nowroomi == 0) {
                int ran = rand() % 10;
                if (ran == 0) {
                    color(4);
                    cout << "天上突然打下一道雷,正中";
                    color(11);
                    cout << myname << endl;
                    color(4);
                    cout << "你眼前一黑,晕了过去..." << endl;
                    color(16);
                    Sleep(10000);
                    color(6);
                    cout << "慢慢地,你有了知觉..." << endl;
                    color(16);
                } else if (ran == 9) {
                    color(6);
                    cout << "祈祷完了,你感觉自己全身闪着金光..." << endl;
                    color(8);
                    cout << "(金色传说!!!)" << endl;
                    color(16);
                } else {
                    color(8);
                    cout << "祈祷完了,你感觉什么都没发生..." << endl;
                    color(16);
                }
            } else {
                cout << "这里不是客栈..." << endl;
            }
        } else if (ins1 == "task") {
            string someone;
            cin >> someone;
            if (someone == "XiaoEr" && !ta[0] && nowroomi == 0) {
                if (task == "XiaoEr") {
                    for (int i = 0; i < 100; i++) {
                        if (bag3[i].name == "野狗的尸体") {
                            color(6);
                            cout << "店小二跟你说:大侠,多谢你的帮助" << endl;
                            cout << "店小二给你了100文钱" << endl;
                            ta[0] = true;
                            coin += 100;
                            color(16);
                            break;
                        }
                    }
                }
                if (!ta[0]) {
                    color(6);
                    cout << "店小二跟你说:大侠,您可以去杀些野狗,为民除害吗?" << endl;
                    color(16);
                    task = "XiaoEr";
                }
            }
            if (someone == "notice1" && !ta[1] && nowroomi == 46) {
                if (task == "notice1") {
                    if (!ta[1]) {
                        color(6);
                        cout << "你看了看告示,再次决定要去闯武道塔" << endl;
                        color(16);
                        task = "notice1";
                    } else {
                        color(6);
                        cout << "士兵:你去了武道塔,皇帝叫我赏你5银" << endl;
                        cout << "士兵给你了5银" << endl;
                        color(16);
                        coin += 500;
                    }
                } else if (!ta[1]) {
                    color(6);
                    cout << "你撕下了告示,准备去闯闯武道塔" << endl;
                    color(16);
                    task = "notice1";
                } else {
                    color(6);
                    cout << "士兵:你去了武道塔,皇帝叫我赏你1银" << endl;
                    cout << "士兵给你了100文钱" << endl;
                    color(16);
                    ta[1] = true;
                    coin += 100;
                }
            }
        } else if (ins1 == "gift") {
            if (nowroomi == 47) {
                if (gift[0] == false) {
                    cout << "你领取了登录礼包,获得了1银" << endl;
                    coin += 100;
                    gift[0] = true;
                }
                if (gift[1] == false) {
                    cout << "你领取了夏日礼包,获得了";
                    color(4);
                    cout << "钟馗道剑" << endl;
                    color(16);
                    color(4);
                    cout << "钟馗道剑" << endl;
                    color(16);
                    cout << "品质【";
                    color(4);
                    cout << "红";
                    color(16);
                    cout << "】" << endl;
                    cout << "镶嵌槽: ◇◇◇◇◇" << endl;
                    gift[1] = true;
                    for (int i = 0; i < 100; i++) {
                        if (bag[i].name == "") {
                            bag[i] = zhongkui;
                            break;
                        }
                    }
                }
            } else {
                cout << "什么?" << endl;
                cout << "如果你不知道指令,请输入 help 查询" << endl;
            }
        } else {
            cout << "什么?" << endl;
            cout << "如果你不知道指令,请输入 help 查询" << endl;
        }
        conversion();
        for (int i = 0; i < myskilli; i++) {
            if (myskill[i].name != "绝世武功") {
                myskill[i].damage = myskill[i].timedamage * damage;
            }
        }
    }
    return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值