mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-24 03:00:13 +01:00
new bandage command to enable fighting classes to help incapacitated players (#11)
This commit is contained in:
parent
dec0c5af1f
commit
27a2f4bdc8
7 changed files with 70 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue