Skip to content

Commit

Permalink
⚖ [Artifact 190-192] アモール / ホルス / ファルシオスの杖の効果の調整 (#847)
Browse files Browse the repository at this point in the history
Co-authored-by: はいいろ <[email protected]>
  • Loading branch information
Lapis-LJA and haiiro2gou authored Mar 6, 2025
1 parent ab6effc commit ea90a73
Show file tree
Hide file tree
Showing 28 changed files with 226 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"アモールの杖","color":"aqua"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"周囲のプレイヤーの体力を少しだけ回復する"}']
data modify storage asset:artifact Lore set value ['{"text":"自身と周囲8mのプレイヤーの体力を7.0回復し"}','{"text":"その後10秒間かけて15.0回復する"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value
# data modify storage asset:artifact ConsumeItem.Count set value
Expand All @@ -41,14 +41,14 @@
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 22
data modify storage asset:artifact MPCost set value 40
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
# data modify storage asset:artifact LocalCooldown set value 160
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
data modify storage asset:artifact TypeCooldown.Type set value "heal"
data modify storage asset:artifact TypeCooldown.Duration set value 76
data modify storage asset:artifact TypeCooldown.Duration set value 80
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@
execute positioned ~ ~4 ~ run function asset:artifact/0190.amor_wand/trigger/vfx/

# 回復
data modify storage api: Argument.Heal set value 8.4
data modify storage api: Argument.Heal set value 7.0f
function api:heal/modifier
execute as @a[distance=..8] run function api:heal/

# リセット
function api:heal/reset

# 再生
data modify storage api: Argument.ID set value 301
data modify storage api: Argument.Stack set value 1
data modify storage api: Argument.FieldOverride.Heal set value 1.5
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
execute as @a[distance=..8] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"ホルスの杖","color":"gold"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"周囲のプレイヤーの体力をそこそこ回復する"}']
data modify storage asset:artifact Lore set value ['{"text":"自身と周囲8mのプレイヤーの体力を17.0回復し"}','{"text":"その後10秒間かけて24.0回復する"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value
# data modify storage asset:artifact ConsumeItem.Count set value
Expand All @@ -41,7 +41,7 @@
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 72
data modify storage asset:artifact MPCost set value 65
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
execute positioned ~ ~4 ~ run function asset:artifact/0191.horus_wand/trigger/vfx/

# 回復
data modify storage api: Argument.Heal set value 15
data modify storage api: Argument.Heal set value 17.0f
function api:heal/modifier
execute as @a[distance=..8] run function api:heal/
effect give @a[distance=..8] regeneration 15 2 true

# リセット
function api:heal/reset

# 再生
data modify storage api: Argument.ID set value 301
data modify storage api: Argument.Stack set value 2
data modify storage api: Argument.FieldOverride.Heal set value 2.4
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
execute as @a[distance=..8] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"ファルシオスの杖","color":"white","bold":true}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"周囲のプレイヤーの体力を大きく回復する"}']
data modify storage asset:artifact Lore set value ['{"text":"自身と周囲8mのプレイヤーの体力を28.0回復し"}','{"text":"その後10秒間かけて30.0回復する"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value
# data modify storage asset:artifact ConsumeItem.Count set value
Expand All @@ -41,7 +41,7 @@
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 82
data modify storage asset:artifact MPCost set value 80
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
execute positioned ~ ~4 ~ run function asset:artifact/0192.falcios_wand/trigger/vfx/

# 回復
data modify storage api: Argument.Heal set value 26
data modify storage api: Argument.Heal set value 28.0f
function api:heal/modifier
execute as @a[distance=..8] run function api:heal/
effect give @a[distance=..8] regeneration 15 2 true

# リセット
function api:heal/reset

# 再生
data modify storage api: Argument.ID set value 301
data modify storage api: Argument.Stack set value 3
data modify storage api: Argument.FieldOverride.Heal set value 3.0
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
execute as @a[distance=..8] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0301.soul_light/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

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

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

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

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

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

execute if data storage asset:context {id:301} run function asset:effect/0301.soul_light/tick/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0301.soul_light/end/
#
# Effectの効果が切れた時の処理
#
# @within function asset:effect/0301.soul_light/_/end

# リセット
function asset:effect/0301.soul_light/reset/
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:effect/0301.soul_light/given/
#
# Effectが付与された時の処理
#
# @within function asset:effect/0301.soul_light/_/given

# this.Healをスコアへ移して保存(e1)
execute store result score @s 301.LatestHeal run data get storage asset:context this.Heal 10

# this.UserIDをスコアへ移して保存
execute store result score @s 301.LatestUserID run data get storage asset:context this.UserID
11 changes: 11 additions & 0 deletions Asset/data/asset/functions/effect/0301.soul_light/load.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:effect/0301.soul_light/load
#
# Effectに利用するスコアボード等の初期化処理
# ※ExtendsSafeを有効化した状態での使用は非推奨です
#
# @within tag/function asset:effect/load

#> 定義類はここに
# @within function asset:effect/0301.soul_light/**
scoreboard objectives add 301.LatestHeal dummy
scoreboard objectives add 301.LatestUserID dummy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:effect/0301.soul_light/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0301.soul_light/_/re-given

#> Private
# @private
#declare score_holder $Heal

# 301.LatestHealとthis.Healを比較し、大きい方をthis.Healに入れる
execute store result score $Heal Temporary run data get storage asset:context this.Heal 10

# $Healの方が大きいならそのまま
# LatestHealの方が大きいなら、スコアのデータをフィールドへ代入
execute if score $Heal Temporary < @s 301.LatestHeal store result storage asset:context this.Heal float 0.1 run scoreboard players get @s 301.LatestHeal
execute if score $Heal Temporary < @s 301.LatestHeal store result storage asset:context this.UserID float 0.1 run scoreboard players get @s 301.LatestUserID

# リセット
scoreboard players reset $Heal Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#> asset:effect/0301.soul_light/register
#
# Effectのデータを指定
#
# @within function asset:effect/0301.soul_light/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 301
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"命魂の光","color":"aqua"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"継続的に体力を回復する","color":"white"}']
# 効果時間 (int) (default = API || error)
data modify storage asset:effect Duration set value 220
# スタック (int) (default = API || 1)
# data modify storage asset:effect Stack set value
# 効果時間の操作方法 (default = API || "replace")
# data modify storage asset:effect DurationOperation set value
# スタックの操作方法 (default = API || "replace")
# data modify storage asset:effect StackOperation set value
# 最大効果時間 (int) (default = 2147483647)
data modify storage asset:effect MaxDuration set value 220
# 最大スタック (int) (default = 2147483647)
data modify storage asset:effect MaxStack set value 3
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value false
# 死亡時のエフェクトの処理 (default = "remove")
# data modify storage asset:effect ProcessOnDied set value
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 3
# エフェクトをUIに表示するか (boolean) (default = true)
# data modify storage asset:effect Visible set value
# エフェクトのスタックををUIに表示するか (boolean) (default = true)
# data modify storage asset:effect StackVisible set value

