xixing.c

来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· C语言 代码 · 共 34 行

C
34
字号
// xi.c
// 吸星大法 吸.c    By poopoo
#include <ansi.h>
#include <skill.h>
#include <weapon.h>
#include <combat.h>
inherit F_SSERVER;
int exert(object me, object target)
{

        int sp, dp;
        int my_max, tg_max;
        sp = me->query_skill("force") + me->query_skill("dodge") + me->query_skill("tmdafa",1)/2;
        dp = target->query_skill("force") + target->query_skill("dodge");

        if ( !target ) target = offensive_target(me);

        if( environment(me)->query("no_fight") )
                return notify_fail("在这里不能攻击他人。\n");
        if( !objectp(target) || target->query("id") == "mu ren" )
                return notify_fail("你要吸取谁的内力?\n");
        if (target->query("race") != "人类")
                return notify_fail("搞错了!这不是人!\n");

        my_max = me->query("max_neili");
        tg_max = target->query("qi");

        if ( me->query_temp("sucked") )
                return notify_fail("你正在运功之中!\n");

        if( !me->is_fighting() || !target->is_fighting())

        if( (int)me->query_skill("tmdafa",1) < 100 )
                return notify_fail("你的天魔大法功力不够,不能吸取对方的内力!

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?