"A dump of #19051 on Sun Dec 17 13:30:28 1995 PST @create $root_class named Generic Skill Object:Generic,Skill,Object @prop #19051."dependant" {} r ;;#19051.("dependant") = {{}, {}} @prop #19051."learn" 10 r @prop #19051."encumbrance" 0 r @prop #19051."insanity" 0 r @prop #19051."injury" 0 r @prop #19051."fatigue" 10 r ;;#19051.("key") = 0 ;;#19051.("aliases") = {"Generic", "Skill", "Object"} ;;#19051.("description") = "An indicator of skill in some nameless area." ;;#19051.("object_size") = {3621, 819192363} @verb #19051:"resolve" this none this @program #19051:resolve if (!(caller_perms() in $local.rpg.gms)) "Return some random nonsensical number, just so prospective GMs can practice with resolves and not get E_TYPEs from an E_PERM."; return 100 - random(200); elseif (valid(doll = $local.rpg:get_doll(args[1]))) res = $local.rpg:roll(doll:total(this) + args[2]) - (pen = this:penalty(doll) ); if (((res > -20) && (res < (20 - pen))) && (length(args) == 2)) doll:improve(this); endif doll.last_action = time(); return res; else return -200; endif . @verb #19051:"moveto" this none this @program #19051:moveto if (((args[1] == $local.rpg) || $local.rpg:is_grandmaster(player)) || player.wizard) return pass(@args); else return E_PERM; endif . @verb #19051:"penalty" this none this @program #19051:penalty doll = args[1]; return ((((4 + (this.injury * doll.inj)) + (this.insanity * doll.ins)) + (this.fatigue * doll.fat)) + ((this.encumbrance * doll:encumbrance()) / 10)) / 10; . @verb #19051:"property_name" this none this @program #19051:property_name "Return the corresponding property name on $local.rpg.doll."; return this.aliases[1]; . @verb #19051:"initialize" this none this rx @program #19051:initialize if ((caller == this) || $perm_utils:controls(caller_perms(), this)) this:moveto($local.rpg.skills); $quota_utils:object_bytes(this); return pass(@args); else return E_PERM; endif "Profane 13-DEC-95 1126 EST -- $quota:utils:object_size."; . @verb #19051:"recycle" this none this rx @program #19051:recycle if ((caller == this) || $perm_utils:controls(caller_perms(), this)) propname = this:property_name(); delete_property($local.rpg.doll, propname); delete_property($local.rpg.skills, propname); return pass(@args); else return E_PERM; endif . @verb #19051:"description" this none this @program #19051:description "Return the description, plus a line detailing which skills affect this one."; deps = this.dependant; atts = deps[1]; skills = deps[2]; if (atts || skills) depstr = (((this:title() + " is a skill directly influenced by ") + (atts ? "the attributes " + $string_utils:title_list(atts) | "")) + (skills ? ((atts ? ", and" | "") + "the skill(s) ") + $string_utils:title_list(skills) | "")) + "."; else depstr = this:title() + " is a basic attribute."; endif return {@(typeof(base = pass(@args)) == LIST) ? base | {base}, depstr}; "DR 10-APR-94 -- Tweaked the spacing in 'the skills'."; . @verb #19051:"tell_stats" this none this @program #19051:tell_stats stats = properties($local.RPG.skill_object); player:tell($string_utils:centre(this.name, 40, "-")); dep = this.dependant; player:tell("Dependant Attributes: ", $string_utils:nn(dep[1], "", "None")); player:tell("Dependant Skills: ", $string_utils:nn(dep[2], "", "None")); player:tell(""); for pn in (setremove(stats, "dependant")) player:tell($string_utils:left(pn, 18), ": ", $string_utils:print(this.(pn))) ; endfor player:tell($string_utils:space(40, "-")); . "***finished***