Generic Dungeon Room #258

Parent #1610Owner Flags Source rpg_march_2006/dungeon.txt

Aliases: Generic Dungeon Room, Dungeon Room

71 verbs · 27 properties · 4 children

Verbs

VerbSpecFlagsDefinerLines
acceptablethis none this#25820
l*ookany any anyrxd#25815
enterfuncthis none this#25852
forgiveany none nonerxd#25839
hateany none nonerxd#25820
tell_contentsthis none this#25823
exitfuncthis none thisrx#25853
exitsthis none thisrxd#2585
deststhis none thisrxd#25815
exit_okthis none this#25827
same_timethis none this#25815
announce_all_butthis none this#25822
missile_deststhis none this#25813
movetothis none this#2581
blockany any any#2580
identify_exitthis none this#2588
identify_entrancethis none this#2588
entrancesthis none thisrxd#2585
contentsthis none this#2589
old_missile_deststhis none this#25813
notify_arrivalthis none this#25833
visiblethis none this#25824
@rpg-gripeany from this#2581
magic_effectsthis none this#25856
set_valuethis none this#25811
get_valuethis none this#2584
obvious_exitsthis none thisrx#2589
exitshockthis none thisrx#25836
free_exitthis none this#2581
bless_exitthis none this#2588
look_selfthis none this#25835
make_fertilethis none this#25813
_ejectthis none this#2585
sayany any anyrxd#25815
match_exitthis none thisrx#25827
initializethis none this#2589
sleep doze nap snooze rest sit crash slump collapse yawn snore search wake stand rise pray chantnone none none#25817
all_contentsthis none this#2587
read_misc_notethis none this#25812
write_misc_notethis none this#25817
erase_misc_notethis none this#25818
combat_effectsthis none this#25855
bless_for_teleportthis none this#2589
notify_exitthis none this#25834
att*ack hit ki*llany none nonerxd#25835
he*al sl*ow re*call li*felink unl*ink mindp*robe de*press st*ealskill pa*cify unw*all fo*rcewall bar*kskin di*spel har*den hai*l ices*hell waterw*hip conj*ure sum*mon sto*rm sti*nkcloud pr*edict heat charm*foe hold*foe raven*fear bi*ting_cloud haste acidr*ain appr*aise poi*son tang*le gly*ph ca*lm minds*hock sha*tter mag*icfist rune reverse*missiles det*ect windw*all ench*ant rot fireb*olt viper*_bite unviper backf*ire unbar*k unbac*kfire petals wound drain compost triage beguile mergestorm stoneflesh blade*barrier unblade*barrier daggers*torm parch chill unreverse resurrect dirge fort*ify haw*thorn anim*ateany any anyrxd#25891
emoteany any anyrxd#25812
exitcleanthis none this#25815
notify_playerthis none thisrxd#2586
detect_magic_msgthis none this#25883
hidethis none this#2589
disfuncthis none thisrd#2587
identify_exit(old)this none this#2588
say(old)any any anyrxd#25810
emote(old)any any anyrxd#25811
exitshock(old)this none thisrx#25827
exitslamthis none this#25843
sc*ore health ht co*nditionthis none this#25821
hidden_verbsthis none this#2588
setadd_exit setremove_exitthis none this#25817
invisiblethis none this#2589
match_exit(old)this none thisrx#25825
_eject(old)this none this#2584
duelany any any#25855
declineany any any#25818
announce_all_but(old)this none this#25814
announce_allthis none this#2582
announcethis none this#2582
show_all_butthis none this#25819
showthis none this#2582
show_allthis none this#2582

Properties

PropertyDefinerFlagsOwnerValue
transparency_support#258rc0
free_exit#258rc0
player_all_verbs#258rc{"drop", "throw", "give", "hand", "wear", "remove", "wield", "unwield", "sheathe", "sling", "put", "insert"}
room_all_verbs#258rc{"get", "take"}
gripe_recipients#258rc{#4044}
magic_effect#258r0
blessed_exit#258r0
accept_rpg_teleport#258rc0
misc_notes#258not readable (E_PERM)
magic_effects#258not readable (E_PERM)
combat_effects#258not readable (E_PERM)
unannounced#258not readable (E_PERM)
teleport_object#258r#-1
teleport_task#258r0
forgiving#258r{}
allowed_exits#258not readable (E_PERM)
dawn_msg#258""
night_msg#258""
dusk_msg#258""
day_msg#258""
free_entry#2580
entrances#258not readable (E_PERM)
exits#258not readable (E_PERM)
ctype#2585
key#258not readable (E_PERM)
aliases#258{"Generic Dungeon Room", "Dungeon Room"}
object_size#258{72473, 1141286558}

Ancestry

Ancestors (nearest first): #1610 RPG RDB room#364 outside room#6792 Generic Integrating Description Room#3879 Matching Room#27777 Self-Cleaning Room

Children: #146 generic Academy room, #1131 Cemetery, #10161 Department of Environmental Protection, #16070 LRPG Illuminated Room

Call graph

calls n258_0 #258:acceptable n27777_5 #27777:acceptable n258_0->n27777_5 n258_1 #258:l*ook n3879_0 #3879:match n258_1->n3879_0 n258_2 #258:enterfunc n1610_7 #1610:enterfunc n258_2->n1610_7 n258_16 #258:identify_entrance n258_2->n258_16 n258_20 #258:notify_arrival n258_2->n258_20 n258_17 #258:entrances n258_2->n258_17 n258_66 #258:announce_all n258_2->n258_66 n258_27 #258:exitshock n258_2->n258_27 n258_16->n258_17 n258_11 #258:announce_all_but n258_66->n258_11 n258_56 #258:exitslam n258_27->n258_56 n258_3 #258:forgive n258_3->n3879_0 n258_4 #258:hate n258_4->n3879_0 n258_5 #258:tell_contents n258_50 #258:hide n258_5->n258_50 n258_6 #258:exitfunc n258_6->n258_27 n27777_1 #27777:exitfunc n258_6->n27777_1 n258_9 #258:exit_ok n258_6->n258_9 n1610_17 #1610:relight n258_6->n1610_17 n15870_9 #15870:active_players n258_6->n15870_9 n258_43 #258:notify_exit n258_6->n258_43 n258_15 #258:identify_exit n258_6->n258_15 n258_9->n258_15 n258_7 #258:exits n258_9->n258_7 n258_28 #258:free_exit n258_9->n258_28 n258_15->n258_7 n258_8 #258:dests n258_8->n258_7 n258_10 #258:same_time n258_10->n258_8 n258_10->n258_7 n258_12 #258:missile_dests n258_12->n258_8 n258_12->n258_7 n258_18 #258:contents n258_18->n258_50 n258_19 #258:old_missile_dests n258_19->n258_8 n258_19->n258_7 n258_21 #258:visible n3879_2 #3879:visible n258_21->n3879_2 n258_60 #258:invisible n258_21->n258_60 n258_23 #258:magic_effects n1610_8 #1610:magic_effect n258_23->n1610_8 n258_26 #258:obvious_exits n258_26->n258_7 n258_30 #258:look_self n258_30->n258_18 n6792_0 #6792:look_self n258_30->n6792_0 n258_32 #258:_eject n258_29 #258:bless_exit n258_32->n258_29 n27777_2 #27777:eject n258_32->n27777_2 n258_33 #258:say n258_33->n258_11 n258_34 #258:match_exit n1610_20 #1610:resting n258_34->n1610_20 n258_36 #258:sleep n258_34->n258_36 n258_37 #258:all_contents n258_37->n258_37 n258_41 #258:combat_effects

Showing 48 of 67 verbs; 19 not shown.

Source

acceptable

Spec this none thisDefiner #258

Referenced by

none

Source

1{what} = args;
2{rpg, owner, loc} = {$local.rpg, what.owner, what.location};
3if (rpg.player_start:is_banned(owner) || (!rpg.player_start:is_not_banned(what)))
4  return 0;
5elseif (is_player(what))
6  if ((what != owner) && (!rpg.guests_allowed))
7    return 0;
8  elseif ((loc in {$mail_editor, $note_editor}) && (this == loc.original[what in loc.active]))
9    if (((valid(doll = rpg:get_doll(what)) && ((note = doll:read_misc_note("last_room")) != E_PROPNF)) && (note == this)) || (what in rpg.gms))
10      return 1;
11    endif
12    valid(doll) && rpg:log_error(tostr("Apparent hacked entry attempt by ", $string_utils:nn(what), " from ", $string_utils:nn(loc), " to ", $string_utils:nn(this), ".  Callers: ", toliteral(callers(1))));
13  endif
14endif
15return ((pass(what) || (owner in rpg.gms)) || ($object_utils:contains(this, what) && ($object_utils:isa(what, rpg.thing) || rpg.object_db:is_monster(what)))) || ((what == this.teleport_object) && (task_id() == this.teleport_task));
16"Removed my insertion of $local.rpg:trust(0) since it seems to allow all entries from any room with an :accept verb higher than this one.";
17"Mooshie (#106469) - Sun Oct 12 00:09:02 1997 PDT - Added teleport object/task check. Set by :bless_for_teleport ";
18"THX (#105941) - Thu Jan 27, 2000 - Allow players back in from $mail_editor and $note_editor.";
19"THX (#105941) - Sun Mar 18, 2001 - changed the is_rpg call to is_monster temporarily.";
20"THX (#105941) - Sun May  6, 2001 - Removed temporary acceptance of hacked $editor origins after catching a few exploiters.  Now it just goes to pass(what).";

l*ook

Spec any any anyFlags rxdDefiner #258

Referenced by

none

Source

1"look [at] thing -- Take a gander at something.";
2rpg = $local.rpg;
3string = (prepstr == "at") ? iobjstr | dobjstr;
4what = string ? this:match(string) | this;
5if (valid(doll = rpg:get_doll(player)) && (msg = doll:cannot_see()))
6  rpg:playertell(player, msg);
7elseif (!$command_utils:object_match_failed(what, string))
8  what:look_self();
9  if (valid(rpg:get_doll(what)) && is_player(what))
10    rpg:look_health(what);
11    rpg:look_gear(what);
12  endif
13endif
14"Quinn 01-AUG-93 0812-ET: Hacked to recognise 'at', and to use :object_match_failed.";
15"Profane (#30788) - Wed Feb 14, 2001 - support for cannot_see";

