找回密码
 注册
搜索
查看: 2260|回复: 5

养精丹是加快精力恢复+10吗?

[复制链接]
门派:不明
发表于 2014-10-16 15:04:33 | 显示全部楼层 |阅读模式
#include <ansi.h>

inherit ITEM;

void create()
{
   set_name("养精丹", ({"yangjing dan", "dan"}));
   if (clonep())
      set_default_object(__FILE__);
   else {
      set("unit", "粒");
      set("value", 100);
   }
   setup();
}

int init()
{
   add_action("do_eat", "eat");
}

int do_eat(string arg)
{
   object me = this_player();

   if(!id(arg))
       return notify_fail("你要吃什么?\n");

   message_vision("$N吃下一粒" + name() + "。\n", me);
   if (((int)me->query_condition("xx_poison") > 0) ||
         ((int)me->query("eff_jing") < (int)me->query("max_jing"))) {
      me->apply_condition("jing_curing", me->query_condition("jing_curing")
         + 10);
   }

   destruct(this_object());
   return 1;
}
门派:不明
 楼主| 发表于 2014-10-16 15:05:19 | 显示全部楼层
// jinchuang.c 金创药
inherit COMBINED_ITEM;

void init()
{
        add_action("do_eat", "eat");
        add_action("do_eat", "fu");
}

void create()
{
        set_name("金创药", ({"jinchuang yao", "jin", "jinchuang"}));
        if (clonep())
                set_default_object(__FILE__);
        else {
                set("unit", "些");
                set("heal_up", 1);
                set("base_unit", "包");
                set("base_weight", 100);
                set("long", "这是一包武林人士必备的金创药。\n");
                set("base_value", 5000);
        }
        set_amount(1);
}

int do_eat(string arg)
{
        if (!id(arg))
                return notify_fail("你要吃什么药?\n");
     if (this_player()->is_busy() || this_player()->is_fighting())
        return notify_fail("你正忙着呢。\n");
        if ((int)this_player()->query("eff_qi") ==
            (int)this_player()->query("max_qi"))
                return notify_fail("你现在不需要用金创药。\n");
        else {
                this_player()->receive_curing("qi", 50);
                message_vision("$N吃下一包金创药,气色看起来好多了。\n", this_player());
                destruct(this_object());
                        this_player()->start_busy(1);
                return 1;
        }
}

这个金疮药是加50点血,还是气血恢复+50呢?????
门派:不明
发表于 2014-10-17 09:04:28 | 显示全部楼层
这个似乎没了吧                     
门派:不明
发表于 2014-10-30 02:56:59 | 显示全部楼层
看起来似乎,可能,大概是这个意思
门派:不明
发表于 2014-10-30 13:32:20 | 显示全部楼层
看不懂code的,飘过
门派:不明
发表于 2014-12-19 21:38:46 | 显示全部楼层
看不懂什么意思,路过,飘过!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|书剑永恒MUD ( 闽ICP备14012032号|闽公网安备 35050202000162号 )

GMT+8, 2025-6-28 12:54 , Processed in 0.049348 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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