A dump of #34595 (LRPG Skill Repository)

@create $room named LRPG Skill Repository:LRPG Skill Repository,skill,repository
@prop #34595."brswd" #29862 r
@prop #34595."dodge" #19856 r
@prop #34595."shock" #19835 r
@prop #34595."melee" #19804 r
@prop #34595."club" #6232 r
@prop #34595."tclub" #7096 r
@prop #34595."rap" #6357 r
@prop #34595."kat" #6175 r
@prop #34595."shield" #19988 r
@prop #34595."kites" #19989 r
@prop #34595."firebolt" #6275 r
@prop #34595."staff" #7144 r
@prop #34595."climb" #24330 r
@prop #34595."sanity" #24345 r
@prop #34595."swim" #24346 r
@prop #34595."scyth" #7565 r
@prop #34595."str" #19148 r
@prop #34595."end" #19184 r
@prop #34595."dex" #19226 r
@prop #34595."agl" #19230 r
@prop #34595."int" #19231 r
@prop #34595."emp" #19235 r
@prop #34595."wil" #19243 r
@prop #34595."pcn" #19316 r
@prop #34595."app" #19343 r
@prop #34595."gadget" #25664 r
@prop #34595."throw" #7607 r
@prop #34595."furn" #6531 r
@prop #34595."wclim" #4649 r
@prop #34595."scim" #6451 r
@prop #34595."natweap" #6512 r
@prop #34595."claw" #5056 r
@prop #34595."tenta" #5967 r
@prop #34595."teeth" #6162 r
@prop #34595."kat1" #6176 r
@prop #34595."kat2" #6178 r
@prop #34595."tclimb" #17076 r
@prop #34595."knives" #7689 r
@prop #34595."slow" #6564 r
@prop #34595."forcewall" #8108 r
@prop #34595."baxe" #5781 r
@prop #34595."baxe1" #5784 r
@prop #34595."baxe2" #25257 r
@prop #34595."heat" #32771 r
@prop #34595."heal" #32773 r
@prop #34595."sai" #32774 r
@prop #34595."crossbow" #18671 r
@prop #34595."longarms" #29441 r
@prop #34595."missiles" #32755 r
@prop #34595."drawbow" #9064 r
@prop #34595."longbow" #9092 r
@prop #34595."javelin_throw" #32761 r
@prop #34595."javelin_melee" #32762 r
@prop #34595."observe" #4631 r
@prop #34595."notice" #4728 r
@prop #34595."search" #2763 r
@prop #34595."star" #32775 r
@prop #34595."convince" #32776 r
@prop #34595."persuade" #32778 r
@prop #34595."trick" #32779 r
@prop #34595."pray" #32780 r
@prop #34595."dagger_throw" #32781 r
@prop #34595."dagger_melee" #32783 r
@prop #34595."machete" #6499 r
@prop #34595."pick" #9080 r
@prop #34595."storm" #9097 r
@prop #34595."lockpick" #50023 r
@prop #34595."recall" #22707 r
@prop #34595."pacify" #55012 r
@prop #34595."stamina" #32039 r
@prop #34595."brawl" #76229 r
@prop #34595."moofu" #7790 r
@prop #34595."magic_theory" #41175 rc
@prop #34595."creo" #46377 rc
@prop #34595."intellego" #10887 rc
@prop #34595."muto" #7127 rc
@prop #34595."perdo" #86906 rc
@prop #34595."rego" #80069 rc
@prop #34595."corporem" #89057 r
@prop #34595."ignem" #62036 r
@prop #34595."vim" #97757 r
@prop #34595."animalem" #37142 rc
@prop #34595."mentem" #99395 rc
@prop #34595."aquam" #104445 rc
@prop #34595."herbam" #104447 rc
@prop #34595."imagonem" #81055 rc
@prop #34595."terram" #16045 rc
@prop #34595."depress" #20936 rc
@prop #34595."calm_winds" #87759 rc
@prop #34595."shatter" #93140 r
@prop #34595."windwall" #101146 rc
@prop #34595."stinkcloud" #74393 r
@prop #34595."predict" #66624 r
@prop #34595."whip" #1587 r
@prop #34595."harden" #75817 r
@prop #34595."enchant" #11401 r
@prop #34595."biting_cloud" #60016 r
@prop #34595."barkskin" #17251 r
@prop #34595."hail" #57478 r
@prop #34595."lifelink" #54026 r
@prop #34595."stealskill" #45809 r
@prop #34595."mindprobe" #102024 r
@prop #34595."waterwhip" #65756 r
@prop #34595."iceshell" #12289 r
@prop #34595."dispel" #71490 r
@prop #34595."claim" #71258 r
@prop #34595."auram" #74932 rc
@prop #34595."shocking_grasp" #78716 r
@prop #34595."unarmed" #60852 rc
@prop #34595."spellsing" #9903 rc
@prop #34595."greatsword" #95126 r
@prop #34595."summon" #52130 r
@prop #34595."flail" #40790 r
@prop #34595."longsword" #75056 r
@prop #34595."hafted" #75899 r
@prop #34595."sword" #10590 r
@prop #34595."weap1" #107205 r
@prop #34595."weap2" #57444 r
@prop #34595."flex" #105206 r
@prop #34595."proj" #87015 r
@prop #34595."know" #89199 r
@prop #34595."athl" #24840 r
@prop #34595."conjure" #53375 r
@prop #34595."shortbow" #67571 r
@prop #34595."ravenfear" #73102 r
@prop #34595."holdfoe" #69062 r
@prop #34595."charmfoe" #10923 r
@prop #34595."bloom" #59643 r
@prop #34595."haste" #79154 r
@prop #34595."acidrain" #74835 r
@prop #34595."animate" #108033 r
@prop #34595."wound" #18688 r
@prop #34595."drain" #98619 r
@prop #34595."tangle" #68846 r
@prop #34595."appraise" #34688 r
@prop #34595."glyph" #109701 r
@prop #34595."rune" #56377 r
@prop #34595."teleport" #2015 r
@prop #34595."retrieve" #67393 r
@prop #34595."chill" #41289 r
@prop #34595."magic_fist" #49020 r
@prop #34595."reverser" #110969 r
@prop #34595."detect" #14497 r
@prop #34595."viper_bite" #14725 r
@prop #34595."backfire" #70784 r
@prop #34595."rot" #112382 r
@prop #34595."mirrors" #85976 r
@prop #34595."hawthorn" #108598 r
@prop #34595."RESISTanimalem" #107437 r
@prop #34595."RESISTaquam" #7919 r
@prop #34595."RESISTauram" #91862 r
@prop #34595."RESISTcorporem" #107956 r
@prop #34595."RESISTherbam" #113732 r
@prop #34595."RESISTignem" #16971 r
@prop #34595."RESISTimagonem" #57918 r
@prop #34595."RESISTmentem" #12343 r
@prop #34595."RESISTterram" #12251 r
@prop #34595."RESISTvim" #10746 r
@prop #34595."beguile" #117341 r
@prop #34595."ride" #34155 r
@prop #34595."thieving" #81749 r
@prop #34595."rounds" #83399 r
@prop #34595."bladebarrier" #83431 r
@prop #34595."parch" #101109 r
@prop #34595."fishing" #66562 r
"#34595.("entrances") => E_PERM (Permission denied)
"#34595.("exits") => E_PERM (Permission denied)
"#34595.("key") => E_PERM (Permission denied)
;;#34595.("aliases") = {"LRPG Skill Repository", "skill", "repository"}
;;#34595.("description") = "A looming hall of great inspiring splendour.  Monuments of human achievement abound, each representing some facet of a Bovine Illuminatus.  You feel tears well in your eyes.  oH god.. you're all choke up.  oH the Majesty of MOO!"
;;#34595.("object_size") = {9838, 1141286561}