enterfunc

Spec this none thisDefiner #258

Referenced by

Source

1if (!(rpg = $local.rpg):trusted_efunc())
2  return E_PERM;
3endif
4{thing} = args;
5pass(thing);
6if ((thing in rpg.pcs) && is_player(thing))
7  rpg.usage_meter:add_user(thing);
8endif
9theEntrance = this:identify_entrance(thing);
10this:notify_arrival(thing, theEntrance);
11if (valid(doll = (rpg = $local.rpg):get_doll(thing)))
12  min = 999;
13  for y in (doll.aggressor)
14    if (valid(y) && (y.location == this))
15    else
16      doll.aggressor = setremove(doll.aggressor, y);
17    endif
18  endfor
19  for q in (setremove(thing.location.contents, thing))
20    if (valid(z = rpg:get_doll(q)) && ((poss = z.act) < min))
21      min = poss;
22    endif
23  endfor
24  if (min < 999)
25    doll.act = min;
26    "fork (0)";
27    "  doll:invite(doll:get_att(\"slowness\") / 2, {-1});";
28    "endfork";
29  else
30    clear_property(doll, "act");
31  endif
32endif
33"New silent 'port detection:";
34if ((theEntrance in this:entrances()) || ((thing == this.teleport_object) && (task_id() == this.teleport_task)))
35elseif ((((this:free_entry(thing) && (rpg.gm_lag < rpg.idle_threshold)) && (!(thing.owner in rpg.gms))) && valid(thing)) && (parent(thing) != $garbage))
36  task = task_id();
37  this.unannounced = setadd(this.unannounced, {task, thing});
38  fork (3)
39    "Fork, because porting announces messages after the moveto; our code in announce* will remove the task from the .unannounced_property if it's not a silent port.";
40    if (i = {task, thing} in this.unannounced)
41      this:announce_all(thing.name, " teleports in, `silently.'");
42      (this.owner in rpg.gms) && this:exitshock(thing);
43      this.unannounced = listdelete(this.unannounced, i);
44      if (parent(this).unannounced == this.unannounced)
45        clear_property(this, "unannounced");
46      endif
47    endif
48  endfork
49endif
50"Profane 5-OCT-97 -- new code for silent entry detection.";
51"Mooshie (#106469) - Fri Jan  2, 1998 - Added some security, a little de-ticking. Will de-tick much more later, this is a mess.";
52"Mooshie (#106469) - Sat Aug 28, 1999 - Added a call to the RPG usage meter.";

forgive

