From 229aaa164b1d4e64485b3e00997640e509c1817b Mon Sep 17 00:00:00 2001 From: 4Ply Date: Sun, 11 Aug 2024 03:39:08 +0200 Subject: [PATCH] On tome buy event: track lifetime total and enable add-item call --- .../do2/functions/agronet/card_bought.mcfunction | 7 ++++--- .../data/do2/functions/cards/buy/1_tome.mcfunction | 1 + .../do2/functions/cards/buy/3_tomes.mcfunction | 1 + .../do2/functions/cards/buy/5_tomes.mcfunction | 1 + .../do2/functions/scoreboard/setup/all.mcfunction | 6 ++++-- .../data/do2/functions/version.mcfunction | 4 ++-- JSON/scoreboards.json | 14 +++++++++++++- 7 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Brilliance Datapack/data/do2/functions/agronet/card_bought.mcfunction b/Brilliance Datapack/data/do2/functions/agronet/card_bought.mcfunction index c2f998b3..a985524a 100644 --- a/Brilliance Datapack/data/do2/functions/agronet/card_bought.mcfunction +++ b/Brilliance Datapack/data/do2/functions/agronet/card_bought.mcfunction @@ -1,6 +1,7 @@ -# execute if score $dungeon do2.agronet.card_bought matches -3 run add-item victory-tome 5 -# execute if score $dungeon do2.agronet.card_bought matches -2 run add-item victory-tome 3 -# execute if score $dungeon do2.agronet.card_bought matches -1 run add-item victory-tome 1 +execute if score $dungeon do2.agronet.card_bought matches -3 run add-item victory-tome 5 +execute if score $dungeon do2.agronet.card_bought matches -2 run add-item victory-tome 3 +execute if score $dungeon do2.agronet.card_bought matches -1 run add-item victory-tome 1 + execute if score $dungeon do2.agronet.card_bought matches 0 run card-bought moment-of-clarity execute if score $dungeon do2.agronet.card_bought matches 1 run card-bought sneak execute if score $dungeon do2.agronet.card_bought matches 2 run card-bought stability diff --git a/Brilliance Datapack/data/do2/functions/cards/buy/1_tome.mcfunction b/Brilliance Datapack/data/do2/functions/cards/buy/1_tome.mcfunction index 0a170a03..ac0c2361 100644 --- a/Brilliance Datapack/data/do2/functions/cards/buy/1_tome.mcfunction +++ b/Brilliance Datapack/data/do2/functions/cards/buy/1_tome.mcfunction @@ -2,6 +2,7 @@ execute as @a[scores={do2.logs.cards=1..}] run tellraw @s ["",{"text":"§f[§9B§r]: Tome Bought: ("},{"text":"§3❄☠ Victory Tome ☠❄","hoverEvent":{"action":"show_item","value":"{id:\"minecraft:iron_nugget\",tag:{NameFormat:{italic:1,bold:0,OriginalName:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}',ModifiedName:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}'},CustomRoleplayData:1b,CustomModelData:6,display:{Name:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}'}},Count:1b}"}},{"text":")"}] # - End Log - +execute as @p[tag=do2.received_shulker] run scoreboard players add @s do2.lifetime.escaped.tomes 1 execute as @p[tag=do2.received_shulker] run scoreboard players add @s do2.cards.bought.1TM 1 execute as @p[tag=do2.received_shulker] run scoreboard players set @s do2.run.cards.bought.1TM 1 execute as @p[tag=do2.received_shulker] run scoreboard players operation @s do2.lifetime.spent.embers += $dungeon do2.cards.price.1TM diff --git a/Brilliance Datapack/data/do2/functions/cards/buy/3_tomes.mcfunction b/Brilliance Datapack/data/do2/functions/cards/buy/3_tomes.mcfunction index 2483f31a..f72323db 100644 --- a/Brilliance Datapack/data/do2/functions/cards/buy/3_tomes.mcfunction +++ b/Brilliance Datapack/data/do2/functions/cards/buy/3_tomes.mcfunction @@ -2,6 +2,7 @@ execute as @a[scores={do2.logs.cards=1..}] run tellraw @s ["",{"text":"§f[§9B§r]: 3 Tomes Bought: ("},{"text":"§3❄☠ Victory Tome ☠❄","hoverEvent":{"action":"show_item","value":"{id:\"minecraft:iron_nugget\",tag:{NameFormat:{italic:1,bold:0,OriginalName:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}',ModifiedName:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}'},CustomRoleplayData:1b,CustomModelData:6,display:{Name:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}'}},Count:3b}"}},{"text":")"}] # - End Log - +execute as @p[tag=do2.received_shulker] run scoreboard players add @s do2.lifetime.escaped.tomes 3 execute as @p[tag=do2.received_shulker] run scoreboard players add @s do2.cards.bought.3TM 1 execute as @p[tag=do2.received_shulker] run scoreboard players set @s do2.run.cards.bought.3TM 1 execute as @p[tag=do2.received_shulker] run scoreboard players operation @s do2.lifetime.spent.embers += $dungeon do2.cards.price.3TM diff --git a/Brilliance Datapack/data/do2/functions/cards/buy/5_tomes.mcfunction b/Brilliance Datapack/data/do2/functions/cards/buy/5_tomes.mcfunction index 41b61941..0949e376 100644 --- a/Brilliance Datapack/data/do2/functions/cards/buy/5_tomes.mcfunction +++ b/Brilliance Datapack/data/do2/functions/cards/buy/5_tomes.mcfunction @@ -2,6 +2,7 @@ execute as @a[scores={do2.logs.cards=1..}] run tellraw @s ["",{"text":"§f[§9B§r]: 5 Tomes Bought: ("},{"text":"§3❄☠ Victory Tome ☠❄","hoverEvent":{"action":"show_item","value":"{id:\"minecraft:iron_nugget\",tag:{NameFormat:{italic:1,bold:0,OriginalName:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}',ModifiedName:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}'},CustomRoleplayData:1b,CustomModelData:6,display:{Name:'{\"bold\":false,\"italic\":true,\"text\":\"❄☠ Victory Tome ☠❄\"}'}},Count:3b}"}},{"text":")"}] # - End Log - +execute as @p[tag=do2.received_shulker] run scoreboard players add @s do2.lifetime.escaped.tomes 5 execute as @p[tag=do2.received_shulker] run scoreboard players add @s do2.cards.bought.5TM 1 execute as @p[tag=do2.received_shulker] run scoreboard players set @s do2.run.cards.bought.5TM 1 execute as @p[tag=do2.received_shulker] run scoreboard players operation @s do2.lifetime.spent.embers += $dungeon do2.cards.price.5TM diff --git a/Brilliance Datapack/data/do2/functions/scoreboard/setup/all.mcfunction b/Brilliance Datapack/data/do2/functions/scoreboard/setup/all.mcfunction index f8985ff5..80af32c6 100644 --- a/Brilliance Datapack/data/do2/functions/scoreboard/setup/all.mcfunction +++ b/Brilliance Datapack/data/do2/functions/scoreboard/setup/all.mcfunction @@ -15,13 +15,15 @@ scoreboard objectives add do2.depth_charge_success dummy "Total Depth Charge Suc # - treasure lifetimes - scoreboard objectives add do2.lifetime.pickedup.crowns dummy "Total §eCrowns§r Picked Up" -scoreboard objectives add do2.lifetime.escaped.crowns dummy "Total §eCrowns§r Escaped With." +scoreboard objectives add do2.lifetime.escaped.crowns dummy "Total §eCrowns§r Escaped With" scoreboard objectives add do2.lifetime.spent.crowns dummy "Total §eCrowns§r Spent" scoreboard objectives add do2.lifetime.coinsconverted dummy "Total §eCoins§r Converted" scoreboard objectives add do2.lifetime.pickedup.coins dummy "Total §eCoins§r Converted" scoreboard objectives add do2.lifetime.pickedup.embers dummy "Total §3Frost Embers§r Picked Up" -scoreboard objectives add do2.lifetime.escaped.embers dummy "Total §3Frost Embers§r Escaped With." +scoreboard objectives add do2.lifetime.escaped.embers dummy "Total §3Frost Embers§r Escaped With" scoreboard objectives add do2.lifetime.spent.embers dummy "Total §3Frost Embers§r Spent" +scoreboard objectives add do2.lifetime.escaped.tomes dummy "Total §eTomes§r Escaped With" +scoreboard objectives add do2.lifetime.spent.tomes dummy "Total §3Tomes§r Spent Or Submitted" # - per run - scoreboard objectives add do2.run.active dummy "Game in Play" diff --git a/Brilliance Datapack/data/do2/functions/version.mcfunction b/Brilliance Datapack/data/do2/functions/version.mcfunction index 9a5848c8..0eb48bb9 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.18 +# DATAPACK VERSION NUMBER: 0.12.19 -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":"."}] +tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.12.19§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/JSON/scoreboards.json b/JSON/scoreboards.json index 95d22f15..1d3be2ed 100644 --- a/JSON/scoreboards.json +++ b/JSON/scoreboards.json @@ -78,7 +78,7 @@ "description": "The total amount of Crowns the target has picked up." }, "do2.lifetime.escaped.crowns": { - "auto": 0, + "auto": 1, "target": "both", "category": "totals", "description": "The total amount of Crowns the target has escaped with." @@ -119,6 +119,18 @@ "category": "totals", "description": "The total amount of Frost Embers the target has spent." }, + "do2.lifetime.escaped.tomes": { + "auto": 1, + "target": "both", + "category": "totals", + "description": "The total amount of Tomes the target has escaped with." + }, + "do2.lifetime.spent.tomes": { + "auto": 1, + "target": "both", + "category": "totals", + "description": "The total amount of Tomes the target has spent or submitted." + }, "do2.highest_win_streak": { "auto": 1, "target": "both",