MUD-武林MUD资料站-武侠MUD游戏
标题:
这是什么意思???
[打印本页]
作者:
靓仔
时间:
2013-11-29 22:47
标题:
这是什么意思???
string query_skill_name(int level)
{
int i;
for(i = sizeof(action)-1; i >= 0; i--)
if(level >= action[i]["lvl"])
return action[i]["skill_name"];
}
mapping query_action(object me, object weapon)
{
int i, level, j;
level = (int) me->query_skill("damo-jian",1);
for(i = sizeof(action); i > 0; i--) {
if(level > action[i-1]["lvl"]) {
j = NewRandom(i, 20, level/5);
return ([
"action": action[j]["action"],
"damage_type": action[j]["damage_type"],
"lvl": action[j]["lvl"],
"force": 100 + random(250),
"dodge": random(20)-10,
"damage": 40 + random(60),
"parry": random(10),
]);
}
}
}
作者:
是开碧落
时间:
2013-11-30 09:16
要结合本文件上面的mapping *action看
mapping *action = ({
([ "action": "$N使一式「万事随缘往」,手中$w嗡嗡微振,幻成一条疾光刺向$n的$l",
"force" : 90,
"attack": 30,
"dodge" : 10,
"parry" : 15,
"damage": 15,
"lvl" : 0,
"skill_name" : "万事随缘往",
"damage_type": "刺伤"
]),
---
string query_skill_name 是返回的 "skill_name" : "万事随缘往",
mapping query_action 是返回的 一组
都是根据level 算的
欢迎光临 MUD-武林MUD资料站-武侠MUD游戏 (http://17mud.com/)
Powered by Discuz! X3.2