… | |
… | |
918 | } |
918 | } |
919 | |
919 | |
920 | /* now try to ready the new skill */ |
920 | /* now try to ready the new skill */ |
921 | if (!change_skill (op, skill, 0)) |
921 | if (!change_skill (op, skill, 0)) |
922 | { /* oh oh, trouble! */ |
922 | { /* oh oh, trouble! */ |
923 | new_draw_info_format (NDI_UNIQUE, 0, tmp, "Couldn't change to skill %s", &skill->name); |
923 | new_draw_info_format (NDI_UNIQUE, 0, op, "Couldn't change to skill %s", &skill->name); |
924 | return 0; |
924 | return 0; |
925 | } |
925 | } |
926 | } |
926 | } |
927 | |
927 | |
928 | if (!pl->combat_ob) |
928 | if (!pl->combat_ob) |
… | |
… | |
933 | } |
933 | } |
934 | |
934 | |
935 | if (op->current_weapon != pl->combat_ob) |
935 | if (op->current_weapon != pl->combat_ob) |
936 | { |
936 | { |
937 | op->current_weapon = pl->combat_ob; |
937 | op->current_weapon = pl->combat_ob; |
|
|
938 | new_draw_info_format (NDI_UNIQUE, 0, op, "You switch to your %s.", &op->current_weapon->name); |
938 | op->update_stats (); |
939 | op->update_stats (); |
939 | } |
940 | } |
940 | |
941 | |
941 | /* lose invisiblity/hiding status for running attacks */ |
942 | /* lose invisiblity/hiding status for running attacks */ |
942 | |
943 | |
… | |
… | |
1025 | } |
1026 | } |
1026 | |
1027 | |
1027 | return do_skill_attack (tmp, pl, string, skill); |
1028 | return do_skill_attack (tmp, pl, string, skill); |
1028 | } |
1029 | } |
1029 | |
1030 | |
1030 | |
|
|
1031 | /* attack_hth() - this handles all hand-to-hand attacks -b.t. */ |
1031 | /* attack_hth() - this handles all hand-to-hand attacks -b.t. */ |
1032 | |
1032 | |
1033 | /* July 5, 1995 - I broke up attack_hth() into 2 parts. In the first |
1033 | /* July 5, 1995 - I broke up attack_hth() into 2 parts. In the first |
1034 | * (attack_hth) we check for weapon use, etc in the second (the new |
1034 | * (attack_hth) we check for weapon use, etc in the second (the new |
1035 | * function skill_attack() we actually attack. |
1035 | * function skill_attack() we actually attack. |
1036 | */ |
1036 | */ |
1037 | |
|
|
1038 | static int |
1037 | static int |
1039 | attack_hth (object *pl, int dir, const char *string, object *skill) |
1038 | attack_hth (object *pl, int dir, const char *string, object *skill) |
1040 | { |
1039 | { |
1041 | object *enemy = NULL, *weapon; |
1040 | object *enemy = NULL, *weapon; |
1042 | |
1041 | |
… | |
… | |
1051 | if (pl->type == PLAYER) |
1050 | if (pl->type == PLAYER) |
1052 | { |
1051 | { |
1053 | new_draw_info (NDI_UNIQUE, 0, pl, "You unwield your weapon in order to attack."); |
1052 | new_draw_info (NDI_UNIQUE, 0, pl, "You unwield your weapon in order to attack."); |
1054 | esrv_update_item (UPD_FLAGS, pl, weapon); |
1053 | esrv_update_item (UPD_FLAGS, pl, weapon); |
1055 | } |
1054 | } |
|
|
1055 | |
1056 | break; |
1056 | break; |
1057 | } |
1057 | } |
1058 | } |
1058 | } |
1059 | |
1059 | |
1060 | return skill_attack (enemy, pl, dir, string, skill); |
1060 | return skill_attack (enemy, pl, dir, string, skill); |