Spec any none noneFlags rxdDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2cp = caller_perms();
3if (((cp != player) && valid(cp)) && (!rpg:trusted(cp)))
4  return player:tell("See G_M about remote calls to the '", verb, "' verb.");
5elseif (!valid(doll = rpg:get_doll(player)))
6  return player:tell("As a peaceful person, you hold no grudges.");
7elseif (valid(attempt = this:match(dobjstr)))
8  dobj = attempt;
9elseif ($command_utils:object_match_failed(dobj, dobjstr))
10  return;
11endif
12if (!valid(fdoll = rpg:get_doll(dobj)))
13  doll.aggressor = setremove(doll.aggressor, dobj);
14  return player:tell(dobj.name, " is no threat to you.");
15endif
16for n in (this.forgiving)
17  if ((n[1] == dobj) && (n[2] == player))
18    doll.aggressor = setremove(doll.aggressor, dobj);
19    fdoll.aggressor = setremove(fdoll.aggressor, player);
20    player:tell("You break off combat with ", dobj.name, ".");
21    dobj:tell("You break off combat with ", player.name, ".");
22    return rpg:rpg_announce_all_but(this, {player, dobj}, player.name, " and ", dobj.name, " break off combat with each other.");
23  elseif (`(n[1].location != this) || (n[2].location != this) ! ANY => 1')
24    this.forgiving = setremove(this.forgiving, n);
25  endif
26endfor
27if (player in fdoll:aggressor())
28  this.forgiving = setadd(this.forgiving, {player, dobj});
29  is_player(dobj) ? dobj:tell(player.name, " forgives you and wishes to cease combat.  If you wish to break off, type 'forgive ", player.name, "', and all will be forgiven.") | dobj:notify_forgive(player);
30  player:tell("You offer to break off combat with ", dobj.name, ".");
31  rpg:rpg_announce_all_but(this, {player, dobj}, player.name, " offers to break off the combat with ", dobj.name, ".");
32elseif (dobj in doll:aggressor())
33  doll.aggressor = setremove(doll.aggressor, dobj);
34  player:tell("You break off combat with ", dobj.name, ".");
35  is_player(dobj) ? dobj:tell(player.name, " breaks off combat with you.") | dobj:notify_forgive(player);
36  rpg:rpg_announce_all_but(this, {player, dobj}, player.name, " breaks off combat with ", dobj.name, ".");
37else
38  player:tell("There is no conflict between you and ", dobj.name, ".  There is nothing to forgive.");
39endif

hate

Spec any none noneFlags rxdDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2doll = rpg:get_doll(player);
3what = this:match(dobjstr);
4if ($match_utils:object_match_failed(what, dobjstr))
5elseif (!valid(doll))
6  player:tell("As a peaceful person, you hold no grudges.");
7elseif (what == player)
8  player:tell("If you hate yourself that much, why not MOOicide?");
9elseif ((callers() && is_player(player)) && (!(caller_perms() in rpg.grand_masters)))
10  rpg:log_error((((((("Player " + $string_utils:nn(player)) + " made to hate using +x nature of verb: ") + $string_utils:nn(caller)) + " owned by ") + tostr(`$string_utils:nn(caller.owner) ! ANY')) + "  :  ") + toliteral(callers()));
11elseif (!doll:legal_target(what))
12  return;
13elseif (!(what in rpg.pcs))
14  player:tell("You nurse your grudge against ", what.name, ".");
15else
16  player:tell("You nurse your grudge against ", what.name, ".");
17  (what in doll.aggressor) || doll:first_blood(player, what);
18  (what.location == player.location) && (doll.aggressor = setadd(doll.aggressor, what));
19endif
20"Hydros (#106189) Thu Aug 11, 2005 - Added a call to :legal_target.";

tell_contents

Spec this none thisDefiner #258

Referenced by

Source

1{contents, ctype} = args;
2if (this.dark)
3  return;
4elseif (ctype != 5)
5  pass(contents, ctype);
6  return;
7endif
8pcs = (rpg = $local.rpg).pcs;
9people = things = {};
10for q in (contents)
11  if ((q in pcs) || is_player(q))
12    this:hide(q) || (people = listappend(people, q));
13  else
14    things = listappend(things, q);
15  endif
16endfor
17if (things)
18  rpg:playershow(player, "You see ", $string_utils:english_list($list_utils:map_verb(things, "title")), " here.");
19endif
20if (people)
21  rpg:playershow(player, $string_utils:english_list($list_utils:map_verb(people, "title")), (length(people) == 1) ? " is" | " are", " here.");
22endif
23"THX 13-Apr-1997 -- Scatter assignment and de-ticked.  Should be nice and fast now.";

exitfunc

Spec this none thisFlags rxDefiner #258

Referenced by

Source

1"Penalise for illegal exit, clear aggressor and action properties, and remove object from the aggressor lists of everyone still in the room.";
2{who} = args;
3if ((!(rpg = $local.rpg):trusted_efunc()) || ((caller != this) && (!$perm_utils:controls(caller_perms(), who))))
4  return E_PERM;
5elseif (valid(who) && (parent(who) != $garbage))
6  pass(who);
7else
8  return;
9endif
10if (this:exit_ok(who))
11  "... they've left via a normal route ...";
12else
13  this:exitshock(who);
14endif
15odb = rpg.object_db;
16if (valid(doll = rpg:get_doll(who)))
17  ("lighting" in this.room_data) && this:relight(doll, 0);
18  ("tavern" in this.room_data) && odb.natweap_db:remove_natweap(doll, odb.pirate_brawling);
19  clear_property(doll, "aggressor");
20  clear_property(doll, "act");
21  if (is_player(who))
22    doll:write_misc_note("last_room", this);
23    if (valid(doll.duelee))
24      if ((ddoll = rpg:get_doll(doll.duelee)).duelee == who)
25        "Fled a duel.";
26        winner = doll.duelee;
27        fork (0)
28          for dude in ($set_utils:union(#15870:active_players(), {who, winner}))
29            if (rpg.rpg_options:get(`rpg:get_doll(dude).rpg_options ! E_INVIND => {}', "APB"))
30              rpg:playertell(dude, winner:titlec(), " has defeated ", who:title(), " in a duel to the death! ", who:title(), " has fled like a cowardly dog!");
31            endif
32          endfor
33        endfork
34        clear_property(ddoll, "duelee");
35      endif
36      clear_property(doll, "duelee");
37    endif
38  endif
39endif
40for pair in (this.forgiving)
41  if (who in pair)
42    (this.forgiving = setremove(this.forgiving, pair)) || clear_property(this, "forgiving");
43  endif
44endfor
45(length(this.contents) < 33) && this:notify_exit(who, this:identify_exit(who, 0));
46((((!valid(loc = who.location)) || (odb:is_rpg_room(loc) || odb:is_rpg_room(loc.location))) || (parent(loc) == $generic_editor)) || (loc in {`who.home ! ANY => $nothing', rpg.player_start})) || ((who in rpg.pcs) && who:tell("You have just exited the LambdaRPG."));
47"Profane (#30788) - Sat Nov  8 23:13:41 1997 PST - readded call to notify_exit, where'd it go?";
48"Mooshie (#106469) - Fri Jan  2, 1998 - Moved the for loop that removes exiter from aggressor lists to :notify_exit, so we don't duplicate the for loop. Also replaced :secure_stack security with :trusted_efunc.";
49"THX (#105941) - Sat Nov  7, 1998 - Only call :notify_exit() if there are fewer than 50 objects in the room.";
50"THX (#105941) - Sat Mar 31, 2001 - Added a hack for the room lighting stuff.";
51"THX (#105941) - Mon Apr 30, 2001 - Added a misc_note that tracks the player's last RPG room location for validating a return from the kids of $generic_editor.";
52"THX (#105941) - Wed May 30, 2001 - Added a loop to clean out the .forgiving property.";
53"Profane (#30788) - Thu May 31, 2001 - announce fleeing of duels, reset duelee prop";

exits

Spec this none thisFlags rxdOwner #78Definer #258

Referenced by

Source

1if ((callers()[1][3] in #46.gms) || (callers()[1][1] == this))
2  return this.exits;
3else
4  return {};
5endif

dests

Spec this none thisFlags rxdOwner #78Definer #258

Referenced by

Source

1if (callers()[1][3] in #46.gms)
2  v = {};
3  for k in (this:exits())
4    z = k;
5    while ($object_utils:isa(z, #566))
6      z = z.succ_exit;
7    endwhile
8    if ($object_utils:isa(z, $exit))
9      v = listappend(v, z.dest);
10    endif
11  endfor
12  return v;
13else
14  return {};
15endif

exit_ok

Spec this none thisDefiner #258

Referenced by

Source

1"You can teleport from a room your owner owns, from one that's free_exit, or if you're a GM's object.";
2rpg = $local.rpg;
3{what} = args;
4theExit = this:identify_exit(what, 1);
5"this:notify_exit(what, theExit);";
6if (((this:free_exit(what) || (theExit in this:exits())) || (what.owner == this.owner)) || (what.owner in rpg.gms))
7  return 1;
8elseif (`parent(theExit) ! E_INVARG' == $generic_editor)
9  return 0;
10else
11  ca = callers();
12  index = 0;
13  while (ca[index = index + 1][1..2] == {this, "exitfunc"})
14  endwhile
15  while (ca[index = index + 1][1..2] == {what, "moveto"})
16  endwhile
17  for res in (ca[index..$])
18    if (res[3] in rpg.gms)
19      return 1;
20    elseif ((!res[3]) in rpg.exporters)
21      return 0;
22    endif
23  endfor
24  return 0;
25endif
26"Profane (#30788) - Fri Jan  2, 1998 - commented out call to notify_exit; since it should be done in exitfunc anyway.";
27"THX (#105941) - Thu Oct  7, 1999 - Tweaked this for speed and passed a 1 to this:identify_exit().";

same_time

Spec this none thisDefiner #258

Referenced by

Source

1(rpg = $local.rpg):secure();
2if (this.transparency_support)
3  {dungeon, missile_exit, o_u} = {rpg.dungeon, rpg.object_DB.PARENT_missile_exit[1], $object_utils};
4  where = setadd(args, this);
5  e = this:exits();
6  d = this:dests();
7  for k in [1..length(e)]
8    if (o_u:isa(e[k], missile_exit) && (!(d[k] in where)))
9      where = o_u:isa(d[k], dungeon) ? d[k]:same_time(@where) | {@where, d[k]};
10    endif
11  endfor
12  return where;
13else
14  return {this};
15endif

announce_all_but

Spec this none thisDefiner #258

Referenced by

Source

1{exclude, @announce} = args;
2rpg = $local.rpg;
3for t in (this.contents)
4  if (t in exclude)
5  elseif (valid(doll = rpg:get_doll(t)) && doll:cannot_hear())
6  else
7    try
8      t:tell(@announce);
9    except (ANY)
10      "Ignore listener with bad :tell";
11      continue t;
12    endtry
13  endif
14endfor
15"New silent entry detection:";
16if ((this.unannounced && (i = $list_utils:iassoc(task_id(), this.unannounced))) && index(tostr(@announce), this.unannounced[i][2].name))
17  this.unannounced = listdelete(this.unannounced, i);
18endif
19"Quinn 13-OCT-93 0116: Added .transparency_support check before all that ancestry snooping.  Made one call to ancestors instead of several :isas.  Changes should speed up :announce* calls and make tracebacks less frequent.";
20"Profane 5-OCT-97 -- new code for silent entry detection.";
21"THX (#105941) - Fri Jun 29, 2001 - Copied the old code to #258:announce_all_but(old) and removed the transparency support (which no-one was using apparently).  Added exclusion of dolled objects that :cannot_hear().  Changed to the actual tells in this verb.  Otherwise we just end up going through .contents all over again.";
22"Profane (#30788) - Fri Mar  8, 2002 - tighten up the detection, make them have their name in the message.";

missile_dests

Spec this none thisDefiner #258

Referenced by

none

Source

1if (!$local.rpg:trusted(caller_perms()))
2  return E_PERM;
3endif
4who = args[1];
5where = {this};
6e = this:exits();
7d = this:dests();
8for k in [1..length(e)]
9  if (($object_utils:isa(e[k], #16049) || $object_utils:isa(e[k], #16050)) && e[k]:is_missile_channel_for(who))
10    where = listappend(where, d[k]);
11  endif
12endfor
13return where;

moveto

Spec this none thisDefiner #258

Referenced by

none

Source

1return ($local.rpg:trusted(caller_perms()) || (args[1] == $nothing)) && pass(@args);

block

Spec any any anyDefiner #258

Referenced by

none

Source

No program (verb defined but unprogrammed).

identify_exit

Spec this none thisDefiner #258

Referenced by

Source

1{what, ?loc_if_no_exit = 0} = args;
2exits = this:exits();
3for entry in (callers()[3..$])
4  if (entry[1] in exits)
5    return entry[1];
6  endif
7endfor
8return loc_if_no_exit ? what.location | $nothing;

identify_entrance

Spec this none thisDefiner #258

Referenced by

Source

1entrances = this:entrances();
2for entry in (callers()[3..$])
3  if (entry[1] in entrances)
4    return entry[1];
5  endif
6endfor
7return $nothing;
8"Mooshie (#106469) - Fri Jan 18, 2002 - This verb used to return callers()[$][1] - the 'this' of the last call. This really didn't make sense, and :identify_exit returns $nothing uniformly if no exit was used to leave. Changed it to return $nothing.";

entrances

Spec this none thisFlags rxdOwner #78Definer #258

Referenced by

Source

1if ((callers()[1][3] in #46.gms) || (callers()[1][1] == this))
2  return this.entrances;
3else
4  return {};
5endif

contents

Spec this none thisDefiner #258

Referenced by

Source

1if ((contents = this.contents) && $list_utils:assoc("look_self", callers(), 2))
2  pcs = $local.rpg.pcs;
3  for t in (contents)
4    if (t in pcs)
5      this:hide(t) && (contents = setremove(contents, t));
6    endif
7  endfor
8endif
9return contents;

old_missile_dests

Spec this none thisDefiner #258

Referenced by

none

Source

1if (!$local.rpg:trust())
2  return E_PERM;
3endif
4who = args[1];
5where = {this};
6e = this:exits();
7d = this:dests();
8for k in [1..length(e)]
9  if ($object_utils:isa(e[k], #16049) && e[k]:is_missile_channel_for(who))
10    where = listappend(where, d[k]);
11  endif
12endfor
13return where;

notify_arrival

Spec this none thisDefiner #258

Referenced by

Source

1":notify_arrival(OBJ player, OBJ entrance_used)";
2{who, entrance} = args;
3if (caller == this)
4  rpg = $local.rpg;
5  if (valid(doll = rpg:get_doll(who)))
6    doll.valid_pkp_targets = doll.INvalid_pkp_targets = {};
7    for effobj in (doll.move_effects)
8      if (`effobj.owner in rpg.gms ! ANY')
9        fork (0)
10          rpg:trusted_verb(effobj, "enter_effect") && effobj:enter_effect(who, this, entrance);
11        endfork
12      else
13        doll:setremove_att("move_effects", effobj);
14      endif
15    endfor
16  endif
17  for object in (this.contents)
18    rpg:s_i_f_i_n();
19    if (rpg:trusted_verb(object, verb))
20      object:(verb)(who, entrance);
21    endif
22  endfor
23endif
24return;
25"Irin -- Hardcode so that non-creature objects get notified.";
26"Passes to the Adventurer's Database (#46), which notifies each object in this location of the given event.";
27"Mooshie (#106469) - Fri Jan 18, 2002 - Added move effects support.";
28"Mooshie (#106469) - Fri Jan 18, 2002 - Changed this:contents() call to this.contents at the top of the :notify_arrival loop.";
29"#46:check_notification(this:contents(), verb, args);";
30"Mooshie (#106469) - Fri Jan 18, 2002 - Commented out this call to :check_notification, which duplicates the for-loop above.";
31"Hydros (#106189) - Wed Jul 13, 2005 - As the RPG gets bigger, it gets tickier.  Added forks in a couple of spots to avoid tick-outs we've been having.";
32"Hydros (#106189) - Tue, Aug 9, 2005 - Changed one of the forks to a suspending call. We were getting odd E_VERBNF tracebacks.";
33"Hydros (#106189) - Thu Sep 8, 2005 - Added a clearing of the .[IN]valid_pkp_targets props. Using these props helps to reduce ticks in $local.rpg.death_db.pkp_effect:check_for_pk().";

visible

Spec this none thisDefiner #258

Referenced by

none

Source

1"A more intelligent handling of `all' and `everything' matching.";
2"This version is tailored for the RPG, only returning kids of Adventure Gear (#517).";
3objects = pass(@args);
4pcs = (rpg = $local.rpg).pcs;
5for q in (objects)
6  if (q in pcs)
7    this:invisible(q) && (objects = setremove(objects, q));
8  endif
9endfor
10if (!(dobjstr in {"all", "everything"}))
11  return objects;
12endif
13q_u = rpg.user_utils.quinn;
14thing = rpg.thing;
15fvrb = q_u:cutr(callers(), 1)[1][2];
16if (fvrb in this.room_all_verbs)
17  objects = q_u:class_list(this.contents, thing);
18elseif (fvrb in this.player_all_verbs)
19  objects = q_u:class_list((args ? args[1] | player).contents, thing);
20else
21  objects = q_u:class_list(objects, thing);
22endif
23rpg:s_i_n();
24return objects;

@rpg-gripe

Spec any from thisDefiner #258

Referenced by

none

Source

1$mail_editor:invoke(this.gripe_recipients, "@rpg-gripe", "@gripe: " + tostr(args[1]));

magic_effects

Spec this none thisDefiner #258

Referenced by

none

Source

1":magic_effects(OBJ caster doll, NUM spell quality, OBJ spell skill, OBJ target doll) => check the room for any mystickal effects that would influence casting.";
2"A non-numeric return value will stop the casting cold; a numeric return value will be subtracted from spell quality.";
3"Newly hacked to check .magic_effects for a list of extra effects that could be added to a room by gms who don't own the room.";
4rpg = $local.rpg;
5rpg:secure();
6{caster, qual, spell, target} = args;
7effect = 0;
8for effobj in (this.magic_effects)
9  if (rpg:trusted_verb(effobj, "magic_effect"))
10    try
11      e = effobj:magic_effect(@args);
12    except x (ANY)
13      this.magic_effects = setremove(this.magic_effects, effobj);
14      e = 0;
15      dude = $nothing;
16      while ((!valid(dude)) && valid(parent(effobj)))
17        if (info = `verb_info(effobj, "magic_effect") ! ANY')
18          dude = info[1];
19        else
20          effobj = parent(effobj);
21        endif
22      endwhile
23      $mail_agent:send_message(this, effobj.owner, "Error reported", ($string_utils:from_value(x, 1, 5) + " ") + tostr(effobj));
24    endtry
25    if (typeof(e) != NUM)
26      return e;
27    else
28      effect = effect + e;
29    endif
30  else
31    this.magic_effects = setremove(this.magic_effects, effobj);
32  endif
33endfor
34"OK, add in the room's own effect:";
35try
36  e = this:magic_effect(@args);
37except x (ANY)
38  this.magic_effects = setremove(this.magic_effects, this);
39  e = 0;
40  dude = $nothing;
41  while ((!valid(dude)) && valid(parent(this)))
42    if (info = `verb_info(this, "magic_effect") ! ANY')
43      dude = info[1];
44    else
45      this = parent(this);
46    endif
47  endwhile
48  $mail_agent:send_message(this, this.owner, "Error reported", ($string_utils:from_value(x, 1, 5) + " ") + tostr(this));
49endtry
50if (typeof(e) != NUM)
51  return e;
52else
53  effect = effect + e;
54endif
55return effect;
56"Mooshie (#106469) - Fri Oct 10 01:25:41 1997 PDT - moved typeof(e) check inside of :trusted_verb to avoid E_VARNF tbs.";

set_value

Spec this none thisDefiner #258

Referenced by

none

Source

1":set_value(STR property_name, value) -- Sets this.(property_name) to `value'";
2{att, val} = args;
3(rpg = $local.rpg):secure();
4if ((caller_perms() in {this.owner, rpg.owner}) || (att in {"combat_effects", "magic_effects"}))
5  return this.(att) = val;
6else
7  return E_PERM;
8endif
9"Mooshie (#106469) - Mon Jan 19, 1998 - Re-wrote. Same thing, but faster.";
10"Profane (#30788) - Sun Aug 30, 1998 - what was the point of 2 perm checks?";
11"THX (#105941) - Thu Jul 15, 1999 - The second check only allows other gamemasters to change magic_effects and combat_effects.";

get_value

Spec this none thisDefiner #258

Referenced by

none

Source

1$local.rpg:secure();
2{att} = args;
3return this.(att);
4"Mooshie (#106469) - Mon Jan 19, 1998 - Re-wrote. Same thing, but faster.";

obvious_exits

Spec this none thisFlags rxDefiner #258

Referenced by

Source

1"Hacked to check for an :obvious verb as well as the standard property.";
2exits = {};
3for exit in (this:exits())
4  if ($code_utils:verb_or_property(exit, "obvious"))
5    exits = setadd(exits, exit);
6  endif
7endfor
8return exits;
9"Quinn 10-AUG-93 0748: Added.";

exitshock

Spec this none thisFlags rxDefiner #258

Referenced by

Source

1":exit_penalty(who) -- Penalise player for unauthorised teleport from an RPG room.";
2{who} = args;
3(rpg = $local.rpg):secure();
4{owner, gms} = {this.owner, rpg.gms};
5for what in ({who, @$object_utils:all_contents(who)})
6  rpg:s_i_f_i_n();
7  if ((valid(doll = rpg:get_doll(what)) && (is_player(what) || what.alive)) && (what.owner != owner))
8    aggressors = doll.aggressor;
9    "These aggressors may not be in the same room ... e.g., archers.";
10    clear_property(doll, "aggressor");
11    for t in (this.contents)
12      (t in aggressors) || ((valid(tdoll = rpg:get_doll(t)) && (who in tdoll.aggressor)) && (aggressors = {@aggressors, t}));
13    endfor
14    compound = 1;
15    deserted_players = {};
16    for t in (setremove(aggressors, who))
17      compound = compound + 1;
18      if ((is_player(t) && (t in connected_players())) && (!(t in gms)))
19        compound = compound + 1;
20        deserted_players = {@deserted_players, t};
21      endif
22    endfor
23    rpg:playertell(what, "The inherent implausibility of your exit briefly distorts your consciousness.");
24    if (!is_player(what))
25      doll:check_ins(10 + random(45 * compound));
26    else
27      doll:check_ins(10 + random(45 * compound));
28      doll.last_attack = doll.last_attack + (4 + compound);
29      doll:write_misc_note("teleport lag", doll.last_attack);
30      doll:clear_good_spells();
31      deserted_players && this:exitslam(doll, deserted_players);
32    endif
33  endif
34endfor
35"THX1138 (#105941) - Mon Jun 15, 1998 - Added a splurge to time out beneficial spells if the player exits the LRPG using LambdaMOO teleportation.";
36"Hannibal (#104762) - Tue July 24, 2001 - Removed connected check for exitslam.";

free_exit

Spec this none thisDefiner #258

Referenced by

Source

1return this.(verb);

bless_exit

Spec this none thisDefiner #258

Referenced by

Source

1":bless_exit(what)";
2"Bless exit from this room by the given object, during THIS task.";
3"A 'blessed' exit avoids the mental fatigue of other teleportation.";
4if ($local.rpg:trusted(caller_perms()))
5  this.blessed_exit = {args[1], task_id()};
6else
7  return E_PERM;
8endif

look_self

Spec this none thisDefiner #258

Referenced by

Source

1"Temporary :look_effects() for showing storms active in the area.";
2pass(@args);
3rpg = $local.rpg;
4if (storms = rpg.magic_db:print_storms(this))
5  player:tell_lines(storms);
6endif
7melee = duels = {};
8visible = this:contents();
9for t in (this.contents)
10  if (valid(doll = rpg:get_doll(t)))
11    for r in (doll.view_effects)
12      if (look = `r:look_msg(doll) ! E_VERBNF => ""')
13        player:tell(look);
14      endif
15    endfor
16    if ((valid(doll.duelee) && (`(ddoll = rpg:get_doll(doll.duelee)).duelee ! E_INVIND' == t)) && (!(t in $list_utils:flatten(duels))))
17      if (((doll.last_attack + 300) < time()) || ((`ddoll.last_attack ! E_INVIND => 0' + 300) < time()))
18        "Duelist idled out.";
19        rpg:tell_damage(t, "Your duel has timed out, and has been rendered null and void.");
20        rpg:tell_damage(doll.duelee, "Your duel has timed out, and has been rendered null and void.");
21        clear_property(doll, "duelee");
22        clear_property(ddoll, "duelee");
23      else
24        duels = {@duels, {t, doll.duelee}};
25      endif
26    elseif (doll.aggressor)
27      (t in visible) && (melee = {@melee, t:title()});
28    endif
29  endif
30endfor
31for pair in (duels)
32  player:tell(pair[1]:titlec(), " and ", pair[2]:title(), " are engaged in a duel to the death!");
33endfor
34(length(melee) > 1) && player:tell($string_utils:english_list(melee), " are engaged in ", {"fierce", "brutal", "vicious", "heated", "savage"}[random($)], " combat.");
35"Miles 26-Aug-1995 -- Added.";

make_fertile

Spec this none thisDefiner #258

Referenced by

none

Source

1":make_fertile() -- Temporarily toggles the 'f' bit, allowing GMs (and not builders in general) to create a child of adventure gear.  To be used as follows:";
2";;#equipment:make_fertile();return player:_create(#equipment)";
3"Where '#equipment' is the number of the object you're wanting to create.  The blank object returned will be your child.  Congratulations, Mommy.";
4if ($local.rpg:trusted(caller_perms()))
5  if (!this.f)
6    this.f = 1;
7    fork (0)
8      this.f = 0;
9    endfork
10  endif
11  return this.f;
12endif
13"Quinn 09-JUL-93 0343: Changed :trust call to :trusted(caller_perms()); Updated comment lines;  eliminated check for ownership in first 'if'.  Let it crash if a kid not owned by GM uses the parent; Now returns status of f-bit.";

_eject

Spec this none thisDefiner #258

Referenced by

none

Source

1":_eject -- called from $local.rpg:die to eject loser players who have @refused moves from G_M";
2{who} = args;
3$local.rpg:secure();
4this:bless_exit(who);
5this:eject_basic(who);

say

Spec any any anyFlags rxdDefiner #258

Referenced by

none

Source

1doll = (rpg = $local.rpg):get_doll(player);
2if (valid(doll) && (p = doll:cannot_talk()))
3  return player:tell((typeof(p) == STR) ? p | "You're paralyzed and find it impossible to talk.");
4endif
5try
6  if (is_player(player) || `player.yeller ! ANY => 0')
7    player:tell("You say, \"", argstr, "\"");
8    this:announce_all_but({player}, player.name, " ", $gender_utils:get_conj("says", player), ", \"", argstr, "\"");
9  else
10    player:tell("You say: \"", argstr, "\"");
11    rpg:rpg_announce_all_but(this, {player}, player.name, " ", $gender_utils:get_conj("says", player), ", \"", argstr, "\"");
12  endif
13except (ANY)
14  "Don't really need to do anything but ignore the idiot who has a bad :tell";
15endtry

match_exit

Spec this none thisFlags rxDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2if (valid(p = pass(@args)))
3  if ((caller == this) || (caller in rpg.object_db.walking_features))
4    if (this:sleeping(player))
5      rpg:playertell(player, "In your dreams, you yearn to travel.");
6      kill_task(task_id());
7    elseif (this:resting(player))
8      this:stand(player);
9    endif
10  endif
11  c = callers();
12  while (c[1][1..2] == {this, verb})
13    c = c[2..$];
14  endwhile
15  "i.e. strip out any child versions of this verb";
16  if (((c[1][1] == this) && rpg:trusted(c[1][3])) && (m = (doll = rpg:get_doll(player)):cannot_walk()))
17    "i.e. ONLY do the paralysis crap if match_exit is called by a trusted verb... let non-trusted verbs match_exits, because match_exit can be called non-VR, e.g. by FO's";
18    "Thus we prevent people from getting stamina checks via the overloaded combat effect by calling @rose, for example.";
19    (length(callers()) < 7) && rpg:playertell(player, (typeof(m) == STR) ? m | "You're paralyzed.  You aren't going to be doing much moving around.");
20    return $failed_match;
21  elseif (p in rpg.object_db.bad_exits)
22    return $failed_match;
23  endif
24endif
25return p;
26"Profane (#30788) - Mon Mar  5, 2001 - change security bits.";
27"THX (#105941) - Tue Apr  3, 2001 - Upgraded to do sleeping-refusal and auto-standing here rather than in #49444:east.  Cleaned up quite a bit.";

initialize

Spec this none thisDefiner #258

Referenced by

none

Source

1owner = (rpg = $local.rpg).owner;
2if ((!(this.owner in rpg.gms)) && (!(parent(this) in rpg.object_DB.OBJ_player_ownable_room)))
3  callers = callers();
4  fork (0)
5    msg = {$string_utils:nn(player), toliteral(callers), ((($string_utils:nn(this) + " ") + $string_utils:nn(parent(this))) + " ") + ctime()};
6    $mail_agent:send_message(owner, {owner}, "Player has created child of #258", msg);
7  endfork
8endif
9return pass(@args);

sleep doze nap snooze rest sit crash slump collapse yawn snore search wake stand rise pray chant

Spec none none noneDefiner #258

Referenced by

Source

1"A catch all verb that help the rpg room look smarter by not saying \"I don't understand that.\" all the time.";
2if (!((caller in {player, this, this.location}) && (player.location == this)))
3  return E_PERM;
4endif
5if (verb in {"sleep", "doze", "nap", "snooze", "rest", "sit", "crash", "slump", "collapse"})
6  player:tell("You can't seem to get comfortable here.");
7elseif (verb == "yawn")
8  player:tell("You yawn.");
9elseif (verb in {"snore", "wake"})
10  player:tell("You aren't sleeping here.");
11elseif (verb in {"stand", "rise"})
12  player:tell("You aren't resting here.");
13elseif (verb == "search")
14  player:tell("You make a quick search of the room and find nothing hidden.");
15else
16  player:tell("This isn't a good place to ", verb, ".");
17endif

all_contents

Spec this none thisDefiner #258

Referenced by

Source

1"Copied from object utilities (#3669):all_contents by Hacker (#18105) Wed Jul  2 06:37:05 1997 PDT";
2"all_contents(object)";
3"Return a list of all objects contained (at some level) by object.";
4for y in (res = args[1].contents)
5  y.contents && (res = {@res, @this:all_contents(y)});
6endfor
7return res;

read_misc_note

Spec this none thisDefiner #258

Referenced by

Source

1":read_misc_note(name)";
2"Much as the same verb on the voodoo doll. In fact, the same verb.";
3"View a miscellaneous note on the voodoo doll.";
4$local.rpg:secure();
5{index} = args;
6for elm in (this.misc_notes)
7  {elm1, elm2} = elm;
8  if (elm1 == index)
9    return elm2;
10  endif
11endfor
12return E_PROPNF;

write_misc_note

Spec this none thisDefiner #258

Referenced by

Source

1":write_misc_note(name, value)";
2"As per the vebr on #74";
3if (!$local.rpg:trusted(caller_perms()))
4  return E_PERM;
5elseif (length(args) != 2)
6  return E_ARGS;
7endif
8notes = this.misc_notes;
9index = args[1];
10for i in [1..length(notes)]
11  if (notes[i][1] == index)
12    this.misc_notes[i][2] = args[2];
13    return i;
14  endif
15endfor
16this.misc_notes = listappend(notes, args);
17return length(notes) + 1;

erase_misc_note

Spec this none thisDefiner #258

Referenced by

none

Source

1":erase_misc_note(name)";
2"Remove a miscellaneous note from the room.";
3if (!$local.rpg:trusted(caller_perms()))
4  return E_PERM;
5endif
6notes = this.misc_notes;
7index = args[1];
8for i in [1..length(notes)]
9  if (notes[i][1] == index)
10    this.misc_notes = listdelete(notes, i);
11    size = length(notes) - 1;
12    if (size == 0)
13      clear_property(this, "misc_notes");
14    endif
15    return size;
16  endif
17endfor
18return E_PROPNF;

combat_effects

Spec this none thisDefiner #258

Referenced by

none

Source

1":combat_effect(DOLL by, DOLL target, OBJ weapon) => check the room for any wierd effects which would impede/assist the attacker.";
2"A non-numeric return value will stop the swing cold; a numeric return value will be subtracted from attack quality.";
3"Newly hacked to check .combat_effects for a list of extra effects that could be added to a room by gms who don't own the room.";
4rpg = $local.rpg;
5rpg:secure();
6{by, target, weapon} = args;
7effect = 0;
8for effobj in (this.combat_effects)
9  if (rpg:trusted_verb(effobj, "combat_effect"))
10    try
11      e = effobj:combat_effect(@args);
12    except x (ANY)
13      this.combat_effects = setremove(this.combat_effects, effobj);
14      e = 0;
15      dude = $nothing;
16      while ((!valid(dude)) && valid(parent(effobj)))
17        if (info = `verb_info(effobj, "combat_effect") ! ANY')
18          dude = info[1];
19        else
20          effobj = parent(effobj);
21        endif
22      endwhile
23      $mail_agent:send_message(this, effobj.owner, "Error reported", ($string_utils:from_value(x, 1, 5) + " ") + tostr(effobj));
24    endtry
25  else
26    this.combat_effects = setremove(this.combat_effects, effobj);
27  endif
28  if (typeof(e) != NUM)
29    return e;
30  else
31    effect = effect + e;
32  endif
33endfor
34"OK, add in the room's own effect:";
35try
36  e = this:combat_effect(@args);
37except x (ANY)
38  this.combat_effects = setremove(this.combat_effects, this);
39  e = 0;
40  dude = $nothing;
41  while ((!valid(dude)) && valid(parent(this)))
42    if (info = `verb_info(this, "combat_effect") ! ANY')
43      dude = info[1];
44    else
45      this = parent(this);
46    endif
47  endwhile
48  $mail_agent:send_message(this, this.owner, "Error reported", ($string_utils:from_value(x, 1, 5) + " ") + tostr(this));
49endtry
50if (typeof(e) != NUM)
51  return e;
52else
53  effect = effect + e;
54endif
55return effect;

bless_for_teleport

Spec this none thisDefiner #258

Referenced by

none

Source

1"Usage: bless_for_teleport(OBJ thing)";
2"Sets this room to allow the same task to teleport an object in.";
3if (!$local.rpg:trusted(caller_perms()))
4  return E_PERM;
5endif
6{what} = args;
7this.teleport_object = what;
8this.teleport_task = task_id();
9"Mooshie (#106469) - Sun Oct 12 00:06:40 1997 PDT - Added.";

notify_exit

Spec this none thisDefiner #258

Referenced by

Source

1"Passes to the Adventurer's Database (#46), which notifies each object in this location of the given event.";
2":notify_exit(OBJ player, OBJ exit_used)";
3{who, exit} = args;
4if (caller == this)
5  gms = (rpg = $local.rpg).gms;
6  if (valid(doll = rpg:get_doll(who)))
7    for effobj in (doll.move_effects)
8      if (`effobj.owner in gms ! ANY')
9        fork (0)
10          rpg:trusted_verb(effobj, "exit_effect") && effobj:exit_effect(who, this, exit);
11        endfork
12      else
13        doll:setremove_att("move_effects", effobj);
14      endif
15    endfor
16  endif
17  for object in (this.contents)
18    if (valid(doll = rpg:get_doll(object)) && doll.aggressor)
19      doll.aggressor = setremove(doll.aggressor, who);
20      doll.valid_pkp_targets = setremove(doll.valid_pkp_targets, who);
21      doll.INvalid_pkp_targets = setremove(doll.INvalid_pkp_targets, who);
22    endif
23    if (rpg:trusted_verb(object, verb))
24      fork (0)
25        object:(verb)(who, exit);
26      endfork
27    endif
28  endfor
29endif
30return;
31"Profane (#30788) - Sat Dec  5, 1998 - error trap the calls.";
32"Mooshie (#106469) - Fri Jan 18, 2002 - Added move effects support.";
33"Hydros (#106189) - Wed Jul 13, 2005 - As the RPG gets bigger, it gets tickier.  Added forks in a couple of spots to avoid tick-outs we've been having.";
34"Hydros (#106189) - Tue Oct 4, 2005 - Added clearing of .[IN]valid_pkp_targets props to aid the new PKProtection system.";

att*ack hit ki*ll

Spec any none noneFlags rxdDefiner #258

Referenced by

none

Source

1"attack <target>";
2"attack <target>'s <bodypart>";
3rpg = $local.rpg;
4if ((((!valid(cp = caller_perms())) || rpg:trusted(cp)) || ((caller == this) || (caller in rpg.vacuum.monsters))) || (!is_player(player)))
5  if (parsed = $match_utils:parse_possessive_reference(dobjstr))
6    {dobjstr, where} = parsed;
7  else
8    where = "";
9  endif
10  if (valid(doll = rpg:get_doll(player)))
11    for t in (doll.aggressor)
12      (t.location == this) || (doll.aggressor = setremove(doll.aggressor, t));
13    endfor
14    if (dobjstr)
15      "... do nothing ... ";
16    elseif (agg = doll.aggressor)
17      dobjstr = tostr(agg[random($)]);
18    else
19      rpg:playertell(player, "Who (or what) are you trying to hit?");
20      return;
21    endif
22    if (w = doll:wielding())
23      {first, @weaps} = w;
24      return first:hit(dobjstr, "with", tostr(first), weaps, where);
25    else
26      rpg:playertell(player, "You are unarmed.");
27      return E_INVIND;
28    endif
29  else
30    rpg:playertell(player, "Your feeble attacks have no effect upon ", dobj.name, ". Perhaps you should consider being trained with the Bovine Illuminati.");
31    return E_INVARG;
32  endif
33else
34  return E_PERM;
35endif

he*al sl*ow re*call li*felink unl*ink mindp*robe de*press st*ealskill pa*cify unw*all fo*rcewall bar*kskin di*spel har*den hai*l ices*hell waterw*hip conj*ure sum*mon sto*rm sti*nkcloud pr*edict heat charm*foe hold*foe raven*fear bi*ting_cloud haste acidr*ain appr*aise poi*son tang*le gly*ph ca*lm minds*hock sha*tter mag*icfist rune reverse*missiles det*ect windw*all ench*ant rot fireb*olt viper*_bite unviper backf*ire unbar*k unbac*kfire petals wound drain compost triage beguile mergestorm stoneflesh blade*barrier unblade*barrier daggers*torm parch chill unreverse resurrect dirge fort*ify haw*thorn anim*ate

Spec any any anyFlags rxdDefiner #258

Referenced by

none

Source

1"Copied from Generic Dungeon Room (#258):firebolt [verb author Grand_Master (#2693)] at Mon Sep 12 17:39:10 2005 PDT";
2rpg = $local.rpg;
3mdb = rpg.magic_db;
4if (callers() && ((caller != this) && (!(caller in rpg.vacuum.monsters))))
5  rpg:secure();
6endif
7"fiddle with the arguments given so they'll match.";
8test = $string_utils:parse_command((verb + " ") + argstr);
9true_dobjstr = dobjstr;
10if (!prepstr)
11  test[6][2] = {@test[6][2], "with/using", "out of/from inside/from"};
12endif
13"First, see short-circuit if the player is trying to call the exact verb on the exact object specified:";
14if ((((dobj != this) && valid(dobj)) && $match_utils:match_verb(verb, dobj, args)) || (valid(iobj) && $match_utils:match_verb(verb, iobj, args)))
15  "such was the case, so we can stop now.";
16  return;
17endif
18"If a preposition isn't given, we just let the verb match `from' and `with' the prepositions used for casting from the focus directly.";
19"Iobj is always the focus, which we set down below.";
20"Dobj takes some more fiddling, and depends on the focus being used, so we fiddle it below.";
21"determine the full name of the verb we want:";
22spells = verb_info(rpg.dungeon, verb)[3];
23spells = " " + $string_utils:strip_chars(spells, "*");
24match = match(spells, ("%<%(" + verb) + "%(%w%|_%)*%)%>");
25try
26  spell = substitute("%1", match);
27except (E_INVARG)
28  "No match at all.";
29  player:tell("The spellcasting shortcut verb can't seem to figure out which spell \"", verb, "\" refers to.");
30  return;
31endtry
32"Now find what objects it's on.";
33doll = rpg:get_doll(player);
34stuff = valid(iobj) ? {iobj} | {};
35"if the player gave an iobj (which will be a focus), we check that one first";
36stuff = {@stuff, @`doll:wielding() ! ANY => {}', @`doll:wearing() ! ANY => {}'};
37"then we check held/worn stuff.";
38"Now we see which of these things is a focus for the requested spell.";
39candidates = {};
40wrong_prep = {};
41for thingy in (stuff)
42  if (verbloc = $object_utils:has_callable_verb(thingy, spell))
43    if (verb_args(verbloc[1], spell)[2] in test[6][2])
44      candidates = setadd(candidates, thingy);
45    else
46      "This bit is in case of failure, so we can explain syntax.";
47      wrong_prep = setadd(wrong_prep, thingy);
48    endif
49  endif
50endfor
51"now try and call the spell verb";
52for focus in (candidates)
53  "$match_utils:match_verb needs iobjstr and prepstr set for it to work, so we set them here, per which focus we are trying.";
54  iobjstr = tostr(iobj = focus);
55  focus_args = verb_args($object_utils:has_callable_verb(focus, spell)[1], spell);
56  prepstr = $code_utils:short_prep(focus_args[2]);
57  "Fiddling with dobj is necessary for $match_utils:match_verb to call verbs with a `none' dobj argument.";
58  if (!true_dobjstr)
59    "Player did not specify a dobj, so we make some assumptions.";
60    if (focus_args[1] != "none")
61      if (spell in {@mdb.peaceful_spells, @mdb.self_default_spells})
62        "assume player as target for peaceful spells.";
63        dobjstr = tostr(dobj = player);
64      elseif (doll.aggressor)
65        "Hostile spell, pick a random aggressor";
66        dobjstr = tostr(dobj = doll.aggressor[random($)]);
67      else
68        "Casting hostile spell with no aggressor. dork.";
69        dobjstr = "";
70        dobj = $nothing;
71      endif
72    else
73      "The player did not give us a dobj, but we might have set it in trying to match a verb without a `none' dobj argument, so unset it here.";
74      dobjstr = "";
75      dobj = $nothing;
76    endif
77  elseif ((dobj == focus) && (focus_args[1] == "none"))
78    dobjstr = "";
79    dobj = $nothing;
80  endif
81  if ($match_utils:match_verb(spell, focus, {}))
82    "bingo, a match";
83    return;
84  endif
85endfor
86"Ok, now try to explain the problem:";
87if (wrong_prep)
88  $command_utils:explain_syntax(wrong_prep[1], verb, args);
89else
90  player:tell("You try to cast ", `rpg:match_skill(spell):title() ! E_INVIND => verb', ", but realize you lack the proper focus.");
91endif

emote

Spec any any anyFlags rxdDefiner #258

Referenced by

none

Source

1doll = (rpg = $local.rpg):get_doll(player);
2if (valid(doll) && (p = doll:cannot_emote()))
3  return player:tell((typeof(p) == STR) ? p | "You're paralyzed and find it impossible to emote anything.");
4endif
5argstr = (argstr && (argstr[1] == ":")) ? argstr[2..$] | (" " + argstr);
6if (is_player(player))
7  " this:show_all_but({`this:sleeping() ! E_VERBNF'}, player.name, argstr)";
8  this:show_all_but(`this:sleeping() ! E_VERBNF', player.name, argstr);
9else
10  player:tell("You emote: ", player.name, argstr);
11  rpg:rpg_show_all_but(this, {player, @`this:sleeping() ! E_VERBNF => {}'}, player.name, argstr);
12endif

exitclean

Spec this none thisDefiner #258

Referenced by

none

Source

1(rpg = $local.rpg):secure();
2{doll} = args;
3n = 0;
4for t in (sch = doll.schedule)
5  {what, effect, time, various} = t;
6  n = n + 1;
7  if (effect in {"unwind", "unwall", "unbark", "unstone"})
8    doll.schedule[n][3] = time();
9  elseif (effect == "unspeed")
10    if (various[1] > doll.slowness)
11      "They're hasted...";
12      doll.schedule[n][3] = time();
13    endif
14  endif
15endfor

notify_player

Spec this none thisFlags rxdOwner #58142Definer #258

Referenced by

none

Source

1if (caller == $local.rpg)
2  {who, msg} = args;
3  (who.location == this) && notify(who, msg);
4else
5  return E_PERM;
6endif

detect_magic_msg

Spec this none thisDefiner #258

Referenced by

none

Source

1"Returns messages displayed when a player successfully casts detect in this room.";
2{bydoll, qual} = args;
3(rpg = $local.rpg):secure();
4msg = {};
5for d in (setremove(this.magic_effects, this))
6  if ($object_utils:has_callable_verb(d, "detect_magic_msg"))
7    msg = {@msg, @(typeof(f = d:detect_magic_msg(bydoll, qual)) == LIST) ? f | {f}};
8  endif
9endfor
10if (oset = (typeof(temp = this:read_misc_note("g&r")) == LIST) ? temp | {})
11  "revise the list, take out expired glyphs&runes etc.";
12  grset = $list_utils:build_alist(oset, 3);
13  for d in (grset)
14    if (time() > d[3])
15      grset = setremove(grset, d);
16    endif
17  endfor
18  if (!grset)
19    rpg.magic_db.gr_combat_effect:remove_effect(this);
20    return msg;
21  endif
22  if ((length(grset) * 3) != length(oset))
23    this:write_misc_note("g&r", $list_utils:flatten(grset));
24  endif
25  gset = rset = {};
26  for d in (grset)
27    if (d[2] < 0)
28      gset = {@gset, d};
29    else
30      rset = {@rset, d};
31    endif
32  endfor
33  if (qual > 100)
34    "say what they are, their strength, when they expire.";
35    msg = {@msg, "Your powerfully enhanced vision reveals much about the glowing magical energies upon the ground:"};
36    for d in (grset)
37      f = abs(d[2]);
38      if (f > 50)
39        stren = "A pulsing and brightly throbbing ";
40      elseif (f > 25)
41        stren = "A solidly glowing ";
42      else
43        stren = "A flickering ";
44      endif
45      msg = {@msg, tostr(stren, d[1].name, (d[2] < 0) ? " glyph " | " rune ", "will expire in ", $time_utils:english_time(d[3] - time()), ".")};
46    endfor
47    return msg;
48  elseif (qual > 75)
49    "say what the glyphs and runes are, and a qualifier indicating their strength";
50    nmsg = "Your enhanced vision reveals";
51    for d in (grset)
52      f = abs(d[2]);
53      if (f > 50)
54        stren = "a pulsing and brightly throbbing ";
55      elseif (f > 25)
56        stren = "a solidly glowing ";
57      else
58        stren = "a flickering ";
59      endif
60      nmsg = nmsg + tostr(((d == grset[$]) && (length(grset) > 1)) ? " and " | " ", stren, d[1].name, (d[2] < 0) ? " glyph," | " rune,");
61    endfor
62    nmsg[$] = " ";
63    return {@msg, nmsg + "etched into the ground here."};
64  elseif (qual > 50)
65    "say what the glyphs and runes are";
66    nmsg = "Your enhanced vision reveals";
67    for d in (grset)
68      nmsg = nmsg + tostr(((d == grset[$]) && (length(grset) > 1)) ? " and " | " ", $string_utils:a_or_an(d[1].name), " ", d[1].name, (d[2] < 0) ? " glyph," | " rune,");
69    endfor
70    nmsg[$] = " ";
71    return {@msg, nmsg + "etched into the ground here."};
72  elseif (qual > 25)
73    "say #glyphs and #runes";
74    return {@msg, tostr("Your enhanced vision reveals ", gset ? tostr($string_utils:english_number(length(gset)), " glyph", (length(gset) > 1) ? "s " | " ") | "", (gset && rset) ? "and " | "", rset ? tostr($string_utils:english_number(length(rset)), " rune", (length(gset) > 1) ? "s " | " ") | "", "etched into the ground here.")};
75  else
76    "just say total # glyphs&runes";
77    return {@msg, tostr("Your enhanced vision reveals ", (length(grset) > 1) ? $string_utils:english_number(length(grset)) + " glyphs and/or runes" | "a glyph or rune", " etched into the ground here.")};
78  endif
79else
80  return msg;
81endif
82"Dred 2-12-99: Created new spell result.";
83"Copied from Perceiving the Powers of Magic (#476):detect_magic_msg(room) by Dred (#49925) Tue Feb 16 06:13:51 1999 PST";

hide

Spec this none thisDefiner #258

Referenced by

Source

1{what} = args;
2if (valid(doll = $local.rpg:get_doll(what)))
3  for t in (doll.view_effects)
4    if (`t:hide_from_tell_contents(what) ! E_VERBNF')
5      return 1;
6    endif
7  endfor
8endif
9return 0;

disfunc

Spec this none thisFlags rdDefiner #258

Referenced by

none

Source

1if ((((cp = caller_perms()) == player) || $perm_utils:controls(cp, player)) || (caller == this))
2  if (((player in $local.rpg.pcs) && (player == player.owner)) && (!(player in $local.rpg.gms)))
3    this:announce_all_but({player}, $string_utils:pronoun_sub("%N %<has> disconnected.", player));
4  else
5    pass(@args);
6  endif
7endif

identify_exit(old)

Spec this none thisDefiner #258

Referenced by

none

Source

1lenc = length(ca = callers());
2for entry in (ca[3..lenc])
3  if (entry[1] in this:exits())
4    return entry[1];
5  endif
6endfor
7return $nothing;
8return args[1].location;

say(old)

Spec any any anyFlags rxdDefiner #258

Referenced by

none

Source

1doll = $local.rpg:get_doll(player);
2if (valid(doll) && (p = doll:cannot_talk()))
3  return player:tell((typeof(p) == STR) ? p | "You're paralyzed and find it impossible to talk.");
4endif
5try
6  is_player(player) && player:tell("You say, \"", argstr, "\"");
7  this:announce_all_but({player}, player.name, " ", $gender_utils:get_conj("says", player), ", \"", argstr, "\"");
8except (ANY)
9  "Don't really need to do anything but ignore the idiot who has a bad :tell";
10endtry

emote(old)

Spec any any anyFlags rxdDefiner #258

Referenced by

none

Source

1doll = (rpg = $local.rpg):get_doll(player);
2if (valid(doll) && (p = doll:cannot_emote()))
3  return player:tell((typeof(p) == STR) ? p | "You're paralyzed and find it impossible to emote anything.");
4endif
5argstr = (argstr && (argstr[1] == ":")) ? argstr[2..$] | (" " + argstr);
6if (is_player(player))
7  this:announce_all_but({}, player.name, argstr);
8else
9  player:tell("You emote: ", player.name, argstr);
10  rpg:rpg_announce_all_but(this, {player}, player.name, argstr);
11endif

exitshock(old)

Spec this none thisFlags rxDefiner #258

Referenced by

none

Source

1":exit_penalty(who) -- Penalise player for unauthorised teleport from an RPG room.";
2{who} = args;
3(rpg = $local.rpg):secure();
4owner = this.owner;
5for what in ({who, @$object_utils:all_contents(who)})
6  rpg:time_stop(1);
7  if ((valid(doll = rpg:get_doll(what)) && (is_player(what) || what.alive)) && (what.owner != owner))
8    aggressors = doll.aggressor;
9    for t in (this.contents)
10      (t in aggressors) || ((valid(tdoll = rpg:get_doll(t)) && (who in tdoll.aggressor)) && (aggressors = {@aggressors, t}));
11    endfor
12    compound = 1;
13    for t in (aggressors)
14      compound = (compound + 1) + is_player(t);
15    endfor
16    rpg:playertell(what, "The inherent implausibility of your exit briefly distorts your consciousness.");
17    if ((connected = what in connected_players()) || (!is_player(what)))
18      doll:check_ins(10 + random(45 * compound));
19    endif
20    if (connected)
21      doll.last_attack = (doll.last_attack + 4) + compound;
22      doll:clear_good_spells();
23    endif
24    clear_property(doll, "aggressor");
25  endif
26endfor
27"THX1138 (#105941) - Mon Jun 15, 1998 - Added a splurge to time out beneficial spells if the player exits the LRPG using LambdaMOO teleportation.";

exitslam

Spec this none thisDefiner #258

Referenced by

Source

1{doll, mob} = args;
2if (`this.arena ! E_PROPNF => 0')
3  "Combat Arena: fight is not to-the-death so don't penalize.";
4elseif (caller == this)
5  rpg = $local.rpg;
6  vowed = rpg.user_utils.ogwul:vowed(doll);
7  if (((note = doll:read_misc_note("first_blood")) != E_PROPNF) || vowed)
8    {char, puzzles, result} = {doll.character, rpg.puzzle_log, 0};
9    if (note)
10      for t in (note)
11        {who, time} = t;
12        if ((who in mob) && (time > time()))
13          puzzles:add_solved(char, verb);
14          result = result + 1;
15        endif
16      endfor
17    else
18      puzzles:add_solved(char, verb);
19      result = result + 1;
20    endif
21    if (result || vowed)
22      {object_db, losses, su} = {rpg.object_db, {}, $string_utils};
23      hits = severity = puzzles:has_solved(char, verb);
24      rpg.object_db.exitslam_effect:add(doll);
25      doll:write_misc_note("exitslam", time() + (99 * severity));
26      contents = $object_utils:all_contents(char);
27      severity = min(severity, length(contents));
28      for t in (contents)
29        rpg:s_i_f_i_n();
30        if (((length(losses) < severity) && object_db:is_thing(t)) && (!t:keep_at_death(char)))
31          losses = {@losses, t.name};
32          t:moveto(this);
33        endif
34      endfor
35      rpg:rpg_announce_all_but(this, {char}, "In ", char.pp, " haste to leave, ", char.name, " teleports out without using LambdaRPG methods and leaves behind ", char.pp, " ", eng_list = su:english_list(losses), "!");
36      rpg:playertell(char, "In your haste to get away from ", su:english_list($list_utils:map_prop(mob, "name")), ", you become distracted while using teleportation techniques that aren't LambdaRPG methods and lose control of your ", eng_list, "!");
37      rpg:rpg_announce_all_but(this, {char}, char.name, "'s equipment clatters to the ground.");
38      fork (0)
39        $mail_agent:send_message(rpg.owner, rpg.object_db.confess, (su:nn(this) + ":") + verb, {((((su:nn(char) + " lost a ") + eng_list) + " whilst escaping from ") + su:nn(mob)) + " after initiating the combat (or having vowed to escape using only themely means).", ("This player has been affected " + tostr(hits)) + " times to date."});
40      endfork
41    endif
42  endif
43endif

sc*ore health ht co*ndition

Spec this none thisDefiner #258

Referenced by

none

Source

1"THX (#105941) - Thu Mar 16, 2000 - Interrupts the 'sc' on the Bovine FO to check sleeping players.";
2(rpg = $local.rpg):secure();
3if (!dobjstr)
4  dobj = player;
5elseif (valid(dobj))
6  "gotcha";
7else
8  dobj = player:my_match_object(dobjstr);
9endif
10dobj = toobj(dobj);
11if (valid(doll = rpg:get_doll(dobj)))
12  for t in ({"inj", "ins", "fat"})
13    (doll.(t) < 0) && (doll.(t) = 0);
14  endfor
15endif
16if (player in rpg.gms)
17elseif (`player.location:sleeping(player) ! ANY => 0')
18  return player:tell(rpg.user_utils.thx1138:sleeping_score(dobj));
19endif
20rpg.gm_feature.gm_utils:score(dobj);
21"THX (#105941) - Mon Dec 18, 2000 - Put an ugly bloody hack in to catch negative injury, fatigue, or sanity scores before continuing.";

hidden_verbs

Spec this none thisDefiner #258

Referenced by

none

Source

1{who} = args;
2prev = pass(who);
3generic = (rpg = $local.rpg).dungeon;
4if (!rpg:trusted(who))
5  prev = {@prev, {generic, verb_info(generic, "sleep")[3], {"none", "none", "none"}}};
6  prev = {@prev, {generic, verb_info(generic, "heal")[3], {"any", "any", "any"}}};
7endif
8return prev;

setadd_exit setremove_exit

Spec this none thisDefiner #258

Referenced by

none

Source

1":setadd[remove]_exit(OBJ exit)  --  Adds/removes and exit to/from an RPG room _if_ the exit is in the room's .allowed_exits property.";
2"If (room == exit.dest) then the exit is added/removed from room.entrances.  If (room == exit.source) then the exit is added/removed from room.exits.";
3{exit} = args;
4(rpg = $local.rpg):secure();
5if (`exit.source ! ANY => $nothing' == this)
6  slot = "exits";
7elseif (`exit.dest ! ANY => $nothing' == this)
8  slot = "entrances";
9else
10  raise(E_INVARG);
11endif
12if ((this.owner in rpg.gms) && (exit in this.allowed_exits))
13  this.(slot) = index(verb, "add") ? setadd(this.(slot), exit) | setremove(this.(slot), exit);
14else
15  raise(E_PERM);
16endif
17"THX (#105941) - Thu Mar 23, 2000 - Added.";

invisible

Spec this none thisDefiner #258

Referenced by

Source

1{what} = args;
2if (valid(doll = $local.rpg:get_doll(what)))
3  for t in (doll.view_effects)
4    if (`t:hide_from_visible(what) ! E_VERBNF')
5      return 1;
6    endif
7  endfor
8endif
9return 0;

match_exit(old)

Spec this none thisFlags rxDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2c = callers();
3while (c[1][1..2] == {this, verb})
4  c = c[2..$];
5endwhile
6"i.e. strip out any child versions of this verb";
7"if (caller == this || caller_perms() in rpg.gms)";
8if (valid(p = pass(@args)))
9  if (((c[1][1] == this) && rpg:trusted(c[1][3])) && (m = (doll = rpg:get_doll(player)):cannot_walk()))
10    "i.e. ONLY do the paralysis crap if match_exit is called by a trusted verb... let non-trusted verbs match_exits, because match_exit can be called non-VR, e.g. by FO's";
11    "Thus we prevent people from getting stamina checks via the overloaded combat effect by calling @rose, for example.";
12    (length(callers()) < 7) && player:tell((typeof(m) == STR) ? m | "You're paralyzed.  You aren't going to be doing much moving around.");
13    return $failed_match;
14  elseif (p in rpg.object_db.bad_exits)
15    return $failed_match;
16  else
17    return p;
18  endif
19else
20  return p;
21endif
22"else";
23"  return $failed_match;";
24"endif";
25"Profane (#30788) - Mon Mar  5, 2001 - change security bits.";

_eject(old)

Spec this none thisDefiner #258

Referenced by

none

Source

1":_eject -- called from #46:die to eject loser players who have @refused moves from G_M";
2if ($local.rpg:trusted(caller_perms()))
3  this:eject_basic(args[1]);
4endif

duel

Spec any any anyDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2if (player.location != this)
3  rpg:playertell(player, "No remote dueling, sorry.");
4elseif (!valid(doll = rpg:get_doll(player)))
5  rpg:playertell(player, "Duel how?  You need to get illuminated first.  Try #88.");
6elseif ($command_utils:object_match_failed(target = this:match(argstr), argstr))
7elseif (target == player)
8  rpg:playertell(player, "... Try the termination centre.");
9elseif (!is_player(target))
10  rpg:playertell(player, "You can only duel other players.");
11elseif (player.owner != player)
12  rpg:playertell(player, "Duelling as a guest?  What a pansy; get a real character first!");
13elseif (target.owner != target)
14  rpg:playertell(player, "Dueling guests?  What fun is that?  Forget it.");
15elseif (!valid(tdoll = rpg:get_doll(target)))
16  rpg:playertell(player, target.name, " does not seem to be enlightened; therefore you cannot duel ", target.po, ".");
17elseif (player.location != target.location)
18  rpg:playertell(player, "You're not in the same place as ", target.name, ".");
19elseif (valid(doll.duelee))
20  if (doll.duelee == target)
21    if (tdoll.duelee == player)
22      rpg:playertell(player, "Um, you and ", target.name, " are already dueling.");
23    else
24      rpg:playertell(player, "You have already challenged ", target.name, " to a duel to the death.");
25    endif
26  else
27    if (`rpg:get_doll(doll.duelee).duelee ! E_INVIND' == player)
28      rpg:playertell(player, "You're currently dueling ", doll.duelee.name, "; one duel at a time.");
29    else
30      rpg:playertell(player, "You've just challenged ", doll.duelee.name, " to a duel, finish that one first.");
31    endif
32  endif
33elseif ((valid(who = tdoll.duelee) && valid(`rpg:get_doll(tdoll.duelee).duelee ! E_INVIND => $nothing')) && (who != player))
34  rpg:playertell(player, target.name, " is currently engaged in a duel with ", who.name, "; wait until they've finished.");
35elseif (setremove(tdoll.aggressor, player))
36  rpg:playertell(player, target.name, " seems occupied with another combat at the moment.  Maybe try again later, or ask them to break off all combat.");
37elseif (teammates = rpg.user_utils.quinn:class_list(doll.armour_effects, rpg.doll))
38  rpg:playertell(player, "You'll have to unteam with ", $string_utils:english_list($list_utils:map_prop($list_utils:map_prop(teammates, "character"), "name")), " before you can engage in a duel.");
39elseif (teammates = rpg.user_utils.quinn:class_list(tdoll.armour_effects, rpg.doll))
40  rpg:playertell(player, target.name, " will have to unteam with ", $string_utils:english_list($list_utils:map_prop($list_utils:map_prop(teammates, "character"), "name")), " before you can engage ", target.po, " in a duel.");
41elseif (tdoll.duelee == player)
42  "Accepting duel.";
43  doll.duelee = target;
44  rpg:tell_damage(player, "You accept ", target.name, "'s duel to the death! FIGHT!");
45  rpg:tell_damage(target, player.name, " accepts your duel to the death! FIGHT!");
46  rpg.owner.duelers = {@rpg.owner.duelers, {player, target, time()}};
47  doll.last_attack = time();
48  tdoll.last_attack = time();
49else
50  "Initiating";
51  doll.duelee = target;
52  rpg:tell_damage(player, "You have challenged ", target.name, " to a duel to the death!");
53  rpg:tell_damage(target, player.name, " has challenged you to a duel to the death! Type `duel ", player.name, "' to accept or `decline ", player.name, "' to refuse.");
54endif
55"Hydros (#106189) - Tue Nov 1, 2005 - Added check for target's location matching that of player.";

decline

Spec any any anyDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2"decline <player> => declines a duel to the death that player has challenged you to.";
3if (player.location != this)
4  rpg:playertell(player, "No remote dueling (or un-dueling), sorry.");
5elseif (!valid(doll = rpg:get_doll(player)))
6  rpg:playertell(player, "Um dude, no one could duel you even if they wanted, stop being so paranoid.");
7elseif ($command_utils:object_match_failed(target = this:match(argstr), argstr))
8elseif (!valid(tdoll = rpg:get_doll(target)))
9  rpg:playertell(player, "Um, ", target.name, " couldn't duel you even if ", `target.ps ! ANY => "it"', " wanted to; stop being so paranoid.");
10elseif ((doll.duelee == target) && (tdoll.duelee == player))
11  rpg:playertell(player, "Hey, you already accepted the duel. No declining now.");
12elseif (tdoll.duelee != player)
13  rpg:playertell(player, target.name, " has not offered to duel you, so you're safe.");
14else
15  tdoll.duelee = $nothing;
16  rpg:tell_damage(player, "You decline ", target.name, "'s duel to the death.");
17  rpg:tell_damage(target, player.name, " has declined your offer to duel to the death.");
18endif

announce_all_but(old)

Spec this none thisDefiner #258

Referenced by

none

Source

1rpg = $local.rpg;
2if (this.transparency_support && (((rpg.thing in (anc = rpg:parents(caller))) || (rpg.doll in anc)) || (rpg.monster in anc)))
3  for k in (this:same_time())
4    k:(verb)(@args);
5  endfor
6else
7  pass(@args);
8endif
9"New silent entry detection:";
10if (i = $list_utils:iassoc(task_id(), this.unannounced))
11  this.unannounced = listdelete(this.unannounced, i);
12endif
13"Quinn 13-OCT-93 0116: Added .transparency_support check before all that ancestry snooping.  Made one call to ancestors instead of several :isas.  Changes should speed up :announce* calls and make tracebacks less frequent.";
14"Profane 5-OCT-97 -- new code for silent entry detection.";

announce_all

Spec this none thisDefiner #258

Referenced by

Source

1this:announce_all_but({}, @args);
2"THX (#105941) - Fri Jun 29, 2001 - Added.";

announce

Spec this none thisDefiner #258

Referenced by

Source

1this:announce_all_but({player}, @args);
2"THX (#105941) - Fri Jun 29, 2001 - Added.";

show_all_but

Spec this none thisDefiner #258

Referenced by

Source

1{exclude, @announce} = args;
2rpg = $local.rpg;
3for t in (this.contents)
4  if (t in exclude)
5  elseif (valid(doll = rpg:get_doll(t)) && doll:cannot_see())
6  else
7    try
8      t:tell(@announce);
9    except (ANY)
10      "Ignore listener with bad :tell";
11      continue t;
12    endtry
13  endif
14endfor
15"New silent entry detection:";
16if (this.unannounced && (i = $list_utils:iassoc(task_id(), this.unannounced)))
17  this.unannounced = listdelete(this.unannounced, i);
18endif
19"THX (#105941) - Fri Jun 29, 2001 - Added.";

show

Spec this none thisDefiner #258

Referenced by

none

Source

1this:show_all_but({player}, @args);
2"THX (#105941) - Fri Jun 29, 2001 - Added.";

show_all

Spec this none thisDefiner #258

Referenced by

none

Source

1this:show_all_but({}, @args);
2"THX (#105941) - Fri Jun 29, 2001 - Added.";