diff --git a/.github/workflows/datapack-linter.yml b/.github/workflows/datapack-linter.yml index 9981d8e95..94d0f2a58 100644 --- a/.github/workflows/datapack-linter.yml +++ b/.github/workflows/datapack-linter.yml @@ -31,7 +31,6 @@ jobs: fetch-depth: 0 sparse-checkout: | NaturalMergeSort - ScoreToHealth - name: Deploy Dependencies run: | @@ -107,4 +106,4 @@ jobs: message: | Update Declares from haiiro2gou/TSB-Patcher@${{ github.SHA }} - [regenerate cache] \ No newline at end of file + [regenerate cache] diff --git a/.gitignore b/.gitignore index 4f599dbb4..ffa23d423 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ MACOSX *.zip cspell.json -NaturalMergeSort -ScoreToHealth \ No newline at end of file +NaturalMergeSort \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0002.blessing/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/3.main.mcfunction index dae995174..9cf1b4a9f 100644 --- a/Asset/data/asset/functions/artifact/0002.blessing/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/3.main.mcfunction @@ -14,10 +14,10 @@ # 50島極振り時: HP +50, MP+100, Atk+40%, Def+40% # 固定加算 - scoreboard players add $MaxHealth Global 20000 - execute as @a run function player_manager:bonus/update_health_bonus - scoreboard players add $MaxMP Global 4 - execute as @a run function player_manager:bonus/update_mp_bonus + scoreboard players add $BonusHealth Global 2 + execute as @a run function asset:artifact/0002.blessing/trigger/update/health_bonus + scoreboard players add $BonusMP Global 4 + execute as @a run function asset:artifact/0002.blessing/trigger/update/mp_bonus # 選択トリガー scoreboard players enable @s 02.Trigger # チャット diff --git a/Asset/data/asset/functions/artifact/0002.blessing/trigger/on_trigger.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/on_trigger.mcfunction index 392e26199..9cedee976 100644 --- a/Asset/data/asset/functions/artifact/0002.blessing/trigger/on_trigger.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/on_trigger.mcfunction @@ -8,16 +8,16 @@ execute unless score @s 02.Trigger matches 1..4 run function lib:message/invalid_operation execute unless score @s 02.Trigger matches 1..4 run function asset:artifact/0002.blessing/trigger/show_trigger_chat # 体力 - execute if score @s 02.Trigger matches 1 run scoreboard players add $MaxHealth Global 10000 - execute if score @s 02.Trigger matches 1 as @a run function player_manager:bonus/update_health_bonus + execute if score @s 02.Trigger matches 1 run scoreboard players add $BonusHealth Global 1 + execute if score @s 02.Trigger matches 1 as @a run function asset:artifact/0002.blessing/trigger/update/health_bonus # MP - execute if score @s 02.Trigger matches 2 run scoreboard players add $MaxMP Global 2 - execute if score @s 02.Trigger matches 2 as @a run function player_manager:bonus/update_mp_bonus + execute if score @s 02.Trigger matches 2 run scoreboard players add $BonusMP Global 2 + execute if score @s 02.Trigger matches 2 as @a run function asset:artifact/0002.blessing/trigger/update/mp_bonus # 攻撃 execute if score @s 02.Trigger matches 3 run scoreboard players add $AttackBonus Global 1 - execute if score @s 02.Trigger matches 3 as @a run function player_manager:bonus/update_attack_bonus + execute if score @s 02.Trigger matches 3 as @a run function asset:artifact/0002.blessing/trigger/update/attack_bonus # 防御 execute if score @s 02.Trigger matches 4 run scoreboard players add $DefenseBonus Global 1 - execute if score @s 02.Trigger matches 4 as @a run function player_manager:bonus/update_defense_bonus + execute if score @s 02.Trigger matches 4 as @a run function asset:artifact/0002.blessing/trigger/update/defense_bonus # リセット scoreboard players reset @s 02.Trigger \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0002.blessing/trigger/show_trigger_chat.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/show_trigger_chat.mcfunction index 36ffcf183..5f37352c6 100644 --- a/Asset/data/asset/functions/artifact/0002.blessing/trigger/show_trigger_chat.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/show_trigger_chat.mcfunction @@ -4,18 +4,9 @@ # # @within function asset:artifact/0002.blessing/trigger/* -#> For tellraw -# @private - #declare score_holder $ReadableHealth - -# 体力だけx10000なので戻す - scoreboard players operation $ReadableHealth Temporary = $MaxHealth Global - scoreboard players operation $ReadableHealth Temporary /= $10000 Const # 出力 tellraw @s {"text":"能力ボーナスを一つ選んでください"} - tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 1"},"color":"gold"},{"text":" 体力(現在値: +","color":"white"},{"score":{"name": "$ReadableHealth","objective":"Temporary"},"color":"aqua"},{"text":") +","color":"white"},{"text":"1","color":"aqua"}] - tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 2"},"color":"gold"},{"text":" 魔力(現在値: +","color":"white"},{"score":{"name": "$MaxMP","objective":"Global"},"color":"aqua"},{"text":") +","color":"white"},{"text":"2","color":"aqua"}] + tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 1"},"color":"gold"},{"text":" 体力(現在値: +","color":"white"},{"score":{"name": "$BonusHealth","objective":"Global"},"color":"aqua"},{"text":") +","color":"white"},{"text":"1","color":"aqua"}] + tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 2"},"color":"gold"},{"text":" 魔力(現在値: +","color":"white"},{"score":{"name": "$BonusMP","objective":"Global"},"color":"aqua"},{"text":") +","color":"white"},{"text":"2","color":"aqua"}] tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 3"},"color":"gold"},{"text":" 攻撃(現在値: +","color":"white"},{"score":{"name": "$AttackBonus","objective":"Global"},"color":"aqua"},{"text":"%) +","color":"white"},{"text":"1","color":"aqua"},{"text":"%","color":"white"}] - tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 4"},"color":"gold"},{"text":" 防御(現在値: +","color":"white"},{"score":{"name": "$DefenseBonus","objective":"Global"},"color":"aqua"},{"text":"%) +","color":"white"},{"text":"1","color":"aqua"},{"text":"%","color":"white"}] -# リセット - scoreboard players reset $ReadableHealth Temporary \ No newline at end of file + tellraw @s [{"text":"[選ぶ]","clickEvent":{"action":"run_command","value":"/trigger 02.Trigger set 4"},"color":"gold"},{"text":" 防御(現在値: +","color":"white"},{"score":{"name": "$DefenseBonus","objective":"Global"},"color":"aqua"},{"text":"%) +","color":"white"},{"text":"1","color":"aqua"},{"text":"%","color":"white"}] \ No newline at end of file diff --git a/TheSkyBlessing/data/player_manager/functions/bonus/update_attack_bonus.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/attack_bonus.mcfunction similarity index 91% rename from TheSkyBlessing/data/player_manager/functions/bonus/update_attack_bonus.mcfunction rename to Asset/data/asset/functions/artifact/0002.blessing/trigger/update/attack_bonus.mcfunction index 531ab6f8e..6e3404a60 100644 --- a/TheSkyBlessing/data/player_manager/functions/bonus/update_attack_bonus.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/attack_bonus.mcfunction @@ -1,4 +1,4 @@ -#> player_manager:bonus/update_attack_bonus +#> asset:artifact/0002.blessing/trigger/update/attack_bonus # # # @@ -13,7 +13,7 @@ #declare score_holder $isNegative # 古いのをremove - data modify storage api: Argument.UUID set value [I;2,2,1,1] + data modify storage api: Argument.UUID set value [I;1,1,2,0] function api:modifier/attack/base/remove # 差分にする scoreboard players operation $Diff Temporary = $AttackBonus Global @@ -31,6 +31,6 @@ scoreboard players reset $isNegative Temporary # 適用 - data modify storage api: Argument set value {Amount:-1,UUID:[I;2,2,1,1],Operation:"multiply"} + data modify storage api: Argument set value {Amount:-1,UUID:[I;1,1,2,0],Operation:"multiply"} execute store result storage api: Argument.Amount double 0.01 run scoreboard players get $AttackBonus Global function api:modifier/attack/base/add \ No newline at end of file diff --git a/TheSkyBlessing/data/player_manager/functions/bonus/update_defense_bonus.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/defense_bonus.mcfunction similarity index 91% rename from TheSkyBlessing/data/player_manager/functions/bonus/update_defense_bonus.mcfunction rename to Asset/data/asset/functions/artifact/0002.blessing/trigger/update/defense_bonus.mcfunction index 8528e1518..1a0434217 100644 --- a/TheSkyBlessing/data/player_manager/functions/bonus/update_defense_bonus.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/defense_bonus.mcfunction @@ -1,4 +1,4 @@ -#> player_manager:bonus/update_defense_bonus +#> asset:artifact/0002.blessing/trigger/update/defense_bonus # # # @@ -13,7 +13,7 @@ #declare score_holder $isNegative # 古いのをremove - data modify storage api: Argument.UUID set value [I;2,2,1,1] + data modify storage api: Argument.UUID set value [I;1,1,2,0] function api:modifier/defense/base/remove # 差分にする scoreboard players operation $Diff Temporary = $DefenseBonus Global @@ -31,6 +31,6 @@ scoreboard players reset $isNegative Temporary # 適用 - data modify storage api: Argument set value {Amount:-1,UUID:[I;2,2,1,1],Operation:"multiply"} + data modify storage api: Argument set value {Amount:-1,UUID:[I;1,1,2,0],Operation:"multiply"} execute store result storage api: Argument.Amount double 0.01 run scoreboard players get $DefenseBonus Global function api:modifier/defense/base/add \ No newline at end of file diff --git a/TheSkyBlessing/data/player_manager/functions/bonus/update_health_bonus.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/health_bonus.mcfunction similarity index 53% rename from TheSkyBlessing/data/player_manager/functions/bonus/update_health_bonus.mcfunction rename to Asset/data/asset/functions/artifact/0002.blessing/trigger/update/health_bonus.mcfunction index 5bedef6de..8c0ece7bc 100644 --- a/TheSkyBlessing/data/player_manager/functions/bonus/update_health_bonus.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/health_bonus.mcfunction @@ -1,4 +1,4 @@ -#> player_manager:bonus/update_health_bonus +#> asset:artifact/0002.blessing/trigger/update/health_bonus # # # @@ -9,24 +9,29 @@ #> Diff # @private #declare score_holder $Diff + #declare score_holder $RemovedAmount #declare score_holder $isNegative - #declare score_holder $isNegative + +# 古いのをremove + data modify storage api: Argument.UUID set value [I;1,1,2,0] + function api:modifier/max_health/remove # 差分にする - scoreboard players operation $Diff Temporary = $MaxHealth Global - scoreboard players operation $Diff Temporary -= @s ScoreToMaxHealth -# 符号を記録して正数に補正する + scoreboard players operation $Diff Temporary = $BonusHealth Global + execute store result score $RemovedAmount Temporary run data get storage api: Removed.Amount 1 + execute unless score $RemovedAmount Temporary matches -2147483648..2147483647 run scoreboard players set $RemovedAmount Temporary 0 + scoreboard players operation $Diff Temporary -= $RemovedAmount Temporary +# 出力 execute store result score $isNegative Temporary if score $Diff Temporary matches ..-1 execute if score $isNegative Temporary matches 1 run scoreboard players operation $Diff Temporary *= $-1 Const -# 整数部のみを取り出す - scoreboard players operation $Diff Temporary = $Diff Temporary - scoreboard players operation $Diff Temporary /= $10000 Const -# 出力 execute if score $isNegative Temporary matches 0 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大体力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"増加した","color":"white"}] execute if score $isNegative Temporary matches 1 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大体力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"減少した","color":"white"}] # リセット scoreboard players reset $Diff Temporary + scoreboard players reset $RemovedAmount Temporary scoreboard players reset $isNegative Temporary # 適用 - scoreboard players operation @s ScoreToMaxHealth = $MaxHealth Global \ No newline at end of file + data modify storage api: Argument set value {Amount:-1,UUID:[I;1,1,2,0],Operation:"add"} + execute store result storage api: Argument.Amount double 1 run scoreboard players get $BonusHealth Global + function api:modifier/max_health/add \ No newline at end of file diff --git a/TheSkyBlessing/data/player_manager/functions/bonus/update_mp_bonus.mcfunction b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/mp_bonus.mcfunction similarity index 54% rename from TheSkyBlessing/data/player_manager/functions/bonus/update_mp_bonus.mcfunction rename to Asset/data/asset/functions/artifact/0002.blessing/trigger/update/mp_bonus.mcfunction index 51319361f..821528934 100644 --- a/TheSkyBlessing/data/player_manager/functions/bonus/update_mp_bonus.mcfunction +++ b/Asset/data/asset/functions/artifact/0002.blessing/trigger/update/mp_bonus.mcfunction @@ -1,4 +1,4 @@ -#> player_manager:bonus/update_mp_bonus +#> asset:artifact/0002.blessing/trigger/update/mp_bonus # # # @@ -9,11 +9,18 @@ #> Diff # @private #declare score_holder $Diff + #declare score_holder $RemovedAmount #declare score_holder $isNegative +# 古いのをremove + data modify storage api: Argument.UUID set value [I;1,1,2,0] + function api:modifier/max_mp/remove + # 差分にする - scoreboard players operation $Diff Temporary = $MaxMP Global - scoreboard players operation $Diff Temporary -= @s MPMax + scoreboard players operation $Diff Temporary = $BonusMP Global + execute store result score $RemovedAmount Temporary run data get storage api: Removed.Amount 1 + execute unless score $RemovedAmount Temporary matches -2147483648..2147483647 run scoreboard players set $RemovedAmount Temporary 0 + scoreboard players operation $Diff Temporary -= $RemovedAmount Temporary # 出力 execute store result score $isNegative Temporary if score $Diff Temporary matches ..-1 execute if score $isNegative Temporary matches 1 run scoreboard players operation $Diff Temporary *= $-1 Const @@ -21,8 +28,10 @@ execute if score $isNegative Temporary matches 1 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大魔力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"減少した","color":"white"}] # リセット scoreboard players reset $Diff Temporary + scoreboard players reset $RemovedAmount Temporary scoreboard players reset $isNegative Temporary - # 適用 - scoreboard players operation @s MPMax = $MaxMP Global \ No newline at end of file + data modify storage api: Argument set value {Amount:-1,UUID:[I;1,1,2,0],Operation:"add"} + execute store result storage api: Argument.Amount double 1 run scoreboard players get $BonusMP Global + function api:modifier/max_mp/add \ No newline at end of file diff --git a/ScoreToHealth/LICENSE b/ScoreToHealth/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/ScoreToHealth/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/ScoreToHealth/README.md b/ScoreToHealth/README.md new file mode 100644 index 000000000..f7e509a3d --- /dev/null +++ b/ScoreToHealth/README.md @@ -0,0 +1,40 @@ +# ScoreToHealth +(Minecraft 1.16+) Very Easy Way to Sync Player's Health with Score +プレイヤーの体力をスコアで設定できます! + +# 動作確認済みバージョン / Verified minecraft versions + +- 1.17 +- 1.18 + +以下のバージョンは右のReleasesからどうぞ。 +For the following versions, please check Releases on the right. + +1.16.x + +# 使い方/How To Use + +プレイヤーのScoreToHealthに、目的のHealthの100倍をセットするだけ! +Simply set the player's ScoreToHealth to 100 times the desired Health. + +例)12.34にしたい場合 +/scoreboard players set @s ScoreToHealth 1234 + +# 連絡はこちら/Contact + +https://twitter.com/AiAkaishi + +# やさしいライセンス + +1. 著作権表示してね +このデータパックのファイルから著作権表示消したりしたらダメなだけで +このデータパックを使った動画、放送、配布マップとかに特別何か書かないといけないわけじゃないよ。 +2. 再配布ok +3. 改変ok +ただし、改変したものを配布する場合は、どのファイルを変えた、とか書いてね。 +4. 無料です +個人でも商用でも! + +# LICENSE + +This datapack is released under the Apache License, Version 2.0, see LICENSE. diff --git a/ScoreToHealth/changes.diff b/ScoreToHealth/changes.diff new file mode 100644 index 000000000..7612430f0 --- /dev/null +++ b/ScoreToHealth/changes.diff @@ -0,0 +1,408 @@ +--- original/ScoreToHealth/data/score_to_health/functions/check.mcfunction ++++ modified/ScoreToHealth/data/score_to_health/functions/check.mcfunction +@@ -15,3 +15,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute store result score #__ ScoreToHealth run data get entity @s Health 100 +-scoreboard players operation #__ ScoreToHealth -= #_ ScoreToHealth ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++function api:data_get/health ++execute store result score $__ ScoreToHealth run data get storage api: Health 100 ++scoreboard players operation $__ ScoreToHealth -= $_ ScoreToHealth +@@ -19 +19 @@ +-execute if score #__ ScoreToHealth matches ..0 unless entity @s[tag=ScoreToHealth.AntiGlitch.UnsafeTick] run function score_to_health:modify ++execute if score $__ ScoreToHealth matches ..0 unless entity @s[tag=ScoreToHealth.AntiGlitch.UnsafeTick] run function score_to_health:modify +@@ -21 +21 @@ +-execute if score #__ ScoreToHealth matches 1.. run function score_to_health:anti_glitch/protect ++execute if score $__ ScoreToHealth matches 1.. run function score_to_health:anti_glitch/protect +--- original/ScoreToHealth/data/score_to_health/functions/load.mcfunction ++++ modified/ScoreToHealth/data/score_to_health/functions/load.mcfunction +@@ -15 +15,15 @@ +-scoreboard objectives add ScoreToHealth dummy {"text":"プレイヤーをこの体力にする(*0.01HP)"} ++#> ObjectDeclare ++# @within * ++# score_to_health:** ++# lib:score_to_health_wrapper/** ++# lib:has_health_modify_score ++# api:modifier/max_health/** ++ scoreboard objectives add ScoreToHealth dummy {"text":"プレイヤーをこの体力にする(*0.01HP)"} ++ scoreboard objectives add ScoreToMaxHealth dummy {"text":"プレイヤーをこの最大体力にする(*0.0001HP)"} ++ ++#> PrivateUse ++# @internal ++ #declare tag ScoreToHealth.AntiGlitch.UnsafeTick ++ #declare tag ScoreToHealth.AntiGlitch.Protected ++ #declare tag ScoreToHealth.Modified ++ #declare tag ScoreToHealth.Return ++ scoreboard objectives add STMHBackup dummy {"text":"ScoreToMaxHealthのBackup"} ++ ++#> RespawnCheck ++# @within function core:handler/respawn ++#declare objective STMHBackup +\ No newline at end of file +--- original/ScoreToHealth/data/score_to_health/functions/modify.mcfunction ++++ modified/ScoreToHealth/data/score_to_health/functions/modify.mcfunction +@@ -17,2 +17,2 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-scoreboard players operation @s ScoreToHealth < #_ ScoreToHealth ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++scoreboard players operation @s ScoreToHealth < $_ ScoreToHealth +@@ -21,3 +21,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-16 "ScoreToHealth" -419.4304 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-16 "ScoreToHealth" 419.4304 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-16 "ScoreToHealth" -419.4304 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-16 "ScoreToHealth" 419.4304 add +@@ -25,3 +25,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-15 "ScoreToHealth" -209.7152 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-15 "ScoreToHealth" 209.7152 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-15 "ScoreToHealth" -209.7152 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-15 "ScoreToHealth" 209.7152 add +@@ -29,3 +29,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-14 "ScoreToHealth" -104.8576 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-14 "ScoreToHealth" 104.8576 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-14 "ScoreToHealth" -104.8576 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-14 "ScoreToHealth" 104.8576 add +@@ -33,3 +33,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-13 "ScoreToHealth" -52.4288 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-13 "ScoreToHealth" 52.4288 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-13 "ScoreToHealth" -52.4288 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-13 "ScoreToHealth" 52.4288 add +@@ -37,3 +37,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-12 "ScoreToHealth" -26.2144 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-12 "ScoreToHealth" 26.2144 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-12 "ScoreToHealth" -26.2144 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-12 "ScoreToHealth" 26.2144 add +@@ -41,3 +41,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-11 "ScoreToHealth" -13.1072 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-11 "ScoreToHealth" 13.1072 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-11 "ScoreToHealth" -13.1072 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-11 "ScoreToHealth" 13.1072 add +@@ -45,3 +45,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-10 "ScoreToHealth" -6.5536 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-10 "ScoreToHealth" 6.5536 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-10 "ScoreToHealth" -6.5536 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-10 "ScoreToHealth" 6.5536 add +@@ -49,3 +49,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0F "ScoreToHealth" -3.2768 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0F "ScoreToHealth" 3.2768 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0F "ScoreToHealth" -3.2768 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0F "ScoreToHealth" 3.2768 add +@@ -53,3 +53,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0E "ScoreToHealth" -1.6384 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0E "ScoreToHealth" 1.6384 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0E "ScoreToHealth" -1.6384 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0E "ScoreToHealth" 1.6384 add +@@ -57,3 +57,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0D "ScoreToHealth" -0.8192 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0D "ScoreToHealth" 0.8192 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0D "ScoreToHealth" -0.8192 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0D "ScoreToHealth" 0.8192 add +@@ -61,3 +61,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0C "ScoreToHealth" -0.4096 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0C "ScoreToHealth" 0.4096 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0C "ScoreToHealth" -0.4096 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0C "ScoreToHealth" 0.4096 add +@@ -65,3 +65,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0B "ScoreToHealth" -0.2048 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0B "ScoreToHealth" 0.2048 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0B "ScoreToHealth" -0.2048 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0B "ScoreToHealth" 0.2048 add +@@ -69,3 +69,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0A "ScoreToHealth" -0.1024 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0A "ScoreToHealth" 0.1024 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0A "ScoreToHealth" -0.1024 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0A "ScoreToHealth" 0.1024 add +@@ -73,3 +73,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-09 "ScoreToHealth" -0.0512 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-09 "ScoreToHealth" 0.0512 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-09 "ScoreToHealth" -0.0512 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-09 "ScoreToHealth" 0.0512 add +@@ -77,3 +77,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-08 "ScoreToHealth" -0.0256 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-08 "ScoreToHealth" 0.0256 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-08 "ScoreToHealth" -0.0256 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-08 "ScoreToHealth" 0.0256 add +@@ -81,3 +81,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-07 "ScoreToHealth" -0.0128 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-07 "ScoreToHealth" 0.0128 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-07 "ScoreToHealth" -0.0128 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-07 "ScoreToHealth" 0.0128 add +@@ -85,3 +85,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-06 "ScoreToHealth" -0.0064 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-06 "ScoreToHealth" 0.0064 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-06 "ScoreToHealth" -0.0064 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-06 "ScoreToHealth" 0.0064 add +@@ -89,3 +89,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-05 "ScoreToHealth" -0.0032 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-05 "ScoreToHealth" 0.0032 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-05 "ScoreToHealth" -0.0032 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-05 "ScoreToHealth" 0.0032 add +@@ -93,3 +93,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-04 "ScoreToHealth" -0.0016 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-04 "ScoreToHealth" 0.0016 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-04 "ScoreToHealth" -0.0016 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-04 "ScoreToHealth" 0.0016 add +@@ -97,3 +97,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-03 "ScoreToHealth" -0.0008 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-03 "ScoreToHealth" 0.0008 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-03 "ScoreToHealth" -0.0008 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-03 "ScoreToHealth" 0.0008 add +@@ -101,3 +101,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-02 "ScoreToHealth" -0.0004 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-02 "ScoreToHealth" 0.0004 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-02 "ScoreToHealth" -0.0004 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-02 "ScoreToHealth" 0.0004 add +@@ -105,3 +105,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-01 "ScoreToHealth" -0.0002 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-01 "ScoreToHealth" 0.0002 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-01 "ScoreToHealth" -0.0002 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-01 "ScoreToHealth" 0.0002 add +@@ -109,3 +109,3 @@ +-execute store result score #_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +-execute if score @s ScoreToHealth <= #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-00 "ScoreToHealth" -0.0001 add +-execute if score @s ScoreToHealth > #_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-00 "ScoreToHealth" 0.0001 add ++execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 ++execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-00 "ScoreToHealth" -0.0001 add ++execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-00 "ScoreToHealth" 0.0001 add +--- /dev/null ++++ modified/ScoreToHealth/data/score_to_health/functions/modify_max_health.mcfunction +@@ -0,0 +1,189 @@ ++# Copyright © 2020 赤石愛 ++ ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++ ++# http://www.apache.org/licenses/LICENSE-2.0 ++ ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++ ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-17 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-16 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-15 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-14 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-13 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-12 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-11 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-10 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0F ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0E ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0D ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0C ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0B ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0A ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-09 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-08 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-07 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-06 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-05 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-04 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-03 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-02 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-01 ++attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-00 ++ ++execute store result score $_ ScoreToMaxHealth run attribute @s generic.max_health base get 10000 ++ ++scoreboard players operation $__ ScoreToMaxHealth = $_ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-17 "ScoreToMaxHealth" -838.8607 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 8388607 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-17 "ScoreToMaxHealth" 838.8607 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 8388607 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-16 "ScoreToMaxHealth" -419.4304 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 4194304 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-16 "ScoreToMaxHealth" 419.4304 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 4194304 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-15 "ScoreToMaxHealth" -209.7152 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 2097152 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-15 "ScoreToMaxHealth" 209.7152 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 2097152 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-14 "ScoreToMaxHealth" -104.8576 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 1048576 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-14 "ScoreToMaxHealth" 104.8576 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 1048576 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-13 "ScoreToMaxHealth" -52.4288 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 524288 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-13 "ScoreToMaxHealth" 52.4288 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 524288 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-12 "ScoreToMaxHealth" -26.2144 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 262144 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-12 "ScoreToMaxHealth" 26.2144 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 262144 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-11 "ScoreToMaxHealth" -13.1072 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 131072 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-11 "ScoreToMaxHealth" 13.1072 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 131072 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-10 "ScoreToMaxHealth" -6.5536 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 65536 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-10 "ScoreToMaxHealth" 6.5536 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 65536 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0F "ScoreToMaxHealth" -3.2768 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 32768 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0F "ScoreToMaxHealth" 3.2768 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 32768 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0E "ScoreToMaxHealth" -1.6384 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 16384 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0E "ScoreToMaxHealth" 1.6384 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 16384 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0D "ScoreToMaxHealth" -0.8192 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 8192 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0D "ScoreToMaxHealth" 0.8192 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 8192 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0C "ScoreToMaxHealth" -0.4096 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 4096 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0C "ScoreToMaxHealth" 0.4096 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 4096 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0B "ScoreToMaxHealth" -0.2048 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 2048 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0B "ScoreToMaxHealth" 0.2048 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 2048 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0A "ScoreToMaxHealth" -0.1024 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 1024 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0A "ScoreToMaxHealth" 0.1024 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 1024 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-09 "ScoreToMaxHealth" -0.0512 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0512 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-09 "ScoreToMaxHealth" 0.0512 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0512 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-08 "ScoreToMaxHealth" -0.0256 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0256 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-08 "ScoreToMaxHealth" 0.0256 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0256 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-07 "ScoreToMaxHealth" -0.0128 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0128 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-07 "ScoreToMaxHealth" 0.0128 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0128 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-06 "ScoreToMaxHealth" -0.0064 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0064 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-06 "ScoreToMaxHealth" 0.0064 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0064 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-05 "ScoreToMaxHealth" -0.0032 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0032 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-05 "ScoreToMaxHealth" 0.0032 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0032 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-04 "ScoreToMaxHealth" -0.0016 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0016 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-04 "ScoreToMaxHealth" 0.0016 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0016 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-03 "ScoreToMaxHealth" -0.0008 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0008 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-03 "ScoreToMaxHealth" 0.0008 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0008 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-02 "ScoreToMaxHealth" -0.0004 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0004 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-02 "ScoreToMaxHealth" 0.0004 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0004 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-01 "ScoreToMaxHealth" -0.0002 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0002 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-01 "ScoreToMaxHealth" 0.0002 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0002 ++scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth ++ ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-00 "ScoreToMaxHealth" -0.0001 add ++execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0001 ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-00 "ScoreToMaxHealth" 0.0001 add ++execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0001 ++ ++effect give @s minecraft:instant_health 1 252 true ++scoreboard players operation @s STMHBackup = @s ScoreToMaxHealth ++tag @s add ScoreToHealth.Return +\ No newline at end of file +--- original/ScoreToHealth/data/score_to_health/functions/player_tick.mcfunction ++++ modified/ScoreToHealth/data/score_to_health/functions/player_tick.mcfunction +@@ -15,0 +16,3 @@ ++execute unless score @s STMHBackup matches -2147483648.. run scoreboard players set @s ScoreToMaxHealth 200000 ++execute unless score @s STMHBackup matches -2147483648.. run scoreboard players set @s STMHBackup 200000 ++execute if entity @s[tag=!ScoreToHealth.Return,tag=!ScoreToHealth.AntiGlitch.UnsafeTick] unless score @s ScoreToMaxHealth = @s STMHBackup run function score_to_health:modify_max_health diff --git a/ScoreToHealth/data/minecraft/tags/functions/load.json b/ScoreToHealth/data/minecraft/tags/functions/load.json new file mode 100644 index 000000000..83958af7a --- /dev/null +++ b/ScoreToHealth/data/minecraft/tags/functions/load.json @@ -0,0 +1,5 @@ +{ + "values": [ + "score_to_health:load" + ] +} diff --git a/ScoreToHealth/data/score_to_health/advancements/player_tick.json b/ScoreToHealth/data/score_to_health/advancements/player_tick.json new file mode 100644 index 000000000..0b0de6c0e --- /dev/null +++ b/ScoreToHealth/data/score_to_health/advancements/player_tick.json @@ -0,0 +1,10 @@ +{ + "criteria": { + "tick": { + "trigger": "minecraft:tick" + } + }, + "rewards": { + "function": "score_to_health:player_tick" + } +} \ No newline at end of file diff --git a/ScoreToHealth/data/score_to_health/functions/anti_glitch/modify.mcfunction b/ScoreToHealth/data/score_to_health/functions/anti_glitch/modify.mcfunction new file mode 100644 index 000000000..ad0cbbc26 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/anti_glitch/modify.mcfunction @@ -0,0 +1,15 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-1F "ScoreToHealth" -100000 add diff --git a/ScoreToHealth/data/score_to_health/functions/anti_glitch/protect.mcfunction b/ScoreToHealth/data/score_to_health/functions/anti_glitch/protect.mcfunction new file mode 100644 index 000000000..d1561276d --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/anti_glitch/protect.mcfunction @@ -0,0 +1,17 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-FF "ScoreToHealth" 100000 add +tag @s add ScoreToHealth.AntiGlitch.Protected +tag @s add ScoreToHealth.AntiGlitch.UnsafeTick diff --git a/ScoreToHealth/data/score_to_health/functions/anti_glitch/restore.mcfunction b/ScoreToHealth/data/score_to_health/functions/anti_glitch/restore.mcfunction new file mode 100644 index 000000000..d7d522a4b --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/anti_glitch/restore.mcfunction @@ -0,0 +1,15 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-1F diff --git a/ScoreToHealth/data/score_to_health/functions/anti_glitch/unprotect.mcfunction b/ScoreToHealth/data/score_to_health/functions/anti_glitch/unprotect.mcfunction new file mode 100644 index 000000000..5cd034f20 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/anti_glitch/unprotect.mcfunction @@ -0,0 +1,16 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-FF +tag @s remove ScoreToHealth.AntiGlitch.Protected diff --git a/ScoreToHealth/data/score_to_health/functions/check.mcfunction b/ScoreToHealth/data/score_to_health/functions/check.mcfunction new file mode 100644 index 000000000..8e65bee50 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/check.mcfunction @@ -0,0 +1,22 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +function api:data_get/health +execute store result score $__ ScoreToHealth run data get storage api: Health 100 +scoreboard players operation $__ ScoreToHealth -= $_ ScoreToHealth + +execute if score $__ ScoreToHealth matches ..0 unless entity @s[tag=ScoreToHealth.AntiGlitch.UnsafeTick] run function score_to_health:modify +tag @s remove ScoreToHealth.AntiGlitch.UnsafeTick +execute if score $__ ScoreToHealth matches 1.. run function score_to_health:anti_glitch/protect diff --git a/ScoreToHealth/data/score_to_health/functions/load.mcfunction b/ScoreToHealth/data/score_to_health/functions/load.mcfunction new file mode 100644 index 000000000..0562039a0 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/load.mcfunction @@ -0,0 +1,34 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#> ObjectDeclare +# @within * +# score_to_health:** +# lib:score_to_health_wrapper/** +# lib:has_health_modify_score +# api:modifier/max_health/** + scoreboard objectives add ScoreToHealth dummy {"text":"プレイヤーをこの体力にする(*0.01HP)"} + scoreboard objectives add ScoreToMaxHealth dummy {"text":"プレイヤーをこの最大体力にする(*0.0001HP)"} + +#> PrivateUse +# @internal + #declare tag ScoreToHealth.AntiGlitch.UnsafeTick + #declare tag ScoreToHealth.AntiGlitch.Protected + #declare tag ScoreToHealth.Modified + #declare tag ScoreToHealth.Return + scoreboard objectives add STMHBackup dummy {"text":"ScoreToMaxHealthのBackup"} + +#> RespawnCheck +# @within function core:handler/respawn +#declare objective STMHBackup \ No newline at end of file diff --git a/ScoreToHealth/data/score_to_health/functions/modify.mcfunction b/ScoreToHealth/data/score_to_health/functions/modify.mcfunction new file mode 100644 index 000000000..6b7069ee0 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/modify.mcfunction @@ -0,0 +1,115 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +execute if entity @s[tag=ScoreToHealth.AntiGlitch.Protected] run function score_to_health:anti_glitch/modify + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +scoreboard players operation @s ScoreToHealth < $_ ScoreToHealth +attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-17 "ScoreToHealth" -838.8607 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-16 "ScoreToHealth" -419.4304 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-16 "ScoreToHealth" 419.4304 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-15 "ScoreToHealth" -209.7152 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-15 "ScoreToHealth" 209.7152 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-14 "ScoreToHealth" -104.8576 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-14 "ScoreToHealth" 104.8576 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-13 "ScoreToHealth" -52.4288 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-13 "ScoreToHealth" 52.4288 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-12 "ScoreToHealth" -26.2144 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-12 "ScoreToHealth" 26.2144 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-11 "ScoreToHealth" -13.1072 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-11 "ScoreToHealth" 13.1072 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-10 "ScoreToHealth" -6.5536 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-10 "ScoreToHealth" 6.5536 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0F "ScoreToHealth" -3.2768 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0F "ScoreToHealth" 3.2768 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0E "ScoreToHealth" -1.6384 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0E "ScoreToHealth" 1.6384 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0D "ScoreToHealth" -0.8192 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0D "ScoreToHealth" 0.8192 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0C "ScoreToHealth" -0.4096 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0C "ScoreToHealth" 0.4096 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0B "ScoreToHealth" -0.2048 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0B "ScoreToHealth" 0.2048 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0A "ScoreToHealth" -0.1024 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-0A "ScoreToHealth" 0.1024 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-09 "ScoreToHealth" -0.0512 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-09 "ScoreToHealth" 0.0512 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-08 "ScoreToHealth" -0.0256 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-08 "ScoreToHealth" 0.0256 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-07 "ScoreToHealth" -0.0128 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-07 "ScoreToHealth" 0.0128 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-06 "ScoreToHealth" -0.0064 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-06 "ScoreToHealth" 0.0064 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-05 "ScoreToHealth" -0.0032 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-05 "ScoreToHealth" 0.0032 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-04 "ScoreToHealth" -0.0016 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-04 "ScoreToHealth" 0.0016 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-03 "ScoreToHealth" -0.0008 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-03 "ScoreToHealth" 0.0008 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-02 "ScoreToHealth" -0.0004 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-02 "ScoreToHealth" 0.0004 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-01 "ScoreToHealth" -0.0002 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-01 "ScoreToHealth" 0.0002 add + +execute store result score $_ ScoreToHealth run attribute @s minecraft:generic.max_health get 100 +execute if score @s ScoreToHealth <= $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-00 "ScoreToHealth" -0.0001 add +execute if score @s ScoreToHealth > $_ ScoreToHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0001-00 "ScoreToHealth" 0.0001 add + +effect give @s minecraft:instant_health 1 252 true +tag @s add ScoreToHealth.Modified +scoreboard players reset @s ScoreToHealth diff --git a/ScoreToHealth/data/score_to_health/functions/modify_max_health.mcfunction b/ScoreToHealth/data/score_to_health/functions/modify_max_health.mcfunction new file mode 100644 index 000000000..28e9e3a44 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/modify_max_health.mcfunction @@ -0,0 +1,189 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-17 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-16 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-15 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-14 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-13 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-12 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-11 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-10 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0F +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0E +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0D +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0C +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0B +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-0A +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-09 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-08 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-07 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-06 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-05 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-04 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-03 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-02 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-01 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0002-00 + +execute store result score $_ ScoreToMaxHealth run attribute @s generic.max_health base get 10000 + +scoreboard players operation $__ ScoreToMaxHealth = $_ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-17 "ScoreToMaxHealth" -838.8607 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 8388607 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-17 "ScoreToMaxHealth" 838.8607 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 8388607 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-16 "ScoreToMaxHealth" -419.4304 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 4194304 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-16 "ScoreToMaxHealth" 419.4304 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 4194304 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-15 "ScoreToMaxHealth" -209.7152 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 2097152 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-15 "ScoreToMaxHealth" 209.7152 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 2097152 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-14 "ScoreToMaxHealth" -104.8576 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 1048576 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-14 "ScoreToMaxHealth" 104.8576 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 1048576 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-13 "ScoreToMaxHealth" -52.4288 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 524288 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-13 "ScoreToMaxHealth" 52.4288 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 524288 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-12 "ScoreToMaxHealth" -26.2144 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 262144 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-12 "ScoreToMaxHealth" 26.2144 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 262144 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-11 "ScoreToMaxHealth" -13.1072 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 131072 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-11 "ScoreToMaxHealth" 13.1072 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 131072 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-10 "ScoreToMaxHealth" -6.5536 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 65536 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-10 "ScoreToMaxHealth" 6.5536 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 65536 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0F "ScoreToMaxHealth" -3.2768 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 32768 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0F "ScoreToMaxHealth" 3.2768 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 32768 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0E "ScoreToMaxHealth" -1.6384 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 16384 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0E "ScoreToMaxHealth" 1.6384 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 16384 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0D "ScoreToMaxHealth" -0.8192 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 8192 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0D "ScoreToMaxHealth" 0.8192 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 8192 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0C "ScoreToMaxHealth" -0.4096 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 4096 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0C "ScoreToMaxHealth" 0.4096 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 4096 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0B "ScoreToMaxHealth" -0.2048 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 2048 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0B "ScoreToMaxHealth" 0.2048 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 2048 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0A "ScoreToMaxHealth" -0.1024 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 1024 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-0A "ScoreToMaxHealth" 0.1024 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 1024 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-09 "ScoreToMaxHealth" -0.0512 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0512 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-09 "ScoreToMaxHealth" 0.0512 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0512 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-08 "ScoreToMaxHealth" -0.0256 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0256 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-08 "ScoreToMaxHealth" 0.0256 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0256 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-07 "ScoreToMaxHealth" -0.0128 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0128 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-07 "ScoreToMaxHealth" 0.0128 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0128 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-06 "ScoreToMaxHealth" -0.0064 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0064 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-06 "ScoreToMaxHealth" 0.0064 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0064 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-05 "ScoreToMaxHealth" -0.0032 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0032 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-05 "ScoreToMaxHealth" 0.0032 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0032 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-04 "ScoreToMaxHealth" -0.0016 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0016 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-04 "ScoreToMaxHealth" 0.0016 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0016 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-03 "ScoreToMaxHealth" -0.0008 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0008 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-03 "ScoreToMaxHealth" 0.0008 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0008 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-02 "ScoreToMaxHealth" -0.0004 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0004 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-02 "ScoreToMaxHealth" 0.0004 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0004 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-01 "ScoreToMaxHealth" -0.0002 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0002 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-01 "ScoreToMaxHealth" 0.0002 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0002 +scoreboard players operation $_ ScoreToMaxHealth = $__ ScoreToMaxHealth + +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-00 "ScoreToMaxHealth" -0.0001 add +execute if score @s ScoreToMaxHealth <= $_ ScoreToMaxHealth run scoreboard players remove $__ ScoreToMaxHealth 0001 +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run attribute @s minecraft:generic.max_health modifier add bab7cdc2-fb6a-47f6-0002-00 "ScoreToMaxHealth" 0.0001 add +execute if score @s ScoreToMaxHealth > $_ ScoreToMaxHealth run scoreboard players add $__ ScoreToMaxHealth 0001 + +effect give @s minecraft:instant_health 1 252 true +scoreboard players operation @s STMHBackup = @s ScoreToMaxHealth +tag @s add ScoreToHealth.Return \ No newline at end of file diff --git a/ScoreToHealth/data/score_to_health/functions/player_tick.mcfunction b/ScoreToHealth/data/score_to_health/functions/player_tick.mcfunction new file mode 100644 index 000000000..f05fb9448 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/player_tick.mcfunction @@ -0,0 +1,21 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +execute if entity @s[tag=ScoreToHealth.Modified] run function score_to_health:restore +execute unless score @s STMHBackup matches -2147483648.. run scoreboard players set @s ScoreToMaxHealth 200000 +execute unless score @s STMHBackup matches -2147483648.. run scoreboard players set @s STMHBackup 200000 +execute if entity @s[tag=!ScoreToHealth.Return,tag=!ScoreToHealth.AntiGlitch.UnsafeTick] unless score @s ScoreToMaxHealth = @s STMHBackup run function score_to_health:modify_max_health +execute unless entity @s[tag=ScoreToHealth.Return] if score @s ScoreToHealth matches -2147483648.. run function score_to_health:check +tag @s[tag=ScoreToHealth.Return] remove ScoreToHealth.Return +advancement revoke @s only score_to_health:player_tick diff --git a/ScoreToHealth/data/score_to_health/functions/restore.mcfunction b/ScoreToHealth/data/score_to_health/functions/restore.mcfunction new file mode 100644 index 000000000..ffaee1293 --- /dev/null +++ b/ScoreToHealth/data/score_to_health/functions/restore.mcfunction @@ -0,0 +1,45 @@ +# Copyright © 2020 赤石愛 + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function score_to_health:anti_glitch/restore + +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-17 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-16 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-15 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-14 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-13 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-12 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-11 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-10 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-0F +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-0E +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-0D +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-0C +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-0B +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-0A +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-09 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-08 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-07 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-06 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-05 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-04 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-03 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-02 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-01 +attribute @s minecraft:generic.max_health modifier remove bab7cdc2-fb6a-47f6-0001-00 + +function score_to_health:anti_glitch/unprotect + +tag @s remove ScoreToHealth.Modified +tag @s add ScoreToHealth.Return diff --git a/ScoreToHealth/pack.mcmeta b/ScoreToHealth/pack.mcmeta new file mode 100644 index 000000000..26578b218 --- /dev/null +++ b/ScoreToHealth/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack":{ + "pack_format": 10, + "description": "Sync Health with Score" + } +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/damage/core/modify_damage.mcfunction b/TheSkyBlessing/data/api/functions/damage/core/modify_damage.mcfunction index 5af2ad51a..325d08153 100644 --- a/TheSkyBlessing/data/api/functions/damage/core/modify_damage.mcfunction +++ b/TheSkyBlessing/data/api/functions/damage/core/modify_damage.mcfunction @@ -11,7 +11,7 @@ #declare score_holder $Damage #declare score_holder $Modifier #declare score_holder $Temp - #declare score_holder $Average + #declare score_holder $Multiplier # 必要なデータの取得と加算 # 元ダメージ @@ -24,30 +24,29 @@ execute if data storage api: Argument{AttackType:"Physical"} unless data storage api: Modifiers.Physical run scoreboard players set $Temp Temporary 100 execute if data storage api: Argument{AttackType:"Magic"} store result score $Temp Temporary run data get storage api: Modifiers.Magic 100 execute if data storage api: Argument{AttackType:"Magic"} unless data storage api: Modifiers.Magic run scoreboard players set $Temp Temporary 100 - scoreboard players operation $Average Temporary += $Temp Temporary + scoreboard players operation $Multiplier Temporary += $Temp Temporary # 第二属性 - execute if data storage api: Argument{ElementType:"None"} run scoreboard players operation $Temp Temporary = $Average Temporary + execute if data storage api: Argument{ElementType:"None"} run scoreboard players set $Temp Temporary 100 execute if data storage api: Argument{ElementType:"Fire"} store result score $Temp Temporary run data get storage api: Modifiers.Fire 100 execute if data storage api: Argument{ElementType:"Fire"} unless data storage api: Modifiers.Fire run scoreboard players set $Temp Temporary 100 execute if data storage api: Argument{ElementType:"Water"} store result score $Temp Temporary run data get storage api: Modifiers.Water 100 execute if data storage api: Argument{ElementType:"Water"} unless data storage api: Modifiers.Water run scoreboard players set $Temp Temporary 100 execute if data storage api: Argument{ElementType:"Thunder"} store result score $Temp Temporary run data get storage api: Modifiers.Thunder 100 execute if data storage api: Argument{ElementType:"Thunder"} unless data storage api: Modifiers.Thunder run scoreboard players set $Temp Temporary 100 - scoreboard players operation $Average Temporary += $Temp Temporary - # 平均値 - scoreboard players operation $Average Temporary /= $2 Const + scoreboard players operation $Multiplier Temporary += $Temp Temporary + scoreboard players remove $Multiplier Temporary 100 # 補正値の計算 - scoreboard players operation $Modifier Temporary *= $Average Temporary + scoreboard players operation $Modifier Temporary *= $Multiplier Temporary scoreboard players operation $Modifier Temporary /= $100 Const # 最低値設定 - scoreboard players operation $Modifier Temporary > $25 Const + scoreboard players operation $Modifier Temporary > $10 Const # 補正 scoreboard players operation $Damage Temporary *= $Modifier Temporary # 代入 execute store result storage api: ModifiedDamage double 0.0001 run scoreboard players get $Damage Temporary # リセット data remove storage api: Modifiers - scoreboard players reset $Average Temporary + scoreboard players reset $Multiplier Temporary scoreboard players reset $Damage Temporary scoreboard players reset $Modifier Temporary scoreboard players reset $Temp Temporary \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/_index.d.mcfunction b/TheSkyBlessing/data/api/functions/modifier/_index.d.mcfunction index 2017356dd..a68449994 100644 --- a/TheSkyBlessing/data/api/functions/modifier/_index.d.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/_index.d.mcfunction @@ -5,4 +5,4 @@ # @within function api:modifier/core/common/update_modifier/* #declare score_holder $Add #declare score_holder $MultiplyBase - #declare score_holder $Modifier + #declare score_holder $Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/base/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/base/add.mcfunction index dca7b03af..985d0ea67 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/base/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/base/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/base/remove.mcfunction index 00f1c7cac..38201e937 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/base/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/base/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/attack/base/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/fire/add.mcfunction index 6843efc21..e5acdd046 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/fire/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/fire/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/fire/remove.mcfunction index ccb73a040..155c12f73 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/fire/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/fire/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/attack/fire/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/magic/add.mcfunction index 752d9803b..f03f6c8e5 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/magic/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/magic/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/magic/remove.mcfunction index 590d2c6dc..e72c84312 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/magic/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/magic/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/attack/magic/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/physical/add.mcfunction index 167375090..acc2a4049 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/physical/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/physical/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/thunder/add.mcfunction index d5cfdb3d2..f0d0d93ca 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/thunder/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/thunder/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/thunder/remove.mcfunction index 0923464eb..237e5177d 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/thunder/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/thunder/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/attack/thunder/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/water/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/water/add.mcfunction index 0977a8ba3..8d63b2c71 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/water/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/water/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/attack/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/attack/water/remove.mcfunction index 3b1d2e6da..b39d67535 100644 --- a/TheSkyBlessing/data/api/functions/modifier/attack/water/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/attack/water/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/attack/water/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/base/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/base/add.mcfunction index e478064a2..34a4c3af1 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/base/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/base/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Base data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Base set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/base/remove.mcfunction index 5051f92c8..f42a1d1e1 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/base/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/base/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Base function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Base set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/add.mcfunction index eebf4fb8d..18cc68cd1 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Fire data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Fire set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/remove.mcfunction index c7fe98995..8b2cbc35e 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/fire/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Fire function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Fire set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/add.mcfunction index 020bf36fc..451d27209 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Magic data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Magic set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/remove.mcfunction index 559a6473d..a00c32a42 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/magic/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Magic function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Magic set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/add.mcfunction index 3c4fd104d..a1a9fc5c9 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Physical data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Physical set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/remove.mcfunction index 53227611a..13ab6abcc 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/physical/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Physical function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Physical set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/add.mcfunction index 5ef000c6a..b5f7f6608 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Thunder data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Thunder set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/remove.mcfunction index 39307a147..ad9322cfc 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/thunder/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Thunder function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Thunder set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/water/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/water/add.mcfunction index 954b56725..3a3ba6a55 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/water/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/water/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Water data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Water set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/attack/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/attack/water/remove.mcfunction index 813201e5d..b47ad1d01 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/attack/water/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/attack/water/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Attack.Water function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Water set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/common/remove_modifier.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/common/remove_modifier.mcfunction index c21e9f77a..fe86081a4 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/common/remove_modifier.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/common/remove_modifier.mcfunction @@ -23,4 +23,4 @@ # リセット scoreboard players reset $isSuccess Temporary # 要素が残ってたら再帰 - execute if data storage api: Modifiers[0] run function api:modifier/core/common/remove_modifier + execute if data storage api: Modifiers[0] run function api:modifier/core/common/remove_modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/.mcfunction index 3540f75d9..274969538 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/.mcfunction @@ -4,13 +4,13 @@ # # @within function api:modifier/core/** -# Modifiersに補正の配列が入ってるので1dをデフォルト値として計算する、その後Modifierに戻す +# Modifiersに補正の配列が入ってるのでベース値を元として計算する、その後Modifierに戻す # 処理としては最初にModifiersをforEachしてOperation毎に別の配列にする、そのあと順番に処理する # Operation毎に分離する function api:modifier/core/common/update_modifier/separate_modifiers -# デフォルト値の設定 - scoreboard players set $Modifier Temporary 1000 +# ベース値の設定 + execute store result score $Modifier Temporary run data get storage api: Base 1000 # Addの処理 scoreboard players operation $Modifier Temporary += $Add Temporary # MultiplyBaseの処理 @@ -25,4 +25,4 @@ scoreboard players reset $Add Temporary scoreboard players reset $Modifier Temporary scoreboard players reset $MultiplyBase Temporary - scoreboard players reset $Temp Temporary + scoreboard players reset $Temp Temporary \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/multiples.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/multiples.mcfunction index 0986d6af7..a53357c84 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/multiples.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/multiples.mcfunction @@ -22,4 +22,4 @@ # リセット scoreboard players reset $Multiply Temporary # 要素がまだあったら再帰する - execute if data storage api: Multiples[0] run function api:modifier/core/common/update_modifier/multiples + execute if data storage api: Multiples[0] run function api:modifier/core/common/update_modifier/multiples \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/separate_modifiers.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/separate_modifiers.mcfunction index 03ab07972..e955fd421 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/separate_modifiers.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/common/update_modifier/separate_modifiers.mcfunction @@ -23,4 +23,4 @@ # リセット data remove storage api: Op # 要素がまだあったら再帰する - execute if data storage api: Modifiers[0] run function api:modifier/core/common/update_modifier/separate_modifiers + execute if data storage api: Modifiers[0] run function api:modifier/core/common/update_modifier/separate_modifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/common/validate.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/common/validate.mcfunction index f72ccc121..f129c1f5f 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/common/validate.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/common/validate.mcfunction @@ -6,4 +6,4 @@ execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] execute unless data storage api: Argument.Amount run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" Amount","color":"red"}] -execute unless data storage api: Argument.Operation run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" Operation","color":"red"}] +execute unless data storage api: Argument.Operation run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" Operation","color":"red"}] \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/base/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/base/add.mcfunction index d7a775415..67ee8f994 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/base/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/base/add.mcfunction @@ -14,9 +14,11 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Base data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Base set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/base/remove.mcfunction index c58da2dbe..3d9e74be4 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/base/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/base/remove.mcfunction @@ -19,8 +19,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Base function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Base set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/add.mcfunction index da0a764e9..329d32fe0 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/add.mcfunction @@ -14,9 +14,11 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Fire data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Fire set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/remove.mcfunction index 7e4c37ea5..05df8621e 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/fire/remove.mcfunction @@ -19,8 +19,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Fire function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Fire set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/add.mcfunction index 79d2c1908..4dde40dc5 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/add.mcfunction @@ -14,9 +14,11 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Magic data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Magic set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/remove.mcfunction index e1f85c2d8..94233a042 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/magic/remove.mcfunction @@ -19,8 +19,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Magic function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Magic set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/add.mcfunction index 0288c89ac..63dd69e26 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/add.mcfunction @@ -14,9 +14,11 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Physical data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Physical set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/remove.mcfunction index e3a8890f9..8eaad7927 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/physical/remove.mcfunction @@ -19,8 +19,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Physical function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Physical set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/add.mcfunction index e43e113df..94eaa7190 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/add.mcfunction @@ -14,9 +14,11 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Thunder data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Thunder set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/remove.mcfunction index 0ea23a1dc..fb1f725d1 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/thunder/remove.mcfunction @@ -19,8 +19,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Thunder function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Thunder set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/water/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/water/add.mcfunction index 9839b5c46..dea31677f 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/water/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/water/add.mcfunction @@ -14,9 +14,11 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Water data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Water set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/defense/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/defense/water/remove.mcfunction index 7d128b5b2..e8168fd0a 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/defense/water/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/defense/water/remove.mcfunction @@ -19,8 +19,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Defense.Water function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Water set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/heal/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/heal/add.mcfunction index 648a9da7a..5265ad883 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/heal/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/heal/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Heal data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Heal set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/heal/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/heal/remove.mcfunction index bfa155cae..0a86ca094 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/heal/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/heal/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.Heal function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Heal set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/max_health/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/max_health/add.mcfunction new file mode 100644 index 000000000..2d7ead998 --- /dev/null +++ b/TheSkyBlessing/data/api/functions/modifier/core/max_health/add.mcfunction @@ -0,0 +1,24 @@ +#> api:modifier/core/max_health/add +# +# +# +# @within function api:modifier/max_health/add + +# UserStorage呼び出し + function oh_my_dat:please +# 無ければ追加 + execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth set value [] +# 追加する + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth append value {} + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth[-1].UUID set from storage api: Argument.UUID + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth[-1].Amount set from storage api: Argument.Amount + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth[-1].Operation set from storage api: Argument.Operation +# データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.MaxHealth + data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth + function api:modifier/core/common/update_modifier/ + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxHealth set from storage api: Modifier +# リセット + data remove storage api: Base + data remove storage api: Modifiers + data remove storage api: Modifier diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/max_health/remove.mcfunction similarity index 50% rename from TheSkyBlessing/data/api/functions/player_modifier/core/attack/base/remove.mcfunction rename to TheSkyBlessing/data/api/functions/modifier/core/max_health/remove.mcfunction index ca89717b7..be40c43a5 100644 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/base/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/max_health/remove.mcfunction @@ -1,24 +1,26 @@ -#> api:player_modifier/core/attack/base/remove +#> api:modifier/core/max_health/remove # # # -# @within function api:player_modifier/attack/base/remove +# @within function api:modifier/max_health/remove # UserStorage呼び出し function oh_my_dat:please # 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base + data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth # 配列の初期化 data modify storage api: NewModifiers set value [] data remove storage api: Removed # フィルタ - function api:player_modifier/core/common/remove_modifier + function api:modifier/core/common/remove_modifier # 新しい配列を戻す data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base set from storage api: Modifiers + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxHealth set from storage api: Modifiers # データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Base set from storage api: Modifier + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.MaxHealth + function api:modifier/core/common/update_modifier/ + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxHealth set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file + data remove storage api: NewModifiers diff --git a/TheSkyBlessing/data/api/functions/modifier/core/max_mp/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/max_mp/add.mcfunction new file mode 100644 index 000000000..1304a2ec1 --- /dev/null +++ b/TheSkyBlessing/data/api/functions/modifier/core/max_mp/add.mcfunction @@ -0,0 +1,24 @@ +#> api:modifier/core/max_mp/add +# +# +# +# @within function api:modifier/max_mp/add + +# UserStorage呼び出し + function oh_my_dat:please +# 無ければ入れる + execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP set value [] +# 追加する + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP append value {} + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP[-1].UUID set from storage api: Argument.UUID + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP[-1].Amount set from storage api: Argument.Amount + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP[-1].Operation set from storage api: Argument.Operation +# データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.MaxMP + data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP + function api:modifier/core/common/update_modifier/ + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxMP set from storage api: Modifier +# リセット + data remove storage api: Base + data remove storage api: Modifiers + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/max_mp/remove.mcfunction similarity index 54% rename from TheSkyBlessing/data/api/functions/player_modifier/core/attack/magic/remove.mcfunction rename to TheSkyBlessing/data/api/functions/modifier/core/max_mp/remove.mcfunction index 2f664167a..0d07bd47f 100644 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/magic/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/max_mp/remove.mcfunction @@ -1,24 +1,26 @@ -#> api:player_modifier/core/attack/magic/remove +#> api:modifier/core/max_mp/remove # # # -# @within function api:player_modifier/attack/magic/remove +# @within function api:modifier/max_mp/remove # UserStorage呼び出し function oh_my_dat:please # 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic + data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP # 配列の初期化 data modify storage api: NewModifiers set value [] data remove storage api: Removed # フィルタ - function api:player_modifier/core/common/remove_modifier + function api:modifier/core/common/remove_modifier # 新しい配列を戻す data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic set from storage api: Modifiers + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MaxMP set from storage api: Modifiers # データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Magic set from storage api: Modifier + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.MaxMP + function api:modifier/core/common/update_modifier/ + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxMP set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/add.mcfunction index c15dd2f00..2f429650f 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.MPRegen data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MPRegen set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/remove.mcfunction index 9deb71f26..f0eb24c51 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/mp_regen/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.MPRegen function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MPRegen set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/add.mcfunction index 77c5a50f2..dd6a80a4e 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/add.mcfunction @@ -14,9 +14,11 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.ReceiveHeal[-1].Amount set from storage api: Argument.Amount data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.ReceiveHeal[-1].Operation set from storage api: Argument.Operation # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.ReceiveHeal data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.ReceiveHeal function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.ReceiveHeal set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: Modifier + data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/remove.mcfunction index 62dc29fd4..8875f00b4 100644 --- a/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/core/receive_heal/remove.mcfunction @@ -17,8 +17,10 @@ data modify storage api: Modifiers set from storage api: NewModifiers data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.ReceiveHeal set from storage api: Modifiers # データの更新 + data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Base.ReceiveHeal function api:modifier/core/common/update_modifier/ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.ReceiveHeal set from storage api: Modifier # リセット + data remove storage api: Base data remove storage api: Modifiers - data remove storage api: NewModifiers + data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/base/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/base/add.mcfunction index 800651fd2..f28143d2a 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/base/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/base/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/base/remove.mcfunction index b6168e575..4480d52b9 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/base/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/base/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/defense/base/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/fire/add.mcfunction index c899b41ad..868e284dc 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/fire/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/fire/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/fire/remove.mcfunction index 6c2be453b..66dfa852d 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/fire/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/fire/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/defense/fire/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/magic/add.mcfunction index 346ece945..348ff22a0 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/magic/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/magic/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/magic/remove.mcfunction index 974f95304..ffb421eee 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/magic/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/magic/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/defense/magic/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/physical/add.mcfunction index 7aad4e080..1436b7767 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/physical/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/physical/add.mcfunction @@ -11,5 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation - \ No newline at end of file + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/physical/remove.mcfunction index eeed9ff78..944b5392d 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/physical/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/physical/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/defense/physical/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/thunder/add.mcfunction index def9dfda5..dd56c56d9 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/thunder/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/thunder/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/thunder/remove.mcfunction index 466220de5..d7bbd0a08 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/thunder/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/thunder/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/defense/thunder/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/water/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/water/add.mcfunction index 65258a97d..006f7da7d 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/water/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/water/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/defense/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/defense/water/remove.mcfunction index 077cd55d9..b77673bc4 100644 --- a/TheSkyBlessing/data/api/functions/modifier/defense/water/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/defense/water/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/defense/water/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/heal/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/heal/add.mcfunction index 9d2a0047a..e144704e5 100644 --- a/TheSkyBlessing/data/api/functions/modifier/heal/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/heal/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/heal/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/heal/remove.mcfunction index edcce8153..71a43dbc2 100644 --- a/TheSkyBlessing/data/api/functions/modifier/heal/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/heal/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/heal/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/max_health/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/max_health/add.mcfunction new file mode 100644 index 000000000..75e7f55d5 --- /dev/null +++ b/TheSkyBlessing/data/api/functions/modifier/max_health/add.mcfunction @@ -0,0 +1,13 @@ +#> api:modifier/max_health/add +# @api + +# データ検証 + function api:modifier/core/common/validate +# データが正しいなら入れる + execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:modifier/core/max_health/add +# データ代入 + execute store result score @s ScoreToMaxHealth run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxHealth 10000 +# リセット + data remove storage api: Argument.Amount + data remove storage api: Argument.Operation + data remove storage api: Argument.UUID diff --git a/TheSkyBlessing/data/api/functions/modifier/max_health/get.mcfunction b/TheSkyBlessing/data/api/functions/modifier/max_health/get.mcfunction new file mode 100644 index 000000000..b6bc803b4 --- /dev/null +++ b/TheSkyBlessing/data/api/functions/modifier/max_health/get.mcfunction @@ -0,0 +1,6 @@ +#> api:modifier/max_health/get +# @api + +function oh_my_dat:please +data remove storage api: Return.MaxHealth +data modify storage api: Return.MaxHealth set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxHealth diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/max_health/remove.mcfunction similarity index 55% rename from TheSkyBlessing/data/api/functions/player_modifier/attack/magic/remove.mcfunction rename to TheSkyBlessing/data/api/functions/modifier/max_health/remove.mcfunction index 28f35084d..80eaf6010 100644 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/max_health/remove.mcfunction @@ -1,12 +1,11 @@ -#> api:player_modifier/attack/magic/remove -# -# -# +#> api:modifier/max_health/remove # @api # データ検証 execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] # データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/attack/magic/remove + execute if data storage api: Argument.UUID run function api:modifier/core/max_health/remove +# データ代入 + execute store result score @s ScoreToMaxHealth run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxHealth 10000 # リセット - data remove storage api: Argument.UUID \ No newline at end of file + data remove storage api: Argument.UUID diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/max_mp/add.mcfunction similarity index 68% rename from TheSkyBlessing/data/api/functions/player_modifier/attack/fire/add.mcfunction rename to TheSkyBlessing/data/api/functions/modifier/max_mp/add.mcfunction index 220d4528a..10f4ea0b4 100644 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/max_mp/add.mcfunction @@ -1,13 +1,15 @@ -#> api:player_modifier/attack/fire/add +#> api:modifier/max_mp/add # # # # @api # データ検証 - function api:player_modifier/core/common/validate + function api:modifier/core/common/validate # データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/attack/fire/add + execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:modifier/core/max_mp/add +# データ代入 + function api:mp/update_max # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount diff --git a/TheSkyBlessing/data/api/functions/modifier/max_mp/get.mcfunction b/TheSkyBlessing/data/api/functions/modifier/max_mp/get.mcfunction new file mode 100644 index 000000000..bab69c81c --- /dev/null +++ b/TheSkyBlessing/data/api/functions/modifier/max_mp/get.mcfunction @@ -0,0 +1,9 @@ +#> api:modifier/max_mp/get +# +# +# +# @api + +function oh_my_dat:please +data remove storage api: Return.MaxMP +execute store result storage api: Return.MaxMP double 1 run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxMP \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/heal/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/max_mp/remove.mcfunction similarity index 72% rename from TheSkyBlessing/data/api/functions/player_modifier/heal/remove.mcfunction rename to TheSkyBlessing/data/api/functions/modifier/max_mp/remove.mcfunction index e7a93c8a6..4ed95c456 100644 --- a/TheSkyBlessing/data/api/functions/player_modifier/heal/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/max_mp/remove.mcfunction @@ -1,4 +1,4 @@ -#> api:player_modifier/heal/remove +#> api:modifier/max_mp/remove # # # @@ -7,6 +7,6 @@ # データ検証 execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] # データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/heal/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file + execute if data storage api: Argument.UUID run function api:modifier/core/max_mp/remove +# データ代入 + function api:mp/update_max \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/mp_regen/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/mp_regen/add.mcfunction index 1df682b5a..a79d08bc8 100644 --- a/TheSkyBlessing/data/api/functions/modifier/mp_regen/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/mp_regen/add.mcfunction @@ -11,5 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation - \ No newline at end of file + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/mp_regen/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/mp_regen/remove.mcfunction index 195c0ca1b..7d3d0c653 100644 --- a/TheSkyBlessing/data/api/functions/modifier/mp_regen/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/mp_regen/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/mp_regen/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/receive_heal/add.mcfunction b/TheSkyBlessing/data/api/functions/modifier/receive_heal/add.mcfunction index 6d05b0954..6e7ad0ab2 100644 --- a/TheSkyBlessing/data/api/functions/modifier/receive_heal/add.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/receive_heal/add.mcfunction @@ -11,4 +11,4 @@ # リセット data remove storage api: Argument.UUID data remove storage api: Argument.Amount - data remove storage api: Argument.Operation + data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/modifier/receive_heal/remove.mcfunction b/TheSkyBlessing/data/api/functions/modifier/receive_heal/remove.mcfunction index cf2e2b35d..066820f4a 100644 --- a/TheSkyBlessing/data/api/functions/modifier/receive_heal/remove.mcfunction +++ b/TheSkyBlessing/data/api/functions/modifier/receive_heal/remove.mcfunction @@ -9,4 +9,4 @@ # データが正しいなら消す execute if data storage api: Argument.UUID run function api:modifier/core/receive_heal/remove # リセット - data remove storage api: Argument.UUID + data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/mp/update_max.mcfunction b/TheSkyBlessing/data/api/functions/mp/update_max.mcfunction new file mode 100644 index 000000000..d34029c10 --- /dev/null +++ b/TheSkyBlessing/data/api/functions/mp/update_max.mcfunction @@ -0,0 +1,16 @@ +#> api:mp/update_max +# +# プレイヤーの最大MPを更新します。 +# +# @input +# as player +# storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxMP +# @output +# score @s MPMax +# @api + +# Storage呼び出し + function oh_my_dat:please +# 最大MP変更 + execute store result score @s MPMax run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MaxMP 1 + scoreboard players operation @s MPMax > $0 Const \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/_index.d.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/_index.d.mcfunction deleted file mode 100644 index 40b512694..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/_index.d.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/_index.d -# @private - -#> Temp -# @within function api:player_modifier/core/common/update_modifier/* - #declare score_holder $Add - #declare score_holder $MultiplyBase - #declare score_holder $Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/base/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/base/add.mcfunction deleted file mode 100644 index 74767c427..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/base/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/attack/base/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/attack/base/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/base/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/base/get.mcfunction deleted file mode 100644 index c8be3cd94..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/base/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/attack/base/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Attack.Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Base \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/base/remove.mcfunction deleted file mode 100644 index a640c0d64..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/base/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/attack/base/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/attack/base/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/get.mcfunction deleted file mode 100644 index 0297bc3e5..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/attack/fire/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Attack.Fire set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Fire \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/remove.mcfunction deleted file mode 100644 index b8ca6a8ee..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/fire/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/attack/fire/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/attack/fire/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/add.mcfunction deleted file mode 100644 index de1051382..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/attack/magic/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/attack/magic/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/get.mcfunction deleted file mode 100644 index 10bf38921..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/magic/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/attack/magic/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Attack.Magic set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Magic \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/add.mcfunction deleted file mode 100644 index d46f7f107..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/attack/physical/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/attack/physical/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/get.mcfunction deleted file mode 100644 index 3a9e97928..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/attack/physical/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Attack.Physical set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Physical \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/remove.mcfunction deleted file mode 100644 index f3a43adf5..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/physical/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/attack/physical/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/attack/physical/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/add.mcfunction deleted file mode 100644 index ce8f6232e..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/attack/thunder/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/attack/thunder/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/get.mcfunction deleted file mode 100644 index a7b889715..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/attack/thunder/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Attack.Thunder set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Thunder \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/remove.mcfunction deleted file mode 100644 index 11ffe8d51..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/thunder/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/attack/thunder/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/attack/thunder/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/water/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/water/add.mcfunction deleted file mode 100644 index c3b48409f..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/water/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/attack/water/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/attack/water/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/water/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/water/get.mcfunction deleted file mode 100644 index 59b619512..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/water/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/attack/water/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Attack.Water set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Water \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/attack/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/attack/water/remove.mcfunction deleted file mode 100644 index c86e22f19..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/attack/water/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/attack/water/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/attack/water/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/base/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/base/add.mcfunction deleted file mode 100644 index 78b0e740e..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/base/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/attack/base/add -# -# -# -# @within function api:player_modifier/attack/base/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Base - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Base set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/fire/add.mcfunction deleted file mode 100644 index 5792ae26b..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/fire/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/attack/fire/add -# -# -# -# @within function api:player_modifier/attack/fire/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Fire set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/fire/remove.mcfunction deleted file mode 100644 index 70adedda3..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/fire/remove.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> api:player_modifier/core/attack/fire/remove -# -# -# -# @within function api:player_modifier/attack/fire/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Fire set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Fire set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/magic/add.mcfunction deleted file mode 100644 index 4e3051003..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/magic/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/attack/magic/add -# -# -# -# @within function api:player_modifier/attack/magic/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Magic - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Magic set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/physical/add.mcfunction deleted file mode 100644 index 89adc6a48..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/physical/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/attack/physical/add -# -# -# -# @within function api:player_modifier/attack/physical/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Physical set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/physical/remove.mcfunction deleted file mode 100644 index 6a8573861..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/physical/remove.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> api:player_modifier/core/attack/physical/remove -# -# -# -# @within function api:player_modifier/attack/physical/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Physical set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Physical set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/thunder/add.mcfunction deleted file mode 100644 index 3882dfc9f..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/thunder/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/attack/thunder/add -# -# -# -# @within function api:player_modifier/attack/thunder/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Thunder set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/thunder/remove.mcfunction deleted file mode 100644 index 409324054..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/thunder/remove.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> api:player_modifier/core/attack/thunder/remove -# -# -# -# @within function api:player_modifier/attack/thunder/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Thunder set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Thunder set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/water/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/water/add.mcfunction deleted file mode 100644 index fada09969..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/water/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/attack/water/add -# -# -# -# @within function api:player_modifier/attack/water/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Water set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/attack/water/remove.mcfunction deleted file mode 100644 index 90e996333..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/attack/water/remove.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> api:player_modifier/core/attack/water/remove -# -# -# -# @within function api:player_modifier/attack/water/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Attack.Water set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Attack.Water set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/common/remove_modifier.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/common/remove_modifier.mcfunction deleted file mode 100644 index 88e57f7cb..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/common/remove_modifier.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/common/remove_modifier -# -# -# -# @within function -# api:player_modifier/**/remove -# api:player_modifier/core/common/remove_modifier - -#> Temp -# @private - #declare score_holder $isSuccess - -# 比較用にコピー - data modify storage api: UUID set from storage api: Argument.UUID -# 比較 - execute store success score $isSuccess Temporary run data modify storage api: UUID set from storage api: Modifiers[-1].UUID -# 同じ場合はRemoveに設定する - execute if score $isSuccess Temporary matches 0 run data modify storage api: Removed set from storage api: Modifiers[-1] -# 違う場合は新しい配列に追加 - execute if score $isSuccess Temporary matches 1 run data modify storage api: NewModifiers append from storage api: Modifiers[-1] -# リストから削除 - data remove storage api: Modifiers[-1] -# リセット - scoreboard players reset $isSuccess Temporary -# 要素が残ってたら再帰 - execute if data storage api: Modifiers[0] run function api:player_modifier/core/common/remove_modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/.mcfunction deleted file mode 100644 index 899642277..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/.mcfunction +++ /dev/null @@ -1,28 +0,0 @@ -#> api:player_modifier/core/common/update_modifier/ -# -# -# -# @within function api:player_modifier/core/** - -# Modifiersに補正の配列が入ってるので1dをデフォルト値として計算する、その後Modifierに戻す -# 処理としては最初にModifiersをforEachしてOperation毎に別の配列にする、そのあと順番に処理する - -# Operation毎に分離する - function api:player_modifier/core/common/update_modifier/separate_modifiers -# デフォルト値の設定 - scoreboard players set $Modifier Temporary 1000 -# Addの処理 - scoreboard players operation $Modifier Temporary += $Add Temporary -# MultiplyBaseの処理 - scoreboard players add $MultiplyBase Temporary 1000 - scoreboard players operation $Modifier Temporary *= $MultiplyBase Temporary - scoreboard players operation $Modifier Temporary /= $1000 Const -# Multiplyの処理 - execute if data storage api: Multiples[0] run function api:player_modifier/core/common/update_modifier/multiples -# ストレージに戻す - execute store result storage api: Modifier double 0.001 run scoreboard players get $Modifier Temporary -# リセット - scoreboard players reset $Add Temporary - scoreboard players reset $Modifier Temporary - scoreboard players reset $MultiplyBase Temporary - scoreboard players reset $Temp Temporary \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/multiples.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/multiples.mcfunction deleted file mode 100644 index 73f8841bf..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/multiples.mcfunction +++ /dev/null @@ -1,25 +0,0 @@ -#> api:player_modifier/core/common/update_modifier/multiples -# -# -# -# @within function -# api:player_modifier/core/common/update_modifier/ -# api:player_modifier/core/common/update_modifier/multiples - -#> Temp -# @private - #declare score_holder $Multiply - -# Multiply値を取得 - execute store result score $Multiply Temporary run data get storage api: Multiples[-1] 1000 -# ベース分1.0追加 - scoreboard players add $Multiply Temporary 1000 -# 乗算する - scoreboard players operation $Modifier Temporary *= $Multiply Temporary - scoreboard players operation $Modifier Temporary /= $1000 Const -# 最後の要素を削除する - data remove storage api: Multiples[-1] -# リセット - scoreboard players reset $Multiply Temporary -# 要素がまだあったら再帰する - execute if data storage api: Multiples[0] run function api:player_modifier/core/common/update_modifier/multiples \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/separate_modifiers.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/separate_modifiers.mcfunction deleted file mode 100644 index bf1a9d9b6..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/common/update_modifier/separate_modifiers.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/common/update_modifier/separate_modifiers -# -# -# -# @within function -# api:player_modifier/core/common/update_modifier/ -# api:player_modifier/core/common/update_modifier/separate_modifiers - -#> Temp -# @private - #declare score_holder $Temp - -# おのれもやんで直接参照(Modifiers[-1]{Operation:"~"})が出来ないので移す - data modify storage api: Op set from storage api: Modifiers[-1].Operation -# Operationを見て別に配列に移す - execute if data storage api: {Op:"add"} store result score $Temp Temporary run data get storage api: Modifiers[-1].Amount 1000 - execute if data storage api: {Op:"add"} run scoreboard players operation $Add Temporary += $Temp Temporary - execute if data storage api: {Op:"multiply_base"} store result score $Temp Temporary run data get storage api: Modifiers[-1].Amount 1000 - execute if data storage api: {Op:"multiply_base"} run scoreboard players operation $MultiplyBase Temporary += $Temp Temporary - execute if data storage api: {Op:"multiply"} run data modify storage api: Multiples append from storage api: Modifiers[-1].Amount -# 最後の要素を削除 - data remove storage api: Modifiers[-1] -# リセット - data remove storage api: Op -# 要素がまだあったら再帰する - execute if data storage api: Modifiers[0] run function api:player_modifier/core/common/update_modifier/separate_modifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/common/validate.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/common/validate.mcfunction deleted file mode 100644 index 73da4058f..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/common/validate.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> api:player_modifier/core/common/validate -# -# -# -# @within function api:player_modifier/**/add - -execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -execute unless data storage api: Argument.Amount run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" Amount","color":"red"}] -execute unless data storage api: Argument.Operation run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" Operation","color":"red"}] \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/base/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/base/add.mcfunction deleted file mode 100644 index 28ab8915b..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/base/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/defense/base/add -# -# -# -# @within function api:player_modifier/defense/base/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base[-1].UUID set from storage api: Argument.UUID - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Base set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/base/remove.mcfunction deleted file mode 100644 index d756f26f5..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/base/remove.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/defense/base/remove -# -# -# -# @within function api:player_modifier/defense/base/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 削除されたデータの加工 - execute store result storage api: Removed.Amount double -0.001 run data get storage api: Removed.Amount 1000 -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Base set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Base set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/fire/add.mcfunction deleted file mode 100644 index 70f52f267..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/fire/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/defense/fire/add -# -# -# -# @within function api:player_modifier/defense/fire/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire[-1].UUID set from storage api: Argument.UUID - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Fire set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/fire/remove.mcfunction deleted file mode 100644 index ff701d2fc..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/fire/remove.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/defense/fire/remove -# -# -# -# @within function api:player_modifier/defense/fire/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 削除されたデータの加工 - execute store result storage api: Removed.Amount double -0.001 run data get storage api: Removed.Amount 1000 -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Fire set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Fire set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/magic/add.mcfunction deleted file mode 100644 index e59655d68..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/magic/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/defense/magic/add -# -# -# -# @within function api:player_modifier/defense/magic/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic[-1].UUID set from storage api: Argument.UUID - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Magic set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/magic/remove.mcfunction deleted file mode 100644 index f48252a83..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/magic/remove.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/defense/magic/remove -# -# -# -# @within function api:player_modifier/defense/magic/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 削除されたデータの加工 - execute store result storage api: Removed.Amount double -0.001 run data get storage api: Removed.Amount 1000 -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Magic set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Magic set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/physical/add.mcfunction deleted file mode 100644 index b0ab11f13..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/physical/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/defense/physical/add -# -# -# -# @within function api:player_modifier/defense/physical/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical[-1].UUID set from storage api: Argument.UUID - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Physical set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/physical/remove.mcfunction deleted file mode 100644 index 2d13e41e7..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/physical/remove.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/defense/physical/remove -# -# -# -# @within function api:player_modifier/defense/physical/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 削除されたデータの加工 - execute store result storage api: Removed.Amount double -0.001 run data get storage api: Removed.Amount 1000 -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Physical set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Physical set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/thunder/add.mcfunction deleted file mode 100644 index fe5636a21..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/thunder/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/defense/thunder/add -# -# -# -# @within function api:player_modifier/defense/thunder/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder[-1].UUID set from storage api: Argument.UUID - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Thunder set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/thunder/remove.mcfunction deleted file mode 100644 index 0049649ff..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/thunder/remove.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/defense/thunder/remove -# -# -# -# @within function api:player_modifier/defense/thunder/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 削除されたデータの加工 - execute store result storage api: Removed.Amount double -0.001 run data get storage api: Removed.Amount 1000 -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Thunder set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Thunder set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/water/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/water/add.mcfunction deleted file mode 100644 index 5864ff53e..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/water/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/defense/water/add -# -# -# -# @within function api:player_modifier/defense/water/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water[-1].UUID set from storage api: Argument.UUID - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water[-1].Amount double -0.001 run data get storage api: Argument.Amount 1000 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Water set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/defense/water/remove.mcfunction deleted file mode 100644 index 4f447bf4c..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/defense/water/remove.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> api:player_modifier/core/defense/water/remove -# -# -# -# @within function api:player_modifier/defense/water/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 削除されたデータの加工 - execute store result storage api: Removed.Amount double -0.001 run data get storage api: Removed.Amount 1000 -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Defense.Water set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Water set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/heal/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/heal/add.mcfunction deleted file mode 100644 index 5007c8656..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/heal/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/heal/add -# -# -# -# @within function api:player_modifier/heal/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Heal set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/heal/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/heal/remove.mcfunction deleted file mode 100644 index 236c9fa81..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/heal/remove.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> api:player_modifier/core/heal/remove -# -# -# -# @within function api:player_modifier/heal/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.Heal set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Heal set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/mp_regen/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/mp_regen/add.mcfunction deleted file mode 100644 index a790f6b4e..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/mp_regen/add.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -#> api:player_modifier/core/mp_regen/add -# -# -# -# @within function api:player_modifier/mp_regen/add - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen set value [] -# 追加する - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen append value {} - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen[-1].UUID set from storage api: Argument.UUID - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen[-1].Amount set from storage api: Argument.Amount - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen[-1].Operation set from storage api: Argument.Operation -# データの更新 - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MPRegen set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: Modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/core/mp_regen/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/core/mp_regen/remove.mcfunction deleted file mode 100644 index 0ee27e049..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/core/mp_regen/remove.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> api:player_modifier/core/mp_regen/remove -# -# -# -# @within function api:player_modifier/mp_regen/remove - -# UserStorage呼び出し - function oh_my_dat:please -# 無ければ入れる - data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen -# 配列の初期化 - data modify storage api: NewModifiers set value [] - data remove storage api: Removed -# フィルタ - function api:player_modifier/core/common/remove_modifier -# 新しい配列を戻す - data modify storage api: Modifiers set from storage api: NewModifiers - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Modifier.MPRegen set from storage api: Modifiers -# データの更新 - function api:player_modifier/core/common/update_modifier/ - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MPRegen set from storage api: Modifier -# リセット - data remove storage api: Modifiers - data remove storage api: NewModifiers \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/base/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/base/add.mcfunction deleted file mode 100644 index 86fae377f..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/base/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/defense/base/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/defense/base/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/base/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/base/get.mcfunction deleted file mode 100644 index d1433e34e..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/base/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/defense/base/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Defense.Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Base \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/base/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/base/remove.mcfunction deleted file mode 100644 index d2016c151..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/base/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/defense/base/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/defense/base/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/add.mcfunction deleted file mode 100644 index d6a31e78d..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/defense/fire/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/defense/fire/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/get.mcfunction deleted file mode 100644 index f83638a5a..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/defense/fire/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Defense.Fire set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Fire \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/remove.mcfunction deleted file mode 100644 index c0da0ad3a..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/fire/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/defense/fire/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/defense/fire/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/add.mcfunction deleted file mode 100644 index 2e73b0e92..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/defense/magic/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/defense/magic/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/get.mcfunction deleted file mode 100644 index d19b91a7a..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/defense/magic/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Defense.Magic set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Magic \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/remove.mcfunction deleted file mode 100644 index 4a7992dca..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/magic/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/defense/magic/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/defense/magic/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/add.mcfunction deleted file mode 100644 index 44cde64b4..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/defense/physical/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/defense/physical/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/get.mcfunction deleted file mode 100644 index 36949f2eb..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/defense/physical/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Defense.Physical set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Physical \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/remove.mcfunction deleted file mode 100644 index 1a45bf3d4..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/physical/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/defense/physical/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/defense/physical/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/add.mcfunction deleted file mode 100644 index e2fc40458..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/defense/thunder/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/defense/thunder/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/get.mcfunction deleted file mode 100644 index f341b3e00..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/defense/thunder/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Defense.Thunder set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Thunder \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/remove.mcfunction deleted file mode 100644 index 083401e48..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/thunder/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/defense/thunder/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/defense/thunder/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/water/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/water/add.mcfunction deleted file mode 100644 index 40bce9b9b..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/water/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/defense/water/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/defense/water/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/water/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/water/get.mcfunction deleted file mode 100644 index 4794fd416..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/water/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/defense/water/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Defense.Water set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense.Water \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/defense/water/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/defense/water/remove.mcfunction deleted file mode 100644 index 3276a1700..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/defense/water/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/defense/water/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/defense/water/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/heal/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/heal/add.mcfunction deleted file mode 100644 index f02177811..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/heal/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/heal/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/heal/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/heal/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/heal/get.mcfunction deleted file mode 100644 index 51b8ba64c..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/heal/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/heal/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.Heal set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Heal \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/add.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/add.mcfunction deleted file mode 100644 index 8d97e966d..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/add.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> api:player_modifier/mp_regen/add -# -# -# -# @api - -# データ検証 - function api:player_modifier/core/common/validate -# データが正しいなら入れる - execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:player_modifier/core/mp_regen/add -# リセット - data remove storage api: Argument.UUID - data remove storage api: Argument.Amount - data remove storage api: Argument.Operation \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/get.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/get.mcfunction deleted file mode 100644 index 5e6798ef2..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/get.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> api:player_modifier/mp_regen/get -# -# -# -# @api - -function oh_my_dat:please -data modify storage api: Return.MPRegen set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MPRegen \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/remove.mcfunction b/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/remove.mcfunction deleted file mode 100644 index ee1711574..000000000 --- a/TheSkyBlessing/data/api/functions/player_modifier/mp_regen/remove.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> api:player_modifier/mp_regen/remove -# -# -# -# @api - -# データ検証 - execute unless data storage api: Argument.UUID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません","color":"white"},{"text":" UUID","color":"red"}] -# データが正しいなら消す - execute if data storage api: Argument.UUID run function api:player_modifier/core/mp_regen/remove -# リセット - data remove storage api: Argument.UUID \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/rom/please.mcfunction b/TheSkyBlessing/data/api/functions/rom/please.mcfunction index 6d14ac395..55bdabf35 100644 --- a/TheSkyBlessing/data/api/functions/rom/please.mcfunction +++ b/TheSkyBlessing/data/api/functions/rom/please.mcfunction @@ -16,4 +16,4 @@ # リセット data remove storage api: Argument.Address scoreboard players reset $Address Temporary - scoreboard players reset $LatestProvidedAddress Global + scoreboard players reset $LatestProvidedAddress Global \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/easy.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/easy.json index 40f2c8988..96c966a88 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/easy.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/easy.json @@ -9,4 +9,4 @@ "score": "Global" }, "range": 1 -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/hard.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/hard.json index 4035fedf2..24ab95356 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/hard.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/hard.json @@ -9,4 +9,4 @@ "score": "Global" }, "range": 3 -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/hard.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/hard.json index 642faf972..32b8494b8 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/hard.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/hard.json @@ -11,4 +11,4 @@ "range": { "max": 3 } -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/normal.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/normal.json index c82a32d74..cb91623b7 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/normal.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/max/normal.json @@ -11,4 +11,4 @@ "range": { "max": 2 } -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/hard.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/hard.json index 8a0325999..9d40ba563 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/hard.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/hard.json @@ -11,4 +11,4 @@ "range": { "min": 3 } -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/normal.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/normal.json index 831ad488f..3eb94fa00 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/normal.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/normal.json @@ -11,4 +11,4 @@ "range": { "min": 2 } -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/over_difficulty.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/over_difficulty.json index 718fdb415..9f9259b3e 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/over_difficulty.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/min/over_difficulty.json @@ -11,4 +11,4 @@ "range": { "min": 4 } -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/normal.json b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/normal.json index ce218233e..885083620 100644 --- a/TheSkyBlessing/data/api/predicates/global_vars/difficulty/normal.json +++ b/TheSkyBlessing/data/api/predicates/global_vars/difficulty/normal.json @@ -9,4 +9,4 @@ "score": "Global" }, "range": 2 -} +} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction index fa00d3aa6..eb3ecccea 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction @@ -3,12 +3,13 @@ #> ReturnTag # @within function -# asset:artifact/*/*/2.check_condition -# asset:artifact/*/*/2.check_condition/** +# asset:artifact/*/**check_condition +# asset:artifact/*/**check_condition/** # asset_manager:artifact/check/ # asset:artifact/common/use/* #declare tag CanUsed #> 処理用一時storage -# @within * asset:** +# @within * +# asset*:** #declare storage asset:temp \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction index 3224b7567..e36c50c42 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'auto' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction index 9f3235c90..448ab0d36 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'chest' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction index e9923184d..a7b92f089 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'feet' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction index fae76193e..1ef82d3f5 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'head' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction index ff7a3a2c4..3a6aebe25 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'hotbar' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction index 9a955612e..98201a5c0 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'legs' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction index 28001a2e6..c6ab3019c 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction @@ -6,7 +6,8 @@ # # @input as player # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'mainhand' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction index 2f6aa94f6..529723010 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction @@ -5,7 +5,8 @@ # 発動可能な場合実行者に`CanUsed`のtagが付与されます。 # # @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition +# @within function asset:artifact/*/**check_condition data modify storage asset:artifact TargetSlot set value 'offhand' -function asset_manager:artifact/check/ \ No newline at end of file +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/check/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction index c60914a66..7c8453943 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction @@ -21,6 +21,7 @@ # DisableCooldownMessage? : boolean # DisableMPMessage? : boolean # CanUsedGod : God[] +# CustomNBT? : Component # @output item 神器 # @within function asset:artifact/*/give/2.give @@ -28,6 +29,9 @@ # @private #declare score_holder $InvSize +# Triggerの並列化 + execute unless data storage asset:artifact Triggers[0] run function asset:artifact/common/trigger/migrate + # storage検証 execute unless data storage asset:artifact ID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" ID","color":"red"}] execute unless data storage asset:artifact Item run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Item","color":"red"}] @@ -35,9 +39,10 @@ execute unless data storage asset:artifact Lore run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Lore","color":"red"}] # execute unless data storage asset:artifact RemainingCount run execute unless data storage asset:artifact RemainingCountMax if data storage asset:artifact RemainingCount run data modify storage asset:artifact RemainingCountMax set from storage asset:artifact RemainingCount - execute unless data storage asset:artifact Slot run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Slot","color":"red"}] - execute unless data storage asset:artifact Trigger run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Trigger","color":"red"}] - execute unless data storage asset:artifact MPCost run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" MPCost","color":"red"}] + execute unless data storage asset:artifact Triggers[0] run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Triggers","color":"red"}] + execute if data storage asset:artifact Triggers[0] run data modify storage asset:temp Triggers set from storage asset:artifact Triggers + execute if data storage asset:artifact Triggers[0] run function asset:artifact/common/trigger/check + execute if data storage asset:artifact Triggers[0] run data remove storage asset:temp Triggers execute unless data storage asset:artifact CanUsedGod run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" CanUsedGod","color":"red"}] # 各データ設定 function asset_manager:artifact/create/set_data @@ -61,16 +66,6 @@ data remove storage asset:artifact Lore data remove storage asset:artifact RemainingCount data remove storage asset:artifact RemainingCountMax - data remove storage asset:artifact Slot - data remove storage asset:artifact Trigger - data remove storage asset:artifact Condition - data remove storage asset:artifact AttackInfo - data remove storage asset:artifact MPCost - data remove storage asset:artifact MPRequire - data remove storage asset:artifact CostText + data remove storage asset:artifact Triggers data remove storage asset:artifact CanUsedGod - data remove storage asset:artifact CustomNBT - data remove storage asset:artifact LocalCooldown - data remove storage asset:artifact SpecialCooldown - data remove storage asset:artifact DisableCooldownMessage - data remove storage asset:artifact DisableMPMessage \ No newline at end of file + data remove storage asset:artifact CustomNBT \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/trigger/check.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/trigger/check.mcfunction new file mode 100644 index 000000000..248cdf7e3 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/common/trigger/check.mcfunction @@ -0,0 +1,21 @@ +#> asset:artifact/common/trigger/check +# @within function +# asset:artifact/common/give +# asset:artifact/common/trigger/check + +# validate + execute unless data storage asset:temp Triggers[0].Slot run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Slot","color":"red"}] + execute unless data storage asset:temp Triggers[0].Trigger run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Trigger","color":"red"}] + # execute unless data storage asset:temp Triggers[0].Condition run + # execute unless data storage asset:temp Triggers[0].AttackInfo run + execute unless data storage asset:temp Triggers[0].MPCost run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" MPCost","color":"red"}] + # execute unless data storage asset:temp Triggers[0].MPRequire run + # execute unless data storage asset:temp Triggers[0].CostText run + # execute unless data storage asset:temp Triggers[0].LocalCooldown run + # execute unless data storage asset:temp Triggers[0].SpecialCooldown run + # execute unless data storage asset:temp Triggers[0].DisableCooldownMessage run + # execute unless data storage asset:temp Triggers[0].DiableMPMessage run + +# loop + data remove storage asset:temp Triggers[0] + execute if data storage asset:temp Triggers[0] run function asset:artifact/common/trigger/check \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/trigger/migrate.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/trigger/migrate.mcfunction new file mode 100644 index 000000000..0ea49fe93 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/common/trigger/migrate.mcfunction @@ -0,0 +1,42 @@ +#> asset:artifact/common/trigger/migrate +# @within function asset:artifact/common/give + +# validate + execute unless data storage asset:artifact Slot run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Slot","color":"red"}] + execute unless data storage asset:artifact Trigger run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Trigger","color":"red"}] + # execute unless data storage asset:artifact Condition run + # execute unless data storage asset:artifact AttackInfo run + execute unless data storage asset:artifact MPCost run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" MPCost","color":"red"}] + # execute unless data storage asset:artifact MPRequire run + # execute unless data storage asset:artifact CostText run + # execute unless data storage asset:artifact LocalCooldown run + # execute unless data storage asset:artifact SpecialCooldown run + # execute unless data storage asset:artifact DisableCooldownMessage run + # execute unless data storage asset:artifact DiableMPMessage run + +# migrate + data modify storage asset:artifact Triggers append value {} + data modify storage asset:artifact Triggers[0].Slot set from storage asset:artifact Slot + data modify storage asset:artifact Triggers[0].Trigger set from storage asset:artifact Trigger + data modify storage asset:artifact Triggers[0].Condition set from storage asset:artifact Condition + data modify storage asset:artifact Triggers[0].AttackInfo set from storage asset:artifact AttackInfo + data modify storage asset:artifact Triggers[0].MPCost set from storage asset:artifact MPCost + data modify storage asset:artifact Triggers[0].MPRequire set from storage asset:artifact MPRequire + data modify storage asset:artifact Triggers[0].CostText set from storage asset:artifact CostText + data modify storage asset:artifact Triggers[0].LocalCooldown set from storage asset:artifact LocalCooldown + data modify storage asset:artifact Triggers[0].SpecialCooldown set from storage asset:artifact SpecialCooldown + data modify storage asset:artifact Triggers[0].DisableCooldownMessage set from storage asset:artifact DisableCooldownMessage + data modify storage asset:artifact Triggers[0].DisableMPMessage set from storage asset:artifact DisableMPMessage + +# reset + data remove storage asset:artifact Slot + data remove storage asset:artifact Trigger + data remove storage asset:artifact Condition + data remove storage asset:artifact AttackInfo + data remove storage asset:artifact MPCost + data remove storage asset:artifact MPRequire + data remove storage asset:artifact CostText + data remove storage asset:artifact LocalCooldown + data remove storage asset:artifact SpecialCooldown + data remove storage asset:artifact DisableCooldownMessage + data remove storage asset:artifact DisableMPMessage diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction index 30eff10b0..68c6ccf73 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction @@ -2,8 +2,9 @@ # # 神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'auto' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction index f1d6b7467..11683f67c 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction @@ -2,8 +2,9 @@ # # チェストプレートの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'chest' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction index 1c0b80e92..036690baf 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction @@ -2,8 +2,9 @@ # # ブーツの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'feet' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction index bae73d00a..3216cd0b4 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction @@ -2,8 +2,9 @@ # # ヘルメットの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'head' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction index 4050d05af..84420e81a 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction @@ -2,8 +2,9 @@ # # チェストプレートの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'hotbar' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction index e46b6e4b0..69d702fdf 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction @@ -2,8 +2,9 @@ # # レギンスの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'legs' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction index a19ebaa02..15b3472db 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction @@ -2,8 +2,9 @@ # # メインハンドの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'mainhand' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction index cf0da3414..c5ec2cede 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction @@ -2,8 +2,9 @@ # # オフハンドの神器の使用時共通処理を実行します # -# @within function asset:artifact/*/*/3.main +# @within function asset:artifact/*/**main data modify storage asset:artifact TargetSlot set value 'offhand' -function asset_manager:artifact/use/ +execute unless data storage asset:artifact Index run data modify storage asset:artifact Index set value 0 +function asset_manager:artifact/use/ with storage asset:artifact tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/give/1.trigger.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/give/1.trigger.mcfunction index 52a294c13..7d2f54f7e 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/example/give/1.trigger.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/example/give/1.trigger.mcfunction @@ -4,4 +4,4 @@ # # @within tag/function asset:artifact/give -execute if data storage asset:context {id:2147483647} run function asset:artifact/example/give/2.give \ No newline at end of file +execute if data storage asset:context {id:65535} run function asset:artifact/example/give/2.give \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction index 8a2815a07..48461787b 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction @@ -7,21 +7,34 @@ # 神器の説明や消費MPなどをここで設定する。 # 最後にasset:artifact/common/giveを実行することで入手可能。 -data modify storage asset:artifact ID set value 2147483647 -data modify storage asset:artifact Item set value "minecraft:raw_gold" -data modify storage asset:artifact Name set value '{"text":"雷のブローチ","color":"yellow"}' -data modify storage asset:artifact Lore set value ['{"text":"攻撃を与えたとき、対象に"}','{"text":"現在体力に依存した割合攻撃を追加与える"}','{"text":""}'] +data modify storage asset:artifact ID set value 65535 +data modify storage asset:artifact Item set value "minecraft:stick" +data modify storage asset:artifact Name set value '{"text":"","extra":[{"text":"テスト君"},{"text":"二式","color":"yellow"}]}' +data modify storage asset:artifact Lore set value ['{"text":"Trigger並列化の先行版。"}','{"text":"これで神器のバリエーションが増えるといいな。"}'] # data modify storage asset:artifact CostText set value '{"text":""}' -data modify storage asset:artifact RemainingCount set value 50 -data modify storage asset:artifact Slot set value "hotbar" -data modify storage asset:artifact Trigger set value "onAttack" -# data modify storage asset:artifact Condition set value '{"text":""}' -# data modify storage asset:artifact AttackInfo set value {Damage:[0,0],AttackType:[Physical,Magic],ElementType:[Fire,Water,Thunder,None],BypassResist:1b,IsrangeAttack:never} -data modify storage asset:artifact MPCost set value 20 -# data modify storage asset:artifact MPRequire set value 100 -data modify storage asset:artifact LocalCooldown set value 40 -# data modify storage asset:artifact SpecialCooldown set value 5 -data modify storage asset:artifact CanUsedGod set value ["Flora","Nyaptov","Wi-ki"] +# data modify storage asset:artifact RemainingCount set value +data modify storage asset:artifact Triggers set value [] +# Trigger 0 + data modify storage asset:artifact Triggers append value {} + data modify storage asset:artifact Triggers[-1].Slot set value "mainhand" + data modify storage asset:artifact Triggers[-1].Trigger set value "onAttack" + # data modify storage asset:artifact Triggers[-1].Condition set value '{"text":""}' + data modify storage asset:artifact Triggers[-1].AttackInfo set value {Damage:["???"],AttackType:[Physical],ElementType:[None],BypassResist:1b,IsrangeAttack:never} + data modify storage asset:artifact Triggers[-1].MPCost set value 20 + # data modify storage asset:artifact Triggers[-1].MPRequire set value 100 + data modify storage asset:artifact Triggers[-1].LocalCooldown set value 15 + # data modify storage asset:artifact Triggers[-1].SpecialCooldown set value 5 +# Trigger 2 + data modify storage asset:artifact Triggers append value {} + data modify storage asset:artifact Triggers[-1].Slot set value "hotbar" + data modify storage asset:artifact Triggers[-1].Trigger set value "equipping" + # data modify storage asset:artifact Triggers[-1].Condition set value '{"text":""}' + # data modify storage asset:artifact Triggers[-1].AttackInfo set value {Damage:[0,0],AttackType:[Physical,Magic],ElementType:[Fire,Water,Thunder,None],BypassResist:1b,IsrangeAttack:never} + data modify storage asset:artifact Triggers[-1].MPCost set value 0 + # data modify storage asset:artifact Triggers[-1].MPRequire set value 100 + # data modify storage asset:artifact Triggers[-1].LocalCooldown set value 30 + # data modify storage asset:artifact Triggers[-1].SpecialCooldown set value 5 +data modify storage asset:artifact CanUsedGod set value "ALL" # data modify storage asset:artifact CustomNBT set value {Unbreakable:1b} function asset:artifact/common/give \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction deleted file mode 100644 index 7455ff4e0..000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/example/trigger/1.trigger -# -# 指定したイベントタイミングで実行されるfunction -# ここで自身の神器が判定をしてmain処理を呼び出す -# -# @within tag/function asset:artifact/** - -# storage asset:context idのfeet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する - execute if data storage asset:context id{hotbar:[2147483647]} run function asset:artifact/example/trigger/2.check_condition \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction deleted file mode 100644 index 2feb50a48..000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction +++ /dev/null @@ -1,32 +0,0 @@ -#> asset:artifact/example/trigger/3.main -# -# 神器のメイン処理部 -# -# @within function asset:artifact/example/trigger/2.check_condition - -#> health -# @private - #declare score_holder $Health - #declare score_holder $Count - -# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う - function asset:artifact/common/use/hotbar - -# ここから先は神器側の効果の処理を書く -# VFX - execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..70,limit=1] run particle dust 100000000 100000000 0 1 ~ ~1.5 ~ 0.05 1 0.05 0 150 - execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..70,limit=1] run playsound entity.lightning_bolt.impact player @a -# 個数を取得 - execute store result score $Count Temporary if data storage asset:context Items.hotbar[{tag:{TSB:{ID:2147483647}}}] -# ダメージ - scoreboard players operation $Health Temporary = @e[type=#lib:living,type=!player,tag=Victim,distance=..70,limit=1] MobHealth - scoreboard players operation $Count Temporary *= $5 Const - scoreboard players operation $Count Temporary += $10 Const - scoreboard players operation $Health Temporary *= $Count Temporary - execute store result storage lib: Argument.Damage float 0.0001 run scoreboard players get $Health Temporary -# ダメージ/その他の設定 - data modify storage lib: Argument.AttackType set value "Magic" - data modify storage lib: Argument.ElementType set value "Thunder" - data modify storage lib: Argument.FixedDamage set value 1b - function lib:damage/modifier - execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..70,limit=1] run function lib:damage/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/add_modifier.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/add_modifier.mcfunction new file mode 100644 index 000000000..a4cbaba6b --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/add_modifier.mcfunction @@ -0,0 +1,44 @@ +#> asset:artifact/example/trigger/add_modifier +# @within function asset:artifact/example/trigger/*/*main + +#> modifier multiplier +# @private + #declare score_holder $Count + +# 補正を削除 + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/attack/base/remove + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/defense/base/remove + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/max_health/remove + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/max_mp/remove + +# 個数 + execute store result score $Count Temporary if data storage asset:context New.Items.hotbar[{tag:{TSB:{ID:65535}}}] +# 補正を追加 + # 基礎攻撃力 N*5% + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + execute store result storage api: Argument.Amount double 0.05 run scoreboard players get $Count Temporary + data modify storage api: Argument.Operation set value "multiply" + execute unless data storage api: Argument{Amount:0.0d} run function api:modifier/attack/base/add + # 基礎防御力 N*5% + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + execute store result storage api: Argument.Amount double 0.05 run scoreboard players get $Count Temporary + data modify storage api: Argument.Operation set value "multiply" + execute unless data storage api: Argument{Amount:0.0d} run function api:modifier/defense/base/add + # 最大体力 N*2.5% + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + execute store result storage api: Argument.Amount double 0.025 run scoreboard players get $Count Temporary + data modify storage api: Argument.Operation set value "multiply" + execute unless data storage api: Argument{Amount:0.0d} run function api:modifier/max_health/add + # 最大魔力 N*2.5% + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + execute store result storage api: Argument.Amount double 0.025 run scoreboard players get $Count Temporary + data modify storage api: Argument.Operation set value "multiply" + execute unless data storage api: Argument{Amount:0.0d} run function api:modifier/max_mp/add + +# リセット + scoreboard players reset $Count Temporary + data remove storage api: Argument \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/1.trigger.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/1.trigger.mcfunction new file mode 100644 index 000000000..fb61f7b11 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/1.trigger.mcfunction @@ -0,0 +1,9 @@ +#> asset:artifact/example/trigger/attack/1.trigger +# +# 指定したイベントタイミングで実行されるfunction +# ここで自身の神器が判定をしてmain処理を呼び出す +# +# @within tag/function asset:artifact/** + +# storage asset:context idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する + execute if data storage asset:context id{mainhand:65535} run function asset:artifact/example/trigger/attack/2.check_condition \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/2.check_condition.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/2.check_condition.mcfunction new file mode 100644 index 000000000..df4d73f4a --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/2.check_condition.mcfunction @@ -0,0 +1,12 @@ +#> asset:artifact/example/trigger/attack/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/example/trigger/attack/1.trigger + +# 神器IDの設定 + data modify storage asset:artifact TargetID set value 65535 +# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く + function asset:artifact/common/check_condition/mainhand +# CanUsedタグをチェックして3.main.mcfunctionを実行する + execute if entity @s[tag=CanUsed] run function asset:artifact/example/trigger/attack/3.main \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/3.main.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/3.main.mcfunction new file mode 100644 index 000000000..9bf3bba36 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/attack/3.main.mcfunction @@ -0,0 +1,28 @@ +#> asset:artifact/example/trigger/attack/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/example/trigger/attack/2.check_condition + +#> health +# @private + #declare score_holder $MaxHealth + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/mainhand + +# ここから先は神器側の効果の処理を書く +# VFX + execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..70,limit=1] run particle dust -1 0 0 1 ~ ~1.5 ~ 0.05 1 0.05 0 150 + execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..70,limit=1] run playsound minecraft:entity.elder_guardian.curse player @a ~ ~ ~ 0.6 1.4 +# ダメージ + execute store result storage api: Argument.Damage float 0.1 as @e[type=#lib:living,type=!player,tag=Victim,distance=..6,limit=1] run function api:mob/get_max_health +# ダメージ/その他の設定 + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "None" + data modify storage api: Argument.FixedDamage set value 1b + function api:damage/modifier + execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..6,limit=1] run function api:damage/ + +# リセット + function api:damage/reset \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/dis_equip/.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/dis_equip/.mcfunction new file mode 100644 index 000000000..2561e917f --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/dis_equip/.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/example/trigger/dis_equip/ +# +# 装備を外した時に外した部位にのみのidが入った状態でトリガーされる +# +# @within tag/function asset:artifact/dis_equip + +execute if data storage asset:context id{hotbar:[65535]} run function asset:artifact/example/trigger/dis_equip/main \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/dis_equip/main.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/dis_equip/main.mcfunction new file mode 100644 index 000000000..a528a1512 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/dis_equip/main.mcfunction @@ -0,0 +1,18 @@ +#> asset:artifact/example/trigger/dis_equip/main +# @within function asset:artifact/example/trigger/dis_equip/ + +# 演出 + playsound minecraft:item.armor.equip_generic player @a ~ ~ ~ 1 0.8 + +# 補正を削除 + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/attack/base/remove + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/defense/base/remove + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/max_health/remove + data modify storage api: Argument.UUID set value [I;1,1,65535,7] + function api:modifier/max_mp/remove + +# 補正を追加 + execute unless entity @s[tag=!DevPrivilege,predicate=player_manager:is_believe/null] run function asset:artifact/example/trigger/add_modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/1.trigger.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/1.trigger.mcfunction new file mode 100644 index 000000000..8e481ef95 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/1.trigger.mcfunction @@ -0,0 +1,9 @@ +#> asset:artifact/example/trigger/equip/1.trigger +# +# 指定したイベントタイミングで実行されるfunction +# ここで自身の神器が判定をしてmain処理を呼び出す +# +# @within tag/function asset:artifact/** + +# storage asset:context idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する + execute if data storage asset:context id{hotbar:[65535]} run function asset:artifact/example/trigger/equip/2.check_condition \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/2.check_condition.mcfunction similarity index 57% rename from TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction rename to TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/2.check_condition.mcfunction index 7a394f751..022e5e060 100644 --- a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/2.check_condition.mcfunction @@ -1,12 +1,13 @@ -#> asset:artifact/example/trigger/2.check_condition +#> asset:artifact/example/trigger/equip/2.check_condition # # 神器の発動条件をチェックします # -# @within function asset:artifact/example/trigger/1.trigger +# @within function asset:artifact/example/trigger/equip/1.trigger # 神器IDの設定 - data modify storage asset:artifact TargetID set value 2147483647 + data modify storage asset:artifact TargetID set value 65535 + data modify storage asset:artifact Index set value 1 # 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く function asset:artifact/common/check_condition/hotbar # CanUsedタグをチェックして3.main.mcfunctionを実行する - execute if entity @s[tag=CanUsed] run function asset:artifact/example/trigger/3.main \ No newline at end of file + execute if entity @s[tag=CanUsed] run function asset:artifact/example/trigger/equip/3.main \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/3.main.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/3.main.mcfunction new file mode 100644 index 000000000..738d30b9b --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/equip/3.main.mcfunction @@ -0,0 +1,20 @@ +#> asset:artifact/example/trigger/equip/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/example/trigger/equip/2.check_condition + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/hotbar + +# ここから先は神器側の効果の処理を書く +# VFX + playsound ogg:block.smithing_table.smithing_table2 player @a ~ ~ ~ 0.5 1.6 + playsound minecraft:item.armor.equip_iron player @a ~ ~ ~ 0.5 1 + playsound ogg:random.levelup player @a ~ ~ ~ 0.6 2 + particle dust 0.278 0.733 1 1 ~ ~1 ~ 0.2 0.2 0.2 0 20 + particle crit ~ ~1 ~ 0 0 0 0.5 10 + particle dust 100000000 1 1 1 ~ ~1.5 ~ 0.5 1 0.5 0 150 + playsound minecraft:block.beacon.activate player @a ~ ~ ~ 1 2 +# 補正を追加 + function asset:artifact/example/trigger/add_modifier \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json b/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json index e2ed460cb..d8df97c7b 100644 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json +++ b/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json @@ -1,5 +1,5 @@ { "values": [ - "asset:artifact/example/trigger/1.trigger" + ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json b/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json index d8df97c7b..d6d8c975c 100644 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json +++ b/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json @@ -1,5 +1,5 @@ { "values": [ - + "asset:artifact/example/trigger/attack/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/dis_equip.json b/TheSkyBlessing/data/asset/tags/functions/artifact/dis_equip.json index d8df97c7b..2c38e21f2 100644 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/dis_equip.json +++ b/TheSkyBlessing/data/asset/tags/functions/artifact/dis_equip.json @@ -1,5 +1,5 @@ { "values": [ - + "asset:artifact/example/trigger/dis_equip/" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/equip.json b/TheSkyBlessing/data/asset/tags/functions/artifact/equip.json index d8df97c7b..6a9c1685f 100644 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/equip.json +++ b/TheSkyBlessing/data/asset/tags/functions/artifact/equip.json @@ -1,5 +1,5 @@ { "values": [ - + "asset:artifact/example/trigger/equip/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/give.json b/TheSkyBlessing/data/asset/tags/functions/artifact/give.json index d8df97c7b..4c2605c84 100644 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/give.json +++ b/TheSkyBlessing/data/asset/tags/functions/artifact/give.json @@ -1,5 +1,5 @@ { "values": [ - + "asset:artifact/example/give/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/mob/attack.json b/TheSkyBlessing/data/asset/tags/functions/mob/attack.json index d8df97c7b..8ad92088c 100644 --- a/TheSkyBlessing/data/asset/tags/functions/mob/attack.json +++ b/TheSkyBlessing/data/asset/tags/functions/mob/attack.json @@ -1,5 +1,5 @@ { "values": [ - + "asset:mob/example/attack/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/mob/death.json b/TheSkyBlessing/data/asset/tags/functions/mob/death.json index d8df97c7b..a3c536626 100644 --- a/TheSkyBlessing/data/asset/tags/functions/mob/death.json +++ b/TheSkyBlessing/data/asset/tags/functions/mob/death.json @@ -1,5 +1,5 @@ { "values": [ - + "asset:mob/example/death/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/mob/hurt.json b/TheSkyBlessing/data/asset/tags/functions/mob/hurt.json index 37461039b..6eb2b316c 100644 --- a/TheSkyBlessing/data/asset/tags/functions/mob/hurt.json +++ b/TheSkyBlessing/data/asset/tags/functions/mob/hurt.json @@ -1,6 +1,6 @@ { "values": [ - "asset:mob/example/hurt/1.trigger", - "asset:mob/ex.1/_/hurt" + "asset:mob/ex.1/_/hurt", + "asset:mob/example/hurt/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/mob/summon.json b/TheSkyBlessing/data/asset/tags/functions/mob/summon.json index 9f8d0e0fd..9ef146acb 100644 --- a/TheSkyBlessing/data/asset/tags/functions/mob/summon.json +++ b/TheSkyBlessing/data/asset/tags/functions/mob/summon.json @@ -1,8 +1,8 @@ { "values": [ - "asset:mob/example/summon/1.trigger", "asset:mob/ex.1/_/summon", "asset:mob/ex.2/_/summon", - "asset:mob/ex.3/_/summon" + "asset:mob/ex.3/_/summon", + "asset:mob/example/summon/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/mob/tick.json b/TheSkyBlessing/data/asset/tags/functions/mob/tick.json index 9e2c6d7bb..d2e2c469d 100644 --- a/TheSkyBlessing/data/asset/tags/functions/mob/tick.json +++ b/TheSkyBlessing/data/asset/tags/functions/mob/tick.json @@ -1,7 +1,7 @@ { "values": [ - "asset:mob/example/tick/1.trigger", "asset:mob/ex.1/_/tick", - "asset:mob/ex.2/_/tick" + "asset:mob/ex.2/_/tick", + "asset:mob/example/tick/1.trigger" ] } \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction index 3d1c74c32..745b0b6fa 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction @@ -6,8 +6,8 @@ # asset_manager:artifact/** # asset:artifact/*/register # asset:artifact/*/give/2.give -# asset:artifact/*/trigger/2.check_condition -# asset:artifact/*/trigger/3.main +# asset:artifact/*/trigger/**check_condition +# asset:artifact/*/trigger/**main # asset:artifact/common/** #declare storage asset:artifact @@ -69,6 +69,6 @@ #declare score_holder $Max #> リセット用 -# @within function asset_manager:artifact/triggers/equipments/update_cooldown/* +# @within function asset_manager:artifact/triggers/equipments/update_cooldown/** #declare score_holder $Tick #declare score_holder $LatestUsedTick \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction index e1ec785f3..51d5553ce 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction @@ -4,7 +4,10 @@ # # @input # as player -# storage asset:artifact TargetSlot : Slot +# storage asset:artifact +# Index? : int +# TargetSlot : Slot +# IgnoreCondition? : "all" | string[] # @output tag @s CanUsed # @within function asset:artifact/common/check_condition/* @@ -12,34 +15,41 @@ function asset_manager:artifact/data/current/get # 事前にtag付与 tag @s add CanUsed +# allを分解 + execute if data storage asset:artifact {IgnoreCondition:"all"} run data modify storage asset:artifact IgnoreCondition set value ["believe","specialcd","mp","localcd"] +# 処理用ストレージに移動 +execute unless data storage asset:artifact TargetItems[0].tag.TSB.Triggers[0] run function asset_manager:artifact/data/migrate +$data modify storage asset:temp Trigger set from storage asset:artifact TargetItems[0].tag.TSB.Triggers[$(Index)] # 条件を満たしてなかったらtag削除 # 信仰による制限 - function asset_manager:artifact/check/check_believe + execute unless data storage asset:artifact {IgnoreCondition:["believe"]} run function asset_manager:artifact/check/check_believe execute if entity @s[tag=CheckFailed] unless score @s BelieveLogCD matches 0.. run tellraw @s {"text":"現在の信仰では使えないようだ...","color":"red"} execute if entity @s[tag=CheckFailed] unless score @s BelieveLogCD matches 0.. run scoreboard players set @s BelieveLogCD 100 execute if entity @s[tag=CheckFailed] run tag @s remove CanUsed tag @s[tag=CheckFailed] remove CheckFailed # SpecialCooldownによる制限 - function asset_manager:artifact/check/check_special_cooldown + execute unless data storage asset:artifact {IgnoreCondition:["specialcd"]} run function asset_manager:artifact/check/check_special_cooldown execute if entity @s[tag=CheckFailed] unless score @s SpecialCDLogCD matches 0.. run tellraw @s {"text":"特殊クールダウンが終わっていません。","color":"red"} execute if entity @s[tag=CheckFailed] unless score @s SpecialCDLogCD matches 0.. run scoreboard players set @s SpecialCDLogCD 60 execute if entity @s[tag=CheckFailed] run tag @s remove CanUsed tag @s[tag=CheckFailed] remove CheckFailed # MP必要量による制限 - function asset_manager:artifact/check/check_mp - execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableMPMessage:true} run tellraw @s {"text":"MPが足りない!","color":"red"} - execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableMPMessage:true} run scoreboard players set @s MPLogCD 20 + execute unless data storage asset:artifact {IgnoreCondition:["mp"]} run function asset_manager:artifact/check/check_mp + execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:temp Trigger{DisableMPMessage:true} run tellraw @s {"text":"MPが足りない!","color":"red"} + execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:temp Trigger{DisableMPMessage:true} run scoreboard players set @s MPLogCD 20 execute if entity @s[tag=CheckFailed] run tag @s remove CanUsed tag @s[tag=CheckFailed] remove CheckFailed # LocalCooldownによる制限 - function asset_manager:artifact/check/check_local_cooldown/ - execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableCooldownMessage:true} run tellraw @s {"text":"クールダウンが終わっていません。","color":"red"} - execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableCooldownMessage:true} run scoreboard players set @s LocalCDLogCD 20 + execute unless data storage asset:artifact {IgnoreCondition:["localcd"]} run function asset_manager:artifact/check/check_local_cooldown/ + execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:temp Trigger{DisableCooldownMessage:true} run tellraw @s {"text":"クールダウンが終わっていません。","color":"red"} + execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:temp Trigger{DisableCooldownMessage:true} run scoreboard players set @s LocalCDLogCD 20 execute if entity @s[tag=CheckFailed] run tag @s remove CanUsed tag @s[tag=CheckFailed] remove CheckFailed # 条件を満たしてない && 使用回数が存在する && トリガーがitemUse ならば使用回数を減らす - execute if entity @s[tag=!CanUsed] if data storage asset:artifact TargetItems[0].tag.TSB.RemainingCount if data storage asset:artifact TargetItems[0].tag.TSB{Trigger:"itemUse"} run function asset_manager:artifact/use/item/has_remain + execute if entity @s[tag=!CanUsed] if data storage asset:temp Trigger.RemainingCount if data storage asset:temp Trigger{Trigger:"itemUse"} run function asset_manager:artifact/use/item/has_remain # リセット + data remove storage asset:temp Trigger data remove storage asset:artifact TargetSlot data remove storage asset:artifact TargetDefaultSlot - data remove storage asset:artifact TargetItems \ No newline at end of file + data remove storage asset:artifact TargetItems + data remove storage asset:artifact IgnoreCondition \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction index 23491c2b1..81ade08f5 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction @@ -11,7 +11,7 @@ # データをコピー data modify storage asset:artifact CopiedItem set from storage asset:artifact TargetItems # すべての要素についてチェックする - function asset_manager:artifact/check/check_local_cooldown/foreach + function asset_manager:artifact/check/check_local_cooldown/foreach with storage asset:artifact # リセット data remove storage asset:artifact CopiedItem scoreboard players reset $Tick Temporary \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction index f7201e918..4dbd2817a 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction @@ -12,8 +12,8 @@ # 時間を取得 execute store result score $Tick Temporary run time query gametime # 最後に使用したtickとLocalCooldownを取得 - execute store result score $LatestUsedTick Temporary run data get storage asset:artifact CopiedItem[-1].tag.TSB.LatestUseTick - execute store result score $Cooldown Temporary run data get storage asset:artifact CopiedItem[-1].tag.TSB.LocalCooldown +$execute store result score $LatestUsedTick Temporary run data get storage asset:artifact CopiedItem[-1].tag.TSB.Triggers.[$(Index)].LatestUseTick +$execute store result score $Cooldown Temporary run data get storage asset:artifact CopiedItem[-1].tag.TSB.Triggers[$(Index)].LocalCooldown # 減算 scoreboard players operation $Tick Temporary -= $LatestUsedTick Temporary # 比較 diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction index 4422080dc..9fde33d21 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction @@ -9,8 +9,8 @@ #declare score_holder $Length # MP必要量を取得 - execute if data storage asset:artifact TargetItems[0].tag.TSB.MPRequire run data modify storage api: Argument.Threshold set from storage asset:artifact TargetItems[-1].tag.TSB.MPRequire - execute unless data storage asset:artifact TargetItems[0].tag.TSB.MPRequire run data modify storage api: Argument.Threshold set from storage asset:artifact TargetItems[-1].tag.TSB.MPCost + execute if data storage asset:temp Trigger.MPRequire run data modify storage api: Argument.Threshold set from storage asset:temp Trigger.MPRequire + execute unless data storage asset:temp Trigger.MPRequire run data modify storage api: Argument.Threshold set from storage asset:temp Trigger.MPCost # アイテム数だけ増やす # execute store result score $Length Temporary if data storage asset:artifact TargetItems[] # scoreboard players operation $CheckMP Lib *= $Length Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction index 95d6a2e5d..5d2f3f974 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction @@ -5,4 +5,4 @@ # @within function asset_manager:artifact/check/ # 特殊クールダウンが存在する∧$ArtifactSpecialCooldownが1以上ならタグ付与 // Item.tag.TSB.SpecialCooldown && $ArtifactSpecialCooldown >= 1 - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown if score $ArtifactSpecialCooldown Global matches 1.. run tag @s add CheckFailed \ No newline at end of file + execute if data storage asset:temp Trigger.SpecialCooldown if score $ArtifactSpecialCooldown Global matches 1.. run tag @s add CheckFailed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_attack_info.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_attack_info.mcfunction index 10bb8be9a..659174110 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_attack_info.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_attack_info.mcfunction @@ -2,60 +2,60 @@ # # 攻撃に関する情報をLoreに追加します # -# @within function asset_manager:artifact/create/set_lore +# @within function asset_manager:artifact/create/trigger_loop #> private # @private #declare score_holder $IsList # 初期化 - data modify storage asset:artifact Line1 set value ['""','{"text":"???"}','[{"text":"範囲-"},{"text":"不明","color":"gray"}]','""'] - data modify storage asset:artifact Line2 set value ['{"text":"物理 ","color":"dark_gray"}','{"text":"魔法 ","color":"dark_gray"}','{"text":"火 ","color":"dark_gray"}','{"text":"水 ","color":"dark_gray"}','{"text":"雷 ","color":"dark_gray"}','{"text":"無 ","color":"dark_gray"}'] + data modify storage asset:temp Line1 set value ['""','{"text":"???"}','[{"text":"範囲-"},{"text":"不明","color":"gray"}]','""'] + data modify storage asset:temp Line2 set value ['{"text":"物理 ","color":"dark_gray"}','{"text":"魔法 ","color":"dark_gray"}','{"text":"火 ","color":"dark_gray"}','{"text":"水 ","color":"dark_gray"}','{"text":"雷 ","color":"dark_gray"}','{"text":"無 ","color":"dark_gray"}'] # Line-1 # 貫通/非貫通 軽減/非軽減を表示 //未設定-非表示 - execute if data storage asset:artifact {AttackInfo:{BypassResist:1b}} run data modify storage asset:artifact Line1[0] set value '{"text":"[防御無効] "}' + execute if data storage asset:temp Trigger{AttackInfo:{BypassResist:1b}} run data modify storage asset:temp Line1[0] set value '{"text":"[防御無効] "}' # ダメージ量を表示 //未設定-??? # Listかを確認 - execute if data storage asset:artifact AttackInfo.Damage[0] run scoreboard players set $IsList Temporary 1 - execute if data storage asset:artifact {AttackInfo:{Damage:[]}} run scoreboard players set $IsList Temporary 1 + execute if data storage asset:temp Trigger.AttackInfo.Damage[0] run scoreboard players set $IsList Temporary 1 + execute if data storage asset:temp Trigger{AttackInfo:{Damage:[]}} run scoreboard players set $IsList Temporary 1 # Literalのとき - execute unless score $IsList Temporary matches 1.. if data storage asset:artifact AttackInfo.Damage run data modify storage asset:artifact Line1[1] set value '[{"storage":"asset:artifact","nbt":"AttackInfo.Damage"}]' + execute unless score $IsList Temporary matches 1.. if data storage asset:temp Trigger.AttackInfo.Damage run data modify storage asset:temp Line1[1] set value '[{"storage":"asset:temp","nbt":"Trigger.AttackInfo.Damage"}]' # List(要素数1)のとき - execute if score $IsList Temporary matches 1.. if data storage asset:artifact AttackInfo.Damage[0] run data modify storage asset:artifact Line1[1] set value '[{"storage":"asset:artifact","nbt":"AttackInfo.Damage[0]"}]' + execute if score $IsList Temporary matches 1.. if data storage asset:temp Trigger.AttackInfo.Damage[0] run data modify storage asset:temp Line1[1] set value '[{"storage":"asset:temp","nbt":"Trigger.AttackInfo.Damage[0]"}]' # List(要素数2)のとき - execute if score $IsList Temporary matches 1.. if data storage asset:artifact AttackInfo.Damage[1] run data modify storage asset:artifact Line1[1] set value '[{"storage":"asset:artifact","nbt":"AttackInfo.Damage[0]"},{"text":"-"},{"storage":"asset:artifact","nbt":"AttackInfo.Damage[1]"}]' + execute if score $IsList Temporary matches 1.. if data storage asset:temp Trigger.AttackInfo.Damage[1] run data modify storage asset:temp Line1[1] set value '[{"storage":"asset:temp","nbt":"Trigger.AttackInfo.Damage[0]"},{"text":"-"},{"storage":"asset:temp","nbt":"Trigger.AttackInfo.Damage[1]"}]' # 単体/確率範囲/条件範囲/常時範囲 を表示 //未設定-不明 - execute if data storage asset:artifact {AttackInfo:{IsRangeAttack:never}} run data modify storage asset:artifact Line1[2] set value '[{"text":"単体"}]' - execute if data storage asset:artifact {AttackInfo:{IsRangeAttack:probability}} run data modify storage asset:artifact Line1[2] set value '[{"text":"範囲-"},{"text":"確率","color":"aqua"}]' - execute if data storage asset:artifact {AttackInfo:{IsRangeAttack:condition}} run data modify storage asset:artifact Line1[2] set value '[{"text":"範囲-"},{"text":"条件","color":"green"}]' - execute if data storage asset:artifact {AttackInfo:{IsRangeAttack:every}} run data modify storage asset:artifact Line1[2] set value '[{"text":"範囲-"},{"text":"常時","color":"gold"}]' + execute if data storage asset:temp Trigger{AttackInfo:{IsRangeAttack:never}} run data modify storage asset:temp Line1[2] set value '[{"text":"単体"}]' + execute if data storage asset:temp Trigger{AttackInfo:{IsRangeAttack:probability}} run data modify storage asset:temp Line1[2] set value '[{"text":"範囲-"},{"text":"確率","color":"aqua"}]' + execute if data storage asset:temp Trigger{AttackInfo:{IsRangeAttack:condition}} run data modify storage asset:temp Line1[2] set value '[{"text":"範囲-"},{"text":"条件","color":"green"}]' + execute if data storage asset:temp Trigger{AttackInfo:{IsRangeAttack:every}} run data modify storage asset:temp Line1[2] set value '[{"text":"範囲-"},{"text":"常時","color":"gold"}]' # 攻撃範囲を表示 //未設定-非表示 - execute if data storage asset:artifact AttackInfo.AttackRange run data modify storage asset:artifact Line1[3] set value '[{"text":" 範囲:"},{"storage":"asset:artifact","nbt":"AttackInfo.AttackRange"},{"text":"m"}]' + execute if data storage asset:temp Trigger.AttackInfo.AttackRange run data modify storage asset:temp Line1[3] set value '[{"text":" 範囲:"},{"storage":"asset:temp","nbt":"Trigger.AttackInfo.AttackRange"},{"text":"m"}]' # Line-2 # 物理/魔法を表示 //未設定-物理 - execute if data storage asset:artifact {AttackInfo:{AttackType:[Physical]}} run data modify storage asset:artifact Line2[0] set value '{"text":"物理 ","color":"dark_green"}' - execute if data storage asset:artifact {AttackInfo:{AttackType:[Magic]}} run data modify storage asset:artifact Line2[1] set value '{"text":"魔法 ","color":"dark_purple"}' + execute if data storage asset:temp Trigger{AttackInfo:{AttackType:[Physical]}} run data modify storage asset:temp Line2[0] set value '{"text":"物理 ","color":"dark_green"}' + execute if data storage asset:temp Trigger{AttackInfo:{AttackType:[Magic]}} run data modify storage asset:temp Line2[1] set value '{"text":"魔法 ","color":"dark_purple"}' - execute unless data storage asset:artifact AttackInfo.AttackType[0] run data modify storage asset:artifact Line2[0] set value '{"text":"物理 ","color":"dark_green"}' + execute unless data storage asset:temp Trigger.AttackInfo.AttackType[0] run data modify storage asset:temp Line2[0] set value '{"text":"物理 ","color":"dark_green"}' # 属性を表示 //未設定-無 - execute if data storage asset:artifact {AttackInfo:{ElementType:[Fire]}} run data modify storage asset:artifact Line2[2] set value '{"text":"火 ","color":"red"}' - execute if data storage asset:artifact {AttackInfo:{ElementType:[Water]}} run data modify storage asset:artifact Line2[3] set value '{"text":"水 ","color":"aqua"}' - execute if data storage asset:artifact {AttackInfo:{ElementType:[Thunder]}} run data modify storage asset:artifact Line2[4] set value '{"text":"雷 ","color":"yellow"}' - execute if data storage asset:artifact {AttackInfo:{ElementType:[None]}} run data modify storage asset:artifact Line2[5] set value '{"text":"無 ","color":"white"}' + execute if data storage asset:temp Trigger{AttackInfo:{ElementType:[Fire]}} run data modify storage asset:temp Line2[2] set value '{"text":"火 ","color":"red"}' + execute if data storage asset:temp Trigger{AttackInfo:{ElementType:[Water]}} run data modify storage asset:temp Line2[3] set value '{"text":"水 ","color":"aqua"}' + execute if data storage asset:temp Trigger{AttackInfo:{ElementType:[Thunder]}} run data modify storage asset:temp Line2[4] set value '{"text":"雷 ","color":"yellow"}' + execute if data storage asset:temp Trigger{AttackInfo:{ElementType:[None]}} run data modify storage asset:temp Line2[5] set value '{"text":"無 ","color":"white"}' - execute unless data storage asset:artifact AttackInfo.ElementType[0] run data modify storage asset:artifact Line2[5] set value '{"text":"無 ","color":"white"}' + execute unless data storage asset:temp Trigger.AttackInfo.ElementType[0] run data modify storage asset:temp Line2[5] set value '{"text":"無 ","color":"white"}' # lootしてLoreに落とし込む loot replace block 10000 0 10000 container.2 loot asset_manager:artifact/generate_lore/attack_info # リセット - data remove storage asset:artifact Line1 - data remove storage asset:artifact Line2 + data remove storage asset:temp Line1 + data remove storage asset:temp Line2 scoreboard players reset $IsList Temporary \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_cooltime.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_cooltime.mcfunction index 16f0b0e5b..4343c206d 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_cooltime.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_cooltime.mcfunction @@ -2,7 +2,7 @@ # # 普通のクールタイムを秒数に変換 クールタイムが1tickだったりすると正確な秒数が出ない # -# @within function asset_manager:artifact/create/set_lore +# @within function asset_manager:artifact/create/trigger_loop #> Temp # @private @@ -11,10 +11,10 @@ #declare score_holder $CooldownMinutes # 5? クールタイムを秒数に変換 - execute store result score $Cooldown Temporary run data get storage asset:artifact LocalCooldown + execute store result score $Cooldown Temporary run data get storage asset:temp Trigger.LocalCooldown scoreboard players operation $Cooldown Temporary /= $20 Const # 5? クールタイムの小数第一位まで求める - execute store result score $CooldownDecimal Temporary run data get storage asset:artifact LocalCooldown + execute store result score $CooldownDecimal Temporary run data get storage asset:temp Trigger.LocalCooldown scoreboard players operation $CooldownDecimal Temporary %= $20 Const scoreboard players operation $CooldownDecimal Temporary *= $5 Const # 5? 秒数を分に変換 @@ -25,9 +25,9 @@ # 分がいるかをloot_table側で判断するためのフラグ execute if score $CooldownMinutes Temporary matches 1.. run scoreboard players set @s Temporary 1 # 5?ストレージに入れる - execute store result storage asset:artifact LocalCooldownSecond int 1 run scoreboard players get $Cooldown Temporary - execute store result storage asset:artifact LocalCooldownDecimal int 1 run scoreboard players get $CooldownDecimal Temporary - execute store result storage asset:artifact LocalCooldownMinutes int 1 run scoreboard players get $CooldownMinutes Temporary + execute store result storage asset:temp LocalCooldownSecond int 1 run scoreboard players get $Cooldown Temporary + execute store result storage asset:temp LocalCooldownDecimal int 1 run scoreboard players get $CooldownDecimal Temporary + execute store result storage asset:temp LocalCooldownMinutes int 1 run scoreboard players get $CooldownMinutes Temporary # lootする loot replace block 10000 0 10000 container.6 loot asset_manager:artifact/generate_lore/cooldown @@ -37,6 +37,6 @@ scoreboard players reset $CooldownDecimal scoreboard players reset $CooldownMinutes scoreboard players reset @s Temporary - data remove storage asset:artifact LocalCooldownSecond - data remove storage asset:artifact LocalCooldownDecimal - data remove storage asset:artifact LocalCooldownMinutes \ No newline at end of file + data remove storage asset:temp LocalCooldownSecond + data remove storage asset:temp LocalCooldownDecimal + data remove storage asset:temp LocalCooldownMinutes \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_data.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_data.mcfunction index bb848ecf1..075d6031b 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_data.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_data.mcfunction @@ -41,21 +41,17 @@ execute store result storage asset:artifact Item.tag.TSB.UUID int 1 run scoreboard players get $ArtifactIndex Global # 扱える神のエイリアスを修正する execute if data storage asset:artifact {CanUsedGod:"ALL"} run data modify storage asset:artifact CanUsedGod set value ['Flora','Urban','Nyaptov','Wi-ki','Rumor'] +# 使用回数の最大値(デフォルト) + execute unless data storage asset:artifact RemainingCountMax run data modify storage asset:artifact RemainingCountMax set from storage asset:artifact RemainingCount # そのまま入れれるやつ data modify storage asset:artifact Item.id set from storage asset:artifact BaseItem data modify storage asset:artifact Item.tag.CustomModelData set from storage asset:artifact ID data modify storage asset:artifact Item.tag.TSB.rawName set from storage asset:artifact Name data modify storage asset:artifact Item.tag.TSB.ID set from storage asset:artifact ID - data modify storage asset:artifact Item.tag.TSB.Trigger set from storage asset:artifact Trigger - data modify storage asset:artifact Item.tag.TSB.MPCost set from storage asset:artifact MPCost - data modify storage asset:artifact Item.tag.TSB.MPRequire set from storage asset:artifact MPRequire + data modify storage asset:artifact Item.tag.TSB.Triggers set from storage asset:artifact Triggers data modify storage asset:artifact Item.tag.TSB.CanUsedGod set from storage asset:artifact CanUsedGod data modify storage asset:artifact Item.tag.TSB.RemainingCount set from storage asset:artifact RemainingCount data modify storage asset:artifact Item.tag.TSB.RemainingCountMax set from storage asset:artifact RemainingCountMax - data modify storage asset:artifact Item.tag.TSB.LocalCooldown set from storage asset:artifact LocalCooldown - data modify storage asset:artifact Item.tag.TSB.SpecialCooldown set from storage asset:artifact SpecialCooldown - data modify storage asset:artifact Item.tag.TSB.DisableCooldownMessage set from storage asset:artifact DisableCooldownMessage - data modify storage asset:artifact Item.tag.TSB.DisableMPMessage set from storage asset:artifact DisableMPMessage # 名前 # 残り回数が存在する場合 diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_lore.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_lore.mcfunction index 9f8c63a45..c630a1b26 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_lore.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_lore.mcfunction @@ -8,24 +8,10 @@ data modify block 10000 0 10000 Items set value [] # 通常説明文 function asset_manager:artifact/create/lore_append -# 空行セパレータ - data modify storage asset:artifact Item.tag.display.Lore append value '""' -# 0 使用方法 - function asset_manager:artifact/create/set_trigger -# 1? 使用条件 - execute if data storage asset:artifact Condition run loot replace block 10000 0 10000 container.1 loot asset_manager:artifact/generate_lore/condition -# 2? 攻撃情報 - execute if data storage asset:artifact AttackInfo run function asset_manager:artifact/create/set_attack_info -# 3? 必要MP - execute if data storage asset:artifact MPRequire run loot replace block 10000 0 10000 container.3 loot asset_manager:artifact/generate_lore/mp_require -# 4 消費MP - loot replace block 10000 0 10000 container.4 loot asset_manager:artifact/generate_lore/mp_cost -# 5? 消費アイテム - execute if data storage asset:artifact CostText run loot replace block 10000 0 10000 container.5 loot asset_manager:artifact/generate_lore/cost_item -# 6? クールタイム - execute if data storage asset:artifact LocalCooldown run function asset_manager:artifact/create/set_cooltime -# 7? スペシャル☆クールタイム - execute if data storage asset:artifact SpecialCooldown run function asset_manager:artifact/create/set_special_cooltime +# 0~7 スキル設定 + data modify storage asset:temp Triggers set from storage asset:artifact Triggers + function asset_manager:artifact/create/trigger_loop + data remove storage asset:temp Triggers # 8 使える神 function asset_manager:artifact/create/set_god # Lore一括追加 diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_special_cooltime.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_special_cooltime.mcfunction index adaf89e9d..257ee2cb6 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_special_cooltime.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_special_cooltime.mcfunction @@ -2,7 +2,7 @@ # # スペシャルクールタイムを秒数にする 1tickとかだと表示が変になる # -# @within function asset_manager:artifact/create/set_lore +# @within function asset_manager:artifact/create/trigger_loop #> Temp # @private @@ -11,10 +11,10 @@ #declare score_holder $CooldownMinutes # 5? スペシャル☆クールタイムを秒数に変換 - execute store result score $Cooldown Temporary run data get storage asset:artifact SpecialCooldown + execute store result score $Cooldown Temporary run data get storage asset:temp Trigger.SpecialCooldown scoreboard players operation $Cooldown Temporary /= $20 Const # 5? スペシャル☆クールタイムの小数第一位まで求める - execute store result score $CooldownDecimal Temporary run data get storage asset:artifact SpecialCooldown + execute store result score $CooldownDecimal Temporary run data get storage asset:temp Trigger.SpecialCooldown scoreboard players operation $CooldownDecimal Temporary %= $20 Const scoreboard players operation $CooldownDecimal Temporary *= $5 Const # 5? 秒数を分に変換 @@ -25,9 +25,9 @@ # 分がいるかをloot_table側で判断するためのフラグ execute if score $CooldownMinutes Temporary matches 1.. run scoreboard players set @s Temporary 1 # 5?ストレージに入れる - execute store result storage asset:artifact SpecialCooldownSecond int 1 run scoreboard players get $Cooldown Temporary - execute store result storage asset:artifact SpecialCooldownDecimal int 1 run scoreboard players get $CooldownDecimal Temporary - execute store result storage asset:artifact SpecialCooldownMinutes int 1 run scoreboard players get $CooldownMinutes Temporary + execute store result storage asset:temp SpecialCooldownSecond int 1 run scoreboard players get $Cooldown Temporary + execute store result storage asset:temp SpecialCooldownDecimal int 1 run scoreboard players get $CooldownDecimal Temporary + execute store result storage asset:temp SpecialCooldownMinutes int 1 run scoreboard players get $CooldownMinutes Temporary # lootする loot replace block 10000 0 10000 container.7 loot asset_manager:artifact/generate_lore/special_cooldown @@ -37,6 +37,6 @@ scoreboard players reset $CooldownDecimal scoreboard players reset $CooldownMinutes scoreboard players reset @s Temporary - data remove storage asset:artifact SpecialCooldownSecond - data remove storage asset:artifact SpecialCooldownDecimal - data remove storage asset:artifact SpecialCooldownMinutes \ No newline at end of file + data remove storage asset:temp SpecialCooldownSecond + data remove storage asset:temp SpecialCooldownDecimal + data remove storage asset:temp SpecialCooldownMinutes \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_trigger.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_trigger.mcfunction index 9ee07a3c1..68cf571e3 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_trigger.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/set_trigger.mcfunction @@ -2,57 +2,57 @@ # # 使用の条件を設定します # -# @within function asset_manager:artifact/create/set_lore +# @within function asset_manager:artifact/create/trigger_loop # スロット - execute if data storage asset:artifact {Slot:"auto"} run data modify storage asset:artifact Temp.Trigger.A set value "どちらかの手に所持" - execute if data storage asset:artifact {Slot:"mainhand"} run data modify storage asset:artifact Temp.Trigger.A set value "メインハンドに所持" - execute if data storage asset:artifact {Slot:"offhand"} run data modify storage asset:artifact Temp.Trigger.A set value "オフハンドに所持" - execute if data storage asset:artifact {Slot:"head"} run data modify storage asset:artifact Temp.Trigger.A set value "装備" - execute if data storage asset:artifact {Slot:"chest"} run data modify storage asset:artifact Temp.Trigger.A set value "装備" - execute if data storage asset:artifact {Slot:"legs"} run data modify storage asset:artifact Temp.Trigger.A set value "装備" - execute if data storage asset:artifact {Slot:"feet"} run data modify storage asset:artifact Temp.Trigger.A set value "装備" - execute if data storage asset:artifact {Slot:"inventory"} run data modify storage asset:artifact Temp.Trigger.A set value "インベントリ内に保持" - execute if data storage asset:artifact {Slot:"hotbar"} run data modify storage asset:artifact Temp.Trigger.A set value "ホットバーに保持" + execute if data storage asset:temp Trigger{Slot:"auto"} run data modify storage asset:temp Temp.Trigger.A set value "どちらかの手に所持" + execute if data storage asset:temp Trigger{Slot:"mainhand"} run data modify storage asset:temp Temp.Trigger.A set value "メインハンドに所持" + execute if data storage asset:temp Trigger{Slot:"offhand"} run data modify storage asset:temp Temp.Trigger.A set value "オフハンドに所持" + execute if data storage asset:temp Trigger{Slot:"head"} run data modify storage asset:temp Temp.Trigger.A set value "装備" + execute if data storage asset:temp Trigger{Slot:"chest"} run data modify storage asset:temp Temp.Trigger.A set value "装備" + execute if data storage asset:temp Trigger{Slot:"legs"} run data modify storage asset:temp Temp.Trigger.A set value "装備" + execute if data storage asset:temp Trigger{Slot:"feet"} run data modify storage asset:temp Temp.Trigger.A set value "装備" + execute if data storage asset:temp Trigger{Slot:"inventory"} run data modify storage asset:temp Temp.Trigger.A set value "インベントリ内に保持" + execute if data storage asset:temp Trigger{Slot:"hotbar"} run data modify storage asset:temp Temp.Trigger.A set value "ホットバーに保持" # 接続詞 - data modify storage asset:artifact Temp.Trigger.AB set value "し" + data modify storage asset:temp Temp.Trigger.AB set value "し" # トリガー - execute if data storage asset:artifact {Trigger:"onClick"} run data modify storage asset:artifact Temp.Trigger.B set value "右クリック" - execute if data storage asset:artifact {Trigger:"shot"} run data modify storage asset:artifact Temp.Trigger.B set value "発射" - execute if data storage asset:artifact {Trigger:"itemUse"} run data modify storage asset:artifact Temp.Trigger.B set value "使用" - execute if data storage asset:artifact {Trigger:"passive"} run data modify storage asset:artifact Temp.Trigger.B set value "ている限り" - execute if data storage asset:artifact {Trigger:"onAttack"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを攻撃" - execute if data storage asset:artifact {Trigger:"onAttackByMelee"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを近接攻撃" - execute if data storage asset:artifact {Trigger:"onAttackByProjectile"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを遠距離攻撃" - execute if data storage asset:artifact {Trigger:"onDamage"} run data modify storage asset:artifact Temp.Trigger.B set value "被ダメージ" - execute if data storage asset:artifact {Trigger:"onDamageFromExplode"} run data modify storage asset:artifact Temp.Trigger.B set value "被爆発ダメージ" - execute if data storage asset:artifact {Trigger:"onDamageFromBurn"} run data modify storage asset:artifact Temp.Trigger.B set value "被延焼ダメージ" - execute if data storage asset:artifact {Trigger:"onDamageFromEntity"} run data modify storage asset:artifact Temp.Trigger.B set value "被攻撃ダメージ" - execute if data storage asset:artifact {Trigger:"onDamageFromMelee"} run data modify storage asset:artifact Temp.Trigger.B set value "被近接ダメージ" - execute if data storage asset:artifact {Trigger:"onDamageFromProjectile"} run data modify storage asset:artifact Temp.Trigger.B set value "被遠距離ダメージ" - execute if data storage asset:artifact {Trigger:"onKilled"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを殺害" - execute if data storage asset:artifact {Trigger:"onKilledByMelee"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを近接攻撃で殺害" - execute if data storage asset:artifact {Trigger:"onKilledByProjectile"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを遠距離攻撃で殺害" - execute if data storage asset:artifact {Trigger:"sneak"} run data modify storage asset:artifact Temp.Trigger.B set value "スニーク" - execute if data storage asset:artifact {Trigger:"sneak1s"} run data modify storage asset:artifact Temp.Trigger.B set value "1秒間スニーク" - execute if data storage asset:artifact {Trigger:"sneak2s"} run data modify storage asset:artifact Temp.Trigger.B set value "2秒間スニーク" - execute if data storage asset:artifact {Trigger:"sneak3s"} run data modify storage asset:artifact Temp.Trigger.B set value "3秒間スニーク" - execute if data storage asset:artifact {Trigger:"sneak4s"} run data modify storage asset:artifact Temp.Trigger.B set value "4秒間スニーク" - execute if data storage asset:artifact {Trigger:"sneak5s"} run data modify storage asset:artifact Temp.Trigger.B set value "5秒間スニーク" - execute if data storage asset:artifact {Trigger:"sneak10s"} run data modify storage asset:artifact Temp.Trigger.B set value "10秒間スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak"} run data modify storage asset:artifact Temp.Trigger.B set value "0秒以上スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak1s"} run data modify storage asset:artifact Temp.Trigger.B set value "1秒間以上スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak2s"} run data modify storage asset:artifact Temp.Trigger.B set value "2秒間以上スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak3s"} run data modify storage asset:artifact Temp.Trigger.B set value "3秒間以上スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak4s"} run data modify storage asset:artifact Temp.Trigger.B set value "4秒間以上スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak5s"} run data modify storage asset:artifact Temp.Trigger.B set value "5秒間以上スニーク" - execute if data storage asset:artifact {Trigger:"keepSneak10s"} run data modify storage asset:artifact Temp.Trigger.B set value "10秒間以上スニーク" - execute if data storage asset:artifact {Trigger:"equipping"} run data modify storage asset:artifact Temp.Trigger.AB set value "" - execute if data storage asset:artifact {Trigger:"equipping"} run data modify storage asset:artifact Temp.Trigger.B set value "" + execute if data storage asset:temp Trigger{Trigger:"onClick"} run data modify storage asset:temp Temp.Trigger.B set value "右クリック" + execute if data storage asset:temp Trigger{Trigger:"shot"} run data modify storage asset:temp Temp.Trigger.B set value "発射" + execute if data storage asset:temp Trigger{Trigger:"itemUse"} run data modify storage asset:temp Temp.Trigger.B set value "使用" + execute if data storage asset:temp Trigger{Trigger:"passive"} run data modify storage asset:temp Temp.Trigger.B set value "ている限り" + execute if data storage asset:temp Trigger{Trigger:"onAttack"} run data modify storage asset:temp Temp.Trigger.B set value "Entityを攻撃" + execute if data storage asset:temp Trigger{Trigger:"onAttackByMelee"} run data modify storage asset:temp Temp.Trigger.B set value "Entityを近接攻撃" + execute if data storage asset:temp Trigger{Trigger:"onAttackByProjectile"} run data modify storage asset:temp Temp.Trigger.B set value "Entityを遠距離攻撃" + execute if data storage asset:temp Trigger{Trigger:"onDamage"} run data modify storage asset:temp Temp.Trigger.B set value "被ダメージ" + execute if data storage asset:temp Trigger{Trigger:"onDamageFromExplode"} run data modify storage asset:temp Temp.Trigger.B set value "被爆発ダメージ" + execute if data storage asset:temp Trigger{Trigger:"onDamageFromBurn"} run data modify storage asset:temp Temp.Trigger.B set value "被延焼ダメージ" + execute if data storage asset:temp Trigger{Trigger:"onDamageFromEntity"} run data modify storage asset:temp Temp.Trigger.B set value "被攻撃ダメージ" + execute if data storage asset:temp Trigger{Trigger:"onDamageFromMelee"} run data modify storage asset:temp Temp.Trigger.B set value "被近接ダメージ" + execute if data storage asset:temp Trigger{Trigger:"onDamageFromProjectile"} run data modify storage asset:temp Temp.Trigger.B set value "被遠距離ダメージ" + execute if data storage asset:temp Trigger{Trigger:"onKilled"} run data modify storage asset:temp Temp.Trigger.B set value "Entityを殺害" + execute if data storage asset:temp Trigger{Trigger:"onKilledByMelee"} run data modify storage asset:temp Temp.Trigger.B set value "Entityを近接攻撃で殺害" + execute if data storage asset:temp Trigger{Trigger:"onKilledByProjectile"} run data modify storage asset:temp Temp.Trigger.B set value "Entityを遠距離攻撃で殺害" + execute if data storage asset:temp Trigger{Trigger:"sneak"} run data modify storage asset:temp Temp.Trigger.B set value "スニーク" + execute if data storage asset:temp Trigger{Trigger:"sneak1s"} run data modify storage asset:temp Temp.Trigger.B set value "1秒間スニーク" + execute if data storage asset:temp Trigger{Trigger:"sneak2s"} run data modify storage asset:temp Temp.Trigger.B set value "2秒間スニーク" + execute if data storage asset:temp Trigger{Trigger:"sneak3s"} run data modify storage asset:temp Temp.Trigger.B set value "3秒間スニーク" + execute if data storage asset:temp Trigger{Trigger:"sneak4s"} run data modify storage asset:temp Temp.Trigger.B set value "4秒間スニーク" + execute if data storage asset:temp Trigger{Trigger:"sneak5s"} run data modify storage asset:temp Temp.Trigger.B set value "5秒間スニーク" + execute if data storage asset:temp Trigger{Trigger:"sneak10s"} run data modify storage asset:temp Temp.Trigger.B set value "10秒間スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak"} run data modify storage asset:temp Temp.Trigger.B set value "0秒以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak1s"} run data modify storage asset:temp Temp.Trigger.B set value "1秒間以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak2s"} run data modify storage asset:temp Temp.Trigger.B set value "2秒間以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak3s"} run data modify storage asset:temp Temp.Trigger.B set value "3秒間以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak4s"} run data modify storage asset:temp Temp.Trigger.B set value "4秒間以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak5s"} run data modify storage asset:temp Temp.Trigger.B set value "5秒間以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"keepSneak10s"} run data modify storage asset:temp Temp.Trigger.B set value "10秒間以上スニーク" + execute if data storage asset:temp Trigger{Trigger:"equipping"} run data modify storage asset:temp Temp.Trigger.AB set value "" + execute if data storage asset:temp Trigger{Trigger:"equipping"} run data modify storage asset:temp Temp.Trigger.B set value "" # 設定されてなかったらエラーメッセージ - execute unless data storage asset:artifact Temp.Trigger.A run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"登録されていないSlotが指定されています","color":"white"}] - execute unless data storage asset:artifact Temp.Trigger.B run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"登録されていないTriggerが指定されています","color":"white"}] + execute unless data storage asset:temp Temp.Trigger.A run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"登録されていないSlotが指定されています","color":"white"}] + execute unless data storage asset:temp Temp.Trigger.B run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"登録されていないTriggerが指定されています","color":"white"}] # 生成 loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/generate_lore/trigger # リセット - data remove storage asset:artifact Temp \ No newline at end of file + data remove storage asset:temp Temp \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/create/trigger_loop.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/create/trigger_loop.mcfunction new file mode 100644 index 000000000..b16d83e1b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/create/trigger_loop.mcfunction @@ -0,0 +1,36 @@ +#> asset_manager:artifact/create/trigger_loop +# @within function +# asset_manager:artifact/create/set_lore +# asset_manager:artifact/create/trigger_loop + +# move + data modify storage asset:temp Trigger set from storage asset:temp Triggers[0] + +# 空行セパレータ + data modify storage asset:artifact Item.tag.display.Lore append value '""' +# 0 使用方法 + function asset_manager:artifact/create/set_trigger +# 1? 使用条件 + execute if data storage asset:temp Trigger.Condition run loot replace block 10000 0 10000 container.1 loot asset_manager:artifact/generate_lore/condition +# 2? 攻撃情報 + execute if data storage asset:temp Trigger.AttackInfo run function asset_manager:artifact/create/set_attack_info +# 3? 必要MP + execute if data storage asset:temp Trigger.MPRequire run loot replace block 10000 0 10000 container.3 loot asset_manager:artifact/generate_lore/mp_require +# 4 消費MP + loot replace block 10000 0 10000 container.4 loot asset_manager:artifact/generate_lore/mp_cost +# 5? 消費アイテム + execute if data storage asset:temp Trigger.CostText run loot replace block 10000 0 10000 container.5 loot asset_manager:artifact/generate_lore/cost_item +# 6? クールタイム + execute if data storage asset:temp Trigger.LocalCooldown run function asset_manager:artifact/create/set_cooltime +# 7? スペシャル☆クールタイム + execute if data storage asset:temp Trigger.SpecialCooldown run function asset_manager:artifact/create/set_special_cooltime + +# Lore一括追加 + data modify storage asset:artifact Item.tag.display.Lore append from block 10000 0 10000 Items[].tag.display.Lore[] +# リセット + data modify block 10000 0 10000 Items set value [] + +# loop + data remove storage asset:temp Trigger + data remove storage asset:temp Triggers[0] + execute if data storage asset:temp Triggers[0] run function asset_manager:artifact/create/trigger_loop \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/migrate.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/migrate.mcfunction new file mode 100644 index 000000000..d628478f3 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/data/migrate.mcfunction @@ -0,0 +1,33 @@ +#> asset_manager:artifact/data/migrate +# @within function asset_manager:artifact/*/ + +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers append value {} + +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].Slot set from storage asset:artifact TargetItems[0].tag.TSB.Slot +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].Trigger set from storage asset:artifact TargetItems[0].tag.TSB.Trigger +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].Condition set from storage asset:artifact TargetItems[0].tag.TSB.Condition +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].AttackInfo set from storage asset:artifact TargetItems[0].tag.TSB.AttackInfo +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].MPCost set from storage asset:artifact TargetItems[0].tag.TSB.MPCost +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].MPRequire set from storage asset:artifact TargetItems[0].tag.TSB.MPRequire +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].CostText set from storage asset:artifact TargetItems[0].tag.TSB.CostText +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].LocalCooldown set from storage asset:artifact TargetItems[0].tag.TSB.LocalCooldown +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].SpecialCooldown set from storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].DisableCooldownMessage set from storage asset:artifact TargetItems[0].tag.TSB.DisableCooldownMessage +data modify storage asset:artifact TargetItems[0].tag.TSB.Triggers[0].DisableMPMessage set from storage asset:artifact TargetItems[0].tag.TSB.DisableMPMessage + +data remove storage asset:artifact TargetItems[0].tag.TSB.Slot +data remove storage asset:artifact TargetItems[0].tag.TSB.Trigger +data remove storage asset:artifact TargetItems[0].tag.TSB.Condition +data remove storage asset:artifact TargetItems[0].tag.TSB.AttackInfo +data remove storage asset:artifact TargetItems[0].tag.TSB.MPCost +data remove storage asset:artifact TargetItems[0].tag.TSB.MPRequire +data remove storage asset:artifact TargetItems[0].tag.TSB.CostText +data remove storage asset:artifact TargetItems[0].tag.TSB.LocalCooldown +data remove storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown +data remove storage asset:artifact TargetItems[0].tag.TSB.DisableCooldownMessage +data remove storage asset:artifact TargetItems[0].tag.TSB.DisableMPMessage + +data modify storage api: Argument.ID set from storage asset:artifact TargetItems[0].tag.TSB.ID +execute unless data storage asset:artifact {TargetSlot:"auto"} run data modify storage api: Argument.Slot set from storage asset:artifact TargetSlot +execute if data storage asset:artifact {TargetSlot:"auto"} run data modify storage api: Argument.Slot set from storage asset:context Items.AutoSlot +function api:artifact/replace/from_id \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction index c9f673083..c260ca5a4 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction @@ -20,8 +20,8 @@ execute if entity @s[tag=TriggerFlag.UseItem] run function asset_manager:artifact/triggers/use_item/ execute if entity @s[tag=TriggerFlag.Sneak] run function asset_manager:artifact/triggers/sneak/ execute if entity @s[tag=TriggerFlag.UsingItem] run function asset_manager:artifact/triggers/using_item - execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/dis_equip - execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equip + execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/dis_equip/ + execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equip/ execute if entity @s[tag=TriggerFlag.Attack] run function asset_manager:artifact/triggers/attack execute if entity @s[tag=TriggerFlag.Damage] run function asset_manager:artifact/triggers/damage # EntityStorageにデータ突っ込む diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction similarity index 93% rename from TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction rename to TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction index 76887a07b..d37efbeb8 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction @@ -1,4 +1,4 @@ -#> asset_manager:artifact/triggers/dis_equip +#> asset_manager:artifact/triggers/dis_equip/ # # 各神器処理へデータ受け渡し # diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction similarity index 88% rename from TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction rename to TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction index cd0a12459..3ef2501d6 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction @@ -1,4 +1,4 @@ -#> asset_manager:artifact/triggers/equip +#> asset_manager:artifact/triggers/equip/ # # 各神器処理へデータ受け渡し # @@ -10,6 +10,8 @@ data modify storage asset:context id.all set from storage asset:context id # 変更のなかったスロットをマスクする function asset_manager:artifact/triggers/equipments/mask_slot/ +# 装備アイテムのModifier反映 + # 神器側に受け渡し function #asset:artifact/equip # イベント発火後に実行するやつ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/mask_slot/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/mask_slot/.mcfunction index 3372445c4..be2d41784 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/mask_slot/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/mask_slot/.mcfunction @@ -2,7 +2,7 @@ # # # -# @within function asset_manager:artifact/triggers/*equip +# @within function asset_manager:artifact/triggers/*equip/ # 元配列 function asset_manager:artifact/data/current/equips/init diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction index 73936b5de..0b5e97b99 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction @@ -24,7 +24,7 @@ data modify storage asset:artifact ItemData append from storage asset:context New.Items.hotbar[7].tag.TSB data modify storage asset:artifact ItemData append from storage asset:context New.Items.hotbar[8].tag.TSB # それぞれについて更新 - function asset_manager:artifact/triggers/equipments/update_cooldown/foreach + function asset_manager:artifact/triggers/equipments/update_cooldown/foreach/ # 反転 function lib:array/reverse # 設定 diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction deleted file mode 100644 index 94654eaf4..000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> asset_manager:artifact/triggers/equipments/update_cooldown/foreach -# -# -# -# @within function asset_manager:artifact/triggers/equipments/update_cooldown/* - -#> Private -# @private - #declare score_holder $Max - -# データ取得 - execute store result score $Tick Temporary run time query gametime - execute store result score $Max Temporary run data get storage asset:artifact ItemData[-1].LocalCooldown - execute store result score $LatestUsedTick Temporary run data get storage asset:artifact ItemData[-1].LatestUseTick -# 使用してからの時間を取得 - scoreboard players operation $Tick Temporary -= $LatestUsedTick Temporary - scoreboard players operation $Max Temporary -= $Tick Temporary - execute if score $Max Temporary matches ..-15 run scoreboard players set $Max Temporary -15 -# 設定 - data modify storage lib: Array append value {} - execute store result storage lib: Array[-1].Value int 1 run scoreboard players get $Max Temporary - execute store result storage lib: Array[-1].Max int 1 run data get storage asset:artifact ItemData[-1].LocalCooldown -# 末尾削除 - data remove storage asset:artifact ItemData[-1] -# 要素があれば再帰 - execute if data storage asset:artifact ItemData[0] run function asset_manager:artifact/triggers/equipments/update_cooldown/foreach \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/.mcfunction new file mode 100644 index 000000000..7dbdd271b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/.mcfunction @@ -0,0 +1,34 @@ +#> asset_manager:artifact/triggers/equipments/update_cooldown/foreach/ +# +# +# +# @within function asset_manager:artifact/triggers/equipments/update_cooldown/** + +#> Private +# @private + #declare score_holder $Max + #declare score_holder $Current + +# データ取得 + execute store result score $Tick Temporary run time query gametime + data modify storage asset:temp Triggers set from storage asset:artifact ItemData[-1].Triggers + function asset_manager:artifact/triggers/equipments/update_cooldown/foreach/get_cooldown + execute store result storage asset:temp MaxLCD int 1 run scoreboard players get $Max Temporary + function asset_manager:artifact/triggers/equipments/update_cooldown/foreach/get_tick with storage asset:temp +# 使用してからの時間を取得 + scoreboard players operation $Current Temporary = $Max Temporary + scoreboard players operation $Tick Temporary -= $LatestUsedTick Temporary + scoreboard players operation $Current Temporary -= $Tick Temporary + execute if score $Current Temporary matches ..-15 run scoreboard players set $Current Temporary -15 +# 設定 + data modify storage lib: Array append value {} + execute store result storage lib: Array[-1].Value int 1 run scoreboard players get $Current Temporary + execute store result storage lib: Array[-1].Max int 1 run scoreboard players get $Max Temporary +# 末尾削除 + data remove storage asset:artifact ItemData[-1] +# リセット + data remove storage asset:temp Triggers + scoreboard players reset $Max Temporary + scoreboard players reset $Current Temporary +# 要素があれば再帰 + execute if data storage asset:artifact ItemData[0] run function asset_manager:artifact/triggers/equipments/update_cooldown/foreach/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/get_cooldown.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/get_cooldown.mcfunction new file mode 100644 index 000000000..6bd562382 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/get_cooldown.mcfunction @@ -0,0 +1,18 @@ +#> asset_manager:artifact/triggers/equipments/update_cooldown/foreach/get_cooldown +# @within function +# asset_manager:artifact/triggers/equipments/update_cooldown/foreach/ +# asset_manager:artifact/triggers/equipments/update_cooldown/foreach/get_cooldown + +#> private +# @private + #declare score_holder $LCD + +# maximize + execute store result score $LCD Temporary run data get storage asset:temp Triggers[-1].LocalCooldown 1 + scoreboard players operation $Max Temporary > $LCD Temporary + +# loop + scoreboard players reset $LCD Temporary + data remove storage asset:temp Triggers[-1] + execute unless data storage asset:temp Triggers[0] run data remove storage asset:temp Triggers + execute if data storage asset:temp Triggers[0] run function asset_manager:artifact/triggers/equipments/update_cooldown/foreach/get_cooldown \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/get_tick.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/get_tick.mcfunction new file mode 100644 index 000000000..3f9c9910b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach/get_tick.mcfunction @@ -0,0 +1,6 @@ +#> asset_manager:artifact/triggers/equipments/update_cooldown/foreach/get_tick +# @within function +# asset_manager:artifact/triggers/equipments/update_cooldown/foreach/ + +$execute store result score $LatestUsedTick Temporary run data get storage asset:artifact ItemData[-1].Triggers[{LocalCooldown:$(MaxLCD)}].LatestUseTick +data remove storage asset:temp MaxLCD \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction index 9f11150f2..3467df7a9 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction @@ -6,15 +6,18 @@ # 神器データの取得 function asset_manager:artifact/data/current/get +# 古いデータの回収 + execute unless data storage asset:artifact TargetItems[0].tag.TSB.Triggers[0] run function asset_manager:artifact/data/migrate # MP減少処理 - function asset_manager:artifact/use/remove_mp + function asset_manager:artifact/use/remove_mp with storage asset:artifact # 特殊クールダウン保存 - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown store result score $ArtifactSpecialCooldown Global run data get storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown store result bossbar asset:special_cooldown max run scoreboard players get $ArtifactSpecialCooldown Global - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown run bossbar set asset:special_cooldown players @a +$execute if data storage asset:artifact TargetItems[0].tag.TSB.Triggers[$(Index)].SpecialCooldown store result score $ArtifactSpecialCooldown Global run data get storage asset:artifact TargetItems[0].tag.TSB.Triggers[$(Index)].SpecialCooldown +$execute if data storage asset:artifact TargetItems[0].tag.TSB.Triggers[$(Index)].SpecialCooldown store result bossbar asset:special_cooldown max run scoreboard players get $ArtifactSpecialCooldown Global +$execute if data storage asset:artifact TargetItems[0].tag.TSB.Triggers[$(Index)].SpecialCooldown run bossbar set asset:special_cooldown players @a # すべてのアイテムについて更新処理を行う - execute unless data storage asset:artifact {IgnoreItemUpdate:true} run function asset_manager:artifact/use/item/ + execute unless data storage asset:artifact {IgnoreItemUpdate:true} run function asset_manager:artifact/use/item/ with storage asset:artifact # リセット + data remove storage asset:artifact Index data remove storage asset:artifact IgnoreItemUpdate data remove storage asset:artifact TargetSlot data remove storage asset:artifact TargetDefaultSlot diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction index f4b7397b7..d25938eb4 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction @@ -7,11 +7,11 @@ # asset_manager:artifact/use/item/ # 最終使用tick保存 - execute store result storage asset:artifact TargetItems[-1].tag.TSB.LatestUseTick int 1 run time query gametime +$execute store result storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LatestUseTick int 1 run time query gametime # アイテム更新 execute unless data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run function asset_manager:artifact/use/item/update execute if data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run function asset_manager:artifact/use/item/has_remain # 末尾削除 data remove storage asset:artifact TargetItems[-1] # 要素が残ってるなら再帰 - execute if data storage asset:artifact TargetItems[0] run function asset_manager:artifact/use/item/ \ No newline at end of file + execute if data storage asset:artifact TargetItems[0] run function asset_manager:artifact/use/item/ with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction index c6c03935d..b435c8ac0 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction @@ -6,5 +6,5 @@ function oh_my_dat:please execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run data modify storage asset:artifact SpecificTargetSlot set from storage asset:artifact TargetItems[-1].Slot -execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar -execute unless data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/non-hotbar \ No newline at end of file +execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar with storage asset:artifact +execute unless data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/non-hotbar with storage asset:artifact \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction index 1afee42b5..ecbf7a7bd 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction @@ -7,14 +7,14 @@ # asset_manager:artifact/use/item/update_local_cooldown/non-hotbar # 設定 - execute if data storage asset:artifact {SpecificTargetSlot:0b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[05].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[05].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:1b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[06].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[06].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:2b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[07].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[07].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:3b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[08].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[08].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:4b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[09].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[09].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:5b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:6b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:7b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:8b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:0b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[05].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[05].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:1b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[06].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[06].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:2b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[07].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[07].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:3b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[08].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[08].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:4b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[09].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[09].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:5b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:6b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:7b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {SpecificTargetSlot:8b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown # リセット data remove storage asset:artifact SpecificTargetSlot \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction index 9a7f2946d..1b49c48d6 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction @@ -5,9 +5,9 @@ # @within function asset_manager:artifact/use/item/update_local_cooldown/ execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} store result storage asset:artifact SpecificTargetSlot byte 1 run data get storage asset:context SelectedItemSlot -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar -execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[0].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[0].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"feet"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[1].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[1].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"legs"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[2].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[2].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"chest"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[3].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[3].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"head"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[4].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[4].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown \ No newline at end of file +execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar with storage asset:artifact +$execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[0].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[0].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {TargetDefaultSlot:"feet"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[1].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[1].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {TargetDefaultSlot:"legs"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[2].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[2].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {TargetDefaultSlot:"chest"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[3].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[3].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown +$execute if data storage asset:artifact {TargetDefaultSlot:"head"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[4].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[4].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.Triggers[$(Index)].LocalCooldown \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction index c554ee900..75ca662a9 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction @@ -13,7 +13,7 @@ #declare score_holder $Length # 取得 - execute store result score $Fluctuation Lib run data get storage asset:artifact TargetItems[0].tag.TSB.MPCost +$execute store result score $Fluctuation Lib run data get storage asset:artifact TargetItems[0].tag.TSB.Triggers[$(Index)].MPCost # アイテム数だけ増やす # execute store result score $Length Temporary if data storage asset:artifact TargetItems[] # scoreboard players operation $Fluctuation Lib *= $Length Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/anti_void_action/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/anti_void_action/.mcfunction index 92895874c..4b4e21274 100644 --- a/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/anti_void_action/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/anti_void_action/.mcfunction @@ -22,4 +22,4 @@ execute if score @s VoidActionTime matches 63 as @a[tag=!PlayerShouldInvulnerable,distance=..5] run function asset_manager:mob/common_tag/anti_void_action/damage execute if score @s VoidActionTime matches 65 run function asset_manager:mob/common_tag/anti_void_action/reset # リセット - tag @s remove AntiVoidTarget + tag @s remove AntiVoidTarget \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/break_rides.mcfunction b/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/break_rides.mcfunction index 0535e0f96..b5a950dfc 100644 --- a/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/break_rides.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/mob/common_tag/break_rides.mcfunction @@ -17,4 +17,4 @@ particle minecraft:poof ~ ~1 ~ 0.2 0.2 0.2 0.1 20 # プレイヤーが置ける乗り物を破壊 - kill @e[type=#lib:placeable_vehicles,distance=..1,sort=nearest,limit=1] + kill @e[type=#lib:placeable_vehicles,distance=..1,sort=nearest,limit=1] \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/attack_info.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/attack_info.json index d428f0fca..5df078e35 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/attack_info.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/attack_info.json @@ -22,12 +22,12 @@ "text": "攻撃情報: " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line1[0]", "interpret": true }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line1[1]", "interpret": true }, @@ -38,12 +38,12 @@ "text": " " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line1[2]", "interpret": true }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line1[3]", "interpret": true } @@ -55,12 +55,12 @@ "italic": false }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line2[0]", "interpret": true }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line2[1]", "interpret": true }, @@ -68,22 +68,22 @@ "text": "| " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line2[2]", "interpret": true }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line2[3]", "interpret": true }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line2[4]", "interpret": true }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Line2[5]", "interpret": true } diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/condition.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/condition.json index 95616588a..2bd75eba6 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/condition.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/condition.json @@ -22,8 +22,8 @@ "text": "使用条件: " }, { - "storage": "asset:artifact", - "nbt": "Condition", + "storage": "asset:temp", + "nbt": "Trigger.Condition", "interpret": true } ] diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cooldown.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cooldown.json index 089488d45..6479ad198 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cooldown.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cooldown.json @@ -22,14 +22,14 @@ "text": "クールダウン: " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "LocalCooldownSecond" }, { "text": "." }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "LocalCooldownDecimal" }, { @@ -67,21 +67,21 @@ "text": "クールダウン: " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "LocalCooldownMinutes" }, { "text": "分" }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "LocalCooldownSecond" }, { "text": "." }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "LocalCooldownDecimal" }, { diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cost_item.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cost_item.json index b5f7ba0a9..304c29e15 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cost_item.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/cost_item.json @@ -22,8 +22,8 @@ "text": "消費アイテム: " }, { - "storage": "asset:artifact", - "nbt": "CostText", + "storage": "asset:temp", + "nbt": "Trigger.CostText", "interpret": true } ] diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_cost.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_cost.json index 9657e5805..c3c2c4966 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_cost.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_cost.json @@ -22,8 +22,8 @@ "text": "消費MP: " }, { - "storage": "asset:artifact", - "nbt": "MPCost" + "storage": "asset:temp", + "nbt": "Trigger.MPCost" } ] ] diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_require.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_require.json index 2874d9f88..d9d3b78cb 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_require.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/mp_require.json @@ -22,8 +22,8 @@ "text": "必要MP: " }, { - "storage": "asset:artifact", - "nbt": "MPRequire" + "storage": "asset:temp", + "nbt": "Trigger.MPRequire" } ] ] diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/special_cooldown.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/special_cooldown.json index 350ba837a..2934fa907 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/special_cooldown.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/special_cooldown.json @@ -22,14 +22,14 @@ "text": "特殊クールダウン: " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "SpecialCooldownSecond" }, { "text": "." }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "SpecialCooldownDecimal" }, { @@ -67,21 +67,21 @@ "text": "特殊クールダウン: " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "SpecialCooldownMinutes" }, { "text": "分" }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "SpecialCooldownSecond" }, { "text": "." }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "SpecialCooldownDecimal" }, { diff --git a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/trigger.json b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/trigger.json index 6c641038a..78713a40f 100644 --- a/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/trigger.json +++ b/TheSkyBlessing/data/asset_manager/loot_tables/artifact/generate_lore/trigger.json @@ -22,15 +22,15 @@ "text": "使用方法: " }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Temp.Trigger.A" }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Temp.Trigger.AB" }, { - "storage": "asset:artifact", + "storage": "asset:temp", "nbt": "Temp.Trigger.B" } ] diff --git a/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction b/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction index 0a726bc4c..1998204f7 100644 --- a/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction +++ b/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction @@ -17,7 +17,7 @@ function player_manager:god/none/set_tag # ステータス初期化 function oh_my_dat:please - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers set value {Heal:1d,ReceiveHeal:1d,Attack:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},Defense:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},MPRegen:1d} + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers set value {Heal:1d,ReceiveHeal:1d,Attack:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},Defense:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},MaxMP:100d,MPRegen:1d,MaxHealth:20d,Base:{Heal:1d,ReceiveHeal:1d,Attack:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},Defense:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},MaxMP:100d,MPRegen:1d,MaxHealth:20d}} # 神器クールダウンの初期化 data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown set value [{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0}] diff --git a/TheSkyBlessing/data/core/functions/handler/join.mcfunction b/TheSkyBlessing/data/core/functions/handler/join.mcfunction index 7c72b41e8..92c27520b 100644 --- a/TheSkyBlessing/data/core/functions/handler/join.mcfunction +++ b/TheSkyBlessing/data/core/functions/handler/join.mcfunction @@ -9,9 +9,9 @@ # バージョンチェック function player_manager:version_check # ボーナスの更新 - function player_manager:bonus/update_health_bonus - function player_manager:bonus/update_mp_bonus - function player_manager:bonus/update_attack_bonus - function player_manager:bonus/update_defense_bonus + function asset:artifact/0002.blessing/trigger/update/attack_bonus + function asset:artifact/0002.blessing/trigger/update/defense_bonus + function asset:artifact/0002.blessing/trigger/update/health_bonus + function asset:artifact/0002.blessing/trigger/update/mp_bonus # ロード待ち時間を更新する function world_manager:chunk_io_protect/update_load_waiting_time \ No newline at end of file diff --git a/TheSkyBlessing/data/core/functions/load_once.mcfunction b/TheSkyBlessing/data/core/functions/load_once.mcfunction index ca41c454b..843876738 100644 --- a/TheSkyBlessing/data/core/functions/load_once.mcfunction +++ b/TheSkyBlessing/data/core/functions/load_once.mcfunction @@ -155,7 +155,6 @@ team modify NoCollision collisionRule never #> AssetManager: Mob -Public # @public scoreboard objectives add MobID dummy {"text":"MobAssetのID"} - scoreboard objectives add MobHealth dummy {"text":"Mobの体力"} #> AssetManager: Mob -Private # @within function @@ -173,11 +172,6 @@ team modify NoCollision collisionRule never scoreboard objectives add SpawnerHP dummy {"text":"スポナーの残体力"} scoreboard objectives add SpawnerCooldown dummy {"text":"スポナーの召喚クールダウン"} - #> AssetManager: Teleporter - # @within function - # asset_manager:teleporter/** - scoreboard objectives add TeleporterLogCD dummy {"text":"他のテレポーターが発見できなかった際のログのクールダウン"} - #> AssetManager: Island # @within function # asset_manager:island/** @@ -193,7 +187,7 @@ team modify NoCollision collisionRule never # core:tick/** scoreboard objectives add FirstJoinEvent custom:play_time {"text":"イベント: 初回Join"} scoreboard objectives add RejoinEvent custom:leave_game {"text":"イベント: 再Join"} - scoreboard objectives add AttackEvent custom:damage_dealt {"text":"イベント: 攻撃"} + scoreboard objectives add AttackEvent custom:damage_dealt_absorbed {"text":"イベント: 攻撃"} scoreboard objectives add DeathEvent deathCount {"text":"イベント: 死亡"} scoreboard objectives add RespawnEvent custom:time_since_death {"text":"イベント: リスポーン"} scoreboard objectives add ClickCarrotEvent used:carrot_on_a_stick {"text":"イベント: クリック 人参棒"} @@ -381,9 +375,5 @@ team modify NoCollision collisionRule never function #asset:artifact/load function #asset:mob/load - #> 神の慈悲アイテムを定義する - function player_manager:god/mercy/offering/init - -#> ROMを初期化する - function rom:init \ No newline at end of file + function player_manager:god/mercy/offering/init \ No newline at end of file diff --git a/TheSkyBlessing/data/core/functions/patcher/load_once.mcfunction b/TheSkyBlessing/data/core/functions/patcher/load_once.mcfunction index f6ffc4d5d..949f04a8c 100644 --- a/TheSkyBlessing/data/core/functions/patcher/load_once.mcfunction +++ b/TheSkyBlessing/data/core/functions/patcher/load_once.mcfunction @@ -16,6 +16,8 @@ # @private #declare objective AttackEvent scoreboard objectives remove AttackEvent + scoreboard players reset $MaxHealth Global + scoreboard players reset $MaxMP Global #> ベクトル用等のシステム内汎用Entityのエイリアスの登録とsummon summon marker 0.0 0.0 0.0 {UUID:[I;0,0,0,0]} @@ -66,8 +68,24 @@ # predicate lib:in_battle scoreboard objectives add InBattleTick dummy + #> 最大値用スコアホルダー + # @within function + # core:patcher/load_once + # core:handler/first_join + # asset:artifact/0002.blessing/trigger/** + #declare score_holder $BonusHealth + #declare score_holder $BonusMP + #declare score_holder $AttackBonus + #declare score_holder $DefenseBonus + scoreboard players set $BonusHealth Global 0 + scoreboard players set $BonusMP Global 0 + scoreboard players set $AttackBonus Global 0 + scoreboard players set $DefenseBonus Global 0 + #> 各Asset側のロード処理 function #asset:artifact/load + function #asset:effect/load + function #asset:mob/load #> ROMを初期化する # @private diff --git a/TheSkyBlessing/data/lib/functions/message/tutorial/sacred_treasure.mcfunction b/TheSkyBlessing/data/lib/functions/message/tutorial/sacred_treasure.mcfunction deleted file mode 100644 index 48424c104..000000000 --- a/TheSkyBlessing/data/lib/functions/message/tutorial/sacred_treasure.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> lib:message/tutorial/sacred_treasure -# -# 「◆ 神器について -# この世界には、**神器**と呼ばれる特別なアイテムが存在します。 -# しかしながら、使用するには神器の力を受け入れる神を信仰している必要があります。」 -# -# @within function world_manager:area/01-03.tutorial-sacred_treasure - -tellraw @s [{"text":"◆ 神器について\n","color":"light_purple"},{"text":"この世界には、","color":"white"},{"text":"神器","bold":true,"color":"light_purple"},{"text":"と呼ばれる特別なアイテムが存在します。\nしかしながら、使用するには神器の力を受け入れる神を信仰している必要があります。","color":"white"}] \ No newline at end of file diff --git a/TheSkyBlessing/data/world_manager/functions/area/01-03.tutorial-sacred_treasure.mcfunction b/TheSkyBlessing/data/world_manager/functions/area/01-03.tutorial-sacred_treasure.mcfunction deleted file mode 100644 index 83162ceda..000000000 --- a/TheSkyBlessing/data/world_manager/functions/area/01-03.tutorial-sacred_treasure.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#> world_manager:area/01-03.tutorial-sacred_treasure -# -# -# -# @within function world_manager:area/01.god_boundaries/on_tick - -#> Once -# @private - #declare tag TutorialFlag3 - -# エリアセット - scoreboard players set $NextInSubArea Temporary 03 -# メッセージ - execute unless entity @s[tag=TutorialFlag3] run function lib:message/tutorial/sacred_treasure -# 二度と表示されなくする - tag @s add TutorialFlag3 \ No newline at end of file diff --git a/TheSkyBlessing/data/world_manager/functions/gimmick/ending_portal/close.mcfunction b/TheSkyBlessing/data/world_manager/functions/gimmick/ending_portal/close.mcfunction new file mode 100644 index 000000000..d57b6fdb4 --- /dev/null +++ b/TheSkyBlessing/data/world_manager/functions/gimmick/ending_portal/close.mcfunction @@ -0,0 +1,8 @@ +#> world_manager:gimmick/ending_portal/close +# +# 初期スポーンに帰還するポータル +# +# @api + +# ポータルなどなかった + kill @e[type=marker,tag=BetaEndingPortal] \ No newline at end of file