summaryrefslogtreecommitdiff
blob: 8365c6f704ebb3e73c688c42b376ec2b5ab354c6 (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
(fate_version 1)

(require player.fate)

(global #player player)

(global (lambda text (int)) coins_word
   (lambda ((int i))
      (switch (var i)
         (0 (text no coins))
         (1 (text a single coin))
         (text (var i) coins)
      )
   )
)

(declare_text_effect action_description)

(define_sequence money_acquisition ((int amount))
   (set! player.money (+ player.money amount))
   (if (> amount 0)
      (text_effect action_description
         You acquired (eval coins_word (var amount))!
      )
   )
)

(define_sequence money_loss ((int amount))
   (set! player.money (- player.money amount))
   (if (> amount 0)
      (text_effect action_description
         You lost (eval coins_word (var amount)).
      )
   )
)

(declare_input_event escape)