Skip to content

Commit

Permalink
ずぶ濡れ Effect 追加
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 26, 2024
1 parent 04a4098 commit 47a0e95
Show file tree
Hide file tree
Showing 20 changed files with 159 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/end/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/given
#
# Effectが付与された時に実行されるfunction
#
# @within tag/function asset:effect/given

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/re-given
#
# Effectが上書きされた時に実行されるfunction
#
# @within tag/function asset:effect/re-given

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/re-given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/remove
#
# Effectが神器や牛乳によって削除された時に実行されるfunction
#
# @within tag/function asset:effect/remove

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/remove/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/tick
#
# Effectが発動している間毎tick実行されるfunction
#
# @within tag/function asset:effect/tick

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/tick/
7 changes: 7 additions & 0 deletions Asset/data/asset/functions/effect/0618.soaked/end/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/end/
#
# Effectの効果が切れた時の処理
#
# @within function asset:effect/0618.soaked/_/end

function asset:effect/0618.soaked/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/given/
#
# Effectが付与された時の処理
#
# @within function asset:effect/0618.soaked/_/given

function asset:effect/0618.soaked/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:effect/0618.soaked/modifier/add
#
# 補正を追加する
#
# @within function
# asset:effect/0618.soaked/given/
# asset:effect/0618.soaked/re-given/

# 移動速度-20%を付与
attribute @s generic.movement_speed modifier add 00000001-0000-0003-0000-026a00000000 "618.Speed" -0.2 multiply

# (-25 × Stack)%分の水耐性弱化を付与
data modify storage api: Argument.UUID set value [I;1,3,618,0]
execute store result storage api: Argument.Amount double -0.25 run data get storage asset:context Stack
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/defense/water/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#> asset:effect/0618.soaked/modifier/remove
#
# 補正を削除する
#
# @within function
# asset:effect/0618.soaked/end/
# asset:effect/0618.soaked/re-given/
# asset:effect/0618.soaked/remove/

# 移動速度低下を削除
attribute @s generic.movement_speed modifier remove 00000001-0000-0003-0000-026a00000000

# 補正を削除する
data modify storage api: Argument.UUID set value [I;1,3,618,0]
function api:modifier/defense/water/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0618.soaked/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0618.soaked/_/re-given

function asset:effect/0618.soaked/modifier/remove
function asset:effect/0618.soaked/modifier/add
35 changes: 35 additions & 0 deletions Asset/data/asset/functions/effect/0618.soaked/register.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#> asset:effect/0618.soaked/register
#
# Effectのデータを指定
#
# @within function asset:effect/0618.soaked/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 618
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"ずぶ濡れ"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value '{"text":"水耐性が大きく減少し、移動が遅くなる"}'
# 効果時間 (int) (default = API || error)
data modify storage asset:effect Duration set value 200
# スタック (int) (default = API || 1)
# data modify storage asset:effect Stack set value
# 効果時間の操作方法 (default = API || "replace")
data modify storage asset:effect DurationOperation set value "forceReplace"
# スタックの操作方法 (default = API || "replace")
data modify storage asset:effect StackOperation set value "add"
# 最大効果時間 (int) (default = 2147483647)
data modify storage asset:effect MaxDuration set value 200
# 最大スタック (int) (default = 2147483647)
data modify storage asset:effect MaxStack set value 2
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value true
# 死亡時のエフェクトの処理 (default = "remove")
# data modify storage asset:effect ProcessOnDied set value
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 2

# フィールド
# data modify storage asset:effect Field set value {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0618.soaked/_/remove

function asset:effect/0618.soaked/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0618.soaked/tick/
#
# Effectのtick処理
#
# @within function asset:effect/0618.soaked/_/tick

# 演出
particle fishing ~ ~1 ~ 0.25 0.5 0.25 0.05 1 normal
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/end.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"asset:effect/0608.sinking/_/end",
"asset:effect/0612.infringement/_/end",
"asset:effect/0613.white_curse/_/end",
"asset:effect/0124.darkness/_/end"
"asset:effect/0124.darkness/_/end",
"asset:effect/0618.soaked/_/end"
]
}
5 changes: 3 additions & 2 deletions Asset/data/asset/tags/functions/effect/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"asset:effect/0607.sedation/_/given",
"asset:effect/0608.sinking/_/given",
"asset:effect/0612.infringement/_/given",
"asset:effect/0613.white_curse/_/given"
"asset:effect/0613.white_curse/_/given",
"asset:effect/0618.soaked/_/given"
]
}
}
5 changes: 3 additions & 2 deletions Asset/data/asset/tags/functions/effect/re-given.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"asset:effect/0607.sedation/_/re-given",
"asset:effect/0608.sinking/_/re-given",
"asset:effect/0612.infringement/_/re-given",
"asset:effect/0613.white_curse/_/re-given"
"asset:effect/0613.white_curse/_/re-given",
"asset:effect/0618.soaked/_/re-given"
]
}
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/register.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"asset:effect/0608.sinking/_/register",
"asset:effect/0612.infringement/_/register",
"asset:effect/0613.white_curse/_/register",
"asset:effect/0124.darkness/_/register"
"asset:effect/0124.darkness/_/register",
"asset:effect/0618.soaked/_/register"
]
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/remove.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"asset:effect/0608.sinking/_/remove",
"asset:effect/0612.infringement/_/remove",
"asset:effect/0613.white_curse/_/remove",
"asset:effect/0124.darkness/_/remove"
"asset:effect/0124.darkness/_/remove",
"asset:effect/0618.soaked/_/remove"
]
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/tick.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"asset:effect/0608.sinking/_/tick",
"asset:effect/0612.infringement/_/tick",
"asset:effect/0613.white_curse/_/tick",
"asset:effect/0124.darkness/_/tick"
"asset:effect/0124.darkness/_/tick",
"asset:effect/0618.soaked/_/tick"
]
}

0 comments on commit 47a0e95

Please sign in to comment.