diff --git a/lib/text/help/help.hlp b/lib/text/help/help.hlp index 915675e..63079a1 100644 --- a/lib/text/help/help.hlp +++ b/lib/text/help/help.hlp @@ -1061,6 +1061,19 @@ Moves all of your money in/out of the bank. See also: GOLD, SCORE #0 +BANDAGE + +Some fighting classes only. + +Usage: bandage [patient] + +The bandage skill is used to treat extremely critical patients who are +in imminent danger of dying. Upon successful application of bandages, +the patient will be stabilized but will still be in critical condition. +If the bandage application fails, the patient will suffer additional +trauma which may hasten their ultimate fate. The success of this skill +will depend upon how well it has been learned. +#0 BASH Fighters only. diff --git a/src/act.h b/src/act.h index 2611d18..3750e92 100644 --- a/src/act.h +++ b/src/act.h @@ -185,6 +185,7 @@ ACMD(do_kill); ACMD(do_order); ACMD(do_rescue); ACMD(do_whirlwind); +ACMD(do_bandage); /***************************************************************************** * Begin Functions and defines for act.other.c diff --git a/src/act.offensive.c b/src/act.offensive.c index ddf7259..cb54edd 100644 --- a/src/act.offensive.c +++ b/src/act.offensive.c @@ -524,3 +524,53 @@ ACMD(do_kick) WAIT_STATE(ch, PULSE_VIOLENCE * 3); } + +ACMD(do_bandage) +{ + char arg[MAX_INPUT_LENGTH]; + struct char_data * vict; + int percent, prob; + + if (!GET_SKILL(ch, SKILL_BANDAGE)) + { + send_to_char(ch, "You are unskilled in the art of bandaging.\r\n"); + return; + } + + if (GET_POS(ch) != POS_STANDING) { + send_to_char(ch, "You are not in a proper position for that!\r\n"); + return; + } + + one_argument(argument, arg); + + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) { + send_to_char(ch, "Who do you want to bandage?\r\n"); + return; + } + + if (GET_HIT(vict) >= 0) { + send_to_char(ch, "You can only bandage someone who is close to death.\r\n"); + return; + } + + WAIT_STATE(ch, PULSE_VIOLENCE * 2); + + percent = rand_number(1, 101); /* 101% is a complete failure */ + prob = GET_SKILL(ch, SKILL_BANDAGE); + + if (percent <= prob) { + act("Your attempt to bandage fails.", FALSE, ch, 0, 0, TO_CHAR); + act("$n tries to bandage $N, but fails miserably.", TRUE, ch, + 0, vict, TO_NOTVICT); + damage(vict, vict, 2, TYPE_SUFFERING); + return; + } + + act("You successfully bandage $N.", FALSE, ch, 0, vict, TO_CHAR); + act("$n bandages $N, who looks a bit better now.", TRUE, ch, 0, + vict, TO_NOTVICT); + act("Someone bandages you, and you feel a bit better now.", + FALSE, ch, 0, vict, TO_VICT); + GET_HIT(vict) = 0; +} diff --git a/src/class.c b/src/class.c index 7fa8346..6efd9da 100644 --- a/src/class.c +++ b/src/class.c @@ -1630,6 +1630,7 @@ void init_spell_levels(void) /* WARRIORS */ spell_level(SKILL_KICK, CLASS_WARRIOR, 1); spell_level(SKILL_RESCUE, CLASS_WARRIOR, 3); + spell_level(SKILL_BANDAGE, CLASS_WARRIOR, 7); spell_level(SKILL_TRACK, CLASS_WARRIOR, 9); spell_level(SKILL_BASH, CLASS_WARRIOR, 12); spell_level(SKILL_WHIRLWIND, CLASS_WARRIOR, 16); diff --git a/src/interpreter.c b/src/interpreter.c index 315fd7b..3c82d4d 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -103,6 +103,7 @@ cpp_extern const struct command_info cmd_info[] = { { "backstab" , "ba" , POS_STANDING, do_backstab , 1, 0 }, { "ban" , "ban" , POS_DEAD , do_ban , LVL_GRGOD, 0 }, + { "bandage" , "band" , POS_RESTING , do_bandage , 1, 0 }, { "balance" , "bal" , POS_STANDING, do_not_here , 1, 0 }, { "bash" , "bas" , POS_FIGHTING, do_bash , 1, 0 }, { "brief" , "br" , POS_DEAD , do_gen_tog , 0, SCMD_BRIEF }, diff --git a/src/spell_parser.c b/src/spell_parser.c index 7e2ae78..a443cc8 100644 --- a/src/spell_parser.c +++ b/src/spell_parser.c @@ -956,5 +956,6 @@ void mag_assign_spells(void) skillo(SKILL_STEAL, "steal"); skillo(SKILL_TRACK, "track"); skillo(SKILL_WHIRLWIND, "whirlwind"); + skillo(SKILL_BANDAGE, "bandage"); } diff --git a/src/spells.h b/src/spells.h index 4b62475..4bcb8ec 100644 --- a/src/spells.h +++ b/src/spells.h @@ -109,7 +109,9 @@ #define SKILL_RESCUE 137 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_SNEAK 138 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_STEAL 139 /* Reserved Skill[] DO NOT CHANGE */ -#define SKILL_TRACK 140 /* Reserved Skill[] DO NOT CHANGE */ +#define SKILL_TRACK 140 /* Reserved Skill[] DO NOT CHANGE */ +#define SKILL_BANDAGE 141 /* Reserved Skill[] DO NOT CHANGE */ + /* New skills may be added here up to MAX_SKILLS (200) */ /* NON-PLAYER AND OBJECT SPELLS AND SKILLS: The practice levels for the spells