diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction index 407d0b8812..78631e3bac 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction @@ -19,6 +19,7 @@ # asset_manager:artifact/use/ # asset_manager:artifact/tick/ # core:tick/ +# debug:artifact/cooldown_reset #declare score_holder $ArtifactSpecialCooldown #> Trigger検知用 diff --git a/TheSkyBlessing/data/debug/functions/artifact/cooldown_reset.mcfunction b/TheSkyBlessing/data/debug/functions/artifact/cooldown_reset.mcfunction new file mode 100644 index 0000000000..41bd2af806 --- /dev/null +++ b/TheSkyBlessing/data/debug/functions/artifact/cooldown_reset.mcfunction @@ -0,0 +1,24 @@ +#> debug:artifact/cooldown_reset +# +# 実行者のすべての神器クールダウンを解消します +# +# @private +# @user + +# 実行者が居ない場合エラー + execute unless entity @s[type=player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text": "実行者を指定してください。"}] + +# LCD +# アイテムに付いた最終発動時刻を削除 + data modify storage api: Argument.Inventory set from entity @s Inventory + data remove storage api: Argument.Inventory[].tag.TSB.LatestUseTick + function api:inventory/set +# プレイヤーのLCD状況データもリセット(何かしらの行動時にしか自動更新してくれないので) + function oh_my_dat:please + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[].Value set value -15 + +# TCD + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TypeCooldown set value [] + +#GCD + scoreboard players set $ArtifactSpecialCooldown Global 0