Skip to content

Commit

Permalink
Store where player died at.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frustrated-Programmer committed Jan 16, 2025
1 parent 74510b7 commit d2504d7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ execute positioned -524 103 2167 if entity @s[distance=..10] at @s run tp @s ~ ~

# If player is at LOBBY worldspawn for some reason
execute positioned -547 113 1980 if entity @s[distance=..2] at @s run tp @s ~ ~ ~ 90 0

# Store where player WAS when they died.
scoreboard players operation @s do2.run.death_dungeon_location = @s do2.utility.dungeonLocation
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
execute as @a[scores={do2.logs.datapack_setup=1..}] run tellraw @s ["",{"text":"[§9B§r]: Setting up dungeon per run scores."}]
# - End Log -

# reset unique scores
scoreboard players set $dungeon do2.run.depth_charge_success 0
scoreboard players set $dungeon do2.run.deepest_floor 0
scoreboard players set $dungeon do2.run.aritfact_floor 0
scoreboard players set $dungeon do2.run.artifact_lodestone_id 0
scoreboard players set $dungeon do2.run.has_won 0
scoreboard players set $dungeon do2.run.deepest_floor 0
scoreboard players set $dungeon do2.run.artifactValue 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ execute unless entity @s[advancements={do2:hidden/adventuring/eat_three_uniques=
# reset player's play_5_moc on 1 run.
execute unless entity @s[advancements={do2:hidden/cards/play_5_moc=true}] run advancement revoke @s only do2:visible/cards/play_5_moc

# reset depth charge dive scores
scoreboard players set @s do2.utility.reachedBottomDepthCharge 0
# reset unique scores
scoreboard players set @s do2.run.depth_charge_success 0
scoreboard players set @s do2.run.deepest_floor 0
scoreboard players set @s do2.run.aritfact_floor 0
scoreboard players set @s do2.run.artifact_lodestone_id 0
scoreboard players set @s do2.run.death_dungeon_location 0

# Ensure Gamemode
execute if entity @s[gamemode=adventure] run scoreboard players set @s do2.utility.oldGamemode 0
Expand All @@ -30,6 +34,7 @@ scoreboard players set @s do2.run.has_won 0
scoreboard players set @s do2.run.has_died 0
scoreboard players set @s do2.utility.deathCount 0


# - RESET ITEMS -
scoreboard players set @s do2.run.items.embers 0
scoreboard players set @s do2.run.items.coins 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ scoreboard objectives add do2.run.depth_charge_success dummy "Whether a Depth Ch
scoreboard objectives add do2.run.deepest_floor dummy "Deepest floor player has reach."
scoreboard objectives add do2.run.aritfact_floor dummy "The floor artifact was submitted."
scoreboard objectives add do2.run.artifact_lodestone_id dummy "The id of the lodestone the player submitted to."
scoreboard objectives add do2.run.death_dungeon_location dummy "The location of where the player 'died' at"

# - Agronet's utility -
scoreboard objectives add do2.agronet.card_available dummy "The card ID of the card available"
Expand Down

0 comments on commit d2504d7

Please sign in to comment.