Skip to content

Commit

Permalink
⚖️ [Artifact 562-565] ハートランドのフルセット効果を EffectAsset に移行
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou committed Mar 6, 2025
1 parent a5f38ec commit ab6effc
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:artifact/0563.heartland/trigger/0.load
#
# 神器に利用するスコアボード等の初期化処理
#
# @within tag/function asset:artifact/load

#> 定義類はここに
# @within function asset:artifact/0563.heartland/trigger/**
scoreboard objectives add FN.LatestFullEffect dummy
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:artifact/0563.heartland/trigger/fullset/tick/foreach
#
#
#
# @within function asset:artifact/0563.heartland/trigger/fullset/tick/main

data modify storage api: Argument.ID set value 266
function api:entity/mob/effect/get/from_id
execute if data storage api: Return.Effect run return fail

data modify storage api: Argument.ID set value 266
function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
#
# @within function asset:artifact/0563.heartland/trigger/fullset/tick/trigger

# 周囲5mのプレイヤーに既に自然回復エフェクトが付与されているかどうかを検知し、自然回復エフェクトを付与
execute as @a[distance=..5] if predicate asset:artifact/0563.heartland/regene_check run effect give @a[distance=..5] regeneration 15 1 false
#> private
# @private
#declare score_holder $FN.Temp

# 1秒に1回
execute store result score $FN.Temp Temporary run data get storage global Time
scoreboard players operation $FN.Temp Temporary -= @s FN.LatestFullEffect
execute if score $FN.Temp Temporary matches 20.. as @a[distance=..5] run function asset:artifact/0563.heartland/trigger/fullset/tick/foreach
execute if score $FN.Temp Temporary matches 20.. store result score @s FN.LatestFullEffect run data get storage global Time
scoreboard players reset $FN.Temp Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#
# @within tag/function asset:artifact/tick

execute if entity @s[tag=FN.Fullset] run function asset:artifact/0563.heartland/trigger/fullset/tick/main
execute if entity @s[tag=FN.Fullset] run function asset:artifact/0563.heartland/trigger/fullset/tick/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0266.grace_of_the_earth/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:266} run function asset:effect/0266.grace_of_the_earth/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:effect/0266.grace_of_the_earth/register
#
# Effectのデータを指定
#
# @within function asset:effect/0266.grace_of_the_earth/_/register

# 継承 (int)
data modify storage asset:effect Extends append value 84
function asset:effect/extends
# ID (int)
data modify storage asset:effect ID set value 266
# 名前 (TextComponentString)
data modify storage asset:effect Name set value "大地の恵み"
# 効果時間 (int) (default = API || error)
data modify storage asset:effect Duration set value 300
# スタック (int) (default = API || 1)
data modify storage asset:effect Stack set value 1

# フィールド
data modify storage asset:effect Field.HealPer set value 0.02
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/artifact/load.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/0563.heartland/trigger/0.load",
"asset:artifact/1088.purifying_hydrangea/trigger/0.load",
"asset:artifact/1081.wandering_piece_of_dream/trigger/0.load",
"asset:artifact/1029.conviction_bone/trigger/0.load",
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/0266.grace_of_the_earth/_/register",
"asset:effect/0134.regeneration/_/register",
"asset:effect/0084.regeneration/_/register",
"asset:effect/0034.regeneration/_/register",
Expand Down

0 comments on commit ab6effc

Please sign in to comment.