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

(require player.fate)

(global player player)

(global (lambda text (int)) coins_word)

(set coins_word
   (lambda ((int i))
      (if_else (= (var i) 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)