1 | /* |
1 | /* |
2 | * static char *rcsid_skill_util_c = |
2 | * static char *rcsid_skill_util_c = |
3 | * "$Id: skill_util.C,v 1.5 2006/08/29 08:01:38 root Exp $"; |
3 | * "$Id: skill_util.C,v 1.6 2006/08/30 06:06:27 root Exp $"; |
4 | */ |
4 | */ |
5 | /* |
5 | /* |
6 | CrossFire, A Multiplayer game for X-windows |
6 | CrossFire, A Multiplayer game for X-windows |
7 | |
7 | |
8 | Copryight (C) 2002 Mark Wedel & Crossfire Development Team |
8 | Copryight (C) 2002 Mark Wedel & Crossfire Development Team |
… | |
… | |
854 | */ |
854 | */ |
855 | |
855 | |
856 | static int do_skill_attack(object *tmp, object *op, const char *string, object *skill) { |
856 | static int do_skill_attack(object *tmp, object *op, const char *string, object *skill) { |
857 | int success; |
857 | int success; |
858 | |
858 | |
|
|
859 | if (INVOKE_OBJECT (SKILL_ATTACK, op, ARG_OBJECT (tmp), ARG_STRING (string), ARG_OBJECT (skill))) |
|
|
860 | return RESULT_INT (0); |
|
|
861 | |
859 | /* For Players only: if there is no ready weapon, and no "attack" skill |
862 | /* For Players only: if there is no ready weapon, and no "attack" skill |
860 | * is readied either then try to find a skill for the player to use. |
863 | * is readied either then try to find a skill for the player to use. |
861 | * it is presumed that if skill is set, it is a valid attack skill (eg, |
864 | * it is presumed that if skill is set, it is a valid attack skill (eg, |
862 | * the caller should have set it appropriately). We still want to pass |
865 | * the caller should have set it appropriately). We still want to pass |
863 | * through that code if skill is set to change to the skill. |
866 | * through that code if skill is set to change to the skill. |