Generic Spell Skill Object #22517

Parent #19051Owner Flags Source rpg_march_2006/spellobj.txt

Aliases: Generic Spell Skill Object

8 verbs · 19 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
slowness_modthis none this#225173
track_usagethis none this#225179
regulatorthis none this#2251720
trackerthis none this#225174
penaltythis none this#225175
updatethis none this#225178
playbalance_penaltythis none this#225171
get_playbalancethis none this#225174

Properties

PropertyDefinerFlagsOwnerValue
slow#22517rc10
diff#22517rc10
sane#22517rc10
sleep#22517rc50
usage#22517not readable (E_PERM)
minus#22517not readable (E_PERM)
subskills#22517r{}
relative#22517not readable (E_PERM)
resist#22517rc""
encumbrance#2251725
injury#2251710
dep_names#22517{"Generic Spell Skill Object"}
cap_boost_mult#225172
improve_learn_ok#225170
queue#22517not readable (E_PERM)
key#22517not readable (E_PERM)
aliases#22517{"Generic Spell Skill Object"}
description#22517"An indicator of skill in some nameless area, though the nameless area probably involves bearded old men with moons and stars on their drooping wee willie winkie caps."
object_size#22517{5801, 1141286561}

Ancestry

Ancestors (nearest first): #19051 Generic Skill Object

Children: none

Call graph

calls n22517_1 #22517:track_usage n22517_2 #22517:regulator n22517_1->n22517_2 n22517_4 #22517:penalty n22517_6 #22517:playbalance_penalty n22517_4->n22517_6 n19051_2 #19051:penalty n22517_4->n19051_2 n22517_7 #22517:get_playbalance n22517_7->n22517_6

Source

slowness_mod

Spec this none thisDefiner #22517

Referenced by

none

Source

1{res, doll} = args;
2return res;
3"Mooshie (#106469) - Sat Jan  3, 1998 - Added. Spells shouldn't be penalized for hasted individuals.";

track_usage

Spec this none thisDefiner #22517

Referenced by

none

Source

1if (caller == this)
2  this.usage = this.usage + 1;
3  if (((rndm = random(this.relative)) == 9) && (dep = this.dependant[2]))
4    ((dep = dep[1]) in $local.rpg.magic_db.magic_forms) && (dep.minus = dep.minus - 1);
5  elseif (rndm < 12)
6    this:regulator();
7  endif
8endif
9"THX (#105941) - Thu Mar  9, 2000 - Added this.relative that can be manually set by G_M for each Form.  The rough equation that I used to set these initially is: Form.relative = 35 + 20 * (# of direct combat Form spells) + 5 * (# of duration effect Form spells) + 2 * (# of Form spells used only on occasion).  Why is this important?  Because the direct combat spells (like firebolt) will be called more often than the duration effect spells (like backfire).";

regulator

Spec this none thisDefiner #22517

Referenced by

Source

1if (caller != this)
2  raise(E_PERM);
3else
4  forms = $local.rpg.magic_db.magic_forms;
5  m = n = 0;
6  for t in (forms)
7    m = m + abs(t.minus);
8    n = n + t.minus;
9  endfor
10  n = n / length(forms);
11  if (n)
12    integral = ((random(33) < 9) * m) / 99;
13    for t in (forms)
14      tminus = t.minus + (((t.minus < 0) ? 1 | -1) * integral);
15      t.minus = max(min(tminus - n, 42), -42);
16    endfor
17  endif
18  return n;
19endif
20"THX (#105941) - Fri Feb 18, 2000 - Added an integral term that tends to reduce all .minus values to 0 over time.";

tracker

Spec this none thisDefiner #22517

Referenced by

none

Source

1$local.rpg:secure();
2for t in ($list_utils:reverse($list_utils:sort(children($code_utils:verb_loc()), $list_utils:map_prop(children($code_utils:verb_loc()), "usage"))))
3  t.usage && player:tell($string_utils:right(t.usage, 8), "   ", $string_utils:left(t.aliases[1], 15), " ", $string_utils:nn(t));
4endfor

penalty

Spec this none thisDefiner #22517

Referenced by

none

Source

1{doll} = args;
2if (caller == this)
3  return pass(doll) - this:playbalance_penalty();
4endif
5return 0;

update

Spec this none thisDefiner #22517

Referenced by

none

Source

1(rpg = $local.rpg):secure();
2update = {@rpg.magic_db.magic_forms, @rpg.magic_db.magic_techniques};
3l_u = $list_utils;
4for s in ($object_utils:descendents(rpg.spell_skill_object))
5  for t in (l_u:flatten(s.dependant))
6    (t in update) && (t.subskills = setadd(t.subskills, s));
7  endfor
8endfor

playbalance_penalty

Spec this none thisDefiner #22517

Referenced by

Source

1return (caller == this) ? max(min(`this.dependant[2][1].minus ! ANY => 0', 27), -27) | 0;

get_playbalance

Spec this none thisDefiner #22517

Referenced by

none

Source

1"Returns the amount that is effectively added to the skill resolve based on the playbalance effect given by the MagicK Form usage tracking.";
2$local.rpg:secure();
3return this:playbalance_penalty();
4"THX (#105941) - Thu Feb 22, 2001 - Added so that gamemasters can see the current playbalance modifier on a given skill.";