简凡网

 找回密码
 立即注册
查看: 40|回复: 0

给选天赋的玩家一些东西,好好看看

[复制链接]
发表于 2024-9-9 20:20:04 | 显示全部楼层 |阅读模式
本帖最后由 风飞扬 于 2024-10-6 10:37 编辑

给选天赋的玩家一些东西,好好看看。


void born_player(object me)
{
        mixed files;
        int i;
        string special;
        string msg;

        msg = HIG "你与生俱来的技能有:" NOR;

        // 查看所有的特殊技能文件
        files = get_dir("/kungfu/special/");
        me->delete("special_skill");

        if (sizeof(files))
        {
                // 整理所有的技能文件
                for (i = 0; i < sizeof(files); i++)
                        sscanf(files, "%s.c", files);

                // 特殊先天属性先行排除
                files -= ({ "lighting" });

                // 性格不符不会愤怒之心
                if (me->query("character") != "光明磊落"
                   && me->query("character") != "心狠手辣")
                        files -= ({ "wrath" });

                // 先天膂力 < 26 不会麒麟血臂
                if (me->query("str") < 26)
                        files -= ({ "strength" });

                // 先天悟性 < 26 不会罡睿神慧
                if (me->query("int") < 26)
                        files -= ({ "intellect" });

                // 先天根骨 < 26 不会镇蕴七星
                if (me->query("con") < 26)
                        files -= ({ "constitution" });

                // 先天身法 < 26 不会玲珑玉躯
                if (me->query("dex") < 26)
                        files -= ({ "dexterity" });

                // 先天容貌 < 20 不会天颜永驻
                if (me->query("per") < 20)
                        files -= ({ "youth" });

                // 祛除真命天子
                files -= ({"emperor"});

                // 获得第一项技能
                special = files[random(sizeof(files))];
                me->set("special_skill/" + special, 1);

                msg += SPECIAL_D(special)->name();

                files -= ({ special });
                if (sizeof(files) && random(100) == 1)
                {
                        // 获得第二项技能
                        special = files[random(sizeof(files))];
                        me->set("special_skill/" + special, 1);
                        msg += HIG "、" NOR + SPECIAL_D(special)->name();

                        files -= ({ special });
                        if (sizeof(files) && random(30) == 1)
                        {
                                // 获得第三项技能
                                special = files[random(sizeof(files))];
                                me->set("special_skill/" + special, 1);
                                msg += HIG "及" NOR + SPECIAL_D(special)->name();
                        }
                }

                // 麒麟血臂增加1点膂力
                if (me->query("special_skill/strength"))
                        me->add("str", 1);

                // 罡睿神慧增加1点悟性
                if (me->query("special_skill/intellect"))
                        me->add("int", 1);

                // 镇蕴七星增加1点根骨
                if (me->query("special_skill/constitution"))
                        me->add("con", 1);

                // 玲珑玉躯增加1点身法
                if (me->query("special_skill/dexterity"))
                        me->add("dex", 1);

                msg += HIG "。\n" NOR + HIC "如果你对此有任何疑问,可以重新"
                       "阅读天赋属性(" HIY "help gift" NOR + HIC ")介绍。\n"
                       NOR;
                me->start_call_out((: call_other, __FILE__, "notice_player",
                                      me, msg , 0);
        }
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|简凡网

GMT+8, 2025-7-1 21:25 , Processed in 0.023755 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】

快速回复 返回顶部 返回列表