generic skill #96
Aliases: generic skill
31 verbs · 31 properties · 3 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
@initialize | this none none | rxd | #96 | 23 |
total | this none this | rxd | #96 | 24 |
check | this none this | rxd | #96 | 24 |
level_string | this none this | rxd | #96 | 11 |
level_names | this none this | rxd | #96 | 1 |
improve | this none this | rxd | #96 | 55 |
maybe_improve | this none this | rxd | #96 | 49 |
base_level | this none this | rxd | #96 | 4 |
raw | this none this | rxd | #96 | 1 |
set | this none this | rxd | #96 | 7 |
learn_cost_for learn_cost_for_full | this none this | rxd | #96 | 25 |
learn | this none this | rxd | #96 | 11 |
calc_best | this none this | rxd | #96 | 10 |
level_desc_for | this none this | rxd | #96 | 13 |
tree_tag | this none this | rxd | #96 | 10 |
age_mod | this none this | rxd | #96 | 7 |
track_daily_gain | this none this | rxd | #96 | 16 |
report_daily_gain | this none this | rxd | #96 | 33 |
ip_cost_for | this none this | rxd | #96 | 14 |
is_bestable | this none this | rxd | #96 | 29 |
modifier | this none this | rxd | #96 | 2 |
flush | this none this | rxd | #96 | 4 |
check_bak | this none this | rxd | #96 | 36 |
lose_raw | this none this | rxd | #96 | 5 |
possibly_improve | this none this | rxd | #96 | 27 |
gain_raw | this none this | rxd | #96 | 4 |
gain_ip | this none this | rxd | #96 | 16 |
can_improve | this none this | rxd | #96 | 19 |
last_improve | this none this | rxd | #96 | 3 |
description | this none this | rxd | #96 | 9 |
ip | this none this | rxd | #96 | 1 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
depends_on | #96 | rc | #361 | {} |
level_names | #96 | rc | #361 | list of 12{"Worthless.", "You're clueless.", "Barely capable.", "Marginally competent.", "Hobbyist.", "Gifted amateur.", "Highly capable.", "Professional.", "Expert.", "Master.", "Innovator.", "Legend."} |
abbrev | #96 | rc | #361 | "" |
improve_rate | #96 | rc | #361 | 0.6 |
improve_msg | #96 | rc | #361 | "You feel your %t ability improving!" |
encumbrance_penalty | #96 | rc | #361 | 0.0 |
defaults_to | #96 | rc | #361 | -3 |
base | #96 | rc | #361 | -2 |
learn_cost_mod | #96 | rc | #361 | 1.0 |
best | #96 | rc | #361 | {} |
peak_age | #96 | rc | #361 | 25 |
dropoff_age | #96 | rc | #361 | 0 |
daily_gain_who | #96 | rc | #361 | {} |
daily_gain_data | #96 | rc | #361 | {} |
private_improve | #96 | rc | #361 | 0 |
min_refresh | #96 | rc | #361 | 60 |
cache_hit | #96 | rc | #361 | 0 |
cache_miss | #96 | rc | #361 | 1 |
min_time_between_ip | #96 | rc | #361 | 5 |
worlds_best_msg | #96 | rc | #361 | "Best in the world." |
teachers | #96 | rc | #361 | list of 17{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
aliases | #1 | rc | #361 | {"generic skill"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {27570, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #1 root
Children: #126 generic stat, #252 dodge, #314 fists
Call graph
Source
@initialize
Referenced by
none
Source
1if (valid(skill = $skills:match(this.name))) 2player:notify("The skill ", $string_utils:nn(skill), " already exists with that name or alias."); 3return; 4endif 5"if (index(this.name, \" \"))"; 6" player:notify(\"You can't have a skill with a space in the name.\");"; 7" return;"; 8"endif"; 9if (this.location == $skills) 10player:notify($string_utils:nn(this) + " is already initialized."); 11return; 12endif 13player:notify(("Initializing " + $string_utils:nn(this)) + " as a new skill. Proceed?"); 14if ($command_utils:yes_or_no()) 15initial_value = {0, 0, 0, 0}; 16prop_info = {player, "rc"}; 17add_property($skills, this.name, this, prop_info); 18this:moveto($skills); 19player:notify("Successfully registered the new skill ", $string_utils:nn(this), "."); 20$wiznet:announce($skills, ((player.name + " initialized a new skill '") + $string_utils:nn(this)) + "'.", 1); 21else 22player:notify("Cancelled."); 23endif
total
Referenced by
- #96:check line 14:
this:total - #96:calc_best line 4:
this:total - #96:level_desc_for line 9:
this:total - #96:check_bak line 14:
this:total
Source
1":total(OBJ player)"; 2"Calculate total skill level for player, taking dependent skills and status effects into account."; 3who = args[1]; 4if ((time() - `who.skills[this.name][4] ! E_RANGE => 0') < this.min_refresh) 5this.cache_hit = this.cache_hit + 1; 6return `who.skills[this.name][3] ! E_RANGE => 0'; 7endif 8total = `who.skills[this.name][1] ! E_RANGE => 0'; 9if (total < 1) 10total = this.defaults_to; 11endif 12"total = (total ? total | this.defaults_to) + this.base;"; 13total = total + this.base; 14dep = 0; 15if (this.depends_on) 16for x in (this.depends_on) 17dep = dep + x:total(who); 18endfor 19dep = dep / length(this.depends_on); 20endif 21total = (total + who:skill_modifier_for(this)) + dep; 22"who.(pname)[3..4] = {total, time()};"; 23this.cache_miss = this.cache_miss + 1; 24return total;
check
Referenced by
none
Source
1"Copied from generic skill (#111):check_jed by Gilmore (#98) Sat Feb 21 01:37:51 2009 CST"; 2":check(OBJ person, INT modifier [, INT dont-improve])"; 3"Roll 2d9 check against the person's skill. Modifier is applied to the person's skill total (high modifier == easier task)."; 4"Note that a 3 or 4 roll is auto-success, and 17 or 18 is auto-failure."; 5"If the third arg is provided, no improvement can happen on this check."; 6who = args[1]; 7mod = args[2]; 8roll = random(9) + random(9); 9if (roll > 17) 10roll = roll + random(9); 11elseif (roll < 4) 12roll = roll - random(9); 13endif 14skill = this:total(who) + mod; 15if (this.encumbrance_penalty) 16skill = skill + toint(tofloat(who:encumbrance()) * this.encumbrance_penalty); 17endif 18result = skill - roll; 19if ((length(args) < 3) || (!args[3])) 20this:possibly_improve(who, result); 21endif 22return result; 23$ou:has_verb(who, "debug_tell_room") && who:debug_tell_room("skills", this.name, " check at ", mod, " -> ", result, " (from ", callers()[1][1], ":", callers()[1][2], ")"); 24return result;
level_string
Referenced by
none
Source
1":level_string(INT level) => STR 'level name'"; 2"Returns an english representation of a skill level for this skill."; 3level = args[1]; 4if (!(typeof(level) == INT)) 5return E_INVARG; 6endif 7level = max(level, 0); 8o = {1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11}; 9level = min(level, 23); 10level = level + 1; 11return this.level_names[o[level]];
level_names
Referenced by
none
Source
1return this.level_names;
improve
Referenced by
- #96:maybe_improve line 44:
this:improve
Source
1":improve(OBJ who)"; 2"Add one IP to this skill for who."; 3"If IP > 99, up the skill by one."; 4who = args[1]; 5if (is_a(this, $stat) || ((time() - who.last_improve_time) > $rpg.skill_improve_interval)) 6if (is_player(who)) 7if (!who.xp_total) 8return; 9endif 10cost = this:ip_cost_for(who); 11if (who.xp < cost) 12return; 13endif 14endif 15for x in (who.fighting) 16if (is_player(x)) 17return; 18endif 19endfor 20this:track_daily_gain(who); 21oldip = this:ip(who); 22if ((oldip + 1) > 99) 23who.skills[this.name] = {this:raw(who) + 1, 0, 0, 0}; 24who:systell($su:ps(this.improve_msg, who, this, this)); 25if (this:raw(who) == 8) 26who:systell("You can no longer improve this skill through practice; you'll have to spend XP with a teacher to go higher."); 27endif 28this:flush(who); 29endif 30if (this.name in keys(who.skills)) 31if (length(who.skills[this.name]) >= 5) 32who.skills[this.name][5] = time(); 33else 34who.skills[this.name] = listappend(who.skills[this.name], time()); 35endif 36endif 37who.last_improve_time = time(); 38if (is_player(who)) 39who:award_xp(1, 1); 40who.xp = who.xp - cost; 41if (cost > 1) 42who:systell("You spent ", tostr(cost - 1), " XP to earn 1 IP in ", this.name, "!"); 43else 44who:systell("You earned 1 IP in ", this.name, "!"); 45endif 46if (who:check_pref("showprogress")) 47ip = this:ip(who); 48ipstr = (ip < 10) ? "0" + tostr(ip) | tostr(ip); 49who:systell("Your raw ", this.name, " skill is now ", this:raw(who), ".", ipstr, "!"); 50endif 51if (!is_a(this, $stat)) 52who.ip_daily = max(0, who.ip_daily - 1); 53endif 54endif 55endif
maybe_improve
Referenced by
- #96:check_bak line 28:
this:maybe_improve - #96:check_bak line 30:
this:maybe_improve - #96:possibly_improve line 23:
this:maybe_improve - #96:possibly_improve line 25:
this:maybe_improve
Source
1":maybe_improve(OBJ who, INT chance)"; 2"Possibly add 1 IP to skill for who, based on d100 chance."; 3"This improvement may cascade down to the dependent skills, at a lesser chance."; 4who = args[1]; 5if (this:can_improve(who)) 6chance = tofloat(args[2]) * this.improve_rate; 7if (is_player(who) && who.hardcore) 8chance = chance * 2.0; 9endif 10if (this:raw(who) < 4) 11chance = chance * (5.0 - tofloat(this:raw(who))); 12elseif (is_a(this, $stat)) 13chance = chance * (4.0 / tofloat(this:raw(who))); 14endif 15if (is_player(who) && (!(this in who.focus_skills))) 16chance = chance * 0.7; 17endif 18if (0 && is_player(who)) 19chance = chance * ((tofloat(who.ip_daily) / 50.0) ^ 2); 20else 21chance = chance * 0.8; 22endif 23if (is_player(who)) 24if (exp = #541309:doses_for(who)) 25chance = chance * (1.5 * tofloat(exp)); 26endif 27for f in (who.fighting) 28if (valid(f) && is_a(f, $creature)) 29if (f.xp_value) 30xr = tofloat(f:xp_value(who)) / tofloat((typeof(f.xp_value) == LIST) ? f.xp_value[1] | f.xp_value); 31if (xr > 0.0) 32chance = chance * (1.0 + (0.5 * xr)); 33endif 34endif 35endif 36endfor 37endif 38chance = toint(chance); 39if (random(100) <= chance) 40if ((!is_player(who)) || (who.xp >= this:ip_cost_for(who))) 41raw = this:raw(who); 42if (((raw < 1) || this.private_improve) || (who.location.grind_ok == 1)) 43if ((!is_player(who)) || (random(100) < who:xp_improve_penalty())) 44this:improve(who); 45endif 46endif 47endif 48endif 49endif
base_level
Referenced by
none
Source
1":base_level(OBJ who)"; 2"Return the base skill level who has for this skill. Useful in determining if someone actually HAS a skill, and not just a default level."; 3who = args[1]; 4return this:raw(who);
raw
Referenced by
- #96:improve line 23:
this:raw - #96:improve line 25:
this:raw - #96:improve line 49:
this:raw - #96:maybe_improve line 10:
this:raw - #96:maybe_improve line 11:
this:raw - #96:maybe_improve line 13:
this:raw - #96:maybe_improve line 41:
this:raw - #96:base_level line 4:
this:raw - #96:learn_cost_for line 3:
this:raw - #96:learn line 5:
this:raw - #96:is_bestable line 26:
this:raw - #96:check_bak line 26:
this:raw - #96:lose_raw line 3:
this:raw - #96:possibly_improve line 21:
this:raw - #96:gain_raw line 2:
this:raw - #96:gain_ip line 2:
this:raw - #96:gain_ip line 16:
this:raw - #96:can_improve line 11:
this:raw - #96:can_improve line 13:
this:raw
Source
1return `args[1].skills[this.name][1] ! E_RANGE => 0';
set
Referenced by
none
Source
1":set(OBJ who, INT raw [,INT clear-improve])"; 2"Set who's skill to raw. If args[3], clear the improve value."; 3who = args[1]; 4raw = args[2]; 5ip = ((length(args) > 2) && args[3]) ? 0 | this:ip(who); 6new_skill = {raw, ip, 0, 0}; 7who.skills[this.name] = new_skill;
learn_cost_for learn_cost_for_full
Referenced by
- #96:learn line 2:
this:learn_cost_for - #96:ip_cost_for line 3:
this:learn_cost_for_full
Source
1"Copied from generic skill (#111):learn_cost_for by Gilmore (#98) Thu Aug 6 23:07:45 2009 CDT"; 2{who} = args; 3yourskill = this:raw(who); 4yourip = this:ip(who); 5ip_to_go = 100 - yourip; 6newlevel = yourskill + 1; 7cost = 1000; 8"if (newlevel < 1)"; 9" cost = $rpg.learn_costs[1];"; 10"elseif (newlevel <= length($rpg.learn_costs))"; 11" cost = $rpg.learn_costs[newlevel];"; 12"else"; 13" cost = 49999;"; 14"endif"; 15if (is_a(who, $player)) 16if (!(this in who.focus_skills)) 17cost = toint((tofloat(cost) * 1.4) * this.learn_cost_mod); 18else 19cost = toint(tofloat(cost) * this.learn_cost_mod); 20endif 21endif 22if (yourip && (verb != "learn_cost_for_full")) 23cost = toint((tofloat(cost) * tofloat(ip_to_go)) / 100.0); 24endif 25return cost;
learn
Referenced by
none
Source
1{who} = args; 2cost = this:learn_cost_for(who); 3if ((!is_a(who, $player)) || (who.xp >= cost)) 4`who.xp = who.xp - cost ! ANY => 0'; 5who.skills[this.name] = {this:raw(who) + 1, 0, 0, 0}; 6this:flush(who); 7who:tell((($ansi.bold_on + "[ You spent ") + tostr(cost)) + " XP. ]"); 8who:tell(((($ansi.bold_on + "[ ") + $su:ps(this.improve_msg, who, this, this)) + " ]") + $ansi.reset); 9else 10return E_INVARG; 11endif
calc_best
Referenced by
none
Source
1h = []; 2for x in (players()) 3if (this:is_bestable(x)) 4h[x] = (this:total(x) * 100) + this:ip(x); 5endif 6$cu:sin(2); 7endfor 8topfive = $hu:topN(h, 5, 2); 9topfive = $lu:reverse($lu:sort_alist(topfive, 2)); 10this.best = $lu:slice(topfive);
level_desc_for
Referenced by
none
Source
1who = args[1]; 2if (who in this.best) 3if (who == this.best[1]) 4return this.worlds_best_msg; 5else 6return $su:capitalize($su:english_ordinal(who in this.best) + "-best in the world."); 7endif 8else 9i = this:total(who) / 2; 10i = max(i, 1); 11i = min(i, length(this.level_names)); 12return this.level_names[i]; 13endif
tree_tag
Referenced by
none
Source
1tag = tostr("i", tostr(this.improve_rate), " l", this.learn_cost_mod); 2if (this.depends_on) 3depstr = ""; 4for x in (this.depends_on) 5depstr = (depstr + ",") + x.abbrev; 6endfor 7depstr = depstr ? " " + depstr[2..$] | ""; 8tag = tag + depstr; 9endif 10return tag;
age_mod
Referenced by
none
Source
1if (this.dropoff_age == 0) 2return 0; 3endif 4who = args[1]; 5age = who:char_age(); 6mod = -1 * toint(abs(age - this.peak_age) / this.dropoff_age); 7return mod;
track_daily_gain
Referenced by
- #96:improve line 20:
this:track_daily_gain
Source
1who = args[1]; 2if ((!is_a(who, $player)) || is_a(who, $builder)) 3return; 4endif 5idx = who in this.daily_gain_who; 6if (idx == 0) 7this.daily_gain_who = setadd(this.daily_gain_who, who); 8idx = who in this.daily_gain_who; 9this.daily_gain_data = listappend(this.daily_gain_data, {0, {}}); 10endif 11if (idx) 12this.daily_gain_data[idx][1] = this.daily_gain_data[idx][1] + 1; 13if (who.executing && (length(who.executing) >= 4)) 14this.daily_gain_data[idx][2] = setadd(this.daily_gain_data[idx][2], {who.executing[1], who.executing[4]}); 15endif 16endif
report_daily_gain
Referenced by
none
Source
1for skill in ($ou:leaves_suspended($skill)) 2if (!skill.daily_gain_who) 3yield; 4continue; 5endif 6if (0) 7lines = listappend(lines, $su:left($su:nn(skill) + " ", -60, "-")); 8for i in [1..length(skill.daily_gain_who)] 9who = skill.daily_gain_who[i]; 10data = skill.daily_gain_data[i]; 11lines = listappend(lines, ((" " + $su:left($su:nn(who), 20)) + " +") + tostr(data[1])); 12for action in (data[2]) 13if (!action[2]) 14lines = listappend(lines, " " + $su:nn(action[1])); 15else 16lines = listappend(lines, ((" " + $su:nn(action[1])) + " => ") + tostr(action[2])); 17endif 18yield; 19endfor 20yield; 21endfor 22endif 23skill.daily_gain_who = {}; 24skill.daily_gain_data = {}; 25if (0) 26lines = listappend(lines, ""); 27endif 28yield; 29endfor 30suspend(0); 31if (0) 32$mail_agent:send_message(#2, #81273, {""}, lines); 33endif
ip_cost_for
Referenced by
- #96:improve line 10:
this:ip_cost_for - #96:maybe_improve line 40:
this:ip_cost_for
Source
1return 0; 2who = args[1]; 3learn = this:learn_cost_for_full(who); 4cost = toint(tofloat(learn) / 250.0) - 1; 5if (who.ip_daily <= 10) 6cost = cost + 3; 7elseif (who.ip_daily <= 20) 8cost = cost + 2; 9elseif (who.ip_daily <= 30) 10cost = cost + 1; 11endif 12cost = max(1, cost); 13cost = min(20, cost); 14return cost;
is_bestable
Referenced by
- #96:calc_best line 3:
this:is_bestable
Source
1who = args[1]; 2if (!is_a(who, $player)) 3return 0; 4elseif (who.f) 5return 0; 6elseif (who.programmer) 7return 0; 8elseif (who in {#143513}) 9return 0; 10elseif (is_a(who, #451070)) 11return 0; 12elseif (is_a(who, #21279)) 13return 0; 14elseif (`who.dont_rank ! E_PROPNF => 0') 15return 0; 16elseif (who in $login.newted) 17return 0; 18elseif (who.password == "scrambled") 19return 0; 20elseif (who.location in {#-1, #5215, #1438}) 21return 0; 22elseif (who.xp_total < $rpg.newbie_xp) 23return 0; 24elseif ((time() - who.last_disconnect_time) > (86400 * 60)) 25return 0; 26elseif (this:raw(who) <= 0) 27return 0; 28endif 29return 1;
modifier
Referenced by
none
Source
1":modifier(OBJ who) -> return any unique skill modifiers for this skill, as calculated for who.)"; 2return 0;
flush
Referenced by
- #96:improve line 28:
this:flush - #96:learn line 6:
this:flush - #96:lose_raw line 4:
this:flush - #96:gain_raw line 3:
this:flush
Source
1who = args[1]; 2if (this.name in keys(who.skills)) 3who.skills[this.name][4] = 0; 4endif
check_bak
Referenced by
none
Source
1"Copied from generic skill (#111):check by Gilmore (#98) Sat Feb 21 01:32:22 2009 CST"; 2":check(OBJ person, INT modifier [, INT dont-improve])"; 3"Roll 2d9 check against the person's skill. Modifier is applied to the person's skill total (high modifier == easier task)."; 4"Note that a 3 or 4 roll is auto-success, and 17 or 18 is auto-failure."; 5"If the third arg is provided, no improvement can happen on this check."; 6who = args[1]; 7mod = args[2]; 8roll = random(9) + random(9); 9if (roll > 17) 10roll = roll + random(9); 11elseif (roll < 4) 12roll = roll - random(9); 13endif 14skill = this:total(who) + mod; 15if (this.encumbrance_penalty) 16skill = skill + toint(tofloat(who:encumbrance()) * this.encumbrance_penalty); 17endif 18result = skill - roll; 19if ((length(args) < 3) || (!args[3])) 20if ((result < 5) && (result > -3)) 21statgimp = 0; 22for s in (this.depends_on) 23statgimp = (statgimp + s:total(who)) - s:raw(who); 24endfor 25gimp = min(0, who:skill_modifier_for(this) + statgimp); 26chance = max(0, ((40 - ((raw = this:raw(who)) * 3)) - (result * 5)) + (gimp * 5)); 27if (chance > 0) 28this:maybe_improve(who, chance); 29elseif ((result + raw) <= 15) 30this:maybe_improve(who, 1); 31endif 32endif 33endif 34return result; 35$ou:has_verb(who, "debug_tell_room") && who:debug_tell_room("skills", this.name, " check at ", mod, " -> ", result, " (from ", callers()[1][1], ":", callers()[1][2], ")"); 36return result;
lose_raw
Referenced by
none
Source
1who = args[1]; 2amount = (length(args) > 1) ? args[2] | 1; 3who.skills[this.name] = {this:raw(who) - amount, this:ip(who), 0, 0}; 4this:flush(who); 5who:tell($ansi.red, $ansi.bold_on, "[ You lost ", amount, " raw in ", this.name, "! ]", $ansi.reset);
possibly_improve
Referenced by
- #96:check line 20:
this:possibly_improve
Source
1":possibly_improve(who, result) => Possibly give IP to 'who', who just made a check with the result 'result'."; 2{who, result} = args; 3dep = this.depends_on; 4gimp = 0; 5if (dep) 6for d in (dep) 7for x in (who.blood) 8gimp = gimp + x[1]:skill_mod(d, who, x[3]); 9endfor 10for x in (who.wearing) 11if (is_a(x, #270267) && (d == x.skill)) 12gimp = gimp + x.mod; 13endif 14endfor 15endfor 16gimp = gimp / length(dep); 17gimp = min(0, gimp); 18endif 19unmod_result = result - gimp; 20if ((unmod_result < 5) && (unmod_result > -3)) 21chance = max(0, (40 - ((raw = this:raw(who)) * 3)) - (unmod_result * 5)); 22if (chance > 0) 23this:maybe_improve(who, chance); 24elseif ((unmod_result + raw) <= 15) 25this:maybe_improve(who, 1); 26endif 27endif
gain_raw
Referenced by
- #96:gain_ip line 14:
this:gain_raw
Source
1{who, ?amount = 1} = args; 2who.skills[this.name] = {this:raw(who) + amount, this:ip(who), 0, 0}; 3this:flush(who); 4who:tell($ansi.bold_on, $ansi.cyan, "[ Your ", this.name, " increased by ", amount, "! ]", $ansi.reset);
gain_ip
Referenced by
none
Source
1{who, ip} = args; 2if (this:raw(who) >= $rpg.max_grind_raw) 3return; 4endif 5who:systell("You gained ", ip, " ip in ", this.name, "!"); 6oldip = this:ip(who); 7newip = oldip + ip; 8gain = 0; 9while (newip > 99) 10newip = newip - 100; 11gain = gain + 1; 12endwhile 13if (gain) 14this:gain_raw(who, gain); 15endif 16who.skills[this.name] = {this:raw(who), newip, 0, 0};
can_improve
Referenced by
- #96:maybe_improve line 5:
this:can_improve
Source
1":can_improve(who) => Can 'who' gain IP in this skill?"; 2{who} = args; 3if (!is_a(who:area(), $real_area)) 4return 0; 5elseif (!who.can_improve) 6return 0; 7elseif (is_player(who) && (!who.ip_daily)) 8return 0; 9elseif (is_player(who) && (!is_connected(who))) 10return 0; 11elseif ((!is_a(this, $stat)) && (this:raw(who) >= $rpg.max_grind_raw)) 12return 0; 13elseif (this:raw(who) >= 15) 14return 0; 15elseif ((time() - this:last_improve(who)) < (this.min_time_between_ip / (1 + #541309:doses_for(who)))) 16return 0; 17else 18return 1; 19endif
last_improve
Referenced by
- #96:can_improve line 15:
this:last_improve
Source
1":last_improve(who) => When did 'who' last gain an IP in this skill?"; 2{who} = args; 3return `who.skills[this.name][5] ! E_RANGE => 0';
description
Referenced by
- #126:description line 1:
pass(
Source
1d = pass(@args); 2d = (typeof(d) == LIST) ? d | {d}; 3if (!is_a(this, $stat)) 4if (this.depends_on) 5s = (((($su:capitalize(this:name()) + " uses the stats ") + $ansi.bold_on) + $su:english_list($lu:map_prop(this.depends_on, "name"))) + $ansi.bold_off) + "."; 6d = {@d, "", s}; 7endif 8endif 9return d;
ip
Referenced by
- #96:improve line 21:
this:ip - #96:improve line 47:
this:ip - #96:set line 5:
this:ip - #96:learn_cost_for line 4:
this:ip - #96:calc_best line 4:
this:ip - #96:lose_raw line 3:
this:ip - #96:gain_raw line 2:
this:ip - #96:gain_ip line 6:
this:ip - #126:total line 10:
this:ip
Source
1return `args[1].skills[this.name][2] ! E_RANGE => 0';