From 949fa1d50ceee1da01464ce5059a0a1fefecd065 Mon Sep 17 00:00:00 2001 From: 4Ply Date: Sun, 11 Aug 2024 00:45:33 +0200 Subject: [PATCH] Add function to track lifetime crowns Additionally: - Call that function from on_coin_conversion - Bump datapack version --- .../functions/events/systems/on_crown_acquired.mcfunction | 7 +++++++ Brilliance Datapack/data/do2/functions/version.mcfunction | 4 ++-- docs/scoreboard.md | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 Brilliance Datapack/data/do2/functions/events/systems/on_crown_acquired.mcfunction diff --git a/Brilliance Datapack/data/do2/functions/events/systems/on_crown_acquired.mcfunction b/Brilliance Datapack/data/do2/functions/events/systems/on_crown_acquired.mcfunction new file mode 100644 index 00000000..437af42a --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/events/systems/on_crown_acquired.mcfunction @@ -0,0 +1,7 @@ +# - Start Log - +execute as @a[scores={do2.logs.player_actions=1..}] run tellraw @s ["",{"text":"§f[§9B§r]: Player escaped the dungeon with a §acrown§r."}] +# - End Log - + +scoreboard players add @a[tag=do2.received_shulker] do2.lifetime.escaped.crowns 1 +scoreboard players add $dungeon do2.lifetime.escaped.crowns 1 + diff --git a/Brilliance Datapack/data/do2/functions/version.mcfunction b/Brilliance Datapack/data/do2/functions/version.mcfunction index d0b96c46..9a5848c8 100644 --- a/Brilliance Datapack/data/do2/functions/version.mcfunction +++ b/Brilliance Datapack/data/do2/functions/version.mcfunction @@ -1,4 +1,4 @@ -# DATAPACK VERSION NUMBER: 0.12.17 +# DATAPACK VERSION NUMBER: 0.12.18 -tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.12.17§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}] +tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.12.18§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}] diff --git a/docs/scoreboard.md b/docs/scoreboard.md index 87a29908..e1b5c867 100644 --- a/docs/scoreboard.md +++ b/docs/scoreboard.md @@ -40,7 +40,7 @@ Brilliance uses a massive amount of scoreboard objectives for a vast amount of t | ✅ | 🟤 | do2.wins | totals | The total amount of wins the target has. | | ✅ | 🟤 | do2.losses | totals | The total amount of losses the target has. | | ✅ | 🟤 | do2.lifetime.pickedup.crowns | totals | The total amount of Crowns the target has picked up. | -| ❌ | 🟤 | do2.lifetime.escaped.crowns | totals | The total amount of Crowns the target has escaped with. | +| ✅ | 🟤 | do2.lifetime.escaped.crowns | totals | The total amount of Crowns the target has escaped with. | | ✅ | 🟤 | do2.lifetime.spent.crowns | totals | The total amount of Crowns the target has spent. | | ✅ | 🟤 | do2.lifetime.pickedup.coins | totals | The total amount of Coins the target has picked up. | | ✅ | 🟤 | do2.lifetime.coinsconverted | totals | The total amount of Coins the target has Converted. |