# フィールド
data modify storage asset:effect Field.Tick set value 20
data modify storage asset:effect Field.Heal set value 1
data modify storage asset:effect Field.UserID set value -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0301.soul_light/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0301.soul_light/_/remove

# リセット
function asset:effect/0301.soul_light/reset/
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:effect/0301.soul_light/reset/
#
# 共通リセット処理
#
# @within function
# asset:effect/0301.soul_light/end/
# asset:effect/0301.soul_light/remove/

# スコアをリセット
scoreboard players reset @s 301.LatestHeal
scoreboard players reset @s 301.LatestUserID
11 changes: 11 additions & 0 deletions Asset/data/asset/functions/effect/0301.soul_light/tick/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:effect/0301.soul_light/tick/
#
# Effectのtick処理
#
# @within function asset:effect/0301.soul_light/_/tick

# デクリメント
execute store result storage asset:context this.Tick int 0.9999999999 run data get storage asset:context this.Tick 1
# 1 秒おきに回復
execute if data storage asset:context this{Tick:0} run function asset:effect/0301.soul_light/tick/heal
execute if data storage asset:context this{Tick:0} run data modify storage asset:context this.Tick set value 20
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#> asset:effect/0301.soul_light/tick/heal
#
#
#
# @within function asset:effect/0301.soul_light/tick/

#> Private
# @private
#declare score_holder $UserID

# 回復者のUserIDを取得
execute store result score $UserID Temporary run data get storage asset:context this.UserID

# 回復
data modify storage api: Argument.Heal set from storage asset:context this.Heal
execute as @a if score @s UserID = $UserID Temporary run function api:heal/modifier
function api:heal/
data modify storage api: Argument.ActivateTrigger set value false
function api:heal/reset

# リセット
scoreboard players reset $UserID Temporary
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/end.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/_/end",
"asset:effect/0034.regeneration/_/end",
"asset:effect/0296.soul_disconnection/_/end",
"asset:effect/0031.slow_falling/_/end",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/given.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/_/given",
"asset:effect/0296.soul_disconnection/_/given",
"asset:effect/0618.soaked/_/given",
"asset:effect/0067.slowness/_/given",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/load.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/load",
"asset:effect/0605.aurora_corrosion/load",
"asset:effect/0601.conviction/load",
"asset:effect/0210.fading_speed/load",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/re-given.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/_/re-given",
"asset:effect/0253.purifying_indigo/_/re-given",
"asset:effect/0296.soul_disconnection/_/re-given",
"asset:effect/0618.soaked/_/re-given",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/register.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/_/register",
"asset:effect/0266.grace_of_the_earth/_/register",
"asset:effect/0134.regeneration/_/register",
"asset:effect/0084.regeneration/_/register",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/remove.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/_/remove",
"asset:effect/0034.regeneration/_/remove",
"asset:effect/0296.soul_disconnection/_/remove",
"asset:effect/0031.slow_falling/_/remove",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/tick.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0301.soul_light/_/tick",
"asset:effect/0034.regeneration/_/tick",
"asset:effect/0620.ongaeshi/_/tick",
"asset:effect/0031.slow_falling/_/tick",
Expand Down

0 comments on commit ea90a73

Please sign in to comment.