这是什么意思???
string query_skill_name(int level){
int i;
for(i = sizeof(action)-1; i >= 0; i--)
if(level >= action["lvl"])
return action["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["lvl"]) {
j = NewRandom(i, 20, level/5);
return ([
"action": action["action"],
"damage_type": action["damage_type"],
"lvl": action["lvl"],
"force": 100 + random(250),
"dodge": random(20)-10,
"damage": 40 + random(60),
"parry": random(10),
]);
}
}
}
要结合本文件上面的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 算的
页:
[1]