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),
]);
}
}
}
|