@verb #34595:"exitfunc" this none this
@program #34595:exitfunc
"Moves skills back into the room.";
{what} = args;
rpg = $local.rpg;
if ($object_utils:isa(what, rpg.skill_object) && (what.aliases[1] in properties(rpg.doll)))
  return what:moveto(this);
endif
return pass(what);
"THX (#105941) - Fri Sep  1, 2000 - Added a check for the skill's presence on the generic doll before moving it here.   Otherwise we were open for a denial of service hack.";
.

@verb #34595:"acceptable" this none this
@program #34595:acceptable
return $object_utils:isa(args[1], $local.rpg.skill_object);
.

@verb #34595:"update_skills" this none this
@program #34595:update_skills
":update_skills() => use information contained in skill.dependant to create a list of names to be stored in #19051.dep_names, for use in faster, spiffier #74:total.";
if (!(caller_perms() in $local.rpg.grand_masters))
  return E_PERM;
endif
player:tell("Beginning update of skills.");
skills = $object_utils:descendants_suspended($local.rpg.skill_object);
for skill in (skills)
  $command_utils:suspend_if_needed(10);
  li = this:rec_skill_deps(skill);
  names = {};
  for item in (li)
    if (typeof(al = item.aliases[1]) == STR)
      names = {@names, al};
    else
      player:tell(("Warning.  Invalid item in deps hierarchy for skill: " + skill.name) + ".");
    endif
  endfor
  skill.dep_names = names;
  if (skill.caps)
    skill.cap_names = skill.caps;
  else
    sub = {};
    for sk in ({@skill.dependant[1], @skill.dependant[2]})
      sub = {@sub, @sk.caps};
    endfor
    skill.cap_names = sub;
  endif
endfor
player:tell("Update of skills finished.");
"Irin Fri Sep  6 18:00:12 1996 PDT -- added.";
.

@verb #34595:"rec_skill_deps" this none this
@program #34595:rec_skill_deps
":rec_skill_deps(OBJ skill) => Used in conjunction with this:update_skills to produce a list of all skills a given skill depends on.";
if (caller != this)
  return "E_SCHMUCK";
endif
skill = args[1];
deps = skill.dependant;
li = {skill};
for thing in (deps[1])
  li = {@li, thing};
endfor
for thing in (deps[2])
  li = {@li, @this:rec_skill_deps(thing)};
endfor
return li;
"Irin Fri Sep  6 17:57:31 1996 PDT -- added.";
.

@verb #34595:"skill_action_msg" this none this
@program #34595:skill_action_msg
"Usage: skill_action_msg(OBJ skill) => string describing use of that skill.";
{skill} = args;
parent = parent(skill);
rpg = $local.rpg;
if (parent in {rpg.combat_skill_object, rpg.skills.unarmed})
  msg = "in the use of ";
elseif (parent == rpg.spell_skill_object)
  dep = skill.dependant;
  if (skill == rpg.skills.magic_theory)
    msg = "using basic ";
  elseif (dep[1] && (!dep[2]))
    msg = "using the Technique of ";
  elseif (dep[1] && dep[2])
    msg = "using the Form of ";
  elseif ((!dep[1]) && dep[2])
    msg = "casting the spell ";
  else
    msg = "using the mysterious ";
  endif
else
  msg = "in the skill of ";
endif
return msg + skill:title();
"Mooshie (#106469) - Mon Oct  6 23:10:13 1997 PDT - Added.";
.

"***finished***