(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)