Generic Temple #133
Aliases: Generic Temple, temple
8 verbs · 70 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
worship pray | any any any | rd | #133 | 22 |
join | any none none | rd | #133 | 27 |
donate tithe offer | any any any | rd | #133 | 22 |
add_donor | this none this | rxd | #133 | 7 |
rem_donor | this none this | rxd | #133 | 4 |
donor_tally | this none this | rxd | #133 | 5 |
init_for_core | this none this | rxd | #133 | 19 |
help_msg | this none this | rxd | #133 | 14 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
gods | #133 | rc | #36 | {} |
orgs | #133 | rc | #36 | {} |
min_stats | #133 | rc | #36 | {2.0, 2.0, 8.5, 1.5} |
stat_to_heal | #133 | rc | #36 | 4 |
donors | #133 | r | #36 | {} |
gold | #133 | r | #36 | 0.0 |
is_temple | #133 | rc | #36 | 1 |
antigods | #133 | rc | #36 | {} |
virtual_exit_task | #118 | r | #2 | <clear> |
defaulting_exit_oleave_msg | #118 | rc | #36 | <clear> |
blessed_entrances | #118 | rc | #36 | <clear> |
virtual_exits | #118 | rc | #36 | {} |
give_short_alias | #118 | rc | #36 | <clear> |
virtual_exit_to_use | #118 | r | #2 | <clear> |
lit_from_outside | #118 | rc | #36 | <clear> |
bot_locked | #104 | rc | #36 | <clear> |
fakes | #104 | r | #36 | <clear> |
retail | #104 | rc | #36 | 0 |
seat | #104 | r | #36 | <clear> |
pool | #104 | r | #36 | <clear> |
seat_desc | #104 | r | #36 | <clear> |
pool_desc | #104 | r | #36 | <clear> |
sit_phrase | #104 | rc | #36 | <clear> |
stand_phrase | #104 | rc | #36 | <clear> |
swim_phrase | #104 | rc | #36 | <clear> |
dry_phrase | #104 | rc | #36 | <clear> |
push_phrase | #104 | rc | #36 | <clear> |
seat_aliai | #104 | r | #36 | <clear> |
pool_aliai | #104 | r | #36 | <clear> |
seat_contents | #104 | r | #36 | <clear> |
pool_contents | #104 | r | #36 | <clear> |
seat_max | #104 | r | #36 | <clear> |
pool_max | #104 | r | #36 | <clear> |
details | #104 | rc | #36 | <clear> |
temp_detail_index | #104 | rc | #36 | <clear> |
temp_detail_desc | #104 | rc | #36 | <clear> |
outdoors | #104 | r | #36 | <clear> |
attack_queue | #104 | r | #2 | <clear> |
battle_on | #104 | r | #2 | <clear> |
stop_msg | #104 | rc | #36 | <clear> |
remove_msg | #104 | rc | #36 | <clear> |
dump_msg | #104 | rc | #36 | <clear> |
dump_loc | #104 | rc | #36 | #62 |
sanctuary | #104 | rc | #36 | 1 |
ansi_title | #104 | r | #36 | <clear> |
dark_desc | #104 | rc | #36 | <clear> |
title_style | #104 | rc | #36 | <clear> |
build_help | #104 | rc | #36 | list of 9{" The temple can be modified to allow a player to join any organization, not just the religious type. For non-religious orgs, turn off the .is_temple property. The second argument in each org pair is for the \"help here\" message, and the third argument is for gender restrictions: 0=ANY 1=MALE 2=FEMALE 3=MALE/FEMALE.", "", "@set these props:", " temple.gods {\"god1\", \"god2\"}", " temple.antigods {\"antigod1\", \"antigod2\"}", " temple.orgs {{\"org1\", \"info1\", 0}, {\"org2\", \"info2\", 0}}", " temple.min_stats {2.0, 2.0, 8.5, 1.5}", " temple.stat_to_heal 1-4", " temple.is_temple 0-1"} |
battle_task | #104 | r | #2 | <clear> |
dig_level | #104 | rc | #36 | <clear> |
holes | #104 | r | #2 | <clear> |
help_msg | #104 | rc | #36 | {" donate/tithe/offer <any>", " worship/pray [any]", " join <any>"} |
who_location_msg | #3 | rc | #36 | <clear> |
free_home | #3 | rc | #36 | <clear> |
victim_ejection_msg | #3 | rc | #36 | <clear> |
ejection_msg | #3 | rc | #36 | <clear> |
oejection_msg | #3 | rc | #36 | <clear> |
residents | #3 | rc | #36 | <clear> |
free_entry | #3 | rc | #36 | <clear> |
entrances | #3 | c | #36 | <clear> |
blessed_object | #3 | rc | #36 | <clear> |
blessed_task | #3 | rc | #36 | <clear> |
exits | #3 | c | #36 | <clear> |
dark | #3 | rc | #36 | <clear> |
ctype | #3 | rc | #36 | <clear> |
key | #1 | c | #36 | 0 |
aliases | #1 | rc | #36 | {"Generic Temple", "temple"} |
description | #1 | rc | #36 | <clear> |
object_size | #1 | r | #36 | {9471, -1090650497} |
html | #1 | rc | #36 | <clear> |
Ancestry
Ancestors (nearest first): #118 virtual exit room → #104 RPG room → #3 generic room → #1 Root Class
Children: none
Call graph
Source
worship pray
Referenced by
none
Source
1if (!this.is_temple) 2return $you:say_action(tostr("%N %<says> a quick prayer.")); 3elseif (dobjstr || iobjstr) 4if ((g = iobjstr in this.gods) || (g = dobjstr in this.gods)) 5god = this.gods[g]; 6elseif ((g = iobjstr in this.antigods) || (g = dobjstr in this.antigods)) 7player:tell("Your blasphemous desecration brings a curse upon you!"); 8player:tell("You feel your ", player.stats[1][this.stat_to_heal], " drain away!"); 9player.stats_current[2][this.stat_to_heal] = player.stats_current[2][this.stat_to_heal] * 0.75; 10else 11god = `this.gods[random($)] ! ANY => "the powers that be"'; 12endif 13else 14god = `this.gods[random($)] ! ANY => "the powers that be"'; 15endif 16$you:say_action(tostr("%N %<says> a prayer to ", god, ".")); 17if (((heal = player.stats[2][this.stat_to_heal] - player.stats_current[2][this.stat_to_heal]) > 0.0) && (0.0 < (val = this:donor_tally(player)))) 18heal = ((x = val * 0.05) < heal) ? x | heal; 19player.stats_current[2][this.stat_to_heal] = player.stats_current[2][this.stat_to_heal] + heal; 20player:tell("You feel the grace of ", god, " restore your ", player.stats[1][this.stat_to_heal], "."); 21this:add_donor(player, heal / -0.1); 22endif
join
Referenced by
none
Source
1if (!(org = dobjstr in $list_utils:slice(this.orgs))) 2player:tell("You may only join ", $string_utils:english_list(this.orgs), "."); 3else 4okay = 1; 5for s in [1..4] 6if (player.stats_current[2][s] < this.min_stats[s]) 7okay = 0; 8break; 9endif 10endfor 11"gender from .orgs[org][3] => 0=ANY, 1=Male, 2=Female 3=Male/Female"; 12if ((this.orgs[org][3] == 1) && (!(player.gender == "male"))) 13player:tell("A member of ", this.orgs[org][1], "must be male."); 14okay = 0; 15elseif ((this.orgs[org][3] == 2) && (!(player.gender == "female"))) 16player:tell("A member of ", this.orgs[org][1], "must be female."); 17okay = 0; 18elseif ((this.orgs[org][3] == 3) && (!(player.gender in {"male", "female"}))) 19player:tell("A member of ", this.orgs[org][1], "must be either female or male."); 20okay = 0; 21endif 22if (okay) 23player:tell("You join ", this.orgs[org][1], "."); 24else 25player:tell("You don't meet the minimum requirements for ", this.orgs[org][1], "."); 26endif 27endif
donate tithe offer
Referenced by
none
Source
1args = setremove(args, "to"); 2if (toint(args[1]) < 0) 3return player:tell("You can't give a negative amount."); 4elseif (toint(args[1]) && $money_utils:_has_currency(args[2])) 5left = player:_rem_money(args[2], tofloat(args[1])); 6if (left != 0) 7return player:tell("You don't have that many ", args[2], "."); 8endif 9value = $money_utils:_from_to(args[2], "Gold", tofloat(args[1])); 10this.gold = this.gold + value; 11this:announce(player:title(), " donates some money to ", this:title(), "."); 12player:tell("You offer ", args[1], " ", args[2], " to ", this:title(), "."); 13this:add_donor(player, value); 14elseif (valid(o = player:my_match_object(dobjstr)) && (o.value_base > 0.0)) 15value = o.value_base; 16this:add_donor(player, value); 17o:moveto(`$local.dead_object_container ! ANY => $nothing'); 18this.gold = this.gold + value; 19$you:say_action(tostr("%N %<donates> ", o:title(), " to ", this:title(), ".")); 20else 21player:tell("The temple can't use that."); 22endif
add_donor
Referenced by
- #133:worship line 21:
this:add_donor - #133:donate line 13:
this:add_donor - #133:donate line 16:
this:add_donor
Source
1"USAGE: add_donor(donor, gold value)"; 2if (d = args[1] in $list_utils:slice(this.donors)) 3this.donors[d][2] = this.donors[d][2] + tofloat(args[2]); 4this.donors[d][2] = (this.donors[d][2] > 0.0001) ? this.donors[d][2] | 0.0; 5else 6this.donors = {@this.donors, {args[1], tofloat(args[2])}}; 7endif
rem_donor
Referenced by
none
Source
1"USAGE: rem_donor(donor)"; 2if (d = args[1] in $list_utils:slice(this.donors)) 3this.donors = setremove(this.donors, this.donors[d]); 4endif
donor_tally
Referenced by
- #133:worship line 17:
this:donor_tally
Source
1"USAGE: donor_tally(donor) => amount donor has given recently"; 2if (d = args[1] in $list_utils:slice(this.donors)) 3return this.donors[d][2]; 4endif 5return 0.0;
init_for_core
Referenced by
none
Source
1if (caller_perms().wizard) 2if (this == $temple) 3this.gods = {}; 4this.antigods = {}; 5this.orgs = {}; 6this.min_stats = {2.0, 2.0, 8.5, 1.5}; 7this.stat_to_heal = 4; 8this.donors = {}; 9this.gold = 0.0; 10this.sanctuary = 1; 11else 12for p in (properties($temple)) 13if ((!p) in {"build_help", "help_msg"}) 14clear_property(this, p); 15endif 16endfor 17endif 18return pass(@args); 19endif
help_msg
Referenced by
none
Source
1msg = (this.is_temple && this.gods) ? {"Deities worshipped here:", " " + $string_utils:english_list(this.gods), "", "Organizations to join:"} | {"Organizations to join:"}; 2for o in (this.orgs) 3if (o[3] == 1) 4blurb = "(male only)"; 5elseif (o[3] == 2) 6blurb = "(female only)"; 7elseif (o[3] == 3) 8blurb = "(male or female only)"; 9else 10blurb = ""; 11endif 12msg = {@msg, ((((" " + o[1]) + " -- ") + o[2]) + " ") + blurb}; 13endfor 14return {@msg, "", @pass(@args)};