generic medical kit #120

Parent #108Owner #36Flags read, fertileSource QuestCore.db

Aliases: generic medical kit, medical kit, medkit

4 verbs · 29 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
use healany any anyrd#12014
do_healthis none thisrxd#12048
look_selfthis none thisrxd#12015
valuethis none thisrxd#1201

Properties

PropertyDefinerFlagsOwnerValue
figure_out_msg#120rc#36{"You study it long enough to figure out the basic procedures.", "USAGE: heal <person> with <this>", " use <this> on <person>"}
effect#120r#361.0
in_use#120r#360
help_msg#120rc#36"You can probably figure it out if you look at it carefully."
returning#108rc#36<clear>
how_long#108rc#36<clear>
been_told#108rc#36<clear>
home#108rc#36<clear>
child_limit#108rc#36<clear>
recycle_at_death#108rc#36<clear>
drop_failed_msg#5rc#36<clear>
drop_succeeded_msg#5rc#36<clear>
odrop_failed_msg#5rc#36<clear>
odrop_succeeded_msg#5rc#36<clear>
otake_succeeded_msg#5rc#36<clear>
otake_failed_msg#5rc#36<clear>
take_succeeded_msg#5rc#36<clear>
take_failed_msg#5rc#36<clear>
value_base#102r#2<clear>
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#36<clear>
key#1c#360
aliases#1rc#36{"generic medical kit", "medical kit", "medkit"}
description#1rc#36"This can be a first-aid kit, a bag of herbs, or whatever you want it to be."
object_size#1r#36{5003, -1090650497}

Ancestry

Ancestors (nearest first): #108 generic replicating & returning thing#5 generic thing#102 subthing#1 Root Class

Children: none

Call graph

calls n120_0 #120:use n6_18 #6:tell n120_0->n6_18 n102_4 #102:title n120_0->n102_4 n6_7 #6:my_match_object n120_0->n6_7 n98_12 #98:person_match_failed n120_0->n98_12 n120_1 #120:do_heal n120_0->n120_1 n120_1->n6_18 n1_4 #1:titlec n120_1->n1_4 n35_3 #35:say_action2 n120_1->n35_3 n120_2 #120:look_self n120_2->n6_18 n1_10 #1:look_self n120_2->n1_10 n6_79 #6:tell_lines n120_2->n6_79

Source

use heal

Spec any any anyFlags rdOwner #36Definer #120

Referenced by

none

Source

1if ((!dobjstr) || (!iobjstr))
2player:tell("USAGE: heal <person> with ", this:title());
3return player:tell("       use ", this:title(), " on <person>");
4endif
5person = (dobj == this) ? iobjstr | dobjstr;
6medical = "medical" in player.skills[1];
7med_skill = player.skills[2][medical];
8if (med_skill < 0.1)
9return player:tell("You have no idea how to use ", this:title(), ".");
10endif
11result = player:my_match_object(person);
12if (!$rp_regulator:person_match_failed(result, person))
13this:do_heal(result);
14endif

do_heal

Spec this none thisFlags rxdOwner #36Definer #120

Referenced by

Source

1"USAGE: do_heal(person)";
2person = args[1];
3dobj = person;
4iobj = this;
5if (this.in_use)
6return player:tell(this:titlec(), " is currently in use.");
7elseif (`player.stats_current[2][3] < 6.0 ! E_PROPNF => 1')
8return player:tell("You don't understand how to use it.");
9elseif (!`person.alive ! E_PROPNF => 0')
10return player:tell(person:titlec(), " cannot be healed.");
11elseif (person.stats_current[2][4] >= person.stats[2][4])
12return player:tell(person:titlec(), " does not need healing.");
13elseif (valid(player.last_healed))
14return player:tell("Not enough time has passed since your last attempted healing of ", player.last_healed:title(), ".");
15endif
16this.in_use = 1;
17fork (2)
18this.in_use = 0;
19endfork
20attempt = player:roll_against("medical", this.effect);
21diff = person.stats[2][4] - person.stats_current[2][4];
22points = (diff * player:medical()) / 18.0;
23points = (points > diff) ? diff | points;
24if (attempt == 2)
25$you:say_action2(player, person, "%N %<heals> %d, with excellent results!");
26points = ((2.0 * points) > diff) ? diff | (2.0 * points);
27person:take_health(points);
28free = (points < 1.0) ? 1.0 | points;
29player.free_points = player.free_points + (sqrt(free) / (player:medical() + 36.0));
30elseif (attempt == 1)
31$you:say_action2(player, person, "%N %<heals> %d using %i.");
32person:take_health(points);
33else
34$you:say_action2(player, person, "%N %<attempts> to heal %d, but %<does/do>n't get very good results from %i.");
35points = points / 2.0;
36endif
37medical = "medical" in player.skills[1];
38points = (points < 1.0) ? 1.0 | points;
39if (player:medical() > 0.0)
40medmod = (player.skills[2][medical] < 1.0) ? 1.0 | player.skills[2][medical];
41player.skills[2][medical] = player.skills[2][medical] + (sqrt(points) / ((player:medical() * player:medical()) * medmod));
42endif
43player.last_healed = person;
44delay = ((pause = 90 - toint(player:medical() * 2.0)) > 10) ? pause | 10;
45fork (delay)
46player:tell("You're ready to heal again.");
47player.last_healed = $nothing;
48endfork

look_self

Spec this none thisFlags rxdOwner #36Definer #120

Referenced by

none

Source

1pass(@args);
2try
3medical = "medical" in player.skills[1];
4med_skill = player.skills[2][medical];
5if (med_skill < 0.1)
6suspend(2);
7if (player.stats_current[2][3] < 6.0)
8return player:tell("You're too dumb to figure out how to use it.");
9endif
10player.skills[2][medical] = 0.1;
11player:tell_lines(this.figure_out_msg);
12endif
13except v (ANY)
14"probably a guest";
15endtry

value

Spec this none thisFlags rxdOwner #36Definer #120

Referenced by

none

Source

1return (50.0 * this.effect) - 10.0;