generic weather object #215
Aliases: generic weather object
8 verbs · 27 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
moveto | this none this | rxd | #215 | 41 |
increase_accumulation | this none this | rxd | #215 | 5 |
upgrade | this none this | rxd | #215 | 17 |
upgrade_msg drift_msg odrift_msg | this none this | rxd | #215 | 1 |
tree_tag | this none this | rxd | #215 | 8 |
look_sky_msg look_sky_high_msg look_ground_msg | this none this | rxd | #215 | 10 |
decrease_accumulation | this none this | rxd | #215 | 12 |
affect | this none this | rxd | #215 | 0 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
accumulation | #215 | rc | #361 | 1 |
strength | #215 | rc | #361 | 1 |
junk_ok | #215 | rc | #361 | 1 |
upgrades | #215 | rc | #361 | {} |
downgrades | #215 | rc | #361 | {} |
drift_msg | #215 | rc | #361 | "%IN drifts to %dt." |
upgrade_msg | #215 | rc | #361 | "" |
odrift_msg | #215 | rc | #361 | "%IN drifts in from %dt." |
icon | #215 | rc | #361 | " " |
look_sky_msg | #215 | rc | #361 | "" |
look_sky_high_msg | #215 | rc | #361 | "" |
look_ground_msg | #215 | rc | #361 | "" |
drifts | #215 | rc | #361 | 1 |
dispersable | #215 | rc | #361 | 1 |
affect_msg | #215 | rc | #361 | "" |
affect_sky_msg | #215 | rc | #361 | "" |
affect_flyer_msg | #215 | rc | #361 | "" |
aliases | #1 | rc | #361 | {"generic weather object"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {4581, 1298434113} |
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: #213 overcast
Call graph
Source
moveto
Referenced by
none
Source
1if (this.f) 2return pass(@args); 3endif 4room = args[1]; 5if ((room == $tomb) || (room == $womb)) 6return pass(@args); 7elseif (!is_a(room, #79017)) 8$rpg:junk(this); 9return; 10elseif (!this.accumulation) 11$rpg:junk(this); 12return; 13endif 14others = room:occupants($aweather); 15if (!others) 16return pass(@args); 17endif 18best = this; 19total = 0; 20for other in (others) 21if (!other.dispersable) 22other:increase_accumulation(this.accumulation); 23$rpg:junk(this); 24return; 25endif 26if (other.strength > best.strength) 27best = other; 28elseif (other.accumulation > best.accumulation) 29best = other; 30endif 31total = total + other.accumulation; 32endfor 33if ((best != this) && (parent(best) != parent(this))) 34this.name = best.name; 35chparent(this, parent(best)); 36endif 37for other in (others) 38$rpg:junk(other); 39endfor 40this:increase_accumulation(total); 41return pass(@args);
increase_accumulation
Referenced by
- #215:moveto line 40:
this:increase_accumulation
Source
1total = args[1]; 2this.accumulation = min(100, this.accumulation + total); 3if (random(100) <= this.accumulation) 4this:upgrade(); 5endif
upgrade
Referenced by
- #215:increase_accumulation line 4:
this:upgrade
Source
1if (this.dispersable && this.upgrades) 2chosen = #-1; 3for upgrade in (this.upgrades) 4if (random(100) <= upgrade[1]) 5chosen = upgrade[2]; 6break; 7endif 8endfor 9if (is_a(chosen, $aweather)) 10this.accumulation = 1; 11chparent(this, chosen); 12this.name = chosen.name; 13if (m = this:upgrade_msg()) 14this.location:announce_all($su:ps(m, this, this, this.location)); 15endif 16endif 17endif
upgrade_msg drift_msg odrift_msg
Referenced by
- #215:upgrade line 13:
this:upgrade_msg
Source
1return $su:msg(this.(verb));
tree_tag
Referenced by
none
Source
1m = tostr(this.icon, $ansi.reset, " ", this.strength); 2if (this.dispersable) 3m = tostr(m, " dspr"); 4endif 5if (this.drifts) 6m = tostr(m, " drft"); 7endif 8return m;
look_sky_msg look_sky_high_msg look_ground_msg
Referenced by
none
Source
1if (typeof(this.(verb)) == STR) 2return this.(verb); 3elseif (typeof(this.(verb)) == LIST) 4m = this.(verb)[max(1, min($, this.accumulation))]; 5if (typeof(m) == STR) 6return m; 7elseif (typeof(m) == LIST) 8return m[random($)]; 9endif 10endif
decrease_accumulation
Referenced by
none
Source
1amount = args[1]; 2if (!this.dispersable) 3this.accumulation = max(1, this.accumulation - amount); 4return 1; 5else 6this.accumulation = this.accumulation - amount; 7if (this.accumulation < 1) 8$rpg:junk(this); 9return 0; 10endif 11return 1; 12endif
affect
Referenced by
none
Source
No program (verb defined but unprogrammed).