poqi.vns

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

VNS
36
字号
//poqi.c -「破气式」#include <ansi.h>#include <combat.h>inherit F_SSERVER;int perform(object me, object target){        int damage;        string msg;        if( !target ) target = offensive_target(me);        if( !target||!target->is_character()||!me->is_fighting(target) )        return notify_fail("你只能对战斗中的对手使用「破气式」。\n");        if( (int)me->query_skill("dugu-jiujian-sword",1) < 80)        return notify_fail("你的独孤九剑不够娴熟,还使不出「破气式」。\n");        if( (int)me->query("neili") < 200 )        return notify_fail("你的内力不够。\n");        me->add("neili", -80);        msg = CYN"$N潜运独孤九剑中的「破气式」,运气贯剑使其由利返钝,毫无花俏地直刺$n的丹田。!\n"NOR;        me->start_busy(2);        if (target->query("neili",1)>100) {        if( random(me->query("combat_exp")) >          (int)target->query("combat_exp")/4 ) {        target->start_busy( (int)me->query_skill("dugu-jiujian-sword") / 20 );        damage = (int)me->query_skill("dugu-jiujian-sword", 1)/4+(int)me->query_skill("sword", 1)/2;        target->add("neili", -damage);        msg += RED"$n对这招「破气式」百思不得其解,退避不及,中剑因而导至内力受损!\n"NOR;    } else {        msg += HIC "$p急忙沉肩滑步,护住丹田,才勉强避开$P这招「破气式」。\n" NOR;    }        message_vision(msg, me, target);        return 1;}        return notify_fail(target->name() + "目前内气虚弱得很,无虚再破,换其他招式罢。\n");}

⌨️ 快捷键说明

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