From 6082a740e95bee1f431d1298e54a72fad16c4747 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Fri, 22 Dec 2023 09:52:50 +0100 Subject: [PATCH] make chest's gold depend on level --- src/artifacts.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/artifacts.rs b/src/artifacts.rs index ed260a2..7eb9a80 100644 --- a/src/artifacts.rs +++ b/src/artifacts.rs @@ -22,9 +22,11 @@ pub struct Chest { impl Chest { pub fn new(position: Position) -> Self { + let level = position.get_level(); Self { position, - gold: 10, + // TODO maybe randomize this? + gold: (level + 1) * 10, } } }