summaryrefslogtreecommitdiff
blob: 342a663b0efbd6e12af7c8646ccbfb9f50b934d0 (plain)
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
(fate_version 1)

(require player.fate)
(require global.fate)
(require cards.fate)
(require rules.fate)
(require play.fate)

(local int original_amount)

(set player.money 0)

Welcome to Tonkadur's wonderful and totally original blackjack!
Say, I don't think I've seen you before...
No, no, I am sure I haven't, actually.
(prompt_string (ptr player.name) 1 64 What's your name, then?)
Alright, (var player.name), well, since it's your first time here, let me give
you some coins.
Just between you and me, someone left those laying around, they aren't mine.

(visit money_acquisition (+ 100 (rand 0 100)))
(set original_amount (var player.money))

Now, you're all set to go... unless you don't know how to play?

(player_choice
   (option
      ( As it happens, I do not. )
      (visit rules_of_blackjack)
      (text_effect action_description
         You leave the counter and approach one of the tables.
      )
      (visit play_a_game)
   )
   (option
      ( I am familiar with BlackJack. )
      (text_effect action_description
         You leave the counter and approach one of the tables.
      )
      (visit play_a_game)
   )
)
(text_effect action_description
   As you leave the establishment, the receptionist notices you.
)

(cond
   (
      (=< player.money (/ original_amount 2))
      Outch. I suppose all your luck was spent by getting these free coins.
   )
   (
      (< player.money original_amount)
      Well, that's not too bad for your first time. Come back tomorrow, I am
      sure you'll be getting it all back.
   )
   (
      (< player.money (* original_amount 2))
      Had a good day, I hope?
   )
   (
      (< player.money (* original_amount 4))
      Well! That was some fine play, if I do say so myself!
   )
   (
      (true)
      (var player.name)! How did you do that?! You have to teach me! I did give
      you the tools of your success, so please?
   )
)

(text_effect action_description
   You walk out, having turned (eval coins_word (var original_amount)) into
   (eval coins_word (var player.money)).
)

(end)