-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stats can be personal/global based on playercount
- Loading branch information
1 parent
15edad7
commit 5b27bfa
Showing
14 changed files
with
156 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Brilliance Datapack/data/do2/functions/statistics_room/personal/summon_general.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
kill @e[tag=do2.statistics_room,tag=!do2.stats.general] | ||
|
||
execute unless score @p do2.runs matches 0.. run scoreboard players set @p do2.runs 0 | ||
execute unless score @p do2.wins matches 0.. run scoreboard players set @p do2.wins 0 | ||
execute unless score @p do2.losses matches 0.. run scoreboard players set @p do2.losses 0 | ||
execute unless score @p do2.eggs.total matches 0.. run scoreboard players set @p do2.eggs.total 0 | ||
execute unless score @p do2.highest_win_streak matches 0.. run scoreboard players set @p do2.highest_win_streak 0 | ||
execute unless score @p do2.win_streak matches 0.. run scoreboard players set @p do2.win_streak 0 | ||
|
||
|
||
execute unless entity @e[tag=do2.statistics_room,tag=do2.stats.general] run summon minecraft:text_display -492 125 1990 {Rotation:[90f,0f], billboard:"fixed",background:26,Tags:["do2.statistics_room","do2.stats.general"]} | ||
execute as @e[tag=do2.statistics_room,tag=do2.stats.general] if entity @s run data merge entity @s {text:'[{"text":"§lStatistics!§r\\n\\n§fTotal Runs: §o§b"},{"score":{"name":"@p","objective":"do2.runs"},"color":"aqua","italic":"true"},{"text":"\\n§fTotal Wins: §o§b"},{"score":{"name":"@p","objective":"do2.wins"},"color":"aqua","italic":"true"},{"text":"\\n§fTotal Losses: §o§b"},{"score":{"name":"@p","objective":"do2.losses"},"color":"aqua","italic":"true"},{"text":"\\n§fHighest Win Streak: §o§b"},{"score":{"name":"@p","objective":"do2.highest_win_streak"},"color":"aqua","italic":"true"},{"text":"\\n§fCurrent Win Streak: §o§b"},{"score":{"name":"@p","objective":"do2.win_streak"},"color":"aqua","italic":"true"},{"text":"\\n§fEggs Found: §o§b"},{"score":{"name":"@p","objective":"do2.eggs.total"},"color":"aqua","italic":"true"},{"text":"§f/§o§b20"}]'} |
58 changes: 58 additions & 0 deletions
58
Brilliance Datapack/data/do2/functions/statistics_room/personal/summon_last_run.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
kill @e[tag=do2.statistics_room,tag=!do2.stats.lastRun] | ||
|
||
execute unless entity @e[tag=do2.statistics_room,tag=do2.stats.lastRun] run summon minecraft:text_display -492 124.3 1990 {Rotation:[90f,0f], billboard:"fixed",background:26,Tags:["do2.statistics_room","do2.stats.lastRun"]} | ||
|
||
# Empty Storages | ||
data modify storage stats_display win_result set value "§c???§r§f" | ||
data modify storage stats_display player_count set value "§c???§r§f" | ||
data modify storage stats_display artifact_symbol set value "§c???§r§f" | ||
data modify storage stats_display floor_embers set value "§c???§r§f" | ||
data modify storage stats_display difficulty set value "§c???§r§f" | ||
# Store WIN/LOSS | ||
execute if score @p do2.run.has_won matches 1 run data modify storage stats_display win_result set value "§aWIN" | ||
execute unless score @p do2.run.has_won matches 1 run data modify storage stats_display win_result set value "§cLOSS" | ||
# Store Player/s | ||
execute if score @p do2.run.players matches 1 run data modify storage stats_display player_count set value " player" | ||
execute unless score @p do2.run.players matches 1 run data modify storage stats_display player_count set value " players" | ||
# Store Artifact | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 10 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 11 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 12 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 13 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 14 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 15 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 16 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 17 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 18 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 19 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 20 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 28 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 29 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 30 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 31 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 32 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 33 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 34 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 35 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 36 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 37 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 38 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 39 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 40 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 41 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 42 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 43 run data modify storage stats_display artifact_symbol set value "" | ||
execute if score @p do2.run.has_won matches 1 if score @p do2.run.foundArtifact matches 44 run data modify storage stats_display artifact_symbol set value "" | ||
execute unless score @p do2.run.has_won matches 1 run data modify storage stats_display artifact_symbol set value "§cN/A§r§f" | ||
# Store Floor Embers | ||
scoreboard players operation @p do2.utility.floorEmbers = @p do2.run.items.embers | ||
scoreboard players operation @p do2.utility.floorEmbers -= @p do2.run.artifactValue | ||
# Store Difficulty | ||
execute if score @p do2.run.difficulty matches 1 run data modify storage stats_display difficulty set value "§1Easy§r§f" | ||
execute if score @p do2.run.difficulty matches 2 run data modify storage stats_display difficulty set value "§aMedium§r§f" | ||
execute if score @p do2.run.difficulty matches 3 run data modify storage stats_display difficulty set value "§6Hard§r§f" | ||
execute if score @p do2.run.difficulty matches 4 run data modify storage stats_display difficulty set value "§4Deadly§r§f" | ||
execute if score @p do2.run.difficulty matches 5 run data modify storage stats_display difficulty set value "§5Deepfrost§r§f" | ||
|
||
|
||
execute as @e[tag=do2.statistics_room,tag=do2.stats.lastRun] if entity @s run data merge entity @s {text:'[{"text": "§l§5Last Run Stats!§r\\n\\n§fRun #§o§b"},{"score": {"name": "@p","objective": "do2.runs"},"color": "aqua"},{"text": " §fResult: "},{"storage": "stats_display","nbt": "win_result"},{"text": "\\n"},{"score": {"name": "@p","objective": "do2.run.players"},"color": "aqua"},{"storage": "stats_display","nbt": "player_count"},{"text": " played for "},{"score": {"name": "@p","objective": "do2.run.seconds"},"color": "aqua"},{"text": " seconds."},{"text": "\\nDeck Size: "},{"score": {"name": "@p","objective": "do2.run.cards.deck.total"},"color": "aqua"},{"text": "/§b40"},{"text": " | Difficulty: "},{"storage": "stats_display","nbt": "difficulty"},{"text": "\\n§lGenerated:\\n"},{"score": {"name": "@p","objective": "do2.run.systems.embers.released"},"color": "aqua"},{"text": "\\uE0A3 | "},{"score": {"name": "@p","objective": "do2.run.systems.treasure.released"},"color": "aqua"},{"text": "\\uE0CA | "},{"score": {"name": "@p","objective": "do2.run.systems.hazard.generated"},"color": "aqua"},{"text": "\\uE0CB | "},{"score": {"name": "@p","objective": "do2.run.systems.clank.generated"},"color": "aqua"},{"text": "\\uE0C3"},{"text": "\\n§lPicked Up:\\n"},{"score": {"name": "@p","objective": "do2.utility.floorEmbers"},"color": "aqua"},{"text": "\\uE0A3 | "},{"score": {"name": "@p","objective": "do2.run.items.crowns"},"color": "aqua"},{"text": "\\uE0A2 | "},{"score": {"name": "@p","objective": "do2.run.items.coins"},"color": "aqua"},{"text": "\\uE0A1"},{"text": "\\n§lBlocked:\\n"},{"score": {"name": "@p","objective": "do2.run.systems.hazard.blocked"},"color": "aqua"},{"text": "\\uE0CB | "},{"score": {"name": "@p","objective": "do2.run.systems.clank.blocked"},"color": "aqua"},{"text": "\\uE0C3"},{"text": "\\n§lArtifact:\\n§r§fFound "},{"storage": "stats_display","nbt": "artifact_symbol"},{"text": " valued at "},{"score": {"name": "@p","objective": "do2.run.artifactValue"},"color": "aqua"},{"text": "\\uE0A3"}]'} |
Oops, something went wrong.