generic weather object #215

Parent #1Owner #361Flags read, fertileSource hellcore/hellcore.db

Aliases: generic weather object

8 verbs · 27 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
movetothis none thisrxd#21541
increase_accumulationthis none thisrxd#2155
upgradethis none thisrxd#21517
upgrade_msg drift_msg odrift_msgthis none thisrxd#2151
tree_tagthis none thisrxd#2158
look_sky_msg look_sky_high_msg look_ground_msgthis none thisrxd#21510
decrease_accumulationthis none thisrxd#21512
affectthis none thisrxd#2150

Properties

PropertyDefinerFlagsOwnerValue
accumulation#215rc#3611
strength#215rc#3611
junk_ok#215rc#3611
upgrades#215rc#361{}
downgrades#215rc#361{}
drift_msg#215rc#361"%IN drifts to %dt."
upgrade_msg#215rc#361""
odrift_msg#215rc#361"%IN drifts in from %dt."
icon#215rc#361" "
look_sky_msg#215rc#361""
look_sky_high_msg#215rc#361""
look_ground_msg#215rc#361""
drifts#215rc#3611
dispersable#215rc#3611
affect_msg#215rc#361""
affect_sky_msg#215rc#361""
affect_flyer_msg#215rc#361""
aliases#1rc#361{"generic weather object"}
description#1rc#361<clear>
object_size#1r#29{4581, 1298434113}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #1 root

Children: #213 overcast

Call graph

calls n215_0 #215:moveto n1_13 #1:moveto n215_0->n1_13 n103_2 #103:junk n215_0->n103_2 n215_1 #215:increase_accumulation n215_0->n215_1 n215_2 #215:upgrade n215_1->n215_2 n215_3 #215:upgrade_msg n215_2->n215_3 n20_34 #20:pronoun_sub n215_2->n20_34 n20_81 #20:msg n215_3->n20_81 n215_6 #215:decrease_accumulation n215_6->n103_2

Source

moveto

Spec this none thisFlags rxdOwner #361Definer #215

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

Spec this none thisFlags rxdOwner #361Definer #215

Referenced by

Source

1total = args[1];
2this.accumulation = min(100, this.accumulation + total);
3if (random(100) <= this.accumulation)
4this:upgrade();
5endif

upgrade

Spec this none thisFlags rxdOwner #361Definer #215

Referenced by

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

Spec this none thisFlags rxdOwner #361Definer #215

Referenced by

Source

1return $su:msg(this.(verb));

tree_tag

Spec this none thisFlags rxdOwner #361Definer #215

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

Spec this none thisFlags rxdOwner #361Definer #215

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

Spec this none thisFlags rxdOwner #361Definer #215

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

Spec this none thisFlags rxdOwner #361Definer #215

Referenced by

none

Source

No program (verb defined but unprogrammed).