-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoonopoly.moo
2119 lines (2056 loc) · 69.9 KB
/
moonopoly.moo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@dump moo
@chmod #87868."help" r
;;#87868.("help") = #87868
@chmod #87868."tasks" r
;;#87868.("tasks") = {}
@chmod #87868."state" r
;;#87868.("state") = ""
@chmod #87868."history" r
;;#87868.("history") = {{#125316, "moved from", "Electric Company", "forward 4
spaces to St. James Place"}, {#125316, "rolled", 2, "and", 2, "-- Doubles!"},
{#125316, "moved from", "Baltic Avenue", "forward 9 spaces to Electric
Company"}, {#125316, "rolled", 3, "and", 6}, {#125316, "moved from", "Short
Line Railroad", "forward 8 spaces to Baltic Avenue"}, {#125316, "rolled", 4,
"and", 4, "-- Doubles!"}, {#125316, "moved from", "Pacific Avenue", "forward 4
spaces to Short Line Railroad"}, {#125316, "rolled", 1, "and", 3}, {#125316,
"moved from", "Water Works", "forward 3 spaces to Pacific Avenue"}, {#125316,
"rolled", 2, "and", 1}, {#125316, "moved from", "Indiana Avenue", "forward 5
spaces to Water Works"}, {#125316, "rolled", 4, "and", 1}, {#125316, "moved
from", "St. James Place", "forward 7 spaces to Indiana Avenue"}, {#125316,
"rolled", 3, "and", 4}, {#125316, "bought", "St. James Place", "for", "$180"},
{#125316, "moved from", "Reading Railroad", "forward 11 spaces to St. James
Place"}, {#125316, "rolled", 5, "and", 6}, {#5704, "collected", "$25"},
{#125316, "paid", "$25"}, {#125316, "moved from", "Go", "forward 5 spaces to
Reading Railroad"}, {#125316, "rolled", 3, "and", 2}, {#125316, "collected",
"$1500"}, {#125316, "rolled", 4, "and", 6}, {#125316, "started playing"},
{#125338, "left the game"}, {#125338, "quit"}, {#125338, "quit"}, {#125338,
"moved from", "Center", "directly to Go"}, {#125338, "quit"}, {#5704, "left the
game"}, {#5704, "moved from", "2nd Community Chest", "directly to North
Carolina Avenue"}, {#5704, "collected", "$200"}, {#5704, "picked", "'From sale
of st...'", "from", "Community Chest"}, {#5704, "moved from", "St. Charles
Place", "forward 6 spaces to 2nd Community Chest"}, {#5704, "rolled", 3, "and",
3, "-- Doubles!"}, {#5704, "bought", "St. Charles Place", "for", "$140"},
{#5704, "moved from", "Reading Railroad", "forward 6 spaces to St. Charles
Place"}, {#5704, "rolled", 4, "and", 2}, {#5704, "bought", "Reading Railroad",
"for", "$200"}, {#5704, "collected", "$200"}, {#5704, "moved from", "Chance",
"to Reading Railroad"}, {#5704, "picked", "'Advance to the ...'", "from",
"Chance"}, {#5704, "collected", "$200"}}
@chmod #87868."riding" r
;;#87868.("riding") = {0, 4, 0}
@chmod #87868."tokens" r
;;#87868.("tokens") = {{"top hat", "racing car", "thimble", "boat", "doggie",
"horse", "shoe", "cannon", "iron", "wheelbarrow", "broomstick"}, {{"wearing a",
"tips %p %t"}, {"driving a", "honks %p horn"}, {"riding in a", "turns in %p
%t"}, {"sailing a", "tacks %p %t"}, {"leading a", "barks"}, {"racing a", "reins
%p %t"}, {"wearing a", "taps %p %t"}, {"firing a", "fires %p %t"}, {"steaming
an", "flattens with %p %t"}, {"pushing a", "overturns %p %t"}, {"floating on
a", "sweeps with %p %t"}}}
@chmod #87868."playerhas" r
;;#87868.("playerhas") = {0}
@chmod #87868."playerlocs" r
;;#87868.("playerlocs") = {"Center", "St. James Place", "Center"}
@chmod #87868."players" r
;;#87868.("players") = {#125397, #125316, #81176}
@chmod #87868."die" r
;;#87868.("die") = {{" ", " o ", " "}, {"o ", " ", " o"}, {"o ", " o
", " o"}, {"o o", " ", "o o"}, {"o o", " o ", "o o"}, {"o o", "o o", "o o"}}
@chmod #87868."requests" r
;;#87868.("requests") = {"Make l*ook look at property", "", "? Notify other
players when monopoly acquired", "Have 'status' group properties by color",
"stat <color> -- who owns what of that color?", "", "Add stuff for players to
have tokens", "pick <token>", " top-hat racing-car thimble boat doggie
horserider shoe canon iron wheelbarrow", " Sitting in a top-hat; riding a
racing car;", " in a thimble; on a boat; riding a doggie;", " next to a
horserider", "", "Player order: In status, say 'joe last rolled 2 and 5, mary's
turn now' or 'joe last", "rolled 2 and 2, joe goes again'", "", "stat order
shows who's turn it is now and who's next?", "", "random messages for 'user
picks up and shakes them' for variety"}
@chmod #87868."jailfree" r
;;#87868.("jailfree") = #-1
@chmod #87868."railroads" r
;;#87868.("railroads") = {6, 16, 26, 36}
@chmod #87868."utilities" r
;;#87868.("utilities") = {13, 29}
@chmod #87868."last_roll" r
;;#87868.("last_roll") = {2, 2, #125316}
@chmod #87868."color" r
;;#87868.("color") = {"", "purple", "", "purple", "", "", "light blue", "",
"light blue", "light blue", "", "light purple", "", "light purple", "light
purple", "", "orange", "", "orange", "orange", "", "red", "", "red", "red", "",
"yellow", "yellow", "", "yellow", "", "green", "green", "", "green", "", "",
"dark blue", "", "dark blue", "", ""}
@chmod #87868."mortgaged" r
;;#87868.("mortgaged") = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
@chmod #87868."features" r
;;#87868.("features") = {"a large arrow and the word GO printed in orange
here", "", "a blue chest and the words 'FOLLOW INSTRUCTIONS ON TOP CARD' here",
"", "the words 'Pay 10% or $200'", "a black choo-choo", "", "a large orange
question mark", "", "", "a cartoon figure in jail nearby", "", "a yellow
light-bulb", "", "", "a black choo-choo", "", "a blue chest and the words
'FOLLOW INSTRUCTIONS ON TOP CARD' here", "", "", "a large red car", "", "a
large blue question mark", "", "", "a black choo-choo", "", "", "a water
faucet", "", "a policeman holding up a finger", "", "", "a blue chest and the
words 'FOLLOW INSTRUCTIONS ON TOP CARD' here", "", "a black choo-choo", "a
large orange question mark", "", "a diamond ring and the words 'PAY $75.00'
here", "", "metal bars all around", "a reminder to type 'rules' for more
information"}
@chmod #87868."map_places" r
;;#87868.("map_places") = {{44, 41, 37, 33, 29, 25, 21, 17, 13, 9, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 9, 13, 17, 21, 25, 29, 33, 37, 41, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 2, 25, 22}, {23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 21,
19, 17, 15, 13, 11, 9, 7, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 9, 11, 13,
15, 17, 19, 21, 23, 17, 9}}
@chmod #87868."map" r
;;#87868.("map") = {"+-----+---+---+---+---+---+---+---+---+---+-----+", "|PARK
|Ken|CHA|Ind|Ill|B&O|Atl|Ven|Wat|Mar|>JAIL|", "| | | | | | | |
| | | |", "+-----+---+---+---+---+---+---+---+---+---+-----+", "|New |
| Pac|", "+-----+ +-----+", "|Ten |
| Nor|", "+-----+ +-----+", "|CCH |
| CCH|", "+-----+ +-----+", "|StJ |
| Pen|", "+-----+ tm +-----+", "|Prr | M O
O N O P O L Y | Sho|", "+-----+
+-----+", "|Vir | | CHA|", "+-----+
+-----+", "|Sta | | Par|", "+-----+
+-----+", "|Ele | | LUX|", "+-----+
+-----+", "|StC | | Brd|",
"+-----+---+---+---+---+---+---+---+---+---+-----+", "| | | | | |
| | | | | GO|", "|JAIL |Con|Ver|CHA|Ori|Rea|TAX|Bal|CCH|Med| <-- |",
"+-----+---+---+---+---+---+---+---+---+---+-----+"}
@chmod #87868."rules" r
;;#87868.("rules") = {{"rules moonopoly here", "", "MOOnopoly(tm) is
text-virtual reality version of the board game of", "similar name. You play the
game by landing on the board, and moving", "yourself around the square. Looking
about, you will see deeds, houses,", "hotels, as well as the various tokens.
Extensive help is available.", "", "The MOOnopoly board doesn't enforce the
rules or automatically play", "(buy or sell property). This leaves some room
for negotiation, and", "cheating, too, if you can get away with it.", "", "For
more help, type 'rules <category>' for any of the following:", " summary
status miscellaneous", " movement money property", "
houses mortgage cards", " jail free-parking income-tax",
" building-shortage tokens", " leaving "}, {"summary verbs", " roll",
" move/go/advance [<place> | <n> | out | nearest [ r*ailroad | u*tility ]]", "
done", " pay/collect [<amount>]", " pay [<amount> to <player> | 10% ]", "
buy/sell/mortgage/unm*ortgage [<place>] [for <n>]", " tr*ansfer [ <place> |
card ] to <player>", " pick/shuffle [<deck>]", " build/return [ <n> | hotel ]
[on <place>]", " stat*us [ <player> | roll | unowned | <color> | rail* | util*
| token ]", " history [<n>]", " d*eed <place>", " l*ook dice | <place> |
<thing>", " map ", " play [<token>]", " ride [<token>]", " quit/concede", "
exit", " reset", " no", "<place> is here or a place name. Watch out that
abbreviations", "choose the first property that match: St = St Charles Place"},
{"movement go roll advance", "roll Roll the dice.",
"move/go Roll and move the amount shown.", "no
Grab the dice if someone else rolls out of order.", "move <number>
Go forward (negative numbers go backward.)", "go to <place> Go
directly to the place.", "go out Get out of jail.",
"advance to <place> Go forward to place; tell whether GO is
passed.", "advance to nearest r*ailroad Just like it says.", "advance to
nearest u*tility", "done Tell other players you're
done with your turn.",
"================================================================", "THE
PLAY...", " \"If a player throws doubles he moves as usual the sum of the
two", "dice and is subject to any privileges or penalties pertaining to the",
"space on which he lands. Retaining the dice, he throws again and moves", "his
token as before. If a player throws doubles three times in", "succession, he
moves immediately to the space marked 'In Jail'.\""}, {"money pay collect
rent", "collect <n> Collect money from bank.", "collect
Collect $200.", "pay <n> Pay money to bank.", "pay <n> to
<player> Give money to another player", "pay [rent] Pay
the amount of rent due, if any, to the", " owner of
your current space.", "pay 10% For use on Income Tax: pay 10%
of net worth.", "rent <place> Show what rent is due on <place>."},
{"mortgage unmortgage", "mortgage [<place>] [for <n>] <place> defaults to
your current location.", "unm*ortgage [<place>] [for <n>]", "", "You may only
mortgage property if it is unimproved, and must return", "any houses or hotels.
The mortgage value of a property is listed", "on its deed; to unmortgage a
property, you must pay 10% over the mortgage", "value."}, {"property buy sell
transfer", "buy [<place>] [for <n>] Buy from the bank.", "sell[<place>] [for
<n>] Sell to the bank.", " <place> defaults to your current location.", "
The price is computed, but you can override it.", "", "tr*ansfer <place> to
<player>", " To sell property between players, the seller transfers the", "
property to the buyer, and the buyer pays the seller the purchase", " price.
You cannot transfer property with improvements.", "", "",
"================================================================", "BUYING
PROPERTY...", " \"Whenever a player lands on an unowned property he may buy
that", "property from the Bank at its printed price.... If he does not wish",
"to buy the property it is sold at auction by to the highest bidder.", "The
buyer pays to the Bank the amount of the bid in cash... Any", "player,
including the one who declined the option of buying it at the", "printed price,
may bid. Bidding may start at any price.", "", "SELLING PROPERTY...", "
Unimproved properties, railroads and utilities (but not ", "buildings) may be
sold to any player as a private transaction ", "for any amount that the owner
can get. However, no property can ", "be sold to another player if buildings
are standing on any ", "properties of that color-group. Any buildings so
located must ", "be returned to the Bank before the owner can sell any property
", "of that color-group.\""}, {"jail", "go out Get out of
jail", "return card Return 'Get Out Of Jail Free' card", "transfer
card to <player>", " Give 'Get Out Of Jail Free' card to
another player.", "", " \"A player gets out of Jail by... (1) throwing
doubles on any", "of his next three turns. (If he succeeds in doing this he ",
"immediately moves forward the number of spaces shown by his ", "doubles throw.
Even though he has thrown doubles he *does not* ", "take another turn.); (2)
using the 'Get Out of Jail Free' card ", "if he has it; (3) purchasing the 'Get
Out of Jail Free' card ", "from another player and playing it; (4) paying a
fine of $50 ", "before he rolls the dice on either of his next two turns.", "
If the player does not throw doubles by his third turn he ", "*must pay* the
$50 fine. He then gets out of Jail and immediately ", "move forward the number
of spaces shown by his throw.", " Even though he is in Jail, a player may buy
or sell property, ", "buy or sell houses and hotels and collect rents.\""},
{"houses hotels build return", "build [<built>] [on <place>]", "
Build any number of houses, or a hotel. Defaults", " to building 1
house on current space.", "", "return [<built>] [on <place>]", "
Return houses/hotel to bank, for half original price.", "", "There are only 12
hotels and 32 houses; see 'building shortage' ", "for details.",
"================================================================", " \"When
a player owns all the properties in a color-group he may", "buy houses from the
Bank and erect them on those properties.", " If he buys one house, he may put
it on any one of those ", "properties. The next house he buys must be erected
on one of the ", "unimproved properties of this or any other complete
color-group ", "he may own.", " The price he must pay the Bank for each house
is shown on his ", "Title Deed card for the property on which he erects the
house.", " The owner can still collect double rent from an opponent who ",
"lands on the unimproved properties of his complete color-group.", "
Following the above rules, a player may buy and erect at any ", "time as many
houses as his judgement and financial standing will ", "allow. *But he must
build evenly* (i.e.: he cannot erect more ", "than one house on any one
property of any color-group until he ", "has built one house on every property
of that group. He may then ", "begin on the second row of houses, and so on, up
to a limit of ", "four houses to a property. For example, he cannot build three
", "houses on one property if he has only one house on another ", "property of
that group.)", " As a player builds evenly, he must also break down evenly if
", "he sells houses back to the Bank.\""}, {"building-shortage",
"================================================================", "BUILDING
SHORTAGE", "\" When the Bank has no houses to sell, players wishing to build
", "must wait for some player to turn back or to sell his houses to ", "the
Bank before building. If there are a limited number of houses ", "and hotels
available, and two or more players wish to buy more ", "than the Bank has, the
houses or hotels must be sold at auction ", "to the highest bidder.\"", "",
"There are only 12 hotels and 32 houses in the set.", "[*NB*] The 'auction'
facility is not currently implemented."}, {"cards community-chest chance",
"pick [<deck>] Pick a card from the deck.", "shuffle [<deck>]
Shuffle community chest or chance cards (or both).", "", "return card
Return Get Out Of Jail Free card to deck.", "tr*ansfer card to <player> Give
card to another player. ",
"================================================================", " \"The
'Get Out of Jail Free' card is held until used and then", "returned to the
deck. If the player who draws it does not wish to use", "it he may sell it, at
any time, to another player at a price agreeable", "to both.\"", "", "[*NB*] To
sell a card to another player, the seller transfers the", "card to the buyer,
who pays the sales price to the seller."}, {"status query worth map history
dice deed", "rent [<place>] What rent is due on <place> (defaults to
'here')", "stat who owns what", "stat <player>
Subset, for a particular player. ('stat me')", "stat [<color> | util | railroad
]", "stat token Who is playing as what token?", "stat unowned
What properties aren't owned?", "look Look around, tells
you who is where.", "look dice Who last rolled what?", "look
<place> See what's on a given square", "d*eed <place>
Show you the deed to a place", "rules <topic> How you get these
messages.", "worth Show what you're worth (for tax
purposes).", "history [<n>] Show <n> recent events, defaults to 10.
", "map Show a map of the game."}, {"tokens", "ride
<token> Select a token to play as.", "play <token> Start
playing, too.", "stat tokens Show which tokens are used & free.",
"", "Players can select a token, which changes their 'look' in the game."},
{"leaving quit exit leave out concede", "exit Leave the
board temporarily.", "concede Stop playing the game; return all
property to bank.", "quit Concede and exit.", "",
"Teleporting out, or leaving in a manner other than 'exit' will remove", "the
player from the game and returns all property, if they don't return", "within
30 seconds and remain."}, {"miscellaneous play reset no done", "play [<token>]
Start playing the game:", " pick the token, collect
$1500, move to go,", " roll to see who goes
first...", "reset game Reset the entire game.", "no
Stop an pending dice-roll or game reset.", "done Emote a
message that your turn is done.", "yell Speak loudly
enough that those outside can hear.", "look out See what's
happening outside.", ""}, {"free-parking", "FREE PARKING...", " A player
landing on this space does not receive any money, ", "property or reward of any
kind. This is just a 'free' resting place.", "Many players are used to house
rules where free parking keeps a jackpot", "of all taxes and fees. This game
does not support it."}, {"income-tax", "Upon landing on income tax, the player
should quickly, without taking", "time to figure his net worth, choose:", "
pay $200", " pay 10%", "",
"================================================================", "INCOME
TAX", " \"When a player lands on 'Income Tax' he has two options: he may",
"estimate his tax at $200 and pay the Bank, or he may pay 10% of his", "total
worth to the Bank. His total worth is all his cash on hand,", "printed prices
of mortgaged and unmortgaged properties and cost price", "of all buildings he
owns.", " The player must decide which option he will take *before* he adds",
"up his total worth.\""}}
@chmod #87868."chance_name" r
;;#87868.("chance_name") = "Chance"
@chmod #87868."chest_name" r
;;#87868.("chest_name") = "Community Chest"
@chmod #87868."chance_marker" r
;;#87868.("chance_marker") = 4
@chmod #87868."chest_marker" r
;;#87868.("chest_marker") = 3
@chmod #87868."chance" r
;;#87868.("chance") = {"GO DIRECTLY TO JAIL; do not pass GO, do not collect
$200.", "Take a walk on the board walk: advance token to Boardwalk.", "Advance
to the nearest Railroad and pay owner Twice the Rental to which he is otherwise
entitled. If Railroad is unowned, you may buy it from the Bank.", "Go back 3
spaces.", "Bank pays you dividend of $50.", "Advance token to nearest Utility.
If UNOWNED, you may buy it from bank. If OWNED, throw dice and pay owner a
total ten times the amount thrown.", "Your building and loan matures: collect
$150.", "GET OUT OF JAIL FREE. This card may be kept until needed or sold.",
"Advance to Illinois Ave.", "Take a ride on the Reading. If you pass GO collect
$200.", "Make general repairs on all your property: for each house pay $25, for
each hotel $100.", "Advance to St. Charles Place. If you pass GO, collect
$200.", "You have been elected Chairman of the Board: pay each player $50.",
"Advance to the nearest Railroad and pay owner Twice the Rental to which he is
otherwise entitled. If Railroad is unowned, you may buy it from the Bank.",
"Advance to GO (collect $200).", "Pay poor tax of $15."}
@chmod #87868."owners" r
;;#87868.("owners") = {#-1, #-1, #-1, #5704, #-1, #5704, #-1, #-1, #5704,
#5704, #-1, #5704, #5704, #-1, #-1, #-1, #125316, #-1, #-1, #-1, #-1, #-1, #-1,
#-1, #-1, #-1, #-1, #-1, #-1, #-1, #-1, #-1, #5704, #-1, #-1, #-1, #-1, #-1,
#-1, #5704, #-1, #-1}
@chmod #87868."houses" r
;;#87868.("houses") = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
@chmod #87868."housing" r
;;#87868.("housing") = {0, {50, 2, 10, 30, 90, 160, 250}, 0, {50, 4, 20, 60,
180, 320, 450}, 0, 0, {50, 6, 30, 90, 270, 400, 550}, 0, {50, 6, 30, 90, 270,
400, 550}, {50, 8, 40, 100, 300, 450, 600}, 0, {100, 10, 50, 150, 450, 626,
750}, 0, {100, 10, 50, 150, 450, 626, 750}, {100, 12, 60, 180, 500, 700, 900},
0, {100, 14, 70, 200, 550, 750, 950}, 0, {100, 14, 70, 200, 550, 750, 950},
{100, 16, 80, 220, 600, 800, 1000}, 0, {100, 18, 90, 250, 700, 875, 1050}, 0,
{100, 18, 90, 250, 700, 875, 1050}, {150, 20, 100, 300, 750, 925, 1100}, 0,
{150, 22, 110, 330, 800, 975, 1150}, {150, 22, 110, 330, 800, 975, 1150}, 0,
{150, 24, 120, 360, 850, 1025, 1200}, 0, {200, 26, 130, 390, 900, 1100, 1275},
{200, 26, 130, 390, 900, 1100, 1275}, 0, {200, 28, 150, 450, 1000, 1200, 1400},
0, 0, {200, 35, 175, 500, 1100, 1300, 1500}, 0, {200, 50, 200, 600, 1400, 1700,
2000}, 0, 0}
@chmod #87868."price" r
;;#87868.("price") = {0, 60, 0, 60, 0, 200, 100, 0, 100, 120, 0, 140, 180, 140,
160, 200, 180, 0, 180, 200, 0, 220, 0, 220, 240, 200, 260, 260, 180, 280, 0,
300, 300, 0, 320, 200, 0, 350, 0, 400, 0, 0}
@chmod #87868."chest" r
;;#87868.("chest") = {"You inherit $100.", "From sale of stock you get $45.",
"Doctor's fee: pay $50.", "Life insurance matures: collect $100.", "Receive for
services $25.", "Xmas fund matures: collect $100.", "GO TO JAIL. Go Directly to
Jail; do not pass GO, do not collect $200.", "Advance to GO (collect $200).",
"GET OUT OF JAIL FREE. This card may be kept until needed or sold.", "You are
assessed for street repairs: $40 per house, $115 per hotel.", "Pay school tax
of $150.", "Grand Opera Opening: collect $50 from every player for opening
night seats.", "Income tax refund: collect $20.", "Bank error in your favor:
collect $200.", "Pay hospital $100.", "You have won Second Prize in a beauty
contest: collect $10."}
@chmod #87868."has" r
;;#87868.("has") = {{#125316, 1295}, {#5704, 725}}
@chmod #87868."listening" r
;;#87868.("listening") = 1
@chmod #87868."places" r
;;#87868.("places") = {"Go", "Mediterranean Avenue", "Community Chest", "Baltic
Avenue", "Income Tax", "Reading Railroad", "Oriental Avenue", "Chance",
"Vermont Avenue", "Connecticut Avenue", "Jail--Just Visiting", "St. Charles
Place", "Electric Company", "States Avenue", "Virginia Avenue", "Pennsylvania
Railroad", "St. James Place", "2nd Community Chest", "Tennessee Avenue", "New
York Avenue", "Free Parking", "Kentucky Avenue", "2nd Chance", "Indiana
Avenue", "Illinois Avenue", "B&O Railroad", "Atlantic Avenue", "Ventnor
Avenue", "Water Works", "Marvin Gardens", "Go to Jail", "Pacific Avenue",
"North Carolina Avenue", "3rd Community Chest", "Pennsylvania Avenue", "Short
Line Railroad", "3rd Chance", "Park Place", "Luxury Tax", "Boardwalk", "Jail",
"Center"}
@chmod #87868."initial_place" r
;;#87868.("initial_place") = "Center"
;;#87868.("help_msg") = {"MOOnopoly(tm) is text-virtual reality version of the
board game of", "similar name. You play the game by landing on the board, and
moving", "yourself around the square. Looking about, you will see deeds,
houses,", "hotels, as well as the various tokens. Extensive help is available,
please type 'rules' to see the list of the categories of what help is
available.", "History of MOOnopoly(tm). MOOnopoly was originally coded by gru
(#122) back in 1992. Around the middle of 1997, gru (who was at the time, over
quota) offered the board to pensette (#84567) so that she could modify it to
make it run again under 1.8, and maintain it thereafter.", "As of this date,
this object has not been reimbursed by the ARB.", "Availability. MOOnopoly is
available in the dining room only, and is not fertile. It is not to be ported
to another MOO without permission of gru (original coder) and/or pensette
(maintainer).", " And now the fun! How to play. Go to the
board.", "play [<token>]. This will pick the token, collect $1500, move to go,
etc.", "If there's a group there, ask to play. At this time you may also 'reset
game'.", "If the room is cluttered with ghosts, you may 'dust' and clear them
out. *This is a temporary modification."}
"#87868.("visible_props") => E_PERM (Permission denied)
"#87868.("move_ok") => E_PERM (Permission denied)
"#87868.("silent_actions") => E_PERM (Permission denied)
"#87868.("accept_key") => E_PERM (Permission denied)
;;#87868.("inside_description") = "This is the interior of the generic portable
room."
"#87868.("entrances") => E_PERM (Permission denied)
"#87868.("exits") => E_PERM (Permission denied)
"#87868.("key") => E_PERM (Permission denied)
;;#87868.("aliases") = {"Moonopoly Board"}
;;#87868.("description") = "A Moonopoly(TM) board, LambdaMoo Electronic Edition
of 1991. When playing it, type 'rules' to see how to run it. MOOnopoly
Copyright (c) 1991, Grump@LambdaMoo."
;;#87868.("object_size") = {81632, 1697703032}
@args #87868:"get_floor get_space" this none this
@program #87868:get_floor
if (ind = args[1] in this.players)
return this.playerlocs[ind];
endif
return E_NONE;
.
@args #87868:"look_self" this none this
@program #87868:look_self
player:tell(this:title());
if (!(args && args[1]))
player:tell_lines(this:description());
endif
if (!(player in (contents = this.contents)))
return this:map();
endif
this:showwhere(1, player);
.
@args #87868:"set_floor set_space" this none this
@program #87868:set_floor
if (caller_perms() != this.owner)
player:tell("Permission denied.");
return;
endif
who = args[1];
where = args[2];
if ((typeof(who) != OBJ) || (!(where in this.places)))
player:tell("Can't set ", who, " to be in ", where, ".");
return;
endif
if (i = who in this.players)
this.playerlocs[i] = where;
else
this.players = {@this.players, who};
this.playerlocs = {@this.playerlocs, where};
this.riding = {@this.riding, 0};
endif
.
@args #87868:"exitfunc" this none this
@program #87868:exitfunc
what = args[1];
"leave game if not going to an editor and via a verb not defined on this";
if (!$object_utils:isa(what.location, $generic_editor))
for x in (callers())
if ((x[1] == this) && (x[2] in {"exit"}))
return pass(@args);
endif
endfor
fork (60)
if (!(what in this.contents))
"Didn't come back.";
if (this:remove_player(what))
this:remember(what, "left the game");
this:announce_all_but({what}, what:title(), " left abruptly, dropping
out of the game.");
what:tell("You left ", this.name, " abruptly, and drop out of the
game.");
endif
endif
endfork
endif
return pass(@args);
.
@args #87868:"enterfunc" this none this
@program #87868:enterfunc
object = args[1];
if (ERR == typeof(this:get_floor(object)))
floor = this:guess_floor();
if (floor == E_NONE)
floor = this.initial_place;
endif
this:set_floor(args[1], floor);
if ($object_utils:has_property(object, "gender"))
fork (0)
this:announce_all_but({object}, object:title(), " landed on ", floor,
".");
endfork
endif
endif
pass(@args);
.
@args #87868:"announce" this none this
@program #87868:announce
floor = this:get_space(caller);
if (!floor)
pass(@args);
else
this:floor_announce(floor, {player}, @args);
endif
.
@args #87868:"announce_all" this none this
@program #87868:announce_all
if ((caller == this) || (ERR == typeof(floor = this:get_floor(caller))))
pass(@args);
else
this:floor_announce(floor, {}, @args);
endif
.
@args #87868:"announce_all_but" this none this
@program #87868:announce_all_but
floor = this:get_floor(caller);
if (!floor)
return pass(@args);
endif
this:floor_announce(floor, @args);
.
@args #87868:"floor_announce" this none this
@program #87868:floor_announce
this:clean();
floor = args[1];
omit = args[2];
text = args[3..length(args)];
for x in [1..length(this.players)]
play = this.players[x];
if (((play.location == this) && (this.playerlocs[x] == floor)) && (!(play in
omit)))
play:tell(@text);
endif
endfor
.
@args #87868:"say" any any any
@chmod #87868:say rxd
@program #87868:say
player:tell("You say, \"", argstr, "\"");
floor = this:get_floor(player) || "somewhere";
cnt = this.contents;
for x in (cnt)
if (x != player)
x:tell(player.name, " ", ((ind = x in this.players) &&
(this.playerlocs[ind] == floor)) ? "says" | ("says from " + floor), ", \"",
argstr, "\"");
endif
endfor
.
@args #87868:"emote" any any any
@chmod #87868:emote rxd
@program #87868:emote
msg = player.name + (((argstr != "") && (argstr[1] == ":")) ?
argstr[2..length(argstr)] | (" " + argstr));
floor = this:get_floor(player) || "somewhere";
cnt = this.contents;
for x in (cnt)
x:tell(((ind = x in this.players) && (this.playerlocs[ind] == floor)) ? "" |
(this:onroom(floor, 1) + ": "), msg);
endfor
.
@args #87868:"guess_floor" this none this
@program #87868:guess_floor
lst = listappend($list_utils:slice(callers()), player);
floor = E_NONE;
while (lst && ((!valid(lst[1])) || (typeof(floor = this:get_floor(lst[1])) ==
ERR)))
lst = listdelete(lst, 1);
endwhile
return floor;
.
@args #87868:"go move advance" any any any
@chmod #87868:go rxd
@program #87868:go
oldfloor = this:get_floor(player);
oldind = oldfloor in this.places;
advance = verb == "advance";
if (!argstr)
cnt = this:roll();
else
cnt = tonum(argstr);
endif
if (cnt || (argstr == "0"))
advance = cnt > 0;
if (!oldind)
player:tell("You don't seem to be anywhere on ", this.name, ".");
elseif (oldind > 40)
player:tell("You can't move that way from ", oldfloor, ".");
return;
elseif ((cnt > 12) || (cnt < -12))
player:tell("You try to go ", cnt, " spaces, but decide it is too far, and
stay put.");
return;
endif
new = this.places[(((oldind + cnt) + 39) % 40) + 1];
announce = (cnt > 0) ? "forward " | "backward ";
cnt = abs(cnt);
announce = (((announce + tostr(cnt)) + " space") + ((cnt == 1) ? " to " | "s
to ")) + new;
elseif ((argstr == "out") && (oldfloor in {"Jail", "In Jail"}))
new = "Jail--Just Visiting";
announce = "out of Jail";
else
where = argstr;
if (index(where, "to ") == 1)
where = where[4..length(where)];
endif
if (index(where, "nearest"))
places = this.(index(where, "est r") ? "railroads" | "utilities");
advance = 1;
nearest = 0;
for x in (places)
if ((!nearest) && (x > oldind))
nearest = x;
endif
endfor
if (!nearest)
nearest = places[1];
endif
where = this.places[nearest];
endif
if (!(new = this:find(where)))
player:tell("I don't know how to go ", argstr);
return;
endif
announce = (advance ? "to " | "directly to ") + new;
endif
player:tell("You ", verb, " ", announce, ".");
this:remember(player, "moved from", oldfloor, announce);
this:set_floor(player, new);
player:tell(new);
if (!($object_utils:has_property(player, "brief") && player.brief))
player:tell_lines(this:description());
endif
others = setremove(this:get_contents(new), player);
this:tell_contents(others, this.ctype);
for x in (others)
x:tell(this:ptitle(player), " comes ", announce, ".");
endfor
this:announce_all_but({player, @others}, this:ptitle(player), " ", (verb ==
"go") ? "goes " | (verb + "s "), announce, ".");
if ((advance && ((new in this.places) <= oldind)) && (oldind < 41))
msg = (new == "Go") ? "landed on" | "passed";
player:tell("You ", msg, " GO! Collect $200.");
this:announce(player.name, " ", msg, " Go and should collect $200.");
endif
rent = this:rent_due(new, player);
if (rent[1])
landlord = rent[2];
msg = ((landlord.name + " $") + tostr(rent[1])) + " rent.";
player:tell("You owe ", msg);
this:announce_all_but({player, landlord}, player.name, " owes ", msg);
landlord:tell(player.name, " owes you $", rent[1], " rent.");
endif
.
@args #87868:"r*oll" none none none
@chmod #87868:roll rxd
@program #87868:roll
if (this.tasks)
player:tell("Sorry, the dice are busy.");
return;
endif
msg = {"%N %<picks> up the dice and %<shakes> them...", "%n %<grunts> and
%<heaves> the dice into the air with great effort..."}[random(2)];
player:tell($string_utils:pronoun_sub(msg, $you));
this:announce_all_but({player}, $string_utils:pronoun_sub(msg, player));
this.tasks = {@this.tasks, task = {"%N %<grabs> the dice away!", task_id()}};
suspend(2);
this.tasks = setremove(this.tasks, task);
die1 = random(6);
die2 = random(6);
msg = ((((tostr(die1) + " and ") + tostr(die2)) + " for ") + tostr(die1 +
die2)) + ".";
if (die1 == die2)
msg = msg + " Doubles!";
endif
player:tell("You roll ", msg);
this:announce_all_but({player}, player:title(), " rolls ", msg);
this.last_roll = {die1, die2, player};
this:remember(player, "rolled", die1, "and", die2, @(die1 == die2) ? {"--
Doubles!"} | {});
return die1 + die2;
.
@args #87868:"stat*us" any none none
@chmod #87868:status rxd
@program #87868:status
"this verb has not yet been fixed - 7/97, pensette";
aa = 0;
want = this;
this:clean();
if (dobjstr)
if (index(dobjstr, "token") == 1)
this:dostatus("token");
return;
elseif (dobjstr == "unowned")
want = #-1;
elseif (dobjstr == "roll")
want = #-5;
elseif (index(dobjstr, "rail") == 1)
want = this.railroads;
elseif (index(dobjstr, "util") == 1)
want = this.utilities;
elseif (dobjstr in this.color)
want = dobjstr;
elseif (!valid(want = this:find_player(dobjstr)))
return;
endif
endif
if (want == this)
own = this.has;
else
own = {};
for x in (this.has)
if (x[1] == want)
own = listappend(own, x);
endif
endfor
endif
for x in [1..length(this.places)]
if (this.price[x])
owner = this.owners[x];
if ((((owner == want) || (valid(owner) && (want == this))) ||
(this.color[x] == want)) || ((typeof(want) == LIST) && (x in want)))
own = {@own, {owner, this.places[x]}};
endif
endif
endfor
if (valid(jf = this.jailfree))
if (want in {this, jf})
own = {@own, {jf, "Get out of Jail Free Card"}};
endif
endif
own = $list_utils:sort_alist(own);
last = "nothing";
for x in (own)
if (last == x[1])
name = " ";
else
name = $string_utils:left(valid(x[1]) ? x[1].name | "unowned", 14);
last = x[1];
endif
if (typeof(owned = x[2]) == NUM)
owned = "$" + tostr(owned);
elseif (ind = owned in this.places)
lst = {};
if (c = this.color[ind])
lst = {c};
endif
if (h = this.houses[ind])
lst = {@lst, (h == 5) ? "hotel" | ((tostr(h) + " house") + ((h == 1) ? ""
| "s"))};
endif
if (m = this.mortgaged[ind])
lst = {@lst, "mortgaged"};
endif
if (lst)
owned = ((owned + " (") + $string_utils:from_list(lst, ", ")) + ")";
endif
endif
aa = 1;
player:tell(" ", name, owned);
endfor
if (!aa)
player:tell((valid(want) && (want != this)) ? want:title() + ": " | "",
"Nothing owned.");
endif
.
@args #87868:"description" this none this
@program #87868:description
who = args ? args[1] | player;
if (who.location == this)
floor = this:get_floor(who);
desc = this:roomdesc(floor, player);
return desc + " There are some enormous dice in the distance.";
else
return pass();
endif
.
@args #87868:"play" any any any
@chmod #87868:play rxd
@program #87868:play
if (player.location == this)
if (argstr && (!this:ride()))
return;
endif
if ($list_utils:assoc(player, this.has) || (player in this.owners))
if (!argstr)
player:tell("You are already playing Monopoly.");
endif
else
player:tell("You start playing Monopoly.");
this:announce(player.name, " starts playing Monopoly.");
this:remember(player, "started playing");
if (this:get_floor(player) != "Go")
this:set_floor(player, "Go");
this:look_self(player.brief);
this:announce(player.name, " moves to Go.");
endif
player:tell("You roll to see who will go first.");
this:announce(player.name, " rolls to see who will go first.");
this:roll();
this:collect(player, 1500);
endif
else
player:tell("You have to be on ", this.name, " to play it!");
this:enter();
endif
.
@args #87868:"buy sell mor*tgage unm*ortgage" any any any
@chmod #87868:buy rxd
@program #87868:buy
vb = verb;
if (!(where = this:find(dobjstr)))
player:tell("Sorry, '", dobjstr, "' isn't a valid place name.");
return;
endif
index = where in this.places;
if (!(price = this.price[index]))
player:tell(where, " can't be bought or sold.");
return;
endif
if (vb in {"buy", "sell"})
if (!iobjstr)
iobjstr = tonum(price);
endif
elseif (index(vb, "unm"))
vb = "unmortgage";
if (!iobjstr)
iobjstr = tonum((price * 11) / 20);
endif
else
vb = "mortgage";
if (!iobjstr)
iobjstr = tonum(price / 2);
endif
endif
if ((!(n = tonum(iobjstr))) && (iobjstr != "0"))
player:tell("Sorry, ", iobjstr, " is not a valid number.");
return;
endif
owner = this.owners[index];
has = this.has;
playerhas = $list_utils:assoc(player, has) || {player, 0};
if (vb == "buy")
if (owner == player)
player:tell("You already own ", where, "!");
return;
elseif ((typeof(owner) == OBJ) && valid(owner))
player:tell(owner:title(), " already owns ", where, "!");
return;
elseif (playerhas[2] < n)
player:tell("You don't have $", n, "; you only have $", playerhas[2], "!");
return;
endif
if (this.price[index] != n)
player:tell("Note! The price of ", where, " is $", this.price[index], ",
not $", n, "!");
endif
this.has = {{player, playerhas[2] - n}, @setremove(has, playerhas)};
this.owners[index] = player;
elseif (owner != player)
"can't mortgage, unmortgage or sell if you don't own.";
player:tell("You don't own ", where, "!");
return;
elseif (this.houses[index])
player:tell("Sorry, ", where, " still has ",
this:house_str(this.houses[index]), " on it!");
return;
elseif (vb == "unmortgage")
if (!this.mortgaged[index])
player:tell(where, " isn't mortgaged!");
return;
endif
this.has = {{player, playerhas[2] - n}, @setremove(has, playerhas)};
this.mortgaged[index] = 0;
elseif (this.mortgaged[index])
player:tell("Sorry, ", where, " is ", (vb == "mortgage") ? "already " | "",
"mortgaged!");
return;
else
this.has = {{player, playerhas[2] + n}, @setremove(has, playerhas)};
if (vb == "mortgage")
this.mortgaged[index] = 1;
else
this.owners[index] = #-1;
endif
endif
player:tell("You ", vb, " ", where, " for $", iobjstr, ".");
this:remember(player, (vb == "buy") ? "bought" | ((vb == "sell") ? "sold" | (vb
+ "ed")), where, "for", "$" + tostr(iobjstr));
this:announce_all_but({player}, player:title(), " ", vb, "s ", where, " for $",
iobjstr, ".");
.
@args #87868:"collect pay" any any any
@chmod #87868:collect rxd
@program #87868:collect
if ((length(args) == 2) && (typeof(args[2]) == NUM))
payer = args[1];
amount = args[2];
elseif ((!dobjstr) || (dobjstr == "rent"))
if (prepstr)
player:tell("Sorry, I didn't understand that.");
return;
endif
if (verb != "pay")
if (dobjstr == "")
amount = 200;
payer = player;
else
player:tell("Sorry, you can't collect rent directly.");
return 0;
endif
else
rent = this:rent_due();
if (rent[1] == 0)
player:tell("Nothing due: ", rent[2], ".");
else
this:pay(player, rent[1]) && this:collect(rent[2], rent[1]);
endif
return 0;
endif
elseif (prepstr)
if (!valid(recip = this:find_player(iobjstr)))
return;
endif
if (dobjstr[1] == "$")
dobjstr = dobjstr[2..length(dobjstr)];
endif
if ((!(amount = tonum(dobjstr))) && (dobjstr != "0"))
player:tell(dobjstr, " is not a valid number.");
return 0;
endif
this:(verb)(player, amount) && this:((verb == "pay") ? "collect" |
"pay")(recip, amount);
return;
elseif (dobjstr == "10%")
payer = player;
amount = this:worth() / 10;
else
if (dobjstr[1] == "$")
dobjstr = dobjstr[2..length(dobjstr)];
endif
if ((!(amount = tonum(dobjstr))) && (dobjstr != "0"))
player:tell(dobjstr, " is not a valid number.");
return 0;
endif
payer = player;
endif
has = this.has;
playerhas = $list_utils:assoc(payer, has) || {payer, 0};
if (verb == "pay")
new = playerhas[2] - amount;
if (new < 0)
payer:tell("You don't have $", amount, "; you only have $", playerhas[2],
"!");
return 0;
endif
else
new = playerhas[2] + amount;
endif
this.has = {{payer, new}, @setremove(has, playerhas)};
payer:tell("You ", verb, " $", amount, "; you now have $", new, ".");
this:remember(payer, (verb == "pay") ? "paid" | "collected", "$" +
tostr(amount));
this:announce_all_but({payer}, payer:title(), " ", verb, "s $", amount, ".");
return 1;
.
@args #87868:"rules about" any none none
@chmod #87868:rules rxd
@program #87868:rules
if (!(player in this.contents))
dobjstr == "";
endif
for x in (this.rules)
if ((!dobjstr) || index(x[1], dobjstr))
player:tell_lines(listdelete(x, 1));
return;
endif
endfor
player:tell("Sorry, no rules for '", dobjstr, "' on ", this.name, ". Use '",
$string_utils:words(this.rules[1][1])[1], "' instead.");
.
@args #87868:"rent_due" this none this
@program #87868:rent_due
if (args)
place = args[1];
play = args[2];
else
play = player;
place = this:get_floor(player);
endif
if (!(index = place in this.places))
return {0, "there is no such (?) place"};
endif
if (!this.price[index])
return {0, "not a rental property"};
endif
owner = this.owners[index];
if ((typeof(owner) != OBJ) || (!valid(owner)))
return {0, "space is not owned"};
endif
if (owner == play)
return {0, "owned by the player"};
endif
if (this.mortgaged[index])
return {0, "property is mortgaged"};