Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#declare score_holder $Modifier

# 補正を取得
function api:modifier/mp_regen/get
function api:modifier/mp_heal/get
# 回復量計算
execute store result score $MPHeal Temporary run data get storage api: Argument.AdditionalMPHeal 100
execute store result score $Modifier Temporary run data get storage api: Return.MPRegen 100
execute store result score $Modifier Temporary run data get storage api: Return.MPHeal 100
scoreboard players operation $MPHeal Temporary *= $Modifier Temporary
execute store result storage api: Argument.Fluctuation double 0.01 run scoreboard players operation $MPHeal Temporary /= $100 Const
# 表示を無効化する
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#> api:modifier/core/mp_regen/add
#> api:modifier/core/mp_heal/add
#
#
#
# @within function api:modifier/mp_regen/add
# @within function api:modifier/mp_heal/add

# UserStorage呼び出し
function oh_my_dat:please
# 無ければ入れる
execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPRegen[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPRegen set value []
execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPHeal[0] run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPHeal set value []
# 同じUUIDのModifierを削除する
data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPRegen
data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPHeal
data modify storage api: NewModifiers set value []
data remove storage api: Removed
function api:modifier/core/common/remove_modifier
Expand All @@ -19,11 +19,11 @@
data modify storage api: Modifiers[-1].UUID set from storage api: Argument.UUID
data modify storage api: Modifiers[-1].Amount set from storage api: Argument.Amount
data modify storage api: Modifiers[-1].Operation set from storage api: Argument.Operation
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPRegen set from storage api: Modifiers
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPHeal set from storage api: Modifiers
# データを更新
data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default.MPRegen
data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default.MPHeal
function api:modifier/core/common/update_modifier/
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value.MPRegen set from storage api: Modifier
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value.MPHeal set from storage api: Modifier
# リセット
data remove storage api: Base
data remove storage api: Modifiers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#> api:modifier/core/mp_regen/remove
#> api:modifier/core/mp_heal/remove
#
#
#
# @within function api:modifier/mp_regen/remove
# @within function api:modifier/mp_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].Attributes.Modifier.MPRegen
data modify storage api: Modifiers set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPHeal
# 配列の初期化
data modify storage api: NewModifiers set value []
data remove storage api: Removed
# フィルタ
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].Attributes.Modifier.MPRegen set from storage api: Modifiers
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Modifier.MPHeal set from storage api: Modifiers
# データの更新
data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default.MPRegen
data modify storage api: Base set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default.MPHeal
function api:modifier/core/common/update_modifier/
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value.MPRegen set from storage api: Modifier
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value.MPHeal set from storage api: Modifier
# リセット
data remove storage api: Base
data remove storage api: Modifiers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> api:modifier/mp_regen/add
#> api:modifier/mp_heal/add
#
#
#
Expand All @@ -12,9 +12,9 @@

# データ検証
function api:modifier/core/common/validate_add
execute if entity @s[type=!player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"api:modifier/mp_regen/add が非プレイヤーに対して使用されています","color":"white"}]
execute if entity @s[type=!player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"api:modifier/mp_heal/add が非プレイヤーに対して使用されています","color":"white"}]
# データが正しいなら入れる
execute if data storage api: Argument.UUID if data storage api: Argument.Amount if data storage api: Argument.Operation run function api:modifier/core/mp_regen/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/mp_heal/add
# リセット
data remove storage api: Argument.UUID
data remove storage api: Argument.Amount
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> api:modifier/mp_heal/get
#
#
#
# @input as player
# @output storage api:
# Return.Heal : double
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@output の記載が Return.Heal になっていますが、この関数は Return.MPHeal を返しています(下の data remove/modify も MPHeal)。APIドキュメントとして誤解を招くので Return.MPHeal : double に修正してください。

Suggested change
# Return.Heal : double
# Return.MPHeal : double

Copilot uses AI. Check for mistakes.
# @api

execute if entity @s[type=!player] run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"api:modifier/mp_heal/get が非プレイヤーに対して使用されています","color":"white"}]

function oh_my_dat:please
data remove storage api: Return.MPHeal
data modify storage api: Return.MPHeal set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value.MPHeal
Comment thread
Lapis-LJA marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> api:modifier/mp_regen/remove
#> api:modifier/mp_heal/remove
#
#
#
Expand All @@ -11,8 +11,8 @@

# データ検証
function api:modifier/core/common/validate_remove
execute if entity @s[type=!player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"api:modifier/mp_regen/remove が非プレイヤーに対して使用されています","color":"white"}]
execute if entity @s[type=!player] run return run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"api:modifier/mp_heal/remove が非プレイヤーに対して使用されています","color":"white"}]
# データが正しいなら消す
execute if data storage api: Argument.UUID run function api:modifier/core/mp_regen/remove
execute if data storage api: Argument.UUID run function api:modifier/core/mp_heal/remove
# リセット
data remove storage api: Argument.UUID

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
execute if data storage asset:artifact Modifier{Type:"heal"} run data modify storage asset:artifact Line[1] set value '"与回復量"'
execute if data storage asset:artifact Modifier{Type:"receive_heal"} run scoreboard players set $CustomModifier Temporary 1
execute if data storage asset:artifact Modifier{Type:"receive_heal"} run data modify storage asset:artifact Line[1] set value '"被回復量"'
execute if data storage asset:artifact Modifier{Type:"mp_regen"} run scoreboard players set $CustomModifier Temporary 1
execute if data storage asset:artifact Modifier{Type:"mp_regen"} run data modify storage asset:artifact Line[1] set value '"MP回復量"'
execute if data storage asset:artifact Modifier{Type:"mp_heal"} run scoreboard players set $CustomModifier Temporary 1
execute if data storage asset:artifact Modifier{Type:"mp_heal"} run data modify storage asset:artifact Line[1] set value '"MP回復量"'
execute if data storage asset:artifact Modifier{Type:"max_health"} run scoreboard players set $CustomModifier Temporary 1
execute if data storage asset:artifact Modifier{Type:"max_health"} run data modify storage asset:artifact Line[1] set value '"最大体力"'
execute if data storage asset:artifact Modifier{Type:"max_mp"} run scoreboard players set $CustomModifier Temporary 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 無信仰にする
execute unless predicate player_manager:is_believe/flora unless predicate player_manager:is_believe/nyaptov unless predicate player_manager:is_believe/rumor unless predicate player_manager:is_believe/urban unless predicate player_manager:is_believe/wi-ki run function player_manager:god/none/set_tag
# ステータス初期化
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default 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,FallResistance:1d}
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default 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,MPHeal:1d,MaxHealth:20d,FallResistance:1d}
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default
# 神器クールダウンの初期化
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}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
function api:modifier/attack/base/remove
# MP回復量+30%
data modify storage api: Argument.UUID set value [1, 2, 1, 12]
function api:modifier/mp_regen/remove
function api:modifier/mp_heal/remove
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
data modify storage api: Argument.UUID set value [1, 2, 1, 12]
data modify storage api: Argument.Amount set value 0.3
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/mp_regen/add
function api:modifier/mp_heal/add
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
data modify storage api: Argument.UUID set value [2, 1, 1, 14]
data modify storage api: Argument.Amount set value 0.25
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/mp_regen/add
function api:modifier/mp_heal/add
# 物理攻撃-30%
data modify storage api: Argument.UUID set value [2, 1, 1, 14]
data modify storage api: Argument.Amount set value -0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
function api:modifier/defense/magic/remove
# MP回復量+25%
data modify storage api: Argument.UUID set value [2, 1, 1, 14]
function api:modifier/mp_regen/remove
function api:modifier/mp_heal/remove
# 物理攻撃-30%
data modify storage api: Argument.UUID set value [2, 1, 1, 14]
function api:modifier/attack/physical/remove
Expand Down
